AWS CodeDeploy

2017/01/26 - AWS CodeDeploy - 2 new 11 updated api methods

Changes  This release of AWS CodeDeploy introduces support for blue/green deployments. In a blue/green deployment, the current set of instances in a deployment group is replaced by new instances that have the latest application revision installed on them. After traffic is rerouted behind a load balancer to the replacement instances, the original instances can be terminated automatically or kept running for other uses.

ContinueDeployment (new) Link ¶

Starts the process of rerouting traffic from instances in the original environment to instances in thereplacement environment without waiting for a specified wait time to elapse. (Traffic rerouting, which is achieved by registering instances in the replacement environment with the load balancer, can start as soon as all instances have a status of Ready.)

See also: AWS API Documentation

Request Syntax

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

string

param deploymentId

The deployment ID of the blue/green deployment for which you want to start rerouting traffic to the replacement environment.

returns

None

SkipWaitTimeForInstanceTermination (new) Link ¶

In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is completed.

See also: AWS API Documentation

Request Syntax

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

string

param deploymentId

The ID of the blue/green deployment for which you want to skip the instance termination wait time.

returns

None

BatchGetDeploymentGroups (updated) Link ¶
Changes (response)
{'deploymentGroupsInfo': {'blueGreenDeploymentConfiguration': {'deploymentReadyOption': {'actionOnTimeout': 'CONTINUE_DEPLOYMENT '
                                                                                                            '| '
                                                                                                            'STOP_DEPLOYMENT',
                                                                                         'waitTimeInMinutes': 'integer'},
                                                               'greenFleetProvisioningOption': {'action': 'DISCOVER_EXISTING '
                                                                                                          '| '
                                                                                                          'COPY_AUTO_SCALING_GROUP'},
                                                               'terminateBlueInstancesOnDeploymentSuccess': {'action': 'TERMINATE '
                                                                                                                       '| '
                                                                                                                       'KEEP_ALIVE',
                                                                                                             'terminationWaitTimeInMinutes': 'integer'}},
                          'deploymentStyle': {'deploymentOption': 'WITH_TRAFFIC_CONTROL '
                                                                  '| '
                                                                  'WITHOUT_TRAFFIC_CONTROL',
                                              'deploymentType': 'IN_PLACE | '
                                                                'BLUE_GREEN'},
                          'loadBalancerInfo': {'elbInfoList': [{'name': 'string'}]},
                          'triggerConfigurations': {'triggerEvents': {'DeploymentReady',
                                                                      'InstanceReady'}}}}

Gets information about one or more deployment groups.

See also: AWS API Documentation

Request Syntax

client.batch_get_deployment_groups(
    applicationName='string',
    deploymentGroupNames=[
        'string',
    ]
)
type applicationName

string

param applicationName

[REQUIRED]

The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.

type deploymentGroupNames

list

param deploymentGroupNames

[REQUIRED]

The deployment groups' names.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'deploymentGroupsInfo': [
        {
            'applicationName': 'string',
            'deploymentGroupId': 'string',
            'deploymentGroupName': 'string',
            'deploymentConfigName': 'string',
            'ec2TagFilters': [
                {
                    'Key': 'string',
                    'Value': 'string',
                    'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
                },
            ],
            'onPremisesInstanceTagFilters': [
                {
                    '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'
                }
            },
            'triggerConfigurations': [
                {
                    'triggerName': 'string',
                    'triggerTargetArn': 'string',
                    'triggerEvents': [
                        'DeploymentStart'|'DeploymentSuccess'|'DeploymentFailure'|'DeploymentStop'|'DeploymentRollback'|'DeploymentReady'|'InstanceStart'|'InstanceSuccess'|'InstanceFailure'|'InstanceReady',
                    ]
                },
            ],
            'alarmConfiguration': {
                'enabled': True|False,
                'ignorePollAlarmFailure': True|False,
                'alarms': [
                    {
                        'name': 'string'
                    },
                ]
            },
            'autoRollbackConfiguration': {
                'enabled': True|False,
                'events': [
                    'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
                ]
            },
            'deploymentStyle': {
                'deploymentType': 'IN_PLACE'|'BLUE_GREEN',
                'deploymentOption': 'WITH_TRAFFIC_CONTROL'|'WITHOUT_TRAFFIC_CONTROL'
            },
            'blueGreenDeploymentConfiguration': {
                'terminateBlueInstancesOnDeploymentSuccess': {
                    'action': 'TERMINATE'|'KEEP_ALIVE',
                    'terminationWaitTimeInMinutes': 123
                },
                'deploymentReadyOption': {
                    'actionOnTimeout': 'CONTINUE_DEPLOYMENT'|'STOP_DEPLOYMENT',
                    'waitTimeInMinutes': 123
                },
                'greenFleetProvisioningOption': {
                    'action': 'DISCOVER_EXISTING'|'COPY_AUTO_SCALING_GROUP'
                }
            },
            'loadBalancerInfo': {
                'elbInfoList': [
                    {
                        'name': 'string'
                    },
                ]
            }
        },
    ],
    'errorMessage': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a batch get deployment groups operation.

    • deploymentGroupsInfo (list) --

      Information about the deployment groups.

      • (dict) --

        Information about a 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 on which to filter.

          • (dict) --

            Information about a tag filter.

            • Key (string) --

              The tag filter key.

            • Value (string) --

              The tag filter value.

            • Type (string) --

              The tag filter type:

              • KEY_ONLY: Key only.

              • VALUE_ONLY: Value only.

              • KEY_AND_VALUE: Key and value.

        • onPremisesInstanceTagFilters (list) --

          The on-premises instance tags on which to filter.

          • (dict) --

            Information about an on-premises instance tag filter.

            • Key (string) --

              The on-premises instance tag filter key.

            • Value (string) --

              The on-premises instance tag filter value.

            • Type (string) --

              The on-premises instance 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 type and location.

          • revisionType (string) --

            The type of application revision:

            • S3: An application revision stored in Amazon S3.

            • GitHub: An application revision stored in GitHub.

          • s3Location (dict) --

            Information about the location of application artifacts 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 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 represents the bundled artifacts for the application revision.

        • triggerConfigurations (list) --

          Information about triggers associated with the deployment group.

          • (dict) --

            Information about notification triggers for the deployment group.

            • triggerName (string) --

              The name of the notification trigger.

            • triggerTargetArn (string) --

              The ARN of the Amazon Simple Notification Service topic through which notifications about deployment or instance events are sent.

            • triggerEvents (list) --

              The event type or types for which notifications are triggered.

              • (string) --

        • alarmConfiguration (dict) --

          A list of alarms associated with the deployment group.

          • enabled (boolean) --

            Indicates whether the alarm configuration is enabled.

          • ignorePollAlarmFailure (boolean) --

            Indicates whether a deployment should continue if information about the current state of alarms cannot be retrieved from Amazon CloudWatch. The default value is false.

            • true: The deployment will proceed even if alarm status information can't be retrieved from Amazon CloudWatch.

            • false: The deployment will stop if alarm status information can't be retrieved from Amazon CloudWatch.

          • alarms (list) --

            A list of alarms configured for the deployment group. A maximum of 10 alarms can be added to a deployment group.

            • (dict) --

              Information about an alarm.

              • name (string) --

                The name of the alarm. Maximum length is 255 characters. Each alarm name can be used only once in a list of alarms.

        • autoRollbackConfiguration (dict) --

          Information about the automatic rollback configuration associated with the deployment group.

          • enabled (boolean) --

            Indicates whether a defined automatic rollback configuration is currently enabled.

          • events (list) --

            The event type or types that trigger a rollback.

            • (string) --

        • deploymentStyle (dict) --

          Information about the type of deployment, either standard or blue/green, you want to run and whether to route deployment traffic behind a load balancer.

          • deploymentType (string) --

            Indicates whether to run a standard deployment or a blue/green deployment.

          • deploymentOption (string) --

            Indicates whether to route deployment traffic behind a load balancer.

        • blueGreenDeploymentConfiguration (dict) --

          Information about blue/green deployment options for a deployment group.

          • terminateBlueInstancesOnDeploymentSuccess (dict) --

            Information about whether to terminate instances in the original fleet during a blue/green deployment.

            • action (string) --

              The action to take on instances in the original environment after a successful blue/green deployment.

              • TERMINATE: Instances are terminated after a specified wait time.

              • KEEP_ALIVE: Instances are left running after they are deregistered from the load balancer and removed from the deployment group.

            • terminationWaitTimeInMinutes (integer) --

              The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment.

          • deploymentReadyOption (dict) --

            Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.

            • actionOnTimeout (string) --

              Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.

              • CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed on the instances in the replacement environment.

              • STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If traffic is not rerouted manually before the end of the specified wait period, the deployment status is changed to Stopped.

            • waitTimeInMinutes (integer) --

              The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout

          • greenFleetProvisioningOption (dict) --

            Information about how instances are provisioned for a replacement environment in a blue/green deployment.

            • action (string) --

              The method used to add instances to a replacement environment.

              • DISCOVER_EXISTING: Use instances that already exist or will be created manually.

              • COPY_AUTO_SCALING_GROUP: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.

        • loadBalancerInfo (dict) --

          Information about the load balancer to use in a blue/green deployment.

          • elbInfoList (list) --

            An array containing information about the load balancer in Elastic Load Balancing to use in a blue/green deployment.

            • (dict) --

              Information about a load balancer in Elastic Load Balancing to use in a blue/green deployment.

              • name (string) --

                The name of the load balancer that will be used to route traffic from original instances to replacement instances in a blue/green deployment.

    • errorMessage (string) --

      Information about errors that may have occurred during the API call.

