Amazon CodeCatalyst

2023/11/15 - Amazon CodeCatalyst - 5 new1 updated api methods

Changes  This release adds functionality for retrieving information about workflows and workflow runs and starting workflow runs in Amazon CodeCatalyst.

GetWorkflow (new) Link ¶

Returns information about a workflow.

See also: AWS API Documentation

Request Syntax

client.get_workflow(
    spaceName='string',
    id='string',
    projectName='string'
)
type spaceName:

string

param spaceName:

[REQUIRED]

The name of the space.

type id:

string

param id:

[REQUIRED]

The ID of the workflow. To rerieve a list of workflow IDs, use ListWorkflows.

type projectName:

string

param projectName:

[REQUIRED]

The name of the project in the space.

rtype:

dict

returns:

Response Syntax

{
    'spaceName': 'string',
    'projectName': 'string',
    'id': 'string',
    'name': 'string',
    'sourceRepositoryName': 'string',
    'sourceBranchName': 'string',
    'definition': {
        'path': 'string'
    },
    'createdTime': datetime(2015, 1, 1),
    'lastUpdatedTime': datetime(2015, 1, 1),
    'runMode': 'QUEUED'|'PARALLEL'|'SUPERSEDED',
    'status': 'INVALID'|'ACTIVE'
}

Response Structure

  • (dict) --

    • spaceName (string) --

      The name of the space.

    • projectName (string) --

      The name of the project in the space.

    • id (string) --

      The ID of the workflow.

    • name (string) --

      The name of the workflow.

    • sourceRepositoryName (string) --

      The name of the source repository where the workflow YAML is stored.

    • sourceBranchName (string) --

      The name of the branch that contains the workflow YAML.

    • definition (dict) --

      Information about the workflow definition file for the workflow.

      • path (string) --

        The path to the workflow definition file stored in the source repository for the project, including the file name.

    • createdTime (datetime) --

      The date and time the workflow was created, in coordinated universal time (UTC) timestamp format as specified in RFC 3339

    • lastUpdatedTime (datetime) --

      The date and time the workflow was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339

    • runMode (string) --

      The behavior to use when multiple workflows occur at the same time. For more information, see https://docs.aws.amazon.com/codecatalyst/latest/userguide/workflows-configure-runs.html in the Amazon CodeCatalyst User Guide.

    • status (string) --

      The status of the workflow.

StartWorkflowRun (new) Link ¶

Begins a run of a specified workflow.

See also: AWS API Documentation

Request Syntax

client.start_workflow_run(
    spaceName='string',
    projectName='string',
    workflowId='string',
    clientToken='string'
)
type spaceName:

string

param spaceName:

[REQUIRED]

The name of the space.

type projectName:

string

param projectName:

[REQUIRED]

The name of the project in the space.

type workflowId:

string

param workflowId:

[REQUIRED]

The system-generated unique ID of the workflow. To retrieve a list of workflow IDs, use ListWorkflows.

type clientToken:

string

param clientToken:

A user-specified idempotency token. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries return the result from the original successful request and have no additional effect.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'spaceName': 'string',
    'projectName': 'string',
    'id': 'string',
    'workflowId': 'string'
}

Response Structure

  • (dict) --

    • spaceName (string) --

      The name of the space.

    • projectName (string) --

      The name of the project in the space.

    • id (string) --

      The system-generated unique ID of the workflow run.

    • workflowId (string) --

      The system-generated unique ID of the workflow.

ListWorkflowRuns (new) Link ¶

Retrieves a list of workflow runs of a specified workflow.

See also: AWS API Documentation

Request Syntax

client.list_workflow_runs(
    spaceName='string',
    workflowId='string',
    projectName='string',
    nextToken='string',
    maxResults=123,
    sortBy=[
        {}
        ,
    ]
)
type spaceName:

string

param spaceName:

[REQUIRED]

The name of the space.

