AmplifyGen3 / Client / create_deployment

create_deployment

AmplifyGen3.Client.create_deployment(**kwargs)

Creates a deployment for an environment of a Gen 3 app.

See also: AWS API Documentation

Request Syntax

response = client.create_deployment(
    AppName='string',
    EnvironmentName='string',
    SourceConfig={
        'GitSource': {
            'GitRef': 'string'
        },
        'ManualUploadSource': {
            'SourceUploadId': 'string',
            'SourceType': 'SOURCE_CODE'|'PREBUILT_ARTIFACT'
        }
    },
    Description='string',
    Tags={
        'string': 'string'
    },
    BranchArn='string',
    PublishableKeyAction='REUSE'|'CREATE_NEW'
)
Parameters:
  • AppName (string) –

    [REQUIRED]

    The name of the app.

  • EnvironmentName (string) –

    [REQUIRED]

    The name of the environment.

  • SourceConfig (dict) –

    The source to deploy.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: GitSource, ManualUploadSource.

    • GitSource (dict) –

      The Git source information.

      • GitRef (string) – [REQUIRED]

        The Git reference to deploy, such as a branch or tag.

    • ManualUploadSource (dict) –

      The manually uploaded source information.

      • SourceUploadId (string) – [REQUIRED]

        The ID of the source upload.

      • SourceType (string) – [REQUIRED]

        The type of source, such as source code or a prebuilt artifact.

  • Description (string) – The description of the deployment.

  • Tags (dict) –

    The tags to apply to the resource.

    • (string) –

      • (string) –

  • BranchArn (string) – The Amazon Resource Name (ARN) of the branch to deploy to. This applies only to an app with a backend. The branch must belong to the same app and environment. In the Production environment, it must be the production branch. If you omit this, Amplify chooses the branch and creates it if it doesn’t exist.

  • PublishableKeyAction (string) – Specifies what the deployment does with the branch’s publishable key, for an app with a backend. CREATE_NEW creates a new key that this deployment and later deployments use. The previous key stays active until you revoke it with RevokeApiKey. REUSE, the default, uses the branch’s current key.

Return type:

dict

Returns:

Response Syntax

{
    'DeploymentId': 'string',
    'DeploymentArn': 'string',
    'Status': 'QUEUED'|'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'EXPIRED'|'CANCELLED'
}

Response Structure

  • (dict) –

    • DeploymentId (string) –

      The ID of the deployment.

    • DeploymentArn (string) –

      The Amazon Resource Name (ARN) of the deployment.

    • Status (string) –

      The status of the deployment.

Exceptions