AWS Amplify

2024/10/15 - AWS Amplify - 6 updated api methods

Changes  Added sourceUrlType field to StartDeployment request

DeleteJob (updated) Link ¶
Changes (response)
{'jobSummary': {'sourceUrl': 'string', 'sourceUrlType': 'ZIP | BUCKET_PREFIX'}}

Deletes a job for a branch of an Amplify app.

See also: AWS API Documentation

Request Syntax

client.delete_job(
    appId='string',
    branchName='string',
    jobId='string'
)
type appId

string

param appId

[REQUIRED]

The unique ID for an Amplify app.

type branchName

string

param branchName

[REQUIRED]

The name of the branch to use for the job.

type jobId

string

param jobId

[REQUIRED]

The unique ID for the job.

rtype

dict

returns

Response Syntax

{
    'jobSummary': {
        'jobArn': 'string',
        'jobId': 'string',
        'commitId': 'string',
        'commitMessage': 'string',
        'commitTime': datetime(2015, 1, 1),
        'startTime': datetime(2015, 1, 1),
        'status': 'PENDING'|'PROVISIONING'|'RUNNING'|'FAILED'|'SUCCEED'|'CANCELLING'|'CANCELLED',
        'endTime': datetime(2015, 1, 1),
        'jobType': 'RELEASE'|'RETRY'|'MANUAL'|'WEB_HOOK',
        'sourceUrl': 'string',
        'sourceUrlType': 'ZIP'|'BUCKET_PREFIX'
    }
}

Response Structure

  • (dict) --

    The result structure for the delete job request.

    • jobSummary (dict) --

      Describes the summary for an execution job for an Amplify app.

      • jobArn (string) --

        The Amazon Resource Name (ARN) for the job.

      • jobId (string) --

        The unique ID for the job.

      • commitId (string) --

        The commit ID from a third-party repository provider for the job.

      • commitMessage (string) --

        The commit message from a third-party repository provider for the job.

      • commitTime (datetime) --

        The commit date and time for the job.

      • startTime (datetime) --

        The start date and time for the job.

      • status (string) --

        The current status for the job.

      • endTime (datetime) --

        The end date and time for the job.

      • jobType (string) --

        The type for the job. If the value is RELEASE , the job was manually released from its source by using the StartJob API. This value is available only for apps that are connected to a repository.

        If the value is RETRY , the job was manually retried using the StartJob API. If the value is WEB_HOOK , the job was automatically triggered by webhooks. If the value is MANUAL , the job is for a manually deployed app. Manually deployed apps are not connected to a Git repository.

      • sourceUrl (string) --

        The source URL for the files to deploy. The source URL can be either an HTTP GET URL that is publicly accessible and downloads a single .zip file, or an Amazon S3 bucket and prefix.

      • sourceUrlType (string) --

        The type of source specified by the sourceURL . If the value is ZIP , the source is a .zip file. If the value is BUCKET_PREFIX , the source is an Amazon S3 bucket and prefix. If no value is specified, the default is ZIP .

GetJob (updated) Link ¶
Changes (response)
{'job': {'summary': {'sourceUrl': 'string',
                     'sourceUrlType': 'ZIP | BUCKET_PREFIX'}}}

Returns a job for a branch of an Amplify app.

See also: AWS API Documentation

Request Syntax

client.get_job(
    appId='string',
    branchName='string',
    jobId='string'
)
type appId

string

param appId

[REQUIRED]

The unique ID for an Amplify app.

type branchName

string

param branchName

[REQUIRED]

The name of the branch to use for the job.

type jobId

string

param jobId

[REQUIRED]

The unique ID for the job.

rtype

dict

returns

Response Syntax