BatchGetDeploymentInstances (updated) Link ¶
Changes (response)
{'instancesSummary': {'instanceType': 'Blue | Green', 'status': {'Ready'}}}

Gets information about one or more instance that are part of a deployment group.

See also: AWS API Documentation

Request Syntax

client.batch_get_deployment_instances(
    deploymentId='string',
    instanceIds=[
        'string',
    ]
)
type deploymentId

string

param deploymentId

[REQUIRED]

The unique ID of a deployment.

type instanceIds

list

param instanceIds

[REQUIRED]

The unique IDs of instances in the deployment group.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'instancesSummary': [
        {
            'deploymentId': 'string',
            'instanceId': 'string',
            'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'|'Ready',
            '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'
                },
            ],
            'instanceType': 'Blue'|'Green'
        },
    ],
    'errorMessage': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a batch get deployment instance operation.

    • instancesSummary (list) --

      Information about the instance.

      • (dict) --

        Information about an instance in a deployment.

        • 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 diagnostic log.

                If available, AWS CodeDeploy returns up to the last 4 KB of the 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 ran successfully.

              • Failed: The deployment lifecycle event has failed.

              • Skipped: The deployment lifecycle event has been skipped.

              • Unknown: The deployment lifecycle event is unknown.

        • instanceType (string) --

          Information about which environment an instance belongs to in a blue/green deployment.

          • BLUE: The instance is part of the original environment.

          • GREEN: The instance is part of the replacement environment.

    • errorMessage (string) --

      Information about errors that may have occurred during the API call.

BatchGetDeployments (updated) Link ¶
Changes (response)
{'deploymentsInfo': {'additionalDeploymentStatusInfo': 'string',
                     'blueGreenDeploymentConfiguration': {'deploymentReadyOption': {'actionOnTimeout': 'CONTINUE_DEPLOYMENT '
                                                                                                       '| '
                                                                                                       'STOP_DEPLOYMENT',
                                                                                    'waitTimeInMinutes': 'integer'},
                                                          'greenFleetProvisioningOption': {'action': 'DISCOVER_EXISTING '
                                                                                                     '| '
                                                                                                     'COPY_AUTO_SCALING_GROUP'},
                                                          'terminateBlueInstancesOnDeploymentSuccess': {'action': 'TERMINATE '
                                                                                                                  '| '
                                                                                                                  'KEEP_ALIVE',
                                                                                                        'terminationWaitTimeInMinutes': 'integer'}},
                     'deploymentOverview': {'Ready': 'long'},
                     'deploymentStyle': {'deploymentOption': 'WITH_TRAFFIC_CONTROL '
                                                             '| '
                                                             'WITHOUT_TRAFFIC_CONTROL',
                                         'deploymentType': 'IN_PLACE | '
                                                           'BLUE_GREEN'},
                     'instanceTerminationWaitTimeStarted': 'boolean',
                     'loadBalancerInfo': {'elbInfoList': [{'name': 'string'}]},
                     'status': {'Ready'},
                     'targetInstances': {'autoScalingGroups': ['string'],
                                         'tagFilters': [{'Key': 'string',
                                                         'Type': 'KEY_ONLY | '
                                                                 'VALUE_ONLY | '
                                                                 'KEY_AND_VALUE',
                                                         'Value': 'string'}]}}}

Gets information about one or more deployments.

See also: AWS API Documentation

Request Syntax

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

list

param deploymentIds