type workflowId:

string

param workflowId:

The ID of the workflow. To retrieve a list of workflow IDs, use ListWorkflows.

type projectName:

string

param projectName:

[REQUIRED]

The name of the project in the space.

type nextToken:

string

param nextToken:

A token returned from a call to this API to indicate the next batch of results to return, if any.

type maxResults:

integer

param maxResults:

The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.

type sortBy:

list

param sortBy:

Information used to sort the items in the returned list.

  • (dict) --

    Information used to sort workflow runs in the returned list.

rtype:

dict

returns:

Response Syntax

{
    'nextToken': 'string',
    'items': [
        {
            'id': 'string',
            'workflowId': 'string',
            'workflowName': 'string',
            'status': 'SUCCEEDED'|'FAILED'|'STOPPED'|'SUPERSEDED'|'CANCELLED'|'NOT_RUN'|'VALIDATING'|'PROVISIONING'|'IN_PROGRESS'|'STOPPING'|'ABANDONED',
            'statusReasons': [
                {},
            ],
            'startTime': datetime(2015, 1, 1),
            'endTime': datetime(2015, 1, 1),
            'lastUpdatedTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      A token returned from a call to this API to indicate the next batch of results to return, if any.

    • items (list) --

      Information about the runs of a workflow.

      • (dict) --

        Information about a workflow run.

        • id (string) --

          The system-generated unique ID of the workflow run.

        • workflowId (string) --

          The system-generated unique ID of the workflow.

        • workflowName (string) --

          The name of the workflow.

        • status (string) --

          The status of the workflow run.

        • statusReasons (list) --

          The reasons for the workflow run status.

          • (dict) --

            Information about the status of a workflow run.

        • startTime (datetime) --

          The date and time the workflow run began, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.

        • endTime (datetime) --

          The date and time the workflow run ended, in coordinated universal time (UTC) timestamp format as specified in RFC 3339

        • lastUpdatedTime (datetime) --

          The date and time the workflow was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339

ListWorkflows (new) Link ¶

Retrieves a list of workflows in a specified project.

See also: AWS API Documentation

Request Syntax

client.list_workflows(
    spaceName='string',
    projectName='string',
    nextToken='string',
    maxResults=123,
    sortBy=[
        {}
        ,
    ]
)
type spaceName:

string

param spaceName:

[REQUIRED]

The name of the space.

type projectName:

string

param projectName:

[REQUIRED]

The name of the project in the space.

type nextToken:

string

param nextToken:

A token returned from a call to this API to indicate the next batch of results to return, if any.

type maxResults:

integer

param maxResults:

The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.

type sortBy:

list

param sortBy:

Information used to sort the items in the returned list.

  • (dict) --

    Information used to sort workflows in the returned list.

rtype:

dict

returns:

Response Syntax

{
    'nextToken': 'string',
    'items': [
        {
            'id': 'string',
            'name': 'string',
            'sourceRepositoryName': 'string',
            'sourceBranchName': 'string',
            'definition': {
                'path': 'string'
            },
            'createdTime': datetime(2015, 1, 1),
            'lastUpdatedTime': datetime(2015, 1, 1),
            'runMode': 'QUEUED'|'PARALLEL'|'SUPERSEDED',
            'status': 'INVALID'|'ACTIVE'
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      A token returned from a call to this API to indicate the next batch of results to return, if any.

    • items (list) --

      Information about the workflows in a project.

      • (dict) --

        Information about a workflow.

        • id (string) --

          The system-generated unique ID of a workflow.

        • name (string) --

          The name of the workflow.

        • sourceRepositoryName (string) --

          The name of the source repository where the workflow definition file is stored.

        • sourceBranchName (string) --

          The name of the branch of the source repository where the workflow definition file is stored.

        • definition (dict) --

          Information about the workflow definition file.

          • path (string) --

            The path to the workflow definition file stored in the source repository for the project, including the file name.

        • createdTime (datetime) --

          The date and time the workflow was created, in coordinated universal time (UTC) timestamp format as specified in RFC 3339

        • lastUpdatedTime (datetime) --

          The date and time the workflow was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339

        • runMode (string) --

          The run mode of the workflow.

        • status (string) --

          The status of the workflow.

GetWorkflowRun (new) Link ¶

Returns information about a specified run of a workflow.

See also: AWS API Documentation

Request Syntax

client.get_workflow_run(
    spaceName='string',
    id='string',
    projectName='string'
)
type spaceName:

string

param spaceName:

[REQUIRED]

The name of the space.

type id:

string

param id:

[REQUIRED]

The ID of the workflow run. To retrieve a list of workflow run IDs, use ListWorkflowRuns.

type projectName:

string

param projectName:

[REQUIRED]

The name of the project in the space.

rtype:

dict

returns:

Response Syntax

{
    'spaceName': 'string',
    'projectName': 'string',
    'id': 'string',
    'workflowId': 'string',
    'status': 'SUCCEEDED'|'FAILED'|'STOPPED'|'SUPERSEDED'|'CANCELLED'|'NOT_RUN'|'VALIDATING'|'PROVISIONING'|'IN_PROGRESS'|'STOPPING'|'ABANDONED',
    'statusReasons': [
        {},
    ],
    'startTime': datetime(2015, 1, 1),
    'endTime': datetime(2015, 1, 1),
    'lastUpdatedTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • spaceName (string) --

      The name of the space.

    • projectName (string) --

      The name of the project in the space.

    • id (string) --

      The ID of the workflow run.

    • workflowId (string) --

      The ID of the workflow.

    • status (string) --

      The status of the workflow run.

    • statusReasons (list) --

      Information about the reasons for the status of the workflow run.

      • (dict) --

        Information about the status of a workflow run.

    • startTime (datetime) --

      The date and time the workflow run began, in coordinated universal time (UTC) timestamp format as specified in RFC 3339

    • endTime (datetime) --

      The date and time the workflow run ended, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.

    • lastUpdatedTime (datetime) --

      The date and time the workflow run status was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339

ListProjects (updated) Link ¶
Changes (request)
{'filters': {'comparisonOperator': {'BEGINS_WITH'}, 'key': {'name'}}}

Retrieves a list of projects.

See also: AWS API Documentation

Request Syntax

client.list_projects(
    spaceName='string',
    nextToken='string',
    maxResults=123,
    filters=[
        {
            'key': 'hasAccessTo'|'name',
            'values': [
                'string',
            ],
            'comparisonOperator': 'EQ'|'GT'|'GE'|'LT'|'LE'|'BEGINS_WITH'
        },
    ]
)
type spaceName:

string

param spaceName:

[REQUIRED]

The name of the space.

type nextToken:

string

param nextToken:

A token returned from a call to this API to indicate the next batch of results to return, if any.

type maxResults:

integer

param maxResults:

The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.

type filters:

list

param filters:

Information about filters to apply to narrow the results returned in the list.

  • (dict) --

    nformation about the filter used to narrow the results returned in a list of projects.

    • key (string) -- [REQUIRED]

      A key that can be used to sort results.

    • values (list) -- [REQUIRED]

      The values of the key.

      • (string) --

    • comparisonOperator (string) --

      The operator used to compare the fields.

rtype:

dict

returns:

Response Syntax

{
    'nextToken': 'string',
    'items': [
        {
            'name': 'string',
            'displayName': 'string',
            'description': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      A token returned from a call to this API to indicate the next batch of results to return, if any.

    • items (list) --

      Information about the projects.

      • (dict) --

        Information about a project.

        • name (string) --

          The name of the project in the space.

        • displayName (string) --

          The friendly name displayed to users of the project in Amazon CodeCatalyst.

        • description (string) --

          The description of the project.