{
    'job': {
        'summary': {
            'jobArn': 'string',
            'jobId': 'string',
            'commitId': 'string',
            'commitMessage': 'string',
            'commitTime': datetime(2015, 1, 1),
            'startTime': datetime(2015, 1, 1),
            'status': 'PENDING'|'PROVISIONING'|'RUNNING'|'FAILED'|'SUCCEED'|'CANCELLING'|'CANCELLED',
            'endTime': datetime(2015, 1, 1),
            'jobType': 'RELEASE'|'RETRY'|'MANUAL'|'WEB_HOOK',
            'sourceUrl': 'string',
            'sourceUrlType': 'ZIP'|'BUCKET_PREFIX'
        },
        'steps': [
            {
                'stepName': 'string',
                'startTime': datetime(2015, 1, 1),
                'status': 'PENDING'|'PROVISIONING'|'RUNNING'|'FAILED'|'SUCCEED'|'CANCELLING'|'CANCELLED',
                'endTime': datetime(2015, 1, 1),
                'logUrl': 'string',
                'artifactsUrl': 'string',
                'testArtifactsUrl': 'string',
                'testConfigUrl': 'string',
                'screenshots': {
                    'string': 'string'
                },
                'statusReason': 'string',
                'context': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • job (dict) --

      Describes an execution job for an Amplify app.

      • summary (dict) --

        Describes the summary for an execution job for an Amplify app.

        • jobArn (string) --

          The Amazon Resource Name (ARN) for the job.

        • jobId (string) --

          The unique ID for the job.

        • commitId (string) --

          The commit ID from a third-party repository provider for the job.

        • commitMessage (string) --

          The commit message from a third-party repository provider for the job.

        • commitTime (datetime) --

          The commit date and time for the job.

        • startTime (datetime) --

          The start date and time for the job.

        • status (string) --

          The current status for the job.

        • endTime (datetime) --

          The end date and time for the job.

        • jobType (string) --

          The type for the job. If the value is RELEASE , the job was manually released from its source by using the StartJob API. This value is available only for apps that are connected to a repository.

          If the value is RETRY , the job was manually retried using the StartJob API. If the value is WEB_HOOK , the job was automatically triggered by webhooks. If the value is MANUAL , the job is for a manually deployed app. Manually deployed apps are not connected to a Git repository.

        • sourceUrl (string) --

          The source URL for the files to deploy. The source URL can be either an HTTP GET URL that is publicly accessible and downloads a single .zip file, or an Amazon S3 bucket and prefix.

        • sourceUrlType (string) --

          The type of source specified by the sourceURL . If the value is ZIP , the source is a .zip file. If the value is BUCKET_PREFIX , the source is an Amazon S3 bucket and prefix. If no value is specified, the default is ZIP .

      • steps (list) --

        The execution steps for an execution job, for an Amplify app.

        • (dict) --

          Describes an execution step, for an execution job, for an Amplify app.

          • stepName (string) --

            The name of the execution step.

          • startTime (datetime) --

            The start date and time of the execution step.

          • status (string) --

            The status of the execution step.

          • endTime (datetime) --

            The end date and time of the execution step.

          • logUrl (string) --

            The URL to the logs for the execution step.

          • artifactsUrl (string) --

            The URL to the artifact for the execution step.

          • testArtifactsUrl (string) --

            The URL to the test artifact for the execution step.

          • testConfigUrl (string) --

            The URL to the test configuration for the execution step.

          • screenshots (dict) --

            The list of screenshot URLs for the execution step, if relevant.

            • (string) --

              • (string) --

          • statusReason (string) --

            The reason for the current step status.

          • context (string) --

            The context for the current step. Includes a build image if the step is build.

ListJobs (updated) Link ¶
Changes (response)
{'jobSummaries': {'sourceUrl': 'string',
                  'sourceUrlType': 'ZIP | BUCKET_PREFIX'}}

Lists the jobs for a branch of an Amplify app.

See also: AWS API Documentation

Request Syntax

client.list_jobs(
    appId='string',
    branchName='string',
    nextToken='string',
    maxResults=123
)
type appId

string

param appId

[REQUIRED]

The unique ID for an Amplify app.

type branchName

string

param branchName

[REQUIRED]

The name of the branch to use for the request.

type nextToken

string

param nextToken

A pagination token. Set to null to start listing steps from the start. If a non-null pagination token is returned in a result, pass its value in here to list more steps.

type maxResults

integer

param maxResults

The maximum number of records to list in a single response.

rtype

dict

returns

Response Syntax

{
    'jobSummaries': [
        {
            'jobArn': 'string',
            'jobId': 'string',
            'commitId': 'string',
            'commitMessage': 'string',
            'commitTime': datetime(2015, 1, 1),
            'startTime': datetime(2015, 1, 1),
            'status': 'PENDING'|'PROVISIONING'|'RUNNING'|'FAILED'|'SUCCEED'|'CANCELLING'|'CANCELLED',
            'endTime': datetime(2015, 1, 1),
            'jobType': 'RELEASE'|'RETRY'|'MANUAL'|'WEB_HOOK',
            'sourceUrl': 'string',
            'sourceUrlType': 'ZIP'|'BUCKET_PREFIX'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    The maximum number of records to list in a single response.

    • jobSummaries (list) --

      The result structure for the list job result request.

      • (dict) --

        Describes the summary for an execution job for an Amplify app.

        • jobArn (string) --

          The Amazon Resource Name (ARN) for the job.

        • jobId (string) --

          The unique ID for the job.

        • commitId (string) --

          The commit ID from a third-party repository provider for the job.

        • commitMessage (string) --

          The commit message from a third-party repository provider for the job.

        • commitTime (datetime) --

          The commit date and time for the job.

        • startTime (datetime) --

          The start date and time for the job.

        • status (string) --

          The current status for the job.

        • endTime (datetime) --

          The end date and time for the job.

        • jobType (string) --

          The type for the job. If the value is RELEASE , the job was manually released from its source by using the StartJob API. This value is available only for apps that are connected to a repository.

          If the value is RETRY , the job was manually retried using the StartJob API. If the value is WEB_HOOK , the job was automatically triggered by webhooks. If the value is MANUAL , the job is for a manually deployed app. Manually deployed apps are not connected to a Git repository.

        • sourceUrl (string) --

          The source URL for the files to deploy. The source URL can be either an HTTP GET URL that is publicly accessible and downloads a single .zip file, or an Amazon S3 bucket and prefix.

        • sourceUrlType (string) --

          The type of source specified by the sourceURL . If the value is ZIP , the source is a .zip file. If the value is BUCKET_PREFIX , the source is an Amazon S3 bucket and prefix. If no value is specified, the default is ZIP .

    • nextToken (string) --

      A pagination token. If non-null the pagination token is returned in a result. Pass its value in another request to retrieve more entries.

StartDeployment (updated) Link ¶
Changes (request, response)
Request
{'sourceUrlType': 'ZIP | BUCKET_PREFIX'}
Response
{'jobSummary': {'sourceUrl': 'string', 'sourceUrlType': 'ZIP | BUCKET_PREFIX'}}

Starts a deployment for a manually deployed app. Manually deployed apps are not connected to a Git repository.

The maximum duration between the CreateDeployment call and the StartDeployment call cannot exceed 8 hours. If the duration exceeds 8 hours, the StartDeployment call and the associated Job will fail.

See also: AWS API Documentation

Request Syntax

client.start_deployment(
    appId='string',
    branchName='string',
    jobId='string',
    sourceUrl='string',
    sourceUrlType='ZIP'|'BUCKET_PREFIX'
)
type appId

string

param appId

[REQUIRED]

The unique ID for an Amplify app.

type branchName

string

param branchName

[REQUIRED]

The name of the branch to use for the deployment job.

type jobId

string

param jobId

The job ID for this deployment that is generated by the CreateDeployment request.

type sourceUrl

string

param sourceUrl

The source URL for the deployment that is used when calling StartDeployment without CreateDeployment . The source URL can be either an HTTP GET URL that is publicly accessible and downloads a single .zip file, or an Amazon S3 bucket and prefix.

type sourceUrlType

string

param sourceUrlType

The type of source specified by the sourceURL . If the value is ZIP , the source is a .zip file. If the value is BUCKET_PREFIX , the source is an Amazon S3 bucket and prefix. If no value is specified, the default is ZIP .

rtype

dict

returns

Response Syntax

{
    'jobSummary': {
        'jobArn': 'string',
        'jobId': 'string',
        'commitId': 'string',
        'commitMessage': 'string',
        'commitTime': datetime(2015, 1, 1),
        'startTime': datetime(2015, 1, 1),
        'status': 'PENDING'|'PROVISIONING'|'RUNNING'|'FAILED'|'SUCCEED'|'CANCELLING'|'CANCELLED',
        'endTime': datetime(2015, 1, 1),
        'jobType': 'RELEASE'|'RETRY'|'MANUAL'|'WEB_HOOK',
        'sourceUrl': 'string',
        'sourceUrlType': 'ZIP'|'BUCKET_PREFIX'
    }
}

Response Structure

  • (dict) --

    The result structure for the start a deployment request.

    • jobSummary (dict) --

      The summary for the job.

      • jobArn (string) --

        The Amazon Resource Name (ARN) for the job.

      • jobId (string) --

        The unique ID for the job.

      • commitId (string) --

        The commit ID from a third-party repository provider for the job.

      • commitMessage (string) --

        The commit message from a third-party repository provider for the job.

      • commitTime (datetime) --

        The commit date and time for the job.

      • startTime (datetime) --

        The start date and time for the job.

      • status (string) --

        The current status for the job.

      • endTime (datetime) --

        The end date and time for the job.

      • jobType (string) --

        The type for the job. If the value is RELEASE , the job was manually released from its source by using the StartJob API. This value is available only for apps that are connected to a repository.

        If the value is RETRY , the job was manually retried using the StartJob API. If the value is WEB_HOOK , the job was automatically triggered by webhooks. If the value is MANUAL , the job is for a manually deployed app. Manually deployed apps are not connected to a Git repository.

      • sourceUrl (string) --

        The source URL for the files to deploy. The source URL can be either an HTTP GET URL that is publicly accessible and downloads a single .zip file, or an Amazon S3 bucket and prefix.

      • sourceUrlType (string) --

        The type of source specified by the sourceURL . If the value is ZIP , the source is a .zip file. If the value is BUCKET_PREFIX , the source is an Amazon S3 bucket and prefix. If no value is specified, the default is ZIP .

StartJob (updated) Link ¶
Changes (response)
{'jobSummary': {'sourceUrl': 'string', 'sourceUrlType': 'ZIP | BUCKET_PREFIX'}}

Starts a new job for a branch of an Amplify app.

See also: AWS API Documentation

Request Syntax

client.start_job(
    appId='string',
    branchName='string',
    jobId='string',
    jobType='RELEASE'|'RETRY'|'MANUAL'|'WEB_HOOK',
    jobReason='string',
    commitId='string',
    commitMessage='string',
    commitTime=datetime(2015, 1, 1)
)
type appId

string

param appId

[REQUIRED]

The unique ID for an Amplify app.

type branchName

string

param branchName

[REQUIRED]

The name of the branch to use for the job.

type jobId

string

param jobId

The unique ID for an existing job. This is required if the value of jobType is RETRY .

type jobType

string

param jobType

[REQUIRED]

Describes the type for the job. The job type RELEASE starts a new job with the latest change from the specified branch. This value is available only for apps that are connected to a repository.

The job type RETRY retries an existing job. If the job type value is RETRY , the jobId is also required.

type jobReason

string

param jobReason

A descriptive reason for starting the job.

type commitId

string

param commitId

The commit ID from a third-party repository provider for the job.

type commitMessage

string

param commitMessage

The commit message from a third-party repository provider for the job.

type commitTime

datetime

param commitTime

The commit date and time for the job.

rtype

dict

returns

Response Syntax

{
    'jobSummary': {
        'jobArn': 'string',
        'jobId': 'string',
        'commitId': 'string',
        'commitMessage': 'string',
        'commitTime': datetime(2015, 1, 1),
        'startTime': datetime(2015, 1, 1),
        'status': 'PENDING'|'PROVISIONING'|'RUNNING'|'FAILED'|'SUCCEED'|'CANCELLING'|'CANCELLED',
        'endTime': datetime(2015, 1, 1),
        'jobType': 'RELEASE'|'RETRY'|'MANUAL'|'WEB_HOOK',
        'sourceUrl': 'string',
        'sourceUrlType': 'ZIP'|'BUCKET_PREFIX'
    }
}

Response Structure

  • (dict) --

    The result structure for the run job request.

    • jobSummary (dict) --

      The summary for the job.

      • jobArn (string) --

        The Amazon Resource Name (ARN) for the job.

      • jobId (string) --

        The unique ID for the job.

      • commitId (string) --

        The commit ID from a third-party repository provider for the job.

      • commitMessage (string) --

        The commit message from a third-party repository provider for the job.

      • commitTime (datetime) --

        The commit date and time for the job.

      • startTime (datetime) --

        The start date and time for the job.

      • status (string) --

        The current status for the job.

      • endTime (datetime) --

        The end date and time for the job.

      • jobType (string) --

        The type for the job. If the value is RELEASE , the job was manually released from its source by using the StartJob API. This value is available only for apps that are connected to a repository.

        If the value is RETRY , the job was manually retried using the StartJob API. If the value is WEB_HOOK , the job was automatically triggered by webhooks. If the value is MANUAL , the job is for a manually deployed app. Manually deployed apps are not connected to a Git repository.

      • sourceUrl (string) --

        The source URL for the files to deploy. The source URL can be either an HTTP GET URL that is publicly accessible and downloads a single .zip file, or an Amazon S3 bucket and prefix.

      • sourceUrlType (string) --

        The type of source specified by the sourceURL . If the value is ZIP , the source is a .zip file. If the value is BUCKET_PREFIX , the source is an Amazon S3 bucket and prefix. If no value is specified, the default is ZIP .

StopJob (updated) Link ¶
Changes (response)
{'jobSummary': {'sourceUrl': 'string', 'sourceUrlType': 'ZIP | BUCKET_PREFIX'}}

Stops a job that is in progress for a branch of an Amplify app.

See also: AWS API Documentation

Request Syntax

client.stop_job(
    appId='string',
    branchName='string',
    jobId='string'
)
type appId

string

param appId

[REQUIRED]

The unique ID for an Amplify app.

type branchName

string

param branchName

[REQUIRED]

The name of the branch to use for the stop job request.

type jobId

string

param jobId

[REQUIRED]

The unique id for the job.

rtype

dict

returns

Response Syntax

{
    'jobSummary': {
        'jobArn': 'string',
        'jobId': 'string',
        'commitId': 'string',
        'commitMessage': 'string',
        'commitTime': datetime(2015, 1, 1),
        'startTime': datetime(2015, 1, 1),
        'status': 'PENDING'|'PROVISIONING'|'RUNNING'|'FAILED'|'SUCCEED'|'CANCELLING'|'CANCELLED',
        'endTime': datetime(2015, 1, 1),
        'jobType': 'RELEASE'|'RETRY'|'MANUAL'|'WEB_HOOK',
        'sourceUrl': 'string',
        'sourceUrlType': 'ZIP'|'BUCKET_PREFIX'
    }
}

Response Structure

  • (dict) --

    The result structure for the stop job request.

    • jobSummary (dict) --

      The summary for the job.

      • jobArn (string) --

        The Amazon Resource Name (ARN) for the job.

      • jobId (string) --

        The unique ID for the job.

      • commitId (string) --

        The commit ID from a third-party repository provider for the job.

      • commitMessage (string) --

        The commit message from a third-party repository provider for the job.

      • commitTime (datetime) --

        The commit date and time for the job.

      • startTime (datetime) --

        The start date and time for the job.

      • status (string) --

        The current status for the job.

      • endTime (datetime) --

        The end date and time for the job.

      • jobType (string) --

        The type for the job. If the value is RELEASE , the job was manually released from its source by using the StartJob API. This value is available only for apps that are connected to a repository.

        If the value is RETRY , the job was manually retried using the StartJob API. If the value is WEB_HOOK , the job was automatically triggered by webhooks. If the value is MANUAL , the job is for a manually deployed app. Manually deployed apps are not connected to a Git repository.

      • sourceUrl (string) --

        The source URL for the files to deploy. The source URL can be either an HTTP GET URL that is publicly accessible and downloads a single .zip file, or an Amazon S3 bucket and prefix.

      • sourceUrlType (string) --

        The type of source specified by the sourceURL . If the value is ZIP , the source is a .zip file. If the value is BUCKET_PREFIX , the source is an Amazon S3 bucket and prefix. If no value is specified, the default is ZIP .