A list of 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'|'Ready',
            'errorInformation': {
                'code': 'DEPLOYMENT_GROUP_MISSING'|'APPLICATION_MISSING'|'REVISION_MISSING'|'IAM_ROLE_MISSING'|'IAM_ROLE_PERMISSIONS'|'NO_EC2_SUBSCRIPTION'|'OVER_MAX_INSTANCES'|'NO_INSTANCES'|'TIMEOUT'|'HEALTH_CONSTRAINTS_INVALID'|'HEALTH_CONSTRAINTS'|'INTERNAL_ERROR'|'THROTTLED'|'ALARM_ACTIVE'|'AGENT_ISSUE'|'AUTO_SCALING_IAM_ROLE_PERMISSIONS'|'AUTO_SCALING_CONFIGURATION'|'MANUAL_STOP',
                '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,
                'Ready': 123
            },
            'description': 'string',
            'creator': 'user'|'autoscaling'|'codeDeployRollback',
            'ignoreApplicationStopFailures': True|False,
            'autoRollbackConfiguration': {
                'enabled': True|False,
                'events': [
                    'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
                ]
            },
            'updateOutdatedInstancesOnly': True|False,
            'rollbackInfo': {
                'rollbackDeploymentId': 'string',
                'rollbackTriggeringDeploymentId': 'string',
                'rollbackMessage': 'string'
            },
            'deploymentStyle': {
                'deploymentType': 'IN_PLACE'|'BLUE_GREEN',
                'deploymentOption': 'WITH_TRAFFIC_CONTROL'|'WITHOUT_TRAFFIC_CONTROL'
            },
            'targetInstances': {
                'tagFilters': [
                    {
                        'Key': 'string',
                        'Value': 'string',
                        'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
                    },
                ],
                'autoScalingGroups': [
                    'string',
                ]
            },
            'instanceTerminationWaitTimeStarted': True|False,
            'blueGreenDeploymentConfiguration': {
                'terminateBlueInstancesOnDeploymentSuccess': {
                    'action': 'TERMINATE'|'KEEP_ALIVE',
                    'terminationWaitTimeInMinutes': 123
                },
                'deploymentReadyOption': {
                    'actionOnTimeout': 'CONTINUE_DEPLOYMENT'|'STOP_DEPLOYMENT',
                    'waitTimeInMinutes': 123
                },
                'greenFleetProvisioningOption': {
                    'action': 'DISCOVER_EXISTING'|'COPY_AUTO_SCALING_GROUP'
                }
            },
            'loadBalancerInfo': {
                'elbInfoList': [
                    {
                        'name': 'string'
                    },
                ]
            },
            'additionalDeploymentStatusInfo': 'string'
        },
    ]
}

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 stored application artifacts and the service from which to retrieve them.

          • revisionType (string) --

            The type of application revision:

            • S3: An application revision stored in Amazon S3.

            • GitHub: An application revision stored in GitHub.

          • s3Location (dict) --

            Information about the location of application artifacts 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 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 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) --

            For information about additional error codes, see Error Codes for AWS CodeDeploy in the AWS CodeDeploy User Guide.

            The error code:

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

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

            • HEALTH_CONSTRAINTS: The deployment failed on too many instances to be successfully deployed within the instance health constraints specified.

            • HEALTH_CONSTRAINTS_INVALID: The revision cannot be successfully deployed within the instance health constraints specified.

            • IAM_ROLE_MISSING: The service role cannot be accessed.

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

            • INTERNAL_ERROR: There was an internal error.

            • NO_EC2_SUBSCRIPTION: The calling account is not subscribed to the Amazon EC2 service.

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

            • OVER_MAX_INSTANCES: The maximum number of instance was exceeded.

            • THROTTLED: The operation was throttled because the calling account exceeded the throttling limits of one or more AWS services.

            • TIMEOUT: The deployment has timed out.

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

          • message (string) --

            An accompanying error message.

        • createTime (datetime) --

          A timestamp indicating when the deployment was created.

        • startTime (datetime) --

          A timestamp indicating when the deployment was deployed to the deployment group.

          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 back-end servers that participate in the deployment process.

        • completeTime (datetime) --

          A timestamp indicating when the deployment was complete.

        • deploymentOverview (dict) --

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

          • Pending (integer) --

            The number of instances in the deployment in a pending state.

          • InProgress (integer) --

            The number of instances in which the deployment is in progress.

          • Succeeded (integer) --

            The number of instances in the deployment to which revisions have been successfully deployed.

          • Failed (integer) --

            The number of instances in the deployment in a failed state.

          • Skipped (integer) --

            The number of instances in the deployment in a skipped state.

          • Ready (integer) --

            The number of instances in a replacement environment ready to receive traffic in a blue/green deployment.

        • description (string) --

          A comment about the deployment.

        • creator (string) --

          The means by which the deployment was created:

          • user: A user created the deployment.

          • autoscaling: Auto Scaling created the deployment.

          • codeDeployRollback: A rollback process created the deployment.

        • ignoreApplicationStopFailures (boolean) --

          If true, then if the deployment causes the ApplicationStop deployment lifecycle event to an instance to fail, the deployment to that instance will not be considered to have failed 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 an instance to fail, the deployment to that instance will stop, and the deployment to that instance will be considered to have failed.

        • autoRollbackConfiguration (dict) --

          Information about the automatic rollback configuration associated with the deployment.

          • enabled (boolean) --

            Indicates whether a defined automatic rollback configuration is currently enabled.

          • events (list) --

            The event type or types that trigger a rollback.

            • (string) --

        • updateOutdatedInstancesOnly (boolean) --

          Indicates whether only instances that are not running the latest application revision are to be deployed to.

        • rollbackInfo (dict) --

          Information about a deployment rollback.

          • rollbackDeploymentId (string) --

            The ID of the deployment rollback.

          • rollbackTriggeringDeploymentId (string) --

            The deployment ID of the deployment that was underway and triggered a rollback deployment because it failed or was stopped.

          • rollbackMessage (string) --

            Information describing the status of a deployment rollback; for example, whether the deployment can't be rolled back, is in progress, failed, or succeeded.

        • deploymentStyle (dict) --

          Information about the type of deployment, either standard or blue/green, you want to run and whether to route deployment traffic behind a load balancer.

          • deploymentType (string) --

            Indicates whether to run a standard deployment or a blue/green deployment.

          • deploymentOption (string) --

            Indicates whether to route deployment traffic behind a load balancer.

        • targetInstances (dict) --

          Information about the instances that belong to the replacement environment in a blue/green deployment.

          • tagFilters (list) --

            The tag filter key, type, and value used to identify Amazon EC2 instances in a replacement environment for a blue/green deployment.

            • (dict) --

              Information about a tag filter.

              • Key (string) --

                The tag filter key.

              • Value (string) --

                The tag filter value.

              • Type (string) --

                The tag filter type:

                • KEY_ONLY: Key only.

                • VALUE_ONLY: Value only.

                • KEY_AND_VALUE: Key and value.

          • autoScalingGroups (list) --

            The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green deployment.

            • (string) --

        • instanceTerminationWaitTimeStarted (boolean) --

          Indicates whether the wait period set for the termination of instances in the original environment has started. Status is 'false' if the KEEP_ALIVE option is specified; otherwise, 'true' as soon as the termination wait period starts.

        • blueGreenDeploymentConfiguration (dict) --

          Information about blue/green deployment options for this deployment.

          • terminateBlueInstancesOnDeploymentSuccess (dict) --

            Information about whether to terminate instances in the original fleet during a blue/green deployment.

            • action (string) --

              The action to take on instances in the original environment after a successful blue/green deployment.

              • TERMINATE: Instances are terminated after a specified wait time.

              • KEEP_ALIVE: Instances are left running after they are deregistered from the load balancer and removed from the deployment group.

            • terminationWaitTimeInMinutes (integer) --

              The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment.

          • deploymentReadyOption (dict) --

            Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.

            • actionOnTimeout (string) --

              Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.

              • CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed on the instances in the replacement environment.

              • STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If traffic is not rerouted manually before the end of the specified wait period, the deployment status is changed to Stopped.

            • waitTimeInMinutes (integer) --

              The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout

          • greenFleetProvisioningOption (dict) --

            Information about how instances are provisioned for a replacement environment in a blue/green deployment.

            • action (string) --

              The method used to add instances to a replacement environment.

              • DISCOVER_EXISTING: Use instances that already exist or will be created manually.

              • COPY_AUTO_SCALING_GROUP: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.

        • loadBalancerInfo (dict) --

          Information about the load balancer used in this blue/green deployment.

          • elbInfoList (list) --

            An array containing information about the load balancer in Elastic Load Balancing to use in a blue/green deployment.

            • (dict) --

              Information about a load balancer in Elastic Load Balancing to use in a blue/green deployment.

              • name (string) --

                The name of the load balancer that will be used to route traffic from original instances to replacement instances in a blue/green deployment.

        • additionalDeploymentStatusInfo (string) --

          Provides information about the results of a deployment, such as whether instances in the original environment in a blue/green deployment were not terminated.

CreateDeployment (updated) Link ¶
Changes (request)
{'targetInstances': {'autoScalingGroups': ['string'],
                     'tagFilters': [{'Key': 'string',
                                     'Type': 'KEY_ONLY | VALUE_ONLY | '
                                             'KEY_AND_VALUE',
                                     'Value': 'string'}]}}

Deploys an application revision through the specified deployment group.

See also: AWS API Documentation

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,
    targetInstances={
        'tagFilters': [
            {
                'Key': 'string',
                'Value': 'string',
                'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
            },
        ],
        'autoScalingGroups': [
            'string',
        ]
    },
    autoRollbackConfiguration={
        'enabled': True|False,
        'events': [
            'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
        ]
    },
    updateOutdatedInstancesOnly=True|False
)
type applicationName

string

param applicationName

[REQUIRED]

The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.

type deploymentGroupName

string

param deploymentGroupName

The name of the deployment group.

type revision

dict

param revision

The type and location of the revision to deploy.

  • revisionType (string) --

    The type of application revision:

    • S3: An application revision stored in Amazon S3.

    • GitHub: An application revision stored in GitHub.

  • s3Location (dict) --

    Information about the location of application artifacts 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 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 represents the bundled artifacts for the application revision.

type deploymentConfigName

string

param deploymentConfigName

The name of a deployment configuration associated with the applicable IAM user or AWS 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 an instance to fail, the deployment to that instance will not be considered to have failed 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 an instance, the deployment to that instance will stop, and the deployment to that instance will be considered to have failed.

type targetInstances

dict

param targetInstances

