AWS CodeDeploy

2014/11/11 - AWS CodeDeploy - 25 new api methods

BatchGetApplications (new) Link ¶

Gets information about one or more applications.

Request Syntax

client.batch_get_applications(
    applicationNames=[
        'string',
    ]
)
type applicationNames

list

param applicationNames

A list of application names, with multiple application names separated by spaces.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'applicationsInfo': [
        {
            'applicationId': 'string',
            'applicationName': 'string',
            'createTime': datetime(2015, 1, 1),
            'linkedToGitHub': True|False
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of a batch get applications operation.

    • applicationsInfo (list) --

      Information about the applications.

      • (dict) --

        Information about an application.

        • applicationId (string) --

          The application ID.

        • applicationName (string) --

          The application name.

        • createTime (datetime) --

          The time that the application was created.

        • linkedToGitHub (boolean) --

          True if the user has authenticated with GitHub for the specified application; otherwise, false.

ListDeploymentGroups (new) Link ¶

Lists the deployment groups for an application registered within the AWS user account.

Request Syntax

client.list_deployment_groups(
    applicationName='string',
    nextToken='string'
)
type applicationName

string

param applicationName

[REQUIRED]

The name of an existing AWS CodeDeploy application within the AWS user account.

type nextToken

string

param nextToken

An identifier that was returned from the previous list deployment groups call, which can be used to return the next set of deployment groups in the list.

rtype

dict

returns

Response Syntax

{
    'applicationName': 'string',
    'deploymentGroups': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a list deployment groups operation.

    • applicationName (string) --

      The application name.

    • deploymentGroups (list) --

      A list of corresponding deployment group names.

      • (string) --

    • nextToken (string) --

      If the amount of information that is returned is significantly large, an identifier will also be returned, which can be used in a subsequent list deployment groups call to return the next set of deployment groups in the list.

GetDeployment (new) Link ¶

Gets information about a deployment.

Request Syntax

client.get_deployment(
    deploymentId='string'
)
type deploymentId

string

param deploymentId

[REQUIRED]

An existing deployment ID within the AWS user account.

rtype

dict

returns

Response Syntax

{
    'deploymentInfo': {
        'applicationName': 'string',
        'deploymentGroupName': 'string',
        'deploymentConfigName': 'string',
        'deploymentId': 'string',
        'revision': {
            'revisionType': 'S3'|'GitHub',
            's3Location': {
                'bucket': 'string',
                'key': 'string',
                'bundleType': 'tar'|'tgz'|'zip',
                'version': 'string',
                'eTag': 'string'
            },
            'gitHubLocation': {
                'repository': 'string',
                'commitId': 'string'
            }
        },
        'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped',
        'errorInformation': {
            'code': 'DEPLOYMENT_GROUP_MISSING'|'APPLICATION_MISSING'|'REVISION_MISSING'|'IAM_ROLE_MISSING'|'IAM_ROLE_PERMISSIONS'|'OVER_MAX_INSTANCES'|'NO_INSTANCES'|'TIMEOUT'|'HEALTH_CONSTRAINTS_INVALID'|'HEALTH_CONSTRAINTS'|'INTERNAL_ERROR',
            'message': 'string'
        },
        'createTime': datetime(2015, 1, 1),
        'startTime': datetime(2015, 1, 1),
        'completeTime': datetime(2015, 1, 1),
        'deploymentOverview': {
            'Pending': 123,
            'InProgress': 123,
            'Succeeded': 123,
            'Failed': 123,
            'Skipped': 123
        },
        'description': 'string',
        'creator': 'user'|'autoscaling',
        'ignoreApplicationStopFailures': True|False
    }
}

Response Structure

  • (dict) --

    Represents the output of a get deployment operation.

    • deploymentInfo (dict) --

      Information about the deployment.

      • applicationName (string) --

        The application name.

      • deploymentGroupName (string) --

        The deployment group name.

      • deploymentConfigName (string) --

        The deployment configuration name.

      • deploymentId (string) --

        The deployment ID.

      • revision (dict) --

        Information about the location of application artifacts that are stored and the service to retrieve them from.

        • revisionType (string) --

          The application revision's type:

          • S3: An application revision stored in Amazon S3.

          • GitHub: An application revision stored in GitHub.

        • s3Location (dict) --

          Information about the location of application artifacts that are stored in Amazon S3.

          • bucket (string) --

            The name of the Amazon S3 bucket where the application revision is stored.

          • key (string) --

            The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

          • bundleType (string) --

            The file type of the application revision. Must be one of the following:

            • tar: A tar archive file.

            • tgz: A compressed tar archive file.

            • zip: A zip archive file.

          • version (string) --

            A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

            If the version is not specified, the system will use the most recent version by default.

          • eTag (string) --

            The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

            If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

        • gitHubLocation (dict) --

          Information about the location of application artifacts that are stored in GitHub.

          • repository (string) --

            The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.

            Specified as account/repository.

          • commitId (string) --

            The SHA1 commit ID of the GitHub commit that references the that represents the bundled artifacts for the application revision.

      • status (string) --

        The current state of the deployment as a whole.

      • errorInformation (dict) --

        Information about any error associated with this deployment.

        • code (string) --

          The error code:

          • APPLICATION_MISSING: The application was missing. Note that this error code will most likely be raised if the application is deleted after the deployment is created but before it starts.

          • DEPLOYMENT_GROUP_MISSING: The deployment group was missing. Note that this error code will most likely be raised if the deployment group is deleted after the deployment is created but before it starts.

          • REVISION_MISSING: The revision ID was missing. Note that this error code will most likely be raised if the revision is deleted after the deployment is created but before it starts.

          • IAM_ROLE_MISSING: The service role cannot be accessed.

          • IAM_ROLE_PERMISSIONS: The service role does not have the correct permissions.

          • OVER_MAX_INSTANCES: The maximum number of instances was exceeded.

          • NO_INSTANCES: No instances were specified, or no instances can be found.

          • TIMEOUT: The deployment has timed out.

          • HEALTH_CONSTRAINTS_INVALID: The revision can never successfully deploy under the instance health constraints as specified.

          • HEALTH_CONSTRAINTS: The deployment failed on too many instances to be able to successfully deploy under the specified instance health constraints.

          • INTERNAL_ERROR: There was an internal error.

        • message (string) --

          An accompanying error message.

      • createTime (datetime) --

        A timestamp indicating when the deployment was created.

      • startTime (datetime) --

        A timestamp indicating when the deployment began deploying to the deployment group.

        Note that in some cases, the reported value of the start time may be later than the complete time. This is due to differences in the clock settings of various back-end servers that participate in the overall deployment process.

      • completeTime (datetime) --

        A timestamp indicating when the deployment was completed.

      • deploymentOverview (dict) --

        A summary of the deployment status of the instances in the deployment.

        • Pending (integer) --

          The number of instances that are pending in the deployment.

        • InProgress (integer) --

          The number of instances that are in progress in the deployment.

        • Succeeded (integer) --

          The number of instances that have succeeded in the deployment.

        • Failed (integer) --

          The number of instances that have failed in the deployment.

        • Skipped (integer) --

          The number of instances that have been skipped in the deployment.

      • description (string) --

        A comment about the deployment.

      • creator (string) --

        How the deployment was created:

        • user: A user created the deployment.

        • autoscaling: Auto Scaling created the deployment.

      • ignoreApplicationStopFailures (boolean) --

        If true, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will not be considered to have failed to that instance at that point and will continue on to the BeforeInstall deployment lifecycle event.

        If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will stop to that instance, and the deployment to that instance will be considered to have failed.

ListApplications (new) Link ¶

Lists the applications registered within the AWS user account.

Request Syntax

client.list_applications(
    nextToken='string'
)
type nextToken

string

param nextToken

An identifier that was returned from the previous list applications call, which can be used to return the next set of applications in the list.

rtype

dict

returns

Response Syntax

{
    'applications': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a list applications operation.

    • applications (list) --

      A list of application names.

      • (string) --

    • nextToken (string) --

      If the amount of information that is returned is significantly large, an identifier will also be returned, which can be used in a subsequent list applications call to return the next set of applications in the list.

RegisterApplicationRevision (new) Link ¶

Registers with AWS CodeDeploy a revision for the specified application.

Request Syntax

client.register_application_revision(
    applicationName='string',
    description='string',
    revision={
        'revisionType': 'S3'|'GitHub',
        's3Location': {
            'bucket': 'string',
            'key': 'string',
            'bundleType': 'tar'|'tgz'|'zip',
            'version': 'string',
            'eTag': 'string'
        },
        'gitHubLocation': {
            'repository': 'string',
            'commitId': 'string'
        }
    }
)
type applicationName

string

param applicationName

[REQUIRED]

The name of an existing AWS CodeDeploy application within the AWS user account.

type description

string

param description

A comment about the revision.

type revision

dict

param revision

[REQUIRED]

Information about the application revision to register, including the revision's type and its location.

  • revisionType (string) --

    The application revision's type:

    • S3: An application revision stored in Amazon S3.

    • GitHub: An application revision stored in GitHub.

  • s3Location (dict) --

    Information about the location of application artifacts that are stored in Amazon S3.

    • bucket (string) --

      The name of the Amazon S3 bucket where the application revision is stored.

    • key (string) --

      The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

    • bundleType (string) --

      The file type of the application revision. Must be one of the following:

      • tar: A tar archive file.

      • tgz: A compressed tar archive file.

      • zip: A zip archive file.

    • version (string) --

      A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

      If the version is not specified, the system will use the most recent version by default.

    • eTag (string) --

      The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

      If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

  • gitHubLocation (dict) --

    Information about the location of application artifacts that are stored in GitHub.

    • repository (string) --

      The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.

      Specified as account/repository.

    • commitId (string) --

      The SHA1 commit ID of the GitHub commit that references the that represents the bundled artifacts for the application revision.

returns

None

GetDeploymentGroup (new) Link ¶

Gets information about a deployment group.

Request Syntax

client.get_deployment_group(
    applicationName='string',
    deploymentGroupName='string'
)
type applicationName

string

param applicationName

[REQUIRED]

The name of an existing AWS CodeDeploy application within the AWS user account.

type deploymentGroupName

string

param deploymentGroupName

[REQUIRED]

The name of an existing deployment group for the specified application.

rtype

dict

returns

Response Syntax

{
    'deploymentGroupInfo': {
        'applicationName': 'string',
        'deploymentGroupId': 'string',
        'deploymentGroupName': 'string',
        'deploymentConfigName': 'string',
        'ec2TagFilters': [
            {
                'Key': 'string',
                'Value': 'string',
                'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
            },
        ],
        'autoScalingGroups': [
            {
                'name': 'string',
                'hook': 'string'
            },
        ],
        'serviceRoleArn': 'string',
        'targetRevision': {
            'revisionType': 'S3'|'GitHub',
            's3Location': {
                'bucket': 'string',
                'key': 'string',
                'bundleType': 'tar'|'tgz'|'zip',
                'version': 'string',
                'eTag': 'string'
            },
            'gitHubLocation': {
                'repository': 'string',
                'commitId': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    Represents the output of a get deployment group operation.

    • deploymentGroupInfo (dict) --

      Information about the deployment group.

      • applicationName (string) --

        The application name.

      • deploymentGroupId (string) --

        The deployment group ID.

      • deploymentGroupName (string) --

        The deployment group name.

      • deploymentConfigName (string) --

        The deployment configuration name.

      • ec2TagFilters (list) --

        The Amazon EC2 tags to filter on.

        • (dict) --

          Information about an Amazon EC2 tag filter.

          • Key (string) --

            The Amazon EC2 tag filter key.

          • Value (string) --

            The Amazon EC2 tag filter value.

          • Type (string) --

            The Amazon EC2 tag filter type:

            • KEY_ONLY: Key only.

            • VALUE_ONLY: Value only.

            • KEY_AND_VALUE: Key and value.

      • autoScalingGroups (list) --

        A list of associated Auto Scaling groups.

        • (dict) --

          Information about an Auto Scaling group.

          • name (string) --

            The Auto Scaling group name.

          • hook (string) --

            An Auto Scaling lifecycle event hook name.

      • serviceRoleArn (string) --

        A service role ARN.

      • targetRevision (dict) --

        Information about the deployment group's target revision, including the revision's type and its location.

        • revisionType (string) --

          The application revision's type:

          • S3: An application revision stored in Amazon S3.

          • GitHub: An application revision stored in GitHub.

        • s3Location (dict) --

          Information about the location of application artifacts that are stored in Amazon S3.

          • bucket (string) --

            The name of the Amazon S3 bucket where the application revision is stored.

          • key (string) --

            The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

          • bundleType (string) --

            The file type of the application revision. Must be one of the following:

            • tar: A tar archive file.

            • tgz: A compressed tar archive file.

            • zip: A zip archive file.

          • version (string) --

            A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

            If the version is not specified, the system will use the most recent version by default.

          • eTag (string) --

            The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

            If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

        • gitHubLocation (dict) --

          Information about the location of application artifacts that are stored in GitHub.

          • repository (string) --

            The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.

            Specified as account/repository.

          • commitId (string) --

            The SHA1 commit ID of the GitHub commit that references the that represents the bundled artifacts for the application revision.

ListDeployments (new) Link ¶

Lists the deployments under a deployment group for an application registered within the AWS user account.

Request Syntax

client.list_deployments(
    applicationName='string',
    deploymentGroupName='string',
    includeOnlyStatuses=[
        'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped',
    ],
    createTimeRange={
        'start': datetime(2015, 1, 1),
        'end': datetime(2015, 1, 1)
    },
    nextToken='string'
)
type applicationName

string

param applicationName

The name of an existing AWS CodeDeploy application within the AWS user account.

type deploymentGroupName

string

param deploymentGroupName

The name of an existing deployment group for the specified application.

type includeOnlyStatuses

list

param includeOnlyStatuses

A subset of deployments to list, by status:

  • Created: Include in the resulting list created deployments.

  • Queued: Include in the resulting list queued deployments.

  • In Progress: Include in the resulting list in-progress deployments.

  • Succeeded: Include in the resulting list succeeded deployments.

  • Failed: Include in the resulting list failed deployments.

  • Aborted: Include in the resulting list aborted deployments.

  • (string) --

type createTimeRange

dict

param createTimeRange

A deployment creation start- and end-time range for returning a subset of the list of deployments.

  • start (datetime) --

    The time range's start time.

    Note

    Specify null to leave the time range's start time open-ended.

  • end (datetime) --

    The time range's end time.

    Note

    Specify null to leave the time range's end time open-ended.

type nextToken

string

param nextToken

An identifier that was returned from the previous list deployments call, which can be used to return the next set of deployments in the list.

rtype

dict

returns

Response Syntax

{
    'deployments': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a list deployments operation.

    • deployments (list) --

      A list of deployment IDs.

      • (string) --

    • nextToken (string) --

      If the amount of information that is returned is significantly large, an identifier will also be returned, which can be used in a subsequent list deployments call to return the next set of deployments in the list.

CreateDeploymentGroup (new) Link ¶

Creates a new deployment group for application revisions to be deployed to.

Request Syntax

client.create_deployment_group(
    applicationName='string',
    deploymentGroupName='string',
    deploymentConfigName='string',
    ec2TagFilters=[
        {
            'Key': 'string',
            'Value': 'string',
            'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
        },
    ],
    autoScalingGroups=[
        'string',
    ],
    serviceRoleArn='string'
)
type applicationName

string

param applicationName

[REQUIRED]

The name of an existing AWS CodeDeploy application within the AWS user account.

type deploymentGroupName

string

param deploymentGroupName

[REQUIRED]

The name of an existing deployment group for the specified application.

type deploymentConfigName

string

param deploymentConfigName

If specified, the deployment configuration name must be one of the predefined values, or it can be a custom deployment configuration:

  • CodeDeployDefault.AllAtOnce deploys an application revision to up to all of the Amazon EC2 instances at once. The overall deployment succeeds if the application revision deploys to at least one of the instances. The overall deployment fails after the application revision fails to deploy to all of the instances. For example, for 9 instances, deploy to up to all 9 instances at once. The overall deployment succeeds if any of the 9 instances is successfully deployed to, and it fails if all 9 instances fail to be deployed to.

  • CodeDeployDefault.HalfAtATime deploys to up to half of the instances at a time (with fractions rounded down). The overall deployment succeeds if the application revision deploys to at least half of the instances (with fractions rounded up); otherwise, the deployment fails. For example, for 9 instances, deploy to up to 4 instances at a time. The overall deployment succeeds if 5 or more instances are successfully deployed to; otherwise, the deployment fails. Note that the deployment may successfully deploy to some instances, even if the overall deployment fails.

  • CodeDeployDefault.OneAtATime deploys the application revision to only one of the instances at a time. The overall deployment succeeds if the application revision deploys to all of the instances. The overall deployment fails after the application revision first fails to deploy to any one instance. For example, for 9 instances, deploy to one instance at a time. The overall deployment succeeds if all 9 instances are successfully deployed to, and it fails if any of one of the 9 instances fail to be deployed to. Note that the deployment may successfully deploy to some instances, even if the overall deployment fails. This is the default deployment configuration if a configuration isn't specified for either the deployment or the deployment group.

To create a custom deployment configuration, call the create deployment configuration operation.

type ec2TagFilters

list

param ec2TagFilters

The Amazon EC2 tags to filter on.

  • (dict) --

    Information about an Amazon EC2 tag filter.

    • Key (string) --

      The Amazon EC2 tag filter key.

    • Value (string) --

      The Amazon EC2 tag filter value.

    • Type (string) --

      The Amazon EC2 tag filter type:

      • KEY_ONLY: Key only.

      • VALUE_ONLY: Value only.

      • KEY_AND_VALUE: Key and value.

type autoScalingGroups

list

param autoScalingGroups

A list of associated Auto Scaling groups.

  • (string) --

type serviceRoleArn

string

param serviceRoleArn

A service role ARN that allows AWS CodeDeploy to act on the user's behalf when interacting with AWS services.

rtype

dict

returns

Response Syntax

{
    'deploymentGroupId': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a create deployment group operation.

    • deploymentGroupId (string) --

      A unique deployment group ID.

CreateDeployment (new) Link ¶

Deploys an application revision to the specified deployment group.

Request Syntax

client.create_deployment(
    applicationName='string',
    deploymentGroupName='string',
    revision={
        'revisionType': 'S3'|'GitHub',
        's3Location': {
            'bucket': 'string',
            'key': 'string',
            'bundleType': 'tar'|'tgz'|'zip',
            'version': 'string',
            'eTag': 'string'
        },
        'gitHubLocation': {
            'repository': 'string',
            'commitId': 'string'
        }
    },
    deploymentConfigName='string',
    description='string',
    ignoreApplicationStopFailures=True|False
)
type applicationName

string

param applicationName

[REQUIRED]

The name of an existing AWS CodeDeploy application within the AWS user account.

type deploymentGroupName

string

param deploymentGroupName

The deployment group's name.

type revision

dict

param revision

The type of revision to deploy, along with information about the revision's location.

  • revisionType (string) --

    The application revision's type:

    • S3: An application revision stored in Amazon S3.

    • GitHub: An application revision stored in GitHub.

  • s3Location (dict) --

    Information about the location of application artifacts that are stored in Amazon S3.

    • bucket (string) --

      The name of the Amazon S3 bucket where the application revision is stored.

    • key (string) --

      The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

    • bundleType (string) --

      The file type of the application revision. Must be one of the following:

      • tar: A tar archive file.

      • tgz: A compressed tar archive file.

      • zip: A zip archive file.

    • version (string) --

      A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

      If the version is not specified, the system will use the most recent version by default.

    • eTag (string) --

      The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

      If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

  • gitHubLocation (dict) --

    Information about the location of application artifacts that are stored in GitHub.

    • repository (string) --

      The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.

      Specified as account/repository.

    • commitId (string) --

      The SHA1 commit ID of the GitHub commit that references the that represents the bundled artifacts for the application revision.

type deploymentConfigName

string

param deploymentConfigName

The name of an existing deployment configuration within the AWS user account.

If not specified, the value configured in the deployment group will be used as the default. If the deployment group does not have a deployment configuration associated with it, then CodeDeployDefault.OneAtATime will be used by default.

type description

string

param description

A comment about the deployment.

type ignoreApplicationStopFailures

boolean

param ignoreApplicationStopFailures

If set to true, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will not be considered to have failed to that instance at that point and will continue on to the BeforeInstall deployment lifecycle event.

If set to false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will stop to that instance, and the deployment to that instance will be considered to have failed.

rtype

dict

returns

Response Syntax

{
    'deploymentId': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a create deployment operation.

    • deploymentId (string) --

      A unique deployment ID.

CreateDeploymentConfig (new) Link ¶

Creates a new deployment configuration.

Request Syntax

client.create_deployment_config(
    deploymentConfigName='string',
    minimumHealthyHosts={
        'value': 123,
        'type': 'HOST_COUNT'|'FLEET_PERCENT'
    }
)
type deploymentConfigName

string

param deploymentConfigName

[REQUIRED]

The name of the deployment configuration to create.

type minimumHealthyHosts

dict

param minimumHealthyHosts

The minimum number of healthy instances that should be available at any time during the deployment. There are two parameters expected in the input: type and value.

The type parameter takes either of the following values:

  • HOST_COUNT: The value parameter represents the minimum number of healthy instances, as an absolute value.

  • FLEET_PERCENT: The value parameter represents the minimum number of healthy instances, as a percentage of the total number of instances in the deployment. If you specify FLEET_PERCENT, then at the start of the deployment AWS CodeDeploy converts the percentage to the equivalent number of instances and rounds fractional instances up.

The value parameter takes an integer.

For example, to set a minimum of 95% healthy instances, specify a type of FLEET_PERCENT and a value of 95.

  • value (integer) --

    The minimum healthy instances value.

  • type (string) --

    The minimum healthy instances type:

    • HOST_COUNT: The minimum number of healthy instances, as an absolute value.

    • FLEET_PERCENT: The minimum number of healthy instances, as a percentage of the total number of instances in the deployment.

    For example, for 9 Amazon EC2 instances, if a HOST_COUNT of 6 is specified, deploy to up to 3 instances at a time. The deployment succeeds if 6 or more instances are successfully deployed to; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to 5 instances at a time. The deployment succeeds if 4 or more instances are successfully deployed to; otherwise, the deployment fails.

    Note

    In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instances type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one Amazon EC2 instance at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.)

rtype

dict

returns

Response Syntax

{
    'deploymentConfigId': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a create deployment configuration operation.

    • deploymentConfigId (string) --

      A unique deployment configuration ID.

GetDeploymentConfig (new) Link ¶

Gets information about a deployment configuration.

Request Syntax

client.get_deployment_config(
    deploymentConfigName='string'
)
type deploymentConfigName

string

param deploymentConfigName

[REQUIRED]

The name of an existing deployment configuration within the AWS user account.

rtype

dict

returns

Response Syntax

{
    'deploymentConfigInfo': {
        'deploymentConfigId': 'string',
        'deploymentConfigName': 'string',
        'minimumHealthyHosts': {
            'value': 123,
            'type': 'HOST_COUNT'|'FLEET_PERCENT'
        },
        'createTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Represents the output of a get deployment configuration operation.

    • deploymentConfigInfo (dict) --

      Information about the deployment configuration.

      • deploymentConfigId (string) --

        The deployment configuration ID.

      • deploymentConfigName (string) --

        The deployment configuration name.

      • minimumHealthyHosts (dict) --

        Information about the number or percentage of minimum healthy instances.

        • value (integer) --

          The minimum healthy instances value.

        • type (string) --

          The minimum healthy instances type:

          • HOST_COUNT: The minimum number of healthy instances, as an absolute value.

          • FLEET_PERCENT: The minimum number of healthy instances, as a percentage of the total number of instances in the deployment.

          For example, for 9 Amazon EC2 instances, if a HOST_COUNT of 6 is specified, deploy to up to 3 instances at a time. The deployment succeeds if 6 or more instances are successfully deployed to; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to 5 instances at a time. The deployment succeeds if 4 or more instances are successfully deployed to; otherwise, the deployment fails.

          Note

          In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instances type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one Amazon EC2 instance at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.)

      • createTime (datetime) --

        The time that the deployment configuration was created.

StopDeployment (new) Link ¶

Attempts to stop an ongoing deployment.

Request Syntax

client.stop_deployment(
    deploymentId='string'
)
type deploymentId

string

param deploymentId

[REQUIRED]

The unique ID of a deployment.

rtype

dict

returns

Response Syntax

{
    'status': 'Pending'|'Succeeded',
    'statusMessage': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a stop deployment operation.

    • status (string) --

      The status of the stop deployment operation:

      • Pending: The stop operation is pending.

      • Succeeded: The stop operation succeeded.

    • statusMessage (string) --

      An accompanying status message.

UpdateDeploymentGroup (new) Link ¶

Changes information about an existing deployment group.

Request Syntax

client.update_deployment_group(
    applicationName='string',
    currentDeploymentGroupName='string',
    newDeploymentGroupName='string',
    deploymentConfigName='string',
    ec2TagFilters=[
        {
            'Key': 'string',
            'Value': 'string',
            'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
        },
    ],
    autoScalingGroups=[
        'string',
    ],
    serviceRoleArn='string'
)
type applicationName

string

param applicationName

[REQUIRED]

The application name corresponding to the deployment group to update.

type currentDeploymentGroupName

string

param currentDeploymentGroupName

[REQUIRED]

The current name of the existing deployment group.

type newDeploymentGroupName

string

param newDeploymentGroupName

The new name of the deployment group, if you want to change it.

type deploymentConfigName

string

param deploymentConfigName

The replacement deployment configuration name to use, if you want to change it.

type ec2TagFilters

list

param ec2TagFilters

The replacement set of Amazon EC2 tags to filter on, if you want to change them.

  • (dict) --

    Information about an Amazon EC2 tag filter.

    • Key (string) --

      The Amazon EC2 tag filter key.

    • Value (string) --

      The Amazon EC2 tag filter value.

    • Type (string) --

      The Amazon EC2 tag filter type:

      • KEY_ONLY: Key only.

      • VALUE_ONLY: Value only.

      • KEY_AND_VALUE: Key and value.

type autoScalingGroups

list

param autoScalingGroups

The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.

  • (string) --

type serviceRoleArn

string

param serviceRoleArn

A replacement service role's ARN, if you want to change it.

rtype

dict

returns

Response Syntax

{
    'hooksNotCleanedUp': [
        {
            'name': 'string',
            'hook': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of an update deployment group operation.

    • hooksNotCleanedUp (list) --

      If the output contains no data, and the corresponding deployment group contained at least one Auto Scaling group, AWS CodeDeploy successfully removed all corresponding Auto Scaling lifecycle event hooks from the AWS user account. If the output does contain data, AWS CodeDeploy could not remove some Auto Scaling lifecycle event hooks from the AWS user account.

      • (dict) --

        Information about an Auto Scaling group.

        • name (string) --

          The Auto Scaling group name.

        • hook (string) --

          An Auto Scaling lifecycle event hook name.

ListDeploymentConfigs (new) Link ¶

Lists the deployment configurations within the AWS user account.

Request Syntax

client.list_deployment_configs(
    nextToken='string'
)
type nextToken

string

param nextToken

An identifier that was returned from the previous list deployment configurations call, which can be used to return the next set of deployment configurations in the list.

rtype

dict

returns

Response Syntax

{
    'deploymentConfigsList': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a list deployment configurations operation.

    • deploymentConfigsList (list) --

      A list of deployment configurations, including the built-in configurations such as CodeDeployDefault.OneAtATime.

      • (string) --

    • nextToken (string) --

      If the amount of information that is returned is significantly large, an identifier will also be returned, which can be used in a subsequent list deployment configurations call to return the next set of deployment configurations in the list.

UpdateApplication (new) Link ¶

Changes an existing application's name.

Request Syntax

client.update_application(
    applicationName='string',
    newApplicationName='string'
)
type applicationName

string

param applicationName

The current name of the application that you want to change.

type newApplicationName

string

param newApplicationName

The new name that you want to change the application to.

returns

None

GetApplicationRevision (new) Link ¶

Gets information about an application revision.

Request Syntax

client.get_application_revision(
    applicationName='string',
    revision={
        'revisionType': 'S3'|'GitHub',
        's3Location': {
            'bucket': 'string',
            'key': 'string',
            'bundleType': 'tar'|'tgz'|'zip',
            'version': 'string',
            'eTag': 'string'
        },
        'gitHubLocation': {
            'repository': 'string',
            'commitId': 'string'
        }
    }
)
type applicationName

string

param applicationName

[REQUIRED]

The name of the application that corresponds to the revision.

type revision

dict

param revision

[REQUIRED]

Information about the application revision to get, including the revision's type and its location.

  • revisionType (string) --

    The application revision's type:

    • S3: An application revision stored in Amazon S3.

    • GitHub: An application revision stored in GitHub.

  • s3Location (dict) --

    Information about the location of application artifacts that are stored in Amazon S3.

    • bucket (string) --

      The name of the Amazon S3 bucket where the application revision is stored.

    • key (string) --

      The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

    • bundleType (string) --

      The file type of the application revision. Must be one of the following:

      • tar: A tar archive file.

      • tgz: A compressed tar archive file.

      • zip: A zip archive file.

    • version (string) --

      A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

      If the version is not specified, the system will use the most recent version by default.

    • eTag (string) --

      The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

      If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

  • gitHubLocation (dict) --

    Information about the location of application artifacts that are stored in GitHub.

    • repository (string) --

      The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.

      Specified as account/repository.

    • commitId (string) --

      The SHA1 commit ID of the GitHub commit that references the that represents the bundled artifacts for the application revision.

rtype

dict

returns

Response Syntax

{
    'applicationName': 'string',
    'revision': {
        'revisionType': 'S3'|'GitHub',
        's3Location': {
            'bucket': 'string',
            'key': 'string',
            'bundleType': 'tar'|'tgz'|'zip',
            'version': 'string',
            'eTag': 'string'
        },
        'gitHubLocation': {
            'repository': 'string',
            'commitId': 'string'
        }
    },
    'revisionInfo': {
        'description': 'string',
        'deploymentGroups': [
            'string',
        ],
        'firstUsedTime': datetime(2015, 1, 1),
        'lastUsedTime': datetime(2015, 1, 1),
        'registerTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Represents the output of a get application revision operation.

    • applicationName (string) --

      The name of the application that corresponds to the revision.

    • revision (dict) --

      Additional information about the revision, including the revision's type and its location.

      • revisionType (string) --

        The application revision's type:

        • S3: An application revision stored in Amazon S3.

        • GitHub: An application revision stored in GitHub.

      • s3Location (dict) --

        Information about the location of application artifacts that are stored in Amazon S3.

        • bucket (string) --

          The name of the Amazon S3 bucket where the application revision is stored.

        • key (string) --

          The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

        • bundleType (string) --

          The file type of the application revision. Must be one of the following:

          • tar: A tar archive file.

          • tgz: A compressed tar archive file.

          • zip: A zip archive file.

        • version (string) --

          A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

          If the version is not specified, the system will use the most recent version by default.

        • eTag (string) --

          The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

          If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

      • gitHubLocation (dict) --

        Information about the location of application artifacts that are stored in GitHub.

        • repository (string) --

          The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.

          Specified as account/repository.

        • commitId (string) --

          The SHA1 commit ID of the GitHub commit that references the that represents the bundled artifacts for the application revision.

    • revisionInfo (dict) --

      General information about the revision.

      • description (string) --

        A comment about the revision.

      • deploymentGroups (list) --

        A list of deployment groups that use this revision.

        • (string) --

      • firstUsedTime (datetime) --

        When the revision was first used by AWS CodeDeploy.

      • lastUsedTime (datetime) --

        When the revision was last used by AWS CodeDeploy.

      • registerTime (datetime) --

        When the revision was registered with AWS CodeDeploy.

DeleteDeploymentGroup (new) Link ¶

Deletes a deployment group.

Request Syntax

client.delete_deployment_group(
    applicationName='string',
    deploymentGroupName='string'
)
type applicationName

string

param applicationName

[REQUIRED]

The name of an existing AWS CodeDeploy application within the AWS user account.

type deploymentGroupName

string

param deploymentGroupName

[REQUIRED]

The name of an existing deployment group for the specified application.

rtype

dict

returns

Response Syntax

{
    'hooksNotCleanedUp': [
        {
            'name': 'string',
            'hook': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of a delete deployment group operation.

    • hooksNotCleanedUp (list) --

      If the output contains no data, and the corresponding deployment group contained at least one Auto Scaling group, AWS CodeDeploy successfully removed all corresponding Auto Scaling lifecycle event hooks from the instances in the Auto Scaling. If the output does contain data, AWS CodeDeploy could not remove some Auto Scaling lifecycle event hooks from the instances in the Auto Scaling group.

      • (dict) --

        Information about an Auto Scaling group.

        • name (string) --

          The Auto Scaling group name.

        • hook (string) --

          An Auto Scaling lifecycle event hook name.

GetApplication (new) Link ¶

Gets information about an application.

Request Syntax

client.get_application(
    applicationName='string'
)
type applicationName

string

param applicationName

[REQUIRED]

The name of an existing AWS CodeDeploy application within the AWS user account.

rtype

dict

returns

Response Syntax

{
    'application': {
        'applicationId': 'string',
        'applicationName': 'string',
        'createTime': datetime(2015, 1, 1),
        'linkedToGitHub': True|False
    }
}

Response Structure

  • (dict) --

    Represents the output of a get application operation.

    • application (dict) --

      Information about the application.

      • applicationId (string) --

        The application ID.

      • applicationName (string) --

        The application name.

      • createTime (datetime) --

        The time that the application was created.

      • linkedToGitHub (boolean) --

        True if the user has authenticated with GitHub for the specified application; otherwise, false.

ListApplicationRevisions (new) Link ¶

Lists information about revisions for an application.

Request Syntax

client.list_application_revisions(
    applicationName='string',
    sortBy='registerTime'|'firstUsedTime'|'lastUsedTime',
    sortOrder='ascending'|'descending',
    s3Bucket='string',
    s3KeyPrefix='string',
    deployed='include'|'exclude'|'ignore',
    nextToken='string'
)
type applicationName

string

param applicationName

[REQUIRED]

The name of an existing AWS CodeDeploy application within the AWS user account.

type sortBy

string

param sortBy

The column name to sort the list results by:

  • registerTime: Sort the list results by when the revisions were registered with AWS CodeDeploy.

  • firstUsedTime: Sort the list results by when the revisions were first used by in a deployment.

  • lastUsedTime: Sort the list results by when the revisions were last used in a deployment.

If not specified or set to null, the results will be returned in an arbitrary order.

type sortOrder

string

param sortOrder

The order to sort the list results by:

  • ascending: Sort the list results in ascending order.

  • descending: Sort the list results in descending order.

If not specified, the results will be sorted in ascending order.

If set to null, the results will be sorted in an arbitrary order.

type s3Bucket

string

param s3Bucket

A specific Amazon S3 bucket name to limit the search for revisions.

If set to null, then all of the user's buckets will be searched.

type s3KeyPrefix

string

param s3KeyPrefix

A specific key prefix for the set of Amazon S3 objects to limit the search for revisions.

type deployed

string

param deployed

Whether to list revisions based on whether the revision is the target revision of an deployment group:

  • include: List revisions that are target revisions of a deployment group.

  • exclude: Do not list revisions that are target revisions of a deployment group.

  • ignore: List all revisions, regardless of whether they are target revisions of a deployment group.

type nextToken

string

param nextToken

An identifier that was returned from the previous list application revisions call, which can be used to return the next set of applications in the list.

rtype

dict

returns

Response Syntax

{
    'revisions': [
        {
            'revisionType': 'S3'|'GitHub',
            's3Location': {
                'bucket': 'string',
                'key': 'string',
                'bundleType': 'tar'|'tgz'|'zip',
                'version': 'string',
                'eTag': 'string'
            },
            'gitHubLocation': {
                'repository': 'string',
                'commitId': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a list application revisions operation.

    • revisions (list) --

      A list of revision locations that contain the matching revisions.

      • (dict) --

        Information about an application revision's location.

        • revisionType (string) --

          The application revision's type:

          • S3: An application revision stored in Amazon S3.

          • GitHub: An application revision stored in GitHub.

        • s3Location (dict) --

          Information about the location of application artifacts that are stored in Amazon S3.

          • bucket (string) --

            The name of the Amazon S3 bucket where the application revision is stored.

          • key (string) --

            The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

          • bundleType (string) --

            The file type of the application revision. Must be one of the following:

            • tar: A tar archive file.

            • tgz: A compressed tar archive file.

            • zip: A zip archive file.

          • version (string) --

            A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

            If the version is not specified, the system will use the most recent version by default.

          • eTag (string) --

            The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

            If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

        • gitHubLocation (dict) --

          Information about the location of application artifacts that are stored in GitHub.

          • repository (string) --

            The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.

            Specified as account/repository.

          • commitId (string) --

            The SHA1 commit ID of the GitHub commit that references the that represents the bundled artifacts for the application revision.

    • nextToken (string) --

      If the amount of information that is returned is significantly large, an identifier will also be returned, which can be used in a subsequent list application revisions call to return the next set of application revisions in the list.

DeleteDeploymentConfig (new) Link ¶

Deletes a deployment configuration.

Note

A deployment configuration cannot be deleted if it is currently in use. Also, predefined configurations cannot be deleted.

Request Syntax

client.delete_deployment_config(
    deploymentConfigName='string'
)
type deploymentConfigName

string

param deploymentConfigName

[REQUIRED]

The name of an existing deployment configuration within the AWS user account.

returns

None

ListDeploymentInstances (new) Link ¶

Lists the Amazon EC2 instances for a deployment within the AWS user account.

Request Syntax

client.list_deployment_instances(
    deploymentId='string',
    nextToken='string',
    instanceStatusFilter=[
        'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown',
    ]
)
type deploymentId

string

param deploymentId

[REQUIRED]

The unique ID of a deployment.

type nextToken

string

param nextToken

An identifier that was returned from the previous list deployment instances call, which can be used to return the next set of deployment instances in the list.

type instanceStatusFilter

list

param instanceStatusFilter

A subset of instances to list, by status:

  • Pending: Include in the resulting list those instances with pending deployments.

  • InProgress: Include in the resulting list those instances with in-progress deployments.

  • Succeeded: Include in the resulting list those instances with succeeded deployments.

  • Failed: Include in the resulting list those instances with failed deployments.

  • Skipped: Include in the resulting list those instances with skipped deployments.

  • Unknown: Include in the resulting list those instances with deployments in an unknown state.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'instancesList': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a list deployment instances operation.

    • instancesList (list) --

      A list of instance IDs.

      • (string) --

    • nextToken (string) --

      If the amount of information that is returned is significantly large, an identifier will also be returned, which can be used in a subsequent list deployment instances call to return the next set of deployment instances in the list.

DeleteApplication (new) Link ¶

Deletes an application.

Request Syntax

client.delete_application(
    applicationName='string'
)
type applicationName

string

param applicationName

[REQUIRED]

The name of an existing AWS CodeDeploy application within the AWS user account.

returns

None

BatchGetDeployments (new) Link ¶

Gets information about one or more deployments.

Request Syntax

client.batch_get_deployments(
    deploymentIds=[
        'string',
    ]
)
type deploymentIds

list

param deploymentIds

A list of deployment IDs, with multiple deployment IDs separated by spaces.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'deploymentsInfo': [
        {
            'applicationName': 'string',
            'deploymentGroupName': 'string',
            'deploymentConfigName': 'string',
            'deploymentId': 'string',
            'revision': {
                'revisionType': 'S3'|'GitHub',
                's3Location': {
                    'bucket': 'string',
                    'key': 'string',
                    'bundleType': 'tar'|'tgz'|'zip',
                    'version': 'string',
                    'eTag': 'string'
                },
                'gitHubLocation': {
                    'repository': 'string',
                    'commitId': 'string'
                }
            },
            'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped',
            'errorInformation': {
                'code': 'DEPLOYMENT_GROUP_MISSING'|'APPLICATION_MISSING'|'REVISION_MISSING'|'IAM_ROLE_MISSING'|'IAM_ROLE_PERMISSIONS'|'OVER_MAX_INSTANCES'|'NO_INSTANCES'|'TIMEOUT'|'HEALTH_CONSTRAINTS_INVALID'|'HEALTH_CONSTRAINTS'|'INTERNAL_ERROR',
                'message': 'string'
            },
            'createTime': datetime(2015, 1, 1),
            'startTime': datetime(2015, 1, 1),
            'completeTime': datetime(2015, 1, 1),
            'deploymentOverview': {
                'Pending': 123,
                'InProgress': 123,
                'Succeeded': 123,
                'Failed': 123,
                'Skipped': 123
            },
            'description': 'string',
            'creator': 'user'|'autoscaling',
            'ignoreApplicationStopFailures': True|False
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of a batch get deployments operation.

    • deploymentsInfo (list) --

      Information about the deployments.

      • (dict) --

        Information about a deployment.

        • applicationName (string) --

          The application name.

        • deploymentGroupName (string) --

          The deployment group name.

        • deploymentConfigName (string) --

          The deployment configuration name.

        • deploymentId (string) --

          The deployment ID.

        • revision (dict) --

          Information about the location of application artifacts that are stored and the service to retrieve them from.

          • revisionType (string) --

            The application revision's type:

            • S3: An application revision stored in Amazon S3.

            • GitHub: An application revision stored in GitHub.

          • s3Location (dict) --

            Information about the location of application artifacts that are stored in Amazon S3.

            • bucket (string) --

              The name of the Amazon S3 bucket where the application revision is stored.

            • key (string) --

              The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

            • bundleType (string) --

              The file type of the application revision. Must be one of the following:

              • tar: A tar archive file.

              • tgz: A compressed tar archive file.

              • zip: A zip archive file.

            • version (string) --

              A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

              If the version is not specified, the system will use the most recent version by default.

            • eTag (string) --

              The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.

              If the ETag is not specified as an input parameter, ETag validation of the object will be skipped.

          • gitHubLocation (dict) --

            Information about the location of application artifacts that are stored in GitHub.

            • repository (string) --

              The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.

              Specified as account/repository.

            • commitId (string) --

              The SHA1 commit ID of the GitHub commit that references the that represents the bundled artifacts for the application revision.

        • status (string) --

          The current state of the deployment as a whole.

        • errorInformation (dict) --

          Information about any error associated with this deployment.

          • code (string) --

            The error code:

            • APPLICATION_MISSING: The application was missing. Note that this error code will most likely be raised if the application is deleted after the deployment is created but before it starts.

            • DEPLOYMENT_GROUP_MISSING: The deployment group was missing. Note that this error code will most likely be raised if the deployment group is deleted after the deployment is created but before it starts.

            • REVISION_MISSING: The revision ID was missing. Note that this error code will most likely be raised if the revision is deleted after the deployment is created but before it starts.

            • IAM_ROLE_MISSING: The service role cannot be accessed.

            • IAM_ROLE_PERMISSIONS: The service role does not have the correct permissions.

            • OVER_MAX_INSTANCES: The maximum number of instances was exceeded.

            • NO_INSTANCES: No instances were specified, or no instances can be found.

            • TIMEOUT: The deployment has timed out.

            • HEALTH_CONSTRAINTS_INVALID: The revision can never successfully deploy under the instance health constraints as specified.

            • HEALTH_CONSTRAINTS: The deployment failed on too many instances to be able to successfully deploy under the specified instance health constraints.

            • INTERNAL_ERROR: There was an internal error.

          • message (string) --

            An accompanying error message.

        • createTime (datetime) --

          A timestamp indicating when the deployment was created.

        • startTime (datetime) --

          A timestamp indicating when the deployment began deploying to the deployment group.

          Note that in some cases, the reported value of the start time may be later than the complete time. This is due to differences in the clock settings of various back-end servers that participate in the overall deployment process.

        • completeTime (datetime) --

          A timestamp indicating when the deployment was completed.

        • deploymentOverview (dict) --

          A summary of the deployment status of the instances in the deployment.

          • Pending (integer) --

            The number of instances that are pending in the deployment.

          • InProgress (integer) --

            The number of instances that are in progress in the deployment.

          • Succeeded (integer) --

            The number of instances that have succeeded in the deployment.

          • Failed (integer) --

            The number of instances that have failed in the deployment.

          • Skipped (integer) --

            The number of instances that have been skipped in the deployment.

        • description (string) --

          A comment about the deployment.

        • creator (string) --

          How the deployment was created:

          • user: A user created the deployment.

          • autoscaling: Auto Scaling created the deployment.

        • ignoreApplicationStopFailures (boolean) --

          If true, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will not be considered to have failed to that instance at that point and will continue on to the BeforeInstall deployment lifecycle event.

          If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will stop to that instance, and the deployment to that instance will be considered to have failed.

CreateApplication (new) Link ¶

Creates a new application.

Request Syntax

client.create_application(
    applicationName='string'
)
type applicationName

string

param applicationName

[REQUIRED]

The name of the application. This name must be unique within the AWS user account.

rtype

dict

returns

Response Syntax

{
    'applicationId': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a create application operation.

    • applicationId (string) --

      A unique application ID.

GetDeploymentInstance (new) Link ¶

Gets information about an Amazon EC2 instance as part of a deployment.

Request Syntax

client.get_deployment_instance(
    deploymentId='string',
    instanceId='string'
)
type deploymentId

string

param deploymentId

[REQUIRED]

The unique ID of a deployment.

type instanceId

string

param instanceId

[REQUIRED]

The unique ID of an Amazon EC2 instance in the deployment's deployment group.

rtype

dict

returns

Response Syntax

{
    'instanceSummary': {
        'deploymentId': 'string',
        'instanceId': 'string',
        'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown',
        'lastUpdatedAt': datetime(2015, 1, 1),
        'lifecycleEvents': [
            {
                'lifecycleEventName': 'string',
                'diagnostics': {
                    'errorCode': 'Success'|'ScriptMissing'|'ScriptNotExecutable'|'ScriptTimedOut'|'ScriptFailed'|'UnknownError',
                    'scriptName': 'string',
                    'message': 'string',
                    'logTail': 'string'
                },
                'startTime': datetime(2015, 1, 1),
                'endTime': datetime(2015, 1, 1),
                'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'
            },
        ]
    }
}

Response Structure

  • (dict) --

    Represents the output of a get deployment instance operation.

    • instanceSummary (dict) --

      Information about the instance.

      • deploymentId (string) --

        The deployment ID.

      • instanceId (string) --

        The instance ID.

      • status (string) --

        The deployment status for this instance:

        • Pending: The deployment is pending for this instance.

        • In Progress: The deployment is in progress for this instance.

        • Succeeded: The deployment has succeeded for this instance.

        • Failed: The deployment has failed for this instance.

        • Skipped: The deployment has been skipped for this instance.

        • Unknown: The deployment status is unknown for this instance.

      • lastUpdatedAt (datetime) --

        A timestamp indicating when the instance information was last updated.

      • lifecycleEvents (list) --

        A list of lifecycle events for this instance.

        • (dict) --

          Information about a deployment lifecycle event.

          • lifecycleEventName (string) --

            The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.

          • diagnostics (dict) --

            Diagnostic information about the deployment lifecycle event.

            • errorCode (string) --

              The associated error code:

              • Success: The specified script ran.

              • ScriptMissing: The specified script was not found in the specified location.

              • ScriptNotExecutable: The specified script is not a recognized executable file type.

              • ScriptTimedOut: The specified script did not finish running in the specified time period.

              • ScriptFailed: The specified script failed to run as expected.

              • UnknownError: The specified script did not run for an unknown reason.

            • scriptName (string) --

              The name of the script.

            • message (string) --

              The message associated with the error.

            • logTail (string) --

              The last portion of the associated diagnostic log.

          • startTime (datetime) --

            A timestamp indicating when the deployment lifecycle event started.

          • endTime (datetime) --

            A timestamp indicating when the deployment lifecycle event ended.

          • status (string) --

            The deployment lifecycle event status:

            • Pending: The deployment lifecycle event is pending.

            • InProgress: The deployment lifecycle event is in progress.

            • Succeeded: The deployment lifecycle event has succeeded.

            • Failed: The deployment lifecycle event has failed.

            • Skipped: The deployment lifecycle event has been skipped.

            • Unknown: The deployment lifecycle event is unknown.