AmplifyGen3 / Client / get_deployment

get_deployment

AmplifyGen3.Client.get_deployment(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.get_deployment(
    AppName='string',
    EnvironmentName='string',
    DeploymentId='string'
)
Parameters:
  • AppName (string) –

    [REQUIRED]

    The name of the app.

  • EnvironmentName (string) –

    [REQUIRED]

    The name of the environment.

  • DeploymentId (string) –

    [REQUIRED]

    The ID of the deployment.

Return type:

dict

Returns:

Response Syntax

{
    'AppName': 'string',
    'DeploymentId': 'string',
    'DeploymentArn': 'string',
    'EnvironmentName': 'string',
    'SourceConfig': {
        'GitSource': {
            'GitRef': 'string',
            'RepositoryUrl': 'string',
            'CommitId': 'string',
            'CommitMessage': 'string',
            'Author': 'string'
        },
        'ManualUploadSource': {
            'SourceUploadId': 'string',
            'SourceType': 'SOURCE_CODE'|'PREBUILT_ARTIFACT'
        }
    },
    'Description': 'string',
    'Status': 'QUEUED'|'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'EXPIRED'|'CANCELLED',
    'DomainName': 'string',
    'Aliases': [
        {
            'AliasName': 'string',
            'AliasArn': 'string',
            'Type': 'ENVIRONMENT'|'BRANCH'|'PULL_REQUEST',
            'Url': 'string',
            'RoutingConfig': [
                {
                    'DeploymentId': 'string',
                    'Weight': 123
                },
            ],
            'CreatedAt': datetime(2015, 1, 1),
            'UpdatedAt': datetime(2015, 1, 1)
        },
    ],
    'EnvironmentVariables': [
        {
            'Key': 'string',
            'Value': 'string',
            'Type': 'PLAINTEXT'|'SENSITIVE',
            'Comment': 'string',
            'SourceIntegrationArn': 'string',
            'Scope': 'BUILD'|'RUNTIME'|'ALL'|'BACKEND'
        },
    ],
    'CreatedAt': datetime(2015, 1, 1),
    'StartedAt': datetime(2015, 1, 1),
    'EndedAt': datetime(2015, 1, 1),
    'ExpiredAt': datetime(2015, 1, 1),
    'StatusReason': 'string',
    'StatusReasonCode': 'INTERNAL_SERVICE_ERROR'|'BUILD_FAILED'|'BUILD_TIMEOUT'|'OUTPUT_DIRECTORY_NOT_FOUND'|'GIT_CLONE_FAILED'|'SOURCE_DOWNLOAD_FAILED'|'CONFIG_RETRIEVAL_FAILED'|'BINDING_RESOLUTION_FAILED'|'RESOURCE_DELETED'|'COLLAPSED'|'AT_ACCOUNT_CONCURRENCY_LIMIT'|'OTHER_DEPLOYMENT_IN_PROGRESS'|'MIGRATION_FAILED'|'BRANCH_LIMIT_EXCEEDED'|'PUBLISHABLE_KEY_LIMIT_EXCEEDED'|'ROLE_NOT_ASSUMABLE',
    'SessionPolicy': 'string',
    'Branch': {
        'BranchName': 'string',
        'BranchArn': 'string',
        'Backend': {
            'Url': 'string',
            'PublishableKeyId': 'string'
        }
    },
    'Backend': {
        'MigrationsDirectory': 'string',
        'Auth': 'string',
        'Database': {
            'MaxBackendCapacityUnits': 123,
            'BackupRetentionDays': 123
        }
    },
    'Steps': {
        'Build': {
            'Status': 'NOT_STARTED'|'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
            'StartedAt': datetime(2015, 1, 1),
            'EndedAt': datetime(2015, 1, 1)
        },
        'Migration': {
            'Status': 'NOT_STARTED'|'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
            'StartedAt': datetime(2015, 1, 1),
            'EndedAt': datetime(2015, 1, 1),
            'AppliedMigrationNames': [
                'string',
            ],
            'SkippedMigrationNames': [
                'string',
            ]
        },
        'Deploy': {
            'Status': 'NOT_STARTED'|'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
            'StartedAt': datetime(2015, 1, 1),
            'EndedAt': datetime(2015, 1, 1)
        }
    }
}

Response Structure

  • (dict) –

    • AppName (string) –

      The name of the app.

    • DeploymentId (string) –

      The ID of the deployment.

    • DeploymentArn (string) –

      The Amazon Resource Name (ARN) of the deployment.

    • EnvironmentName (string) –

      The name of the environment.

    • SourceConfig (dict) –

      The source configuration for the deployment.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: GitSource, ManualUploadSource. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

      'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
      
      • GitSource (dict) –

        The Git source information.

        • GitRef (string) –

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

        • RepositoryUrl (string) –

          The URL of the source repository.

        • CommitId (string) –

          The commit ID of the source.

        • CommitMessage (string) –

          The commit message of the source.

        • Author (string) –

          The author of the commit.

      • ManualUploadSource (dict) –

        The manually uploaded source information.

        • SourceUploadId (string) –

          The ID of the source upload.

        • SourceType (string) –

          The type of source, such as source code or a prebuilt artifact. If you use PREBUILT_ARTIFACT, Amplify Gen 3 uploads your source as-is; however, when you deploy your app, Amplify Gen 3 still optimizes artifacts for performance.

    • Description (string) –

      The description of the deployment.

    • Status (string) –

      The status of the deployment.

    • DomainName (string) –

      The fully qualified domain name.

    • Aliases (list) –

      The aliases.

      • (dict) –

        Summary information for an alias.

        • AliasName (string) –

          The name of the alias.

        • AliasArn (string) –

          The Amazon Resource Name (ARN) of the alias.

        • Type (string) –

          The type of the alias.

        • Url (string) –

          The URL of the alias.

        • RoutingConfig (list) –

          The traffic routing configuration.

          • (dict) –

            An entry that maps a portion of traffic to a deployment.

            • DeploymentId (string) –

              The ID of the deployment that receives the traffic.

            • Weight (integer) –

              The percentage of traffic to route to the deployment.

        • CreatedAt (datetime) –

          The time at which the alias was created. The value is in ISO-8601 format.

        • UpdatedAt (datetime) –

          The time at which the alias was last updated. The value is in ISO-8601 format.

    • EnvironmentVariables (list) –

      The environment variables.

      • (dict) –

        An environment variable for an environment.

        • Key (string) –

          The key of the environment variable.

        • Value (string) –

          The value of the environment variable. Omitted for secrets.

        • Type (string) –

          The type of the environment variable.

        • Comment (string) –

          An optional comment describing the environment variable.

        • SourceIntegrationArn (string) –

          The Amazon Resource Name (ARN) of the integration that provides this environment variable, if any.

        • Scope (string) –

          The scope where the environment variable is available.

    • CreatedAt (datetime) –

      The time at which the deployment was created. The value is in ISO-8601 format.

    • StartedAt (datetime) –

      The time at which processing started. The value is in ISO-8601 format.

    • EndedAt (datetime) –

      The time at which processing ended. The value is in ISO-8601 format.

    • ExpiredAt (datetime) –

      The time at which the deployment expired. The value is in ISO-8601 format.

    • StatusReason (string) –

      The reason for the status.

    • StatusReasonCode (string) –

      A code that identifies the reason for the status.

    • SessionPolicy (string) –

      The IAM session policy, as a JSON document, that the app’s runtime was scoped to for this deployment.

    • Branch (dict) –

      The branch that the deployment ran against. Present after the deployment’s branch exists.

      • BranchName (string) –

        The name of the branch.

      • BranchArn (string) –

        The Amazon Resource Name (ARN) of the branch.

      • Backend (dict) –

        The backend settings of the branch when the deployment ran.

        • Url (string) –

          The URL of the branch’s backend when the deployment ran.

        • PublishableKeyId (string) –

          The ID of the publishable key that the deployment was built with. Use this ID with GetApiKey or RevokeApiKey.

    • Backend (dict) –

      The backend settings that the deployment captured when it was created. Present only when the app has a backend.

      • MigrationsDirectory (string) –

        The directory that contains the migration files, relative to the root of the source.

      • Auth (string) –

        The authentication settings that the deployment sent to its branch, as a JSON document, whether or not the deployment succeeded.

      • Database (dict) –

        The database settings that the deployment sent to its branch, whether or not the deployment succeeded.

        • MaxBackendCapacityUnits (integer) –

          The maximum number of backend capacity units that the environment’s database can scale to.

        • BackupRetentionDays (integer) –

          The number of days that automated backups are kept. This is also how far back the environment’s database can be restored.

    • Steps (dict) –

      The steps of the deployment. Each step that applies to the deployment is present from the time that the deployment is created.

      • Build (dict) –

        The build step.

        • Status (string) –

          The status of the step.

        • StartedAt (datetime) –

          The time at which the step started.

        • EndedAt (datetime) –

          The time at which the step ended.

      • Migration (dict) –

        The database migration step.

        • Status (string) –

          The status of the step.

        • StartedAt (datetime) –

          The time at which the step started.

        • EndedAt (datetime) –

          The time at which the step ended.

        • AppliedMigrationNames (list) –

          The names of the migrations that the step applied.

          • (string) –

        • SkippedMigrationNames (list) –

          The names of the migrations that the step skipped.

          • (string) –

      • Deploy (dict) –

        The deploy step.

        • Status (string) –

          The status of the step.

        • StartedAt (datetime) –

          The time at which the step started.

        • EndedAt (datetime) –

          The time at which the step ended.

Exceptions

  • AmplifyGen3.Client.exceptions.ThrottlingException

  • AmplifyGen3.Client.exceptions.AccessDeniedException

  • AmplifyGen3.Client.exceptions.ResourceNotFoundException

  • AmplifyGen3.Client.exceptions.ValidationException

  • AmplifyGen3.Client.exceptions.InternalServerException