Information about the instances that will belong to the replacement environment in a blue/green deployment.

  • tagFilters (list) --

    The tag filter key, type, and value used to identify Amazon EC2 instances in a replacement environment for a blue/green deployment.

    • (dict) --

      Information about a tag filter.

      • Key (string) --

        The tag filter key.

      • Value (string) --

        The tag filter value.

      • Type (string) --

        The tag filter type:

        • KEY_ONLY: Key only.

        • VALUE_ONLY: Value only.

        • KEY_AND_VALUE: Key and value.

  • autoScalingGroups (list) --

    The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green deployment.

    • (string) --

type autoRollbackConfiguration

dict

param autoRollbackConfiguration

Configuration information for an automatic rollback that is added when a deployment is created.

  • enabled (boolean) --

    Indicates whether a defined automatic rollback configuration is currently enabled.

  • events (list) --

    The event type or types that trigger a rollback.

    • (string) --

type updateOutdatedInstancesOnly

boolean

param updateOutdatedInstancesOnly

Indicates whether to deploy to all instances or only to instances that are not running the latest application revision.

rtype

dict

returns

Response Syntax

{
    'deploymentId': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a create deployment operation.

    • deploymentId (string) --

      A unique deployment ID.

CreateDeploymentGroup (updated) Link ¶
Changes (request)
{'blueGreenDeploymentConfiguration': {'deploymentReadyOption': {'actionOnTimeout': 'CONTINUE_DEPLOYMENT '
                                                                                   '| '
                                                                                   'STOP_DEPLOYMENT',
                                                                'waitTimeInMinutes': 'integer'},
                                      'greenFleetProvisioningOption': {'action': 'DISCOVER_EXISTING '
                                                                                 '| '
                                                                                 'COPY_AUTO_SCALING_GROUP'},
                                      'terminateBlueInstancesOnDeploymentSuccess': {'action': 'TERMINATE '
                                                                                              '| '
                                                                                              'KEEP_ALIVE',
                                                                                    'terminationWaitTimeInMinutes': 'integer'}},
 'deploymentStyle': {'deploymentOption': 'WITH_TRAFFIC_CONTROL | '
                                         'WITHOUT_TRAFFIC_CONTROL',
                     'deploymentType': 'IN_PLACE | BLUE_GREEN'},
 'loadBalancerInfo': {'elbInfoList': [{'name': 'string'}]},
 'triggerConfigurations': {'triggerEvents': {'DeploymentReady',
                                             'InstanceReady'}}}

Creates a deployment group to which application revisions will be deployed.

See also: AWS API Documentation

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'
        },
    ],
    onPremisesInstanceTagFilters=[
        {
            'Key': 'string',
            'Value': 'string',
            'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
        },
    ],
    autoScalingGroups=[
        'string',
    ],
    serviceRoleArn='string',
    triggerConfigurations=[
        {
            'triggerName': 'string',
            'triggerTargetArn': 'string',
            'triggerEvents': [
                'DeploymentStart'|'DeploymentSuccess'|'DeploymentFailure'|'DeploymentStop'|'DeploymentRollback'|'DeploymentReady'|'InstanceStart'|'InstanceSuccess'|'InstanceFailure'|'InstanceReady',
            ]
        },
    ],
    alarmConfiguration={
        'enabled': True|False,
        'ignorePollAlarmFailure': True|False,
        'alarms': [
            {
                'name': 'string'
            },
        ]
    },
    autoRollbackConfiguration={
        'enabled': True|False,
        'events': [
            'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
        ]
    },
    deploymentStyle={
        'deploymentType': 'IN_PLACE'|'BLUE_GREEN',
        'deploymentOption': 'WITH_TRAFFIC_CONTROL'|'WITHOUT_TRAFFIC_CONTROL'
    },
    blueGreenDeploymentConfiguration={
        'terminateBlueInstancesOnDeploymentSuccess': {
            'action': 'TERMINATE'|'KEEP_ALIVE',
            'terminationWaitTimeInMinutes': 123
        },
        'deploymentReadyOption': {
            'actionOnTimeout': 'CONTINUE_DEPLOYMENT'|'STOP_DEPLOYMENT',
            'waitTimeInMinutes': 123
        },
        'greenFleetProvisioningOption': {
            'action': 'DISCOVER_EXISTING'|'COPY_AUTO_SCALING_GROUP'
        }
    },
    loadBalancerInfo={
        'elbInfoList': [
            {
                'name': 'string'
            },
        ]
    }
)
type applicationName

string

param applicationName

[REQUIRED]

The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.

type deploymentGroupName

string

param deploymentGroupName

[REQUIRED]

The name of a new deployment group for the specified application.

type deploymentConfigName

string

param deploymentConfigName

If specified, the deployment configuration name can be either one of the predefined configurations provided with AWS CodeDeploy or a custom deployment configuration that you create by calling the create deployment configuration operation.

CodeDeployDefault.OneAtATime is the default deployment configuration. It is used if a configuration isn't specified for the deployment or the deployment group.

For more information about the predefined deployment configurations in AWS CodeDeploy, see see Working with Deployment Groups in AWS CodeDeploy in the AWS CodeDeploy User Guide.

type ec2TagFilters

list

param ec2TagFilters

The Amazon EC2 tags on which to filter.

  • (dict) --

    Information about a tag filter.

    • Key (string) --

      The tag filter key.

    • Value (string) --

      The tag filter value.

    • Type (string) --

      The tag filter type:

      • KEY_ONLY: Key only.

      • VALUE_ONLY: Value only.

      • KEY_AND_VALUE: Key and value.

type onPremisesInstanceTagFilters

list

param onPremisesInstanceTagFilters

The on-premises instance tags on which to filter.

  • (dict) --

    Information about an on-premises instance tag filter.

    • Key (string) --

      The on-premises instance tag filter key.

    • Value (string) --

      The on-premises instance tag filter value.

    • Type (string) --

      The on-premises instance 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

[REQUIRED]

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

type triggerConfigurations

list

param triggerConfigurations

Information about triggers to create when the deployment group is created. For examples, see Create a Trigger for an AWS CodeDeploy Event in the AWS CodeDeploy User Guide.

  • (dict) --

    Information about notification triggers for the deployment group.

    • triggerName (string) --

      The name of the notification trigger.

    • triggerTargetArn (string) --

      The ARN of the Amazon Simple Notification Service topic through which notifications about deployment or instance events are sent.

    • triggerEvents (list) --

      The event type or types for which notifications are triggered.

      • (string) --

type alarmConfiguration

dict

param alarmConfiguration

Information to add about Amazon CloudWatch alarms when the deployment group is created.

  • enabled (boolean) --

    Indicates whether the alarm configuration is enabled.

  • ignorePollAlarmFailure (boolean) --

    Indicates whether a deployment should continue if information about the current state of alarms cannot be retrieved from Amazon CloudWatch. The default value is false.

    • true: The deployment will proceed even if alarm status information can't be retrieved from Amazon CloudWatch.

    • false: The deployment will stop if alarm status information can't be retrieved from Amazon CloudWatch.

  • alarms (list) --

    A list of alarms configured for the deployment group. A maximum of 10 alarms can be added to a deployment group.

    • (dict) --

      Information about an alarm.

      • name (string) --

        The name of the alarm. Maximum length is 255 characters. Each alarm name can be used only once in a list of alarms.

type autoRollbackConfiguration

dict

param autoRollbackConfiguration

Configuration information for an automatic rollback that is added when a deployment group is created.

  • enabled (boolean) --

    Indicates whether a defined automatic rollback configuration is currently enabled.

  • events (list) --

    The event type or types that trigger a rollback.

    • (string) --

type deploymentStyle

dict

param deploymentStyle

Information about the type of deployment, standard or blue/green, that you want to run and whether to route deployment traffic behind a load balancer.

  • deploymentType (string) --

    Indicates whether to run a standard deployment or a blue/green deployment.

  • deploymentOption (string) --

    Indicates whether to route deployment traffic behind a load balancer.

type blueGreenDeploymentConfiguration

dict

param blueGreenDeploymentConfiguration

Information about blue/green deployment options for a deployment group.

  • terminateBlueInstancesOnDeploymentSuccess (dict) --

    Information about whether to terminate instances in the original fleet during a blue/green deployment.

    • action (string) --

      The action to take on instances in the original environment after a successful blue/green deployment.

      • TERMINATE: Instances are terminated after a specified wait time.

      • KEEP_ALIVE: Instances are left running after they are deregistered from the load balancer and removed from the deployment group.

    • terminationWaitTimeInMinutes (integer) --

      The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment.

  • deploymentReadyOption (dict) --

    Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.

    • actionOnTimeout (string) --

      Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.

      • CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed on the instances in the replacement environment.

      • STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If traffic is not rerouted manually before the end of the specified wait period, the deployment status is changed to Stopped.

    • waitTimeInMinutes (integer) --

      The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout

  • greenFleetProvisioningOption (dict) --

    Information about how instances are provisioned for a replacement environment in a blue/green deployment.

    • action (string) --

      The method used to add instances to a replacement environment.

      • DISCOVER_EXISTING: Use instances that already exist or will be created manually.

      • COPY_AUTO_SCALING_GROUP: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.

type loadBalancerInfo

dict

param loadBalancerInfo

Information about the load balancer used in a blue/green deployment.

  • elbInfoList (list) --

    An array containing information about the load balancer in Elastic Load Balancing to use in a blue/green deployment.

    • (dict) --

      Information about a load balancer in Elastic Load Balancing to use in a blue/green deployment.

      • name (string) --

        The name of the load balancer that will be used to route traffic from original instances to replacement instances in a blue/green deployment.

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.

GetDeployment (updated) Link ¶
Changes (response)
{'deploymentInfo': {'additionalDeploymentStatusInfo': 'string',
                    'blueGreenDeploymentConfiguration': {'deploymentReadyOption': {'actionOnTimeout': 'CONTINUE_DEPLOYMENT '
                                                                                                      '| '
                                                                                                      'STOP_DEPLOYMENT',
                                                                                   'waitTimeInMinutes': 'integer'},
                                                         'greenFleetProvisioningOption': {'action': 'DISCOVER_EXISTING '
                                                                                                    '| '
                                                                                                    'COPY_AUTO_SCALING_GROUP'},
                                                         'terminateBlueInstancesOnDeploymentSuccess': {'action': 'TERMINATE '
                                                                                                                 '| '
                                                                                                                 'KEEP_ALIVE',
                                                                                                       'terminationWaitTimeInMinutes': 'integer'}},
                    'deploymentOverview': {'Ready': 'long'},
                    'deploymentStyle': {'deploymentOption': 'WITH_TRAFFIC_CONTROL '
                                                            '| '
                                                            'WITHOUT_TRAFFIC_CONTROL',
                                        'deploymentType': 'IN_PLACE | '
                                                          'BLUE_GREEN'},
                    'instanceTerminationWaitTimeStarted': 'boolean',
                    'loadBalancerInfo': {'elbInfoList': [{'name': 'string'}]},
                    'status': {'Ready'},
                    'targetInstances': {'autoScalingGroups': ['string'],
                                        'tagFilters': [{'Key': 'string',
                                                        'Type': 'KEY_ONLY | '
                                                                'VALUE_ONLY | '
                                                                'KEY_AND_VALUE',
                                                        'Value': 'string'}]}}}

Gets information about a deployment.

See also: AWS API Documentation

Request Syntax

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

string

param deploymentId

[REQUIRED]

A deployment ID associated with the applicable IAM user or AWS 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'|'Ready',
        'errorInformation': {
            'code': 'DEPLOYMENT_GROUP_MISSING'|'APPLICATION_MISSING'|'REVISION_MISSING'|'IAM_ROLE_MISSING'|'IAM_ROLE_PERMISSIONS'|'NO_EC2_SUBSCRIPTION'|'OVER_MAX_INSTANCES'|'NO_INSTANCES'|'TIMEOUT'|'HEALTH_CONSTRAINTS_INVALID'|'HEALTH_CONSTRAINTS'|'INTERNAL_ERROR'|'THROTTLED'|'ALARM_ACTIVE'|'AGENT_ISSUE'|'AUTO_SCALING_IAM_ROLE_PERMISSIONS'|'AUTO_SCALING_CONFIGURATION'|'MANUAL_STOP',
            '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,
            'Ready': 123
        },
        'description': 'string',
        'creator': 'user'|'autoscaling'|'codeDeployRollback',
        'ignoreApplicationStopFailures': True|False,
        'autoRollbackConfiguration': {
            'enabled': True|False,
            'events': [
                'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
            ]
        },
        'updateOutdatedInstancesOnly': True|False,
        'rollbackInfo': {
            'rollbackDeploymentId': 'string',
            'rollbackTriggeringDeploymentId': 'string',
            'rollbackMessage': 'string'
        },
        'deploymentStyle': {
            'deploymentType': 'IN_PLACE'|'BLUE_GREEN',
            'deploymentOption': 'WITH_TRAFFIC_CONTROL'|'WITHOUT_TRAFFIC_CONTROL'
        },
        'targetInstances': {
            'tagFilters': [
                {
                    'Key': 'string',
                    'Value': 'string',
                    'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
                },
            ],
            'autoScalingGroups': [
                'string',
            ]
        },
        'instanceTerminationWaitTimeStarted': True|False,
        'blueGreenDeploymentConfiguration': {
            'terminateBlueInstancesOnDeploymentSuccess': {
                'action': 'TERMINATE'|'KEEP_ALIVE',
                'terminationWaitTimeInMinutes': 123
            },
            'deploymentReadyOption': {
                'actionOnTimeout': 'CONTINUE_DEPLOYMENT'|'STOP_DEPLOYMENT',
                'waitTimeInMinutes': 123
            },
            'greenFleetProvisioningOption': {
                'action': 'DISCOVER_EXISTING'|'COPY_AUTO_SCALING_GROUP'
            }
        },
        'loadBalancerInfo': {
            'elbInfoList': [
                {
                    'name': 'string'
                },
            ]
        },
        'additionalDeploymentStatusInfo': 'string'
    }
}

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 stored application artifacts and the service from which to retrieve them.

        • revisionType (string) --

          The type of application revision:

          • S3: An application revision stored in Amazon S3.

          • GitHub: An application revision stored in GitHub.

        • s3Location (dict) --

          Information about the location of application artifacts 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 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 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) --

          For information about additional error codes, see Error Codes for AWS CodeDeploy in the AWS CodeDeploy User Guide.

          The error code:

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

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

          • HEALTH_CONSTRAINTS: The deployment failed on too many instances to be successfully deployed within the instance health constraints specified.

          • HEALTH_CONSTRAINTS_INVALID: The revision cannot be successfully deployed within the instance health constraints specified.

          • IAM_ROLE_MISSING: The service role cannot be accessed.

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

          • INTERNAL_ERROR: There was an internal error.

          • NO_EC2_SUBSCRIPTION: The calling account is not subscribed to the Amazon EC2 service.

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

          • OVER_MAX_INSTANCES: The maximum number of instance was exceeded.

          • THROTTLED: The operation was throttled because the calling account exceeded the throttling limits of one or more AWS services.

          • TIMEOUT: The deployment has timed out.

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

        • message (string) --

          An accompanying error message.

      • createTime (datetime) --

        A timestamp indicating when the deployment was created.

      • startTime (datetime) --

        A timestamp indicating when the deployment was deployed to the deployment group.

        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 back-end servers that participate in the deployment process.

      • completeTime (datetime) --

        A timestamp indicating when the deployment was complete.

      • deploymentOverview (dict) --

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

        • Pending (integer) --

          The number of instances in the deployment in a pending state.

        • InProgress (integer) --

          The number of instances in which the deployment is in progress.

        • Succeeded (integer) --

          The number of instances in the deployment to which revisions have been successfully deployed.

        • Failed (integer) --

          The number of instances in the deployment in a failed state.

        • Skipped (integer) --

          The number of instances in the deployment in a skipped state.

        • Ready (integer) --

          The number of instances in a replacement environment ready to receive traffic in a blue/green deployment.

      • description (string) --

        A comment about the deployment.

      • creator (string) --

        The means by which the deployment was created:

        • user: A user created the deployment.

        • autoscaling: Auto Scaling created the deployment.

        • codeDeployRollback: A rollback process created the deployment.

      • ignoreApplicationStopFailures (boolean) --

        If true, then if the deployment causes the ApplicationStop deployment lifecycle event to an instance to fail, the deployment to that instance will not be considered to have failed 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 an instance to fail, the deployment to that instance will stop, and the deployment to that instance will be considered to have failed.

      • autoRollbackConfiguration (dict) --

        Information about the automatic rollback configuration associated with the deployment.

        • enabled (boolean) --

          Indicates whether a defined automatic rollback configuration is currently enabled.

        • events (list) --

          The event type or types that trigger a rollback.

          • (string) --

      • updateOutdatedInstancesOnly (boolean) --

        Indicates whether only instances that are not running the latest application revision are to be deployed to.

      • rollbackInfo (dict) --

        Information about a deployment rollback.

        • rollbackDeploymentId (string) --

          The ID of the deployment rollback.

        • rollbackTriggeringDeploymentId (string) --

          The deployment ID of the deployment that was underway and triggered a rollback deployment because it failed or was stopped.

        • rollbackMessage (string) --

          Information describing the status of a deployment rollback; for example, whether the deployment can't be rolled back, is in progress, failed, or succeeded.

      • deploymentStyle (dict) --

        Information about the type of deployment, either standard or blue/green, you want to run and whether to route deployment traffic behind a load balancer.

        • deploymentType (string) --

          Indicates whether to run a standard deployment or a blue/green deployment.

        • deploymentOption (string) --

          Indicates whether to route deployment traffic behind a load balancer.

      • targetInstances (dict) --

        Information about the instances that belong to the replacement environment in a blue/green deployment.

        • tagFilters (list) --

          The tag filter key, type, and value used to identify Amazon EC2 instances in a replacement environment for a blue/green deployment.

          • (dict) --

            Information about a tag filter.

            • Key (string) --

              The tag filter key.

            • Value (string) --

              The tag filter value.

            • Type (string) --

              The tag filter type:

              • KEY_ONLY: Key only.

              • VALUE_ONLY: Value only.

              • KEY_AND_VALUE: Key and value.

        • autoScalingGroups (list) --

          The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green deployment.

          • (string) --

      • instanceTerminationWaitTimeStarted (boolean) --

        Indicates whether the wait period set for the termination of instances in the original environment has started. Status is 'false' if the KEEP_ALIVE option is specified; otherwise, 'true' as soon as the termination wait period starts.

      • blueGreenDeploymentConfiguration (dict) --

        Information about blue/green deployment options for this deployment.

        • terminateBlueInstancesOnDeploymentSuccess (dict) --

          Information about whether to terminate instances in the original fleet during a blue/green deployment.

          • action (string) --

            The action to take on instances in the original environment after a successful blue/green deployment.

            • TERMINATE: Instances are terminated after a specified wait time.

            • KEEP_ALIVE: Instances are left running after they are deregistered from the load balancer and removed from the deployment group.

          • terminationWaitTimeInMinutes (integer) --

            The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment.

        • deploymentReadyOption (dict) --

          Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.

          • actionOnTimeout (string) --

            Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.

            • CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed on the instances in the replacement environment.

            • STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If traffic is not rerouted manually before the end of the specified wait period, the deployment status is changed to Stopped.

          • waitTimeInMinutes (integer) --

            The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout

        • greenFleetProvisioningOption (dict) --

          Information about how instances are provisioned for a replacement environment in a blue/green deployment.

          • action (string) --

            The method used to add instances to a replacement environment.

            • DISCOVER_EXISTING: Use instances that already exist or will be created manually.

            • COPY_AUTO_SCALING_GROUP: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.

      • loadBalancerInfo (dict) --

        Information about the load balancer used in this blue/green deployment.

        • elbInfoList (list) --

          An array containing information about the load balancer in Elastic Load Balancing to use in a blue/green deployment.

          • (dict) --

            Information about a load balancer in Elastic Load Balancing to use in a blue/green deployment.

            • name (string) --

              The name of the load balancer that will be used to route traffic from original instances to replacement instances in a blue/green deployment.

      • additionalDeploymentStatusInfo (string) --

        Provides information about the results of a deployment, such as whether instances in the original environment in a blue/green deployment were not terminated.

GetDeploymentGroup (updated) Link ¶
Changes (response)
{'deploymentGroupInfo': {'blueGreenDeploymentConfiguration': {'deploymentReadyOption': {'actionOnTimeout': 'CONTINUE_DEPLOYMENT '
                                                                                                           '| '
                                                                                                           'STOP_DEPLOYMENT',
                                                                                        'waitTimeInMinutes': 'integer'},
                                                              'greenFleetProvisioningOption': {'action': 'DISCOVER_EXISTING '
                                                                                                         '| '
                                                                                                         'COPY_AUTO_SCALING_GROUP'},
                                                              'terminateBlueInstancesOnDeploymentSuccess': {'action': 'TERMINATE '
                                                                                                                      '| '
                                                                                                                      'KEEP_ALIVE',
                                                                                                            'terminationWaitTimeInMinutes': 'integer'}},
                         'deploymentStyle': {'deploymentOption': 'WITH_TRAFFIC_CONTROL '
                                                                 '| '
                                                                 'WITHOUT_TRAFFIC_CONTROL',
                                             'deploymentType': 'IN_PLACE | '
                                                               'BLUE_GREEN'},
                         'loadBalancerInfo': {'elbInfoList': [{'name': 'string'}]},
                         'triggerConfigurations': {'triggerEvents': {'DeploymentReady',
                                                                     'InstanceReady'}}}}

Gets information about a deployment group.

See also: AWS API Documentation

Request Syntax

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

string

param applicationName

[REQUIRED]

The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS 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'
            },
        ],
        'onPremisesInstanceTagFilters': [
            {
                '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'
            }
        },
        'triggerConfigurations': [
            {
                'triggerName': 'string',
                'triggerTargetArn': 'string',
                'triggerEvents': [
                    'DeploymentStart'|'DeploymentSuccess'|'DeploymentFailure'|'DeploymentStop'|'DeploymentRollback'|'DeploymentReady'|'InstanceStart'|'InstanceSuccess'|'InstanceFailure'|'InstanceReady',
                ]
            },
        ],
        'alarmConfiguration': {
            'enabled': True|False,
            'ignorePollAlarmFailure': True|False,
            'alarms': [
                {
                    'name': 'string'
                },
            ]
        },
        'autoRollbackConfiguration': {
            'enabled': True|False,
            'events': [
                'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
            ]
        },
        'deploymentStyle': {
            'deploymentType': 'IN_PLACE'|'BLUE_GREEN',
            'deploymentOption': 'WITH_TRAFFIC_CONTROL'|'WITHOUT_TRAFFIC_CONTROL'
        },
        'blueGreenDeploymentConfiguration': {
            'terminateBlueInstancesOnDeploymentSuccess': {
                'action': 'TERMINATE'|'KEEP_ALIVE',
                'terminationWaitTimeInMinutes': 123
            },
            'deploymentReadyOption': {
                'actionOnTimeout': 'CONTINUE_DEPLOYMENT'|'STOP_DEPLOYMENT',
                'waitTimeInMinutes': 123
            },
            'greenFleetProvisioningOption': {
                'action': 'DISCOVER_EXISTING'|'COPY_AUTO_SCALING_GROUP'
            }
        },
        'loadBalancerInfo': {
            'elbInfoList': [
                {
                    'name': '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 on which to filter.

        • (dict) --

          Information about a tag filter.

          • Key (string) --

            The tag filter key.

          • Value (string) --

            The tag filter value.

          • Type (string) --

            The tag filter type:

            • KEY_ONLY: Key only.

            • VALUE_ONLY: Value only.

            • KEY_AND_VALUE: Key and value.

      • onPremisesInstanceTagFilters (list) --

        The on-premises instance tags on which to filter.

        • (dict) --

          Information about an on-premises instance tag filter.

          • Key (string) --

            The on-premises instance tag filter key.

          • Value (string) --

            The on-premises instance tag filter value.

          • Type (string) --

            The on-premises instance 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 type and location.

        • revisionType (string) --

          The type of application revision:

          • S3: An application revision stored in Amazon S3.

          • GitHub: An application revision stored in GitHub.

        • s3Location (dict) --

          Information about the location of application artifacts 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 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 represents the bundled artifacts for the application revision.

      • triggerConfigurations (list) --

        Information about triggers associated with the deployment group.

        • (dict) --

          Information about notification triggers for the deployment group.

          • triggerName (string) --

            The name of the notification trigger.

          • triggerTargetArn (string) --

            The ARN of the Amazon Simple Notification Service topic through which notifications about deployment or instance events are sent.

          • triggerEvents (list) --

            The event type or types for which notifications are triggered.

            • (string) --

      • alarmConfiguration (dict) --

        A list of alarms associated with the deployment group.

        • enabled (boolean) --

          Indicates whether the alarm configuration is enabled.

        • ignorePollAlarmFailure (boolean) --

          Indicates whether a deployment should continue if information about the current state of alarms cannot be retrieved from Amazon CloudWatch. The default value is false.

          • true: The deployment will proceed even if alarm status information can't be retrieved from Amazon CloudWatch.

          • false: The deployment will stop if alarm status information can't be retrieved from Amazon CloudWatch.

        • alarms (list) --

          A list of alarms configured for the deployment group. A maximum of 10 alarms can be added to a deployment group.

          • (dict) --

            Information about an alarm.

            • name (string) --

              The name of the alarm. Maximum length is 255 characters. Each alarm name can be used only once in a list of alarms.

      • autoRollbackConfiguration (dict) --

        Information about the automatic rollback configuration associated with the deployment group.

        • enabled (boolean) --

          Indicates whether a defined automatic rollback configuration is currently enabled.

        • events (list) --

          The event type or types that trigger a rollback.

          • (string) --

      • deploymentStyle (dict) --

        Information about the type of deployment, either standard or blue/green, you want to run and whether to route deployment traffic behind a load balancer.

        • deploymentType (string) --

          Indicates whether to run a standard deployment or a blue/green deployment.

        • deploymentOption (string) --

          Indicates whether to route deployment traffic behind a load balancer.

      • blueGreenDeploymentConfiguration (dict) --

        Information about blue/green deployment options for a deployment group.

        • terminateBlueInstancesOnDeploymentSuccess (dict) --

          Information about whether to terminate instances in the original fleet during a blue/green deployment.

          • action (string) --

            The action to take on instances in the original environment after a successful blue/green deployment.

            • TERMINATE: Instances are terminated after a specified wait time.

            • KEEP_ALIVE: Instances are left running after they are deregistered from the load balancer and removed from the deployment group.

          • terminationWaitTimeInMinutes (integer) --

            The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment.

        • deploymentReadyOption (dict) --

          Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.

          • actionOnTimeout (string) --

            Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.

            • CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed on the instances in the replacement environment.

            • STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If traffic is not rerouted manually before the end of the specified wait period, the deployment status is changed to Stopped.

          • waitTimeInMinutes (integer) --

            The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout

        • greenFleetProvisioningOption (dict) --

          Information about how instances are provisioned for a replacement environment in a blue/green deployment.

          • action (string) --

            The method used to add instances to a replacement environment.

            • DISCOVER_EXISTING: Use instances that already exist or will be created manually.

            • COPY_AUTO_SCALING_GROUP: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.

      • loadBalancerInfo (dict) --

        Information about the load balancer to use in a blue/green deployment.

        • elbInfoList (list) --

          An array containing information about the load balancer in Elastic Load Balancing to use in a blue/green deployment.

          • (dict) --

            Information about a load balancer in Elastic Load Balancing to use in a blue/green deployment.

            • name (string) --

              The name of the load balancer that will be used to route traffic from original instances to replacement instances in a blue/green deployment.

GetDeploymentInstance (updated) Link ¶
Changes (response)
{'instanceSummary': {'instanceType': 'Blue | Green', 'status': {'Ready'}}}

Gets information about an instance as part of a deployment.

See also: AWS API Documentation

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 instance in the deployment group.

rtype

dict

returns

Response Syntax

{
    'instanceSummary': {
        'deploymentId': 'string',
        'instanceId': 'string',
        'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'|'Ready',
        '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'
            },
        ],
        'instanceType': 'Blue'|'Green'
    }
}

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 diagnostic log.

              If available, AWS CodeDeploy returns up to the last 4 KB of the 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 ran successfully.

            • Failed: The deployment lifecycle event has failed.

            • Skipped: The deployment lifecycle event has been skipped.

            • Unknown: The deployment lifecycle event is unknown.

      • instanceType (string) --

        Information about which environment an instance belongs to in a blue/green deployment.

        • BLUE: The instance is part of the original environment.

        • GREEN: The instance is part of the replacement environment.

ListDeploymentInstances (updated) Link ¶
Changes (request)
{'instanceStatusFilter': {'Ready'}, 'instanceTypeFilter': ['Blue | Green']}

Lists the instance for a deployment associated with the applicable IAM user or AWS account.

See also: AWS API Documentation

Request Syntax

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

string

param deploymentId

[REQUIRED]

The unique ID of a deployment.

type nextToken

string

param nextToken

An identifier returned from the previous list deployment instances call. It 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 those instance with pending deployments.

  • InProgress: Include those instance where deployments are still in progress.

  • Succeeded: Include those instances with successful deployments.

  • Failed: Include those instance with failed deployments.

  • Skipped: Include those instance with skipped deployments.

  • Unknown: Include those instance with deployments in an unknown state.

  • (string) --

type instanceTypeFilter

list

param instanceTypeFilter

The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in the replacement environment ("GREEN"), for which you want to view instance information.

  • (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 a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list deployment instances call to return the next set of deployment instances in the list.

ListDeployments (updated) Link ¶
Changes (request)
{'includeOnlyStatuses': {'Ready'}}

Lists the deployments in a deployment group for an application registered with the applicable IAM user or AWS account.

See also: AWS API Documentation

Request Syntax

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

string

param applicationName

The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS 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 created deployments in the resulting list.

  • Queued: Include queued deployments in the resulting list.

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

  • Succeeded: Include successful deployments in the resulting list.

  • Failed: Include failed deployments in the resulting list.

  • Stopped: Include stopped deployments in the resulting list.

  • (string) --

type createTimeRange

dict

param createTimeRange

A time range (start and end) for returning a subset of the list of deployments.

  • start (datetime) --

    The start time of the time range.

    Note

    Specify null to leave the start time open-ended.

  • end (datetime) --

    The end time of the time range.

    Note

    Specify null to leave the end time open-ended.

type nextToken

string

param nextToken

An identifier returned from the previous list deployments call. It 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 a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list deployments call to return the next set of deployments in the list.

UpdateDeploymentGroup (updated) Link ¶
Changes (request)
{'blueGreenDeploymentConfiguration': {'deploymentReadyOption': {'actionOnTimeout': 'CONTINUE_DEPLOYMENT '
                                                                                   '| '
                                                                                   'STOP_DEPLOYMENT',
                                                                'waitTimeInMinutes': 'integer'},
                                      'greenFleetProvisioningOption': {'action': 'DISCOVER_EXISTING '
                                                                                 '| '
                                                                                 'COPY_AUTO_SCALING_GROUP'},
                                      'terminateBlueInstancesOnDeploymentSuccess': {'action': 'TERMINATE '
                                                                                              '| '
                                                                                              'KEEP_ALIVE',
                                                                                    'terminationWaitTimeInMinutes': 'integer'}},
 'deploymentStyle': {'deploymentOption': 'WITH_TRAFFIC_CONTROL | '
                                         'WITHOUT_TRAFFIC_CONTROL',
                     'deploymentType': 'IN_PLACE | BLUE_GREEN'},
 'loadBalancerInfo': {'elbInfoList': [{'name': 'string'}]},
 'triggerConfigurations': {'triggerEvents': {'DeploymentReady',
                                             'InstanceReady'}}}

Changes information about a deployment group.

See also: AWS API Documentation

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'
        },
    ],
    onPremisesInstanceTagFilters=[
        {
            'Key': 'string',
            'Value': 'string',
            'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
        },
    ],
    autoScalingGroups=[
        'string',
    ],
    serviceRoleArn='string',
    triggerConfigurations=[
        {
            'triggerName': 'string',
            'triggerTargetArn': 'string',
            'triggerEvents': [
                'DeploymentStart'|'DeploymentSuccess'|'DeploymentFailure'|'DeploymentStop'|'DeploymentRollback'|'DeploymentReady'|'InstanceStart'|'InstanceSuccess'|'InstanceFailure'|'InstanceReady',
            ]
        },
    ],
    alarmConfiguration={
        'enabled': True|False,
        'ignorePollAlarmFailure': True|False,
        'alarms': [
            {
                'name': 'string'
            },
        ]
    },
    autoRollbackConfiguration={
        'enabled': True|False,
        'events': [
            'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
        ]
    },
    deploymentStyle={
        'deploymentType': 'IN_PLACE'|'BLUE_GREEN',
        'deploymentOption': 'WITH_TRAFFIC_CONTROL'|'WITHOUT_TRAFFIC_CONTROL'
    },
    blueGreenDeploymentConfiguration={
        'terminateBlueInstancesOnDeploymentSuccess': {
            'action': 'TERMINATE'|'KEEP_ALIVE',
            'terminationWaitTimeInMinutes': 123
        },
        'deploymentReadyOption': {
            'actionOnTimeout': 'CONTINUE_DEPLOYMENT'|'STOP_DEPLOYMENT',
            'waitTimeInMinutes': 123
        },
        'greenFleetProvisioningOption': {
            'action': 'DISCOVER_EXISTING'|'COPY_AUTO_SCALING_GROUP'
        }
    },
    loadBalancerInfo={
        'elbInfoList': [
            {
                'name': '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 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 on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.

  • (dict) --

    Information about a tag filter.

    • Key (string) --

      The tag filter key.

    • Value (string) --

      The tag filter value.

    • Type (string) --

      The tag filter type:

      • KEY_ONLY: Key only.

      • VALUE_ONLY: Value only.

      • KEY_AND_VALUE: Key and value.

type onPremisesInstanceTagFilters

list

param onPremisesInstanceTagFilters

The replacement set of on-premises instance tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.

  • (dict) --

    Information about an on-premises instance tag filter.

    • Key (string) --

      The on-premises instance tag filter key.

    • Value (string) --

      The on-premises instance tag filter value.

    • Type (string) --

      The on-premises instance 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. To keep the Auto Scaling groups, enter their names. To remove Auto Scaling groups, do not enter any Auto Scaling group names.

  • (string) --

type serviceRoleArn

string

param serviceRoleArn

A replacement ARN for the service role, if you want to change it.

type triggerConfigurations

list

param triggerConfigurations

Information about triggers to change when the deployment group is updated. For examples, see Modify Triggers in an AWS CodeDeploy Deployment Group in the AWS CodeDeploy User Guide.

  • (dict) --

    Information about notification triggers for the deployment group.

    • triggerName (string) --

      The name of the notification trigger.

    • triggerTargetArn (string) --

      The ARN of the Amazon Simple Notification Service topic through which notifications about deployment or instance events are sent.

    • triggerEvents (list) --

      The event type or types for which notifications are triggered.

      • (string) --

type alarmConfiguration

dict

param alarmConfiguration

Information to add or change about Amazon CloudWatch alarms when the deployment group is updated.

  • enabled (boolean) --

    Indicates whether the alarm configuration is enabled.

  • ignorePollAlarmFailure (boolean) --

    Indicates whether a deployment should continue if information about the current state of alarms cannot be retrieved from Amazon CloudWatch. The default value is false.

    • true: The deployment will proceed even if alarm status information can't be retrieved from Amazon CloudWatch.

    • false: The deployment will stop if alarm status information can't be retrieved from Amazon CloudWatch.

  • alarms (list) --

    A list of alarms configured for the deployment group. A maximum of 10 alarms can be added to a deployment group.

    • (dict) --

      Information about an alarm.

      • name (string) --

        The name of the alarm. Maximum length is 255 characters. Each alarm name can be used only once in a list of alarms.

type autoRollbackConfiguration

dict

param autoRollbackConfiguration

Information for an automatic rollback configuration that is added or changed when a deployment group is updated.

  • enabled (boolean) --

    Indicates whether a defined automatic rollback configuration is currently enabled.

  • events (list) --

    The event type or types that trigger a rollback.

    • (string) --

type deploymentStyle

dict

param deploymentStyle

Information about the type of deployment, either standard or blue/green, you want to run and whether to route deployment traffic behind a load balancer.

  • deploymentType (string) --

    Indicates whether to run a standard deployment or a blue/green deployment.

  • deploymentOption (string) --

    Indicates whether to route deployment traffic behind a load balancer.

type blueGreenDeploymentConfiguration

dict

param blueGreenDeploymentConfiguration

Information about blue/green deployment options for a deployment group.

  • terminateBlueInstancesOnDeploymentSuccess (dict) --

    Information about whether to terminate instances in the original fleet during a blue/green deployment.

    • action (string) --

      The action to take on instances in the original environment after a successful blue/green deployment.

      • TERMINATE: Instances are terminated after a specified wait time.

      • KEEP_ALIVE: Instances are left running after they are deregistered from the load balancer and removed from the deployment group.

    • terminationWaitTimeInMinutes (integer) --

      The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment.

  • deploymentReadyOption (dict) --

    Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.

    • actionOnTimeout (string) --

      Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.

      • CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed on the instances in the replacement environment.

      • STOP_DEPLOYMENT: Do not register new instances with load balancer unless traffic is rerouted manually. If traffic is not rerouted manually before the end of the specified wait period, the deployment status is changed to Stopped.

    • waitTimeInMinutes (integer) --

      The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout

  • greenFleetProvisioningOption (dict) --

    Information about how instances are provisioned for a replacement environment in a blue/green deployment.

    • action (string) --

      The method used to add instances to a replacement environment.

      • DISCOVER_EXISTING: Use instances that already exist or will be created manually.

      • COPY_AUTO_SCALING_GROUP: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.

type loadBalancerInfo

dict

param loadBalancerInfo

Information about the load balancer used in a blue/green deployment.

  • elbInfoList (list) --

    An array containing information about the load balancer in Elastic Load Balancing to use in a blue/green deployment.

    • (dict) --

      Information about a load balancer in Elastic Load Balancing to use in a blue/green deployment.

      • name (string) --

        The name of the load balancer that will be used to route traffic from original instances to replacement instances in a blue/green deployment.

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 account. If the output contains data, AWS CodeDeploy could not remove some Auto Scaling lifecycle event hooks from the AWS account.

      • (dict) --

        Information about an Auto Scaling group.

        • name (string) --

          The Auto Scaling group name.

        • hook (string) --

          An Auto Scaling lifecycle event hook name.