AWS CodeDeploy

2017/11/29 - AWS CodeDeploy - 1 new 14 updated api methods

Changes  Support for AWS Lambda function deployment - AWS CodeDeploy now supports the deployment of AWS Lambda functions. A Lambda deployment uses a Lambda function alias to shift traffic to a new version. You select a deployment configuration that specifies exactly how traffic shifts to your new version. Success of a deployment can be validated using Lambda functions that are referenced by the deployment. This provides the opportunity to rollback if necessary.

PutLifecycleEventHookExecutionStatus (new) Link ¶

Sets the result of a Lambda validation function. The function validates one or both lifecycle events (BeforeAllowTraffic and AfterAllowTraffic ) and returns Succeeded or Failed .

See also: AWS API Documentation

Request Syntax

client.put_lifecycle_event_hook_execution_status(
    deploymentId='string',
    lifecycleEventHookExecutionId='string',
    status='Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'
)
type deploymentId

string

param deploymentId

The ID of the deployment. Pass this ID to a Lambda function that validates a deployment lifecycle event.

type lifecycleEventHookExecutionId

string

param lifecycleEventHookExecutionId

The execution ID of a deployment's lifecycle hook. A deployment lifecycle hook is specified in the hooks section of the AppSpec file.

type status

string

param status

The result of a Lambda function that validates a deployment lifecycle event (Succeeded or Failed ).

rtype

dict

returns

Response Syntax

{
    'lifecycleEventHookExecutionId': 'string'
}

Response Structure

  • (dict) --

    • lifecycleEventHookExecutionId (string) --

      The execution ID of the lifecycle event hook. A hook is specified in the hooks section of the deployment's AppSpec file.

BatchGetApplicationRevisions (updated) Link ¶
Changes (request, response)
Request
{'revisions': {'revisionType': ['String'],
               's3Location': {'bundleType': ['YAML', 'JSON']},
               'string': {'content': 'string', 'sha256': 'string'}}}
Response
{'revisions': {'revisionLocation': {'revisionType': ['String'],
                                    's3Location': {'bundleType': ['YAML',
                                                                  'JSON']},
                                    'string': {'content': 'string',
                                               'sha256': 'string'}}}}

Gets information about one or more application revisions.

See also: AWS API Documentation

Request Syntax

client.batch_get_application_revisions(
    applicationName='string',
    revisions=[
        {
            'revisionType': 'S3'|'GitHub'|'String',
            's3Location': {
                'bucket': 'string',
                'key': 'string',
                'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
                'version': 'string',
                'eTag': 'string'
            },
            'gitHubLocation': {
                'repository': 'string',
                'commitId': 'string'
            },
            'string': {
                'content': 'string',
                'sha256': 'string'
            }
        },
    ]
)
type applicationName

string

param applicationName

[REQUIRED]

The name of an AWS CodeDeploy application about which to get revision information.

type revisions

list

param revisions

[REQUIRED]

Information to get about the application revisions, including type and location.

  • (dict) --

    Information about the location of an application revision.

    • revisionType (string) --

      The type of application revision:

      • S3: An application revision stored in Amazon S3.

      • GitHub: An application revision stored in GitHub (EC2/On-premises deployments only)

      • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

    • s3Location (dict) --

      Information about the location of a revision 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.

    • string (dict) --

      Information about the location of an AWS Lambda deployment revision stored as a RawString.

      • content (string) --

        The YAML-formatted or JSON-formatted revision string. It includes information about what Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

      • sha256 (string) --

        The SHA256 hash value of the revision that is specified as a RawString.

rtype

dict

returns

Response Syntax

{
    'applicationName': 'string',
    'errorMessage': 'string',
    'revisions': [
        {
            'revisionLocation': {
                'revisionType': 'S3'|'GitHub'|'String',
                's3Location': {
                    'bucket': 'string',
                    'key': 'string',
                    'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
                    'version': 'string',
                    'eTag': 'string'
                },
                'gitHubLocation': {
                    'repository': 'string',
                    'commitId': 'string'
                },
                'string': {
                    'content': 'string',
                    'sha256': 'string'
                }
            },
            'genericRevisionInfo': {
                'description': 'string',
                'deploymentGroups': [
                    'string',
                ],
                'firstUsedTime': datetime(2015, 1, 1),
                'lastUsedTime': datetime(2015, 1, 1),
                'registerTime': datetime(2015, 1, 1)
            }
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of a BatchGetApplicationRevisions operation.

    • applicationName (string) --

      The name of the application that corresponds to the revisions.

    • errorMessage (string) --

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

    • revisions (list) --

      Additional information about the revisions, including the type and location.

      • (dict) --

        Information about an application revision.

        • revisionLocation (dict) --

          Information about the location and type of an application revision.

          • revisionType (string) --

            The type of application revision:

            • S3: An application revision stored in Amazon S3.

            • GitHub: An application revision stored in GitHub (EC2/On-premises deployments only)

            • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

          • s3Location (dict) --

            Information about the location of a revision 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.

          • string (dict) --

            Information about the location of an AWS Lambda deployment revision stored as a RawString.

            • content (string) --

              The YAML-formatted or JSON-formatted revision string. It includes information about what Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

            • sha256 (string) --

              The SHA256 hash value of the revision that is specified as a RawString.

        • genericRevisionInfo (dict) --

          Information about an application revision, including usage details and associated deployment groups.

          • description (string) --

            A comment about the revision.

          • deploymentGroups (list) --

            The deployment groups for which this is the current target revision.

            • (string) --

          • firstUsedTime (datetime) --

            When the revision was first used by AWS CodeDeploy.

          • lastUsedTime (datetime) --

            When the revision was last used by AWS CodeDeploy.

          • registerTime (datetime) --

            When the revision was registered with AWS CodeDeploy.

BatchGetApplications (updated) Link ¶
Changes (response)
{'applicationsInfo': {'computePlatform': 'Server | Lambda'}}

Gets information about one or more applications.

See also: AWS API Documentation

Request Syntax

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

list

param applicationNames

[REQUIRED]

A list of application names separated by spaces.

  • (string) --

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    Represents the output of a BatchGetApplications operation.

    • applicationsInfo (list) --

      Information about the applications.

      • (dict) --

        Information about an application.

        • applicationId (string) --

          The application ID.

        • applicationName (string) --

          The application name.

        • createTime (datetime) --

          The time at which the application was created.

        • linkedToGitHub (boolean) --

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

        • gitHubAccountName (string) --

          The name for a connection to a GitHub account.

        • computePlatform (string) --

          The destination platform type for deployment of the application (Lambda or Server ).

BatchGetDeploymentGroups (updated) Link ¶
Changes (response)
{'deploymentGroupsInfo': {'computePlatform': 'Server | Lambda',
                          'targetRevision': {'revisionType': ['String'],
                                             's3Location': {'bundleType': ['YAML',
                                                                           'JSON']},
                                             'string': {'content': 'string',
                                                        'sha256': 'string'}}}}

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'|'String',
                's3Location': {
                    'bucket': 'string',
                    'key': 'string',
                    'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
                    'version': 'string',
                    'eTag': 'string'
                },
                'gitHubLocation': {
                    'repository': 'string',
                    'commitId': 'string'
                },
                'string': {
                    'content': 'string',
                    'sha256': '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'
                    },
                ],
                'targetGroupInfoList': [
                    {
                        'name': 'string'
                    },
                ]
            },
            'lastSuccessfulDeployment': {
                'deploymentId': 'string',
                'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped'|'Ready',
                'endTime': datetime(2015, 1, 1),
                'createTime': datetime(2015, 1, 1)
            },
            'lastAttemptedDeployment': {
                'deploymentId': 'string',
                'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped'|'Ready',
                'endTime': datetime(2015, 1, 1),
                'createTime': datetime(2015, 1, 1)
            },
            'ec2TagSet': {
                'ec2TagSetList': [
                    [
                        {
                            'Key': 'string',
                            'Value': 'string',
                            'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
                        },
                    ],
                ]
            },
            'onPremisesTagSet': {
                'onPremisesTagSetList': [
                    [
                        {
                            'Key': 'string',
                            'Value': 'string',
                            'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
                        },
                    ],
                ]
            },
            'computePlatform': 'Server'|'Lambda'
        },
    ],
    'errorMessage': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a BatchGetDeploymentGroups 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. The deployment group includes EC2 instances with any of the specified tags.

          • (dict) --

            Information about an EC2 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. The deployment group includes on-premises instances with any of the specified tags.

          • (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 (EC2/On-premises deployments only)

            • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

          • s3Location (dict) --

            Information about the location of a revision 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.

          • string (dict) --

            Information about the location of an AWS Lambda deployment revision stored as a RawString.

            • content (string) --

              The YAML-formatted or JSON-formatted revision string. It includes information about what Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

            • sha256 (string) --

              The SHA256 hash value of the revision that is specified as a RawString.

        • 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 in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.

          • deploymentType (string) --

            Indicates whether to run an in-place 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 deployment.

          • elbInfoList (list) --

            An array containing information about the load balancer to use for load balancing in a deployment. In Elastic Load Balancing, load balancers are used with Classic Load Balancers.

            • (dict) --

              Information about a load balancer in Elastic Load Balancing to use in a deployment. Instances are registered directly with a load balancer, and traffic is routed to the load balancer.

              • name (string) --

                For blue/green deployments, the name of the load balancer that will be used to route traffic from original instances to replacement instances in a blue/green deployment. For in-place deployments, the name of the load balancer that instances are deregistered from so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.

          • targetGroupInfoList (list) --

            An array containing information about the target group to use for load balancing in a deployment. In Elastic Load Balancing, target groups are used with Application Load Balancers.

            • (dict) --

              Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.

              • name (string) --

                For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.

        • lastSuccessfulDeployment (dict) --

          Information about the most recent successful deployment to the deployment group.

          • deploymentId (string) --

            The deployment ID.

          • status (string) --

            The status of the most recent deployment.

          • endTime (datetime) --

            A timestamp indicating when the most recent deployment to the deployment group completed.

          • createTime (datetime) --

            A timestamp indicating when the most recent deployment to the deployment group started.

        • lastAttemptedDeployment (dict) --

          Information about the most recent attempted deployment to the deployment group.

          • deploymentId (string) --

            The deployment ID.

          • status (string) --

            The status of the most recent deployment.

          • endTime (datetime) --

            A timestamp indicating when the most recent deployment to the deployment group completed.

          • createTime (datetime) --

            A timestamp indicating when the most recent deployment to the deployment group started.

        • ec2TagSet (dict) --

          Information about groups of tags applied to an EC2 instance. The deployment group includes only EC2 instances identified by all the tag groups. Cannot be used in the same call as ec2TagFilters.

          • ec2TagSetList (list) --

            A list containing other lists of EC2 instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.

            • (list) --

              • (dict) --

                Information about an EC2 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.

        • onPremisesTagSet (dict) --

          Information about groups of tags applied to an on-premises instance. The deployment group includes only on-premises instances identified by all the tag groups. Cannot be used in the same call as onPremisesInstanceTagFilters.

          • onPremisesTagSetList (list) --

            A list containing other lists of on-premises instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.

            • (list) --

              • (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.

        • computePlatform (string) --

          The destination platform type for the deployment group (Lambda or Server ).

    • errorMessage (string) --

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

BatchGetDeployments (updated) Link ¶
Changes (response)
{'deploymentsInfo': {'computePlatform': 'Server | Lambda',
                     'deploymentStatusMessages': ['string'],
                     'errorInformation': {'code': ['MISSING_GITHUB_TOKEN',
                                                   'MISSING_BLUE_GREEN_DEPLOYMENT_CONFIGURATION',
                                                   'ELASTIC_LOAD_BALANCING_INVALID',
                                                   'INVALID_LAMBDA_CONFIGURATION',
                                                   'INVALID_LAMBDA_FUNCTION',
                                                   'ELB_INVALID_INSTANCE',
                                                   'MISSING_ELB_INFORMATION',
                                                   'HOOK_EXECUTION_FAILURE']},
                     'previousRevision': {'revisionType': ['String'],
                                          's3Location': {'bundleType': ['YAML',
                                                                        'JSON']},
                                          'string': {'content': 'string',
                                                     'sha256': 'string'}},
                     'revision': {'revisionType': ['String'],
                                  's3Location': {'bundleType': ['YAML',
                                                                'JSON']},
                                  'string': {'content': 'string',
                                             'sha256': '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

[REQUIRED]

A list of deployment IDs, separated by spaces.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'deploymentsInfo': [
        {
            'applicationName': 'string',
            'deploymentGroupName': 'string',
            'deploymentConfigName': 'string',
            'deploymentId': 'string',
            'previousRevision': {
                'revisionType': 'S3'|'GitHub'|'String',
                's3Location': {
                    'bucket': 'string',
                    'key': 'string',
                    'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
                    'version': 'string',
                    'eTag': 'string'
                },
                'gitHubLocation': {
                    'repository': 'string',
                    'commitId': 'string'
                },
                'string': {
                    'content': 'string',
                    'sha256': 'string'
                }
            },
            'revision': {
                'revisionType': 'S3'|'GitHub'|'String',
                's3Location': {
                    'bucket': 'string',
                    'key': 'string',
                    'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
                    'version': 'string',
                    'eTag': 'string'
                },
                'gitHubLocation': {
                    'repository': 'string',
                    'commitId': 'string'
                },
                'string': {
                    'content': 'string',
                    'sha256': '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'|'MISSING_BLUE_GREEN_DEPLOYMENT_CONFIGURATION'|'MISSING_ELB_INFORMATION'|'MISSING_GITHUB_TOKEN'|'ELASTIC_LOAD_BALANCING_INVALID'|'ELB_INVALID_INSTANCE'|'INVALID_LAMBDA_CONFIGURATION'|'INVALID_LAMBDA_FUNCTION'|'HOOK_EXECUTION_FAILURE',
                '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',
                ],
                'ec2TagSet': {
                    'ec2TagSetList': [
                        [
                            {
                                'Key': 'string',
                                'Value': 'string',
                                'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
                            },
                        ],
                    ]
                }
            },
            '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'
                    },
                ],
                'targetGroupInfoList': [
                    {
                        'name': 'string'
                    },
                ]
            },
            'additionalDeploymentStatusInfo': 'string',
            'fileExistsBehavior': 'DISALLOW'|'OVERWRITE'|'RETAIN',
            'deploymentStatusMessages': [
                'string',
            ],
            'computePlatform': 'Server'|'Lambda'
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of a BatchGetDeployments 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.

        • previousRevision (dict) --

          Information about the application revision that was deployed to the deployment group before the most recent successful deployment.

          • revisionType (string) --

            The type of application revision:

            • S3: An application revision stored in Amazon S3.

            • GitHub: An application revision stored in GitHub (EC2/On-premises deployments only)

            • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

          • s3Location (dict) --

            Information about the location of a revision 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.

          • string (dict) --

            Information about the location of an AWS Lambda deployment revision stored as a RawString.

            • content (string) --

              The YAML-formatted or JSON-formatted revision string. It includes information about what Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

            • sha256 (string) --

              The SHA256 hash value of the revision that is specified as a RawString.

        • 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 (EC2/On-premises deployments only)

            • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

          • s3Location (dict) --

            Information about the location of a revision 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.

          • string (dict) --

            Information about the location of an AWS Lambda deployment revision stored as a RawString.

            • content (string) --

              The YAML-formatted or JSON-formatted revision string. It includes information about what Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

            • sha256 (string) --

              The SHA256 hash value of the revision that is specified as a RawString.

        • 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 in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.

          • deploymentType (string) --

            Indicates whether to run an in-place 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. Cannot be used in the same call as ec2TagSet.

            • (dict) --

              Information about an EC2 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) --

          • ec2TagSet (dict) --

            Information about the groups of EC2 instance tags that an instance must be identified by in order for it to be included in the replacement environment for a blue/green deployment. Cannot be used in the same call as tagFilters.

            • ec2TagSetList (list) --

              A list containing other lists of EC2 instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.

              • (list) --

                • (dict) --

                  Information about an EC2 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.

        • 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 the deployment.

          • elbInfoList (list) --

            An array containing information about the load balancer to use for load balancing in a deployment. In Elastic Load Balancing, load balancers are used with Classic Load Balancers.

            • (dict) --

              Information about a load balancer in Elastic Load Balancing to use in a deployment. Instances are registered directly with a load balancer, and traffic is routed to the load balancer.

              • name (string) --

                For blue/green deployments, the name of the load balancer that will be used to route traffic from original instances to replacement instances in a blue/green deployment. For in-place deployments, the name of the load balancer that instances are deregistered from so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.

          • targetGroupInfoList (list) --

            An array containing information about the target group to use for load balancing in a deployment. In Elastic Load Balancing, target groups are used with Application Load Balancers.

            • (dict) --

              Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.

              • name (string) --

                For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.

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

        • fileExistsBehavior (string) --

          Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.

          • DISALLOW: The deployment fails. This is also the default behavior if no option is specified.

          • OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.

          • RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.

        • deploymentStatusMessages (list) --

          Messages that contain information about the status of a deployment.

          • (string) --

        • computePlatform (string) --

          The destination platform type for the deployment (Lambda or Server ).

CreateApplication (updated) Link ¶
Changes (request)
{'computePlatform': 'Server | Lambda'}

Creates an application.

See also: AWS API Documentation

Request Syntax

client.create_application(
    applicationName='string',
    computePlatform='Server'|'Lambda'
)
type applicationName

string

param applicationName

[REQUIRED]

The name of the application. This name must be unique with the applicable IAM user or AWS account.

type computePlatform

string

param computePlatform

The destination platform type for the deployment Lambda or Server ).

rtype

dict

returns

Response Syntax

{
    'applicationId': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a CreateApplication operation.

    • applicationId (string) --

      A unique application ID.

CreateDeployment (updated) Link ¶
Changes (request)
{'revision': {'revisionType': ['String'],
              's3Location': {'bundleType': ['YAML', 'JSON']},
              'string': {'content': 'string', 'sha256': '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'|'String',
        's3Location': {
            'bucket': 'string',
            'key': 'string',
            'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
            'version': 'string',
            'eTag': 'string'
        },
        'gitHubLocation': {
            'repository': 'string',
            'commitId': 'string'
        },
        'string': {
            'content': 'string',
            'sha256': 'string'
        }
    },
    deploymentConfigName='string',
    description='string',
    ignoreApplicationStopFailures=True|False,
    targetInstances={
        'tagFilters': [
            {
                'Key': 'string',
                'Value': 'string',
                'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
            },
        ],
        'autoScalingGroups': [
            'string',
        ],
        'ec2TagSet': {
            'ec2TagSetList': [
                [
                    {
                        'Key': 'string',
                        'Value': 'string',
                        'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
                    },
                ],
            ]
        }
    },
    autoRollbackConfiguration={
        'enabled': True|False,
        'events': [
            'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
        ]
    },
    updateOutdatedInstancesOnly=True|False,
    fileExistsBehavior='DISALLOW'|'OVERWRITE'|'RETAIN'
)
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 (EC2/On-premises deployments only)

    • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

  • s3Location (dict) --

    Information about the location of a revision 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.

  • string (dict) --

    Information about the location of an AWS Lambda deployment revision stored as a RawString.

    • content (string) --

      The YAML-formatted or JSON-formatted revision string. It includes information about what Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

    • sha256 (string) --

      The SHA256 hash value of the revision that is specified as a RawString.

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. Cannot be used in the same call as ec2TagSet.

    • (dict) --

      Information about an EC2 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) --

  • ec2TagSet (dict) --

    Information about the groups of EC2 instance tags that an instance must be identified by in order for it to be included in the replacement environment for a blue/green deployment. Cannot be used in the same call as tagFilters.

    • ec2TagSetList (list) --

      A list containing other lists of EC2 instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.

      • (list) --

        • (dict) --

          Information about an EC2 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 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.

type fileExistsBehavior

string

param fileExistsBehavior

Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.

The fileExistsBehavior parameter takes any of the following values:

  • DISALLOW: The deployment fails. This is also the default behavior if no option is specified.

  • OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.

  • RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.

rtype

dict

returns

Response Syntax

{
    'deploymentId': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a CreateDeployment operation.

    • deploymentId (string) --

      A unique deployment ID.

CreateDeploymentConfig (updated) Link ¶
Changes (request)
{'computePlatform': 'Server | Lambda',
 'trafficRoutingConfig': {'timeBasedCanary': {'canaryInterval': 'integer',
                                              'canaryPercentage': 'integer'},
                          'timeBasedLinear': {'linearInterval': 'integer',
                                              'linearPercentage': 'integer'},
                          'type': 'TimeBasedCanary | TimeBasedLinear | '
                                  'AllAtOnce'}}

Creates a deployment configuration.

See also: AWS API Documentation

Request Syntax

client.create_deployment_config(
    deploymentConfigName='string',
    minimumHealthyHosts={
        'value': 123,
        'type': 'HOST_COUNT'|'FLEET_PERCENT'
    },
    trafficRoutingConfig={
        'type': 'TimeBasedCanary'|'TimeBasedLinear'|'AllAtOnce',
        'timeBasedCanary': {
            'canaryPercentage': 123,
            'canaryInterval': 123
        },
        'timeBasedLinear': {
            'linearPercentage': 123,
            'linearInterval': 123
        }
    },
    computePlatform='Server'|'Lambda'
)
type deploymentConfigName

string

param deploymentConfigName

[REQUIRED]

The name of the deployment configuration to create.

type minimumHealthyHosts

dict

param minimumHealthyHosts

[REQUIRED]

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

The type parameter takes either of the following values:

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

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

The value parameter takes an integer.

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

  • value (integer) --

    The minimum healthy instance value.

  • type (string) --

    The minimum healthy instance type:

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

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

    In an example of nine instance, if a HOST_COUNT of six is specified, deploy to up to three instances at a time. The deployment will be successful if six or more instances are deployed to successfully; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to five instance at a time. The deployment will be successful if four or more instance are deployed to successfully; otherwise, the deployment fails.

    Note

    In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instance type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instance at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, with CodeDeployDefault.OneAtATime, AWS CodeDeploy will try to ensure that all instances but one are kept in a healthy state during the deployment. Although this allows one instance at a time to be taken offline for a new deployment, it also means that if the deployment to the last instance fails, the overall deployment still succeeds.

    For more information, see AWS CodeDeploy Instance Health in the AWS CodeDeploy User Guide .

type trafficRoutingConfig

dict

param trafficRoutingConfig

The configuration specifying how the deployment traffic will be routed.

  • type (string) --

    The type of traffic shifting a deployment configuration uses (TimeBasedCanary or TimeBasedLinear ).

  • timeBasedCanary (dict) --

    A configuration that shifts traffic from one version of a Lambda function to another in two increments. The original and target Lambda function versions are specified in the deployment's AppSpec file.

    • canaryPercentage (integer) --

      The percentage of traffic to shift in the first increment of a TimeBasedCanary deployment.

    • canaryInterval (integer) --

      The number of minutes between the first and second traffic shifts of a TimeBasedCanary deployment.

  • timeBasedLinear (dict) --

    A configuration that shifts traffic from one version of a Lambda function to another in equal increments, with an equal number of minutes between each increment. The original and target Lambda function versions are specified in the deployment's AppSpec file.

    • linearPercentage (integer) --

      The percentage of traffic that is shifted at the start of each increment of a TimeBasedLinear deployment.

    • linearInterval (integer) --

      The number of minutes between each incremental traffic shift of a TimeBasedLinear deployment.

type computePlatform

string

param computePlatform

The destination platform type for the deployment (Lambda or Server >).

rtype

dict

returns

Response Syntax

{
    'deploymentConfigId': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a CreateDeploymentConfig operation.

    • deploymentConfigId (string) --

      A unique deployment configuration ID.

GetApplication (updated) Link ¶
Changes (response)
{'application': {'computePlatform': 'Server | Lambda'}}

Gets information about an application.

See also: AWS API Documentation

Request Syntax

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

string

param applicationName

[REQUIRED]

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

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    Represents the output of a GetApplication operation.

    • application (dict) --

      Information about the application.

      • applicationId (string) --

        The application ID.

      • applicationName (string) --

        The application name.

      • createTime (datetime) --

        The time at which the application was created.

      • linkedToGitHub (boolean) --

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

      • gitHubAccountName (string) --

        The name for a connection to a GitHub account.

      • computePlatform (string) --

        The destination platform type for deployment of the application (Lambda or Server ).

GetApplicationRevision (updated) Link ¶
Changes (both)
{'revision': {'revisionType': ['String'],
              's3Location': {'bundleType': ['YAML', 'JSON']},
              'string': {'content': 'string', 'sha256': 'string'}}}

Gets information about an application revision.

See also: AWS API Documentation

Request Syntax

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

string

param applicationName

[REQUIRED]

The name of the application that corresponds to the revision.

type revision

dict

param revision

[REQUIRED]

Information about the application revision to get, including 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 (EC2/On-premises deployments only)

    • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

  • s3Location (dict) --

    Information about the location of a revision 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.

  • string (dict) --

    Information about the location of an AWS Lambda deployment revision stored as a RawString.

    • content (string) --

      The YAML-formatted or JSON-formatted revision string. It includes information about what Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

    • sha256 (string) --

      The SHA256 hash value of the revision that is specified as a RawString.

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    Represents the output of a GetApplicationRevision operation.

    • applicationName (string) --

      The name of the application that corresponds to the revision.

    • revision (dict) --

      Additional information about the 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 (EC2/On-premises deployments only)

        • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

      • s3Location (dict) --

        Information about the location of a revision 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.

      • string (dict) --

        Information about the location of an AWS Lambda deployment revision stored as a RawString.

        • content (string) --

          The YAML-formatted or JSON-formatted revision string. It includes information about what Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

        • sha256 (string) --

          The SHA256 hash value of the revision that is specified as a RawString.

    • revisionInfo (dict) --

      General information about the revision.

      • description (string) --

        A comment about the revision.

      • deploymentGroups (list) --

        The deployment groups for which this is the current target revision.

        • (string) --

      • firstUsedTime (datetime) --

        When the revision was first used by AWS CodeDeploy.

      • lastUsedTime (datetime) --

        When the revision was last used by AWS CodeDeploy.

      • registerTime (datetime) --

        When the revision was registered with AWS CodeDeploy.

GetDeployment (updated) Link ¶
Changes (response)
{'deploymentInfo': {'computePlatform': 'Server | Lambda',
                    'deploymentStatusMessages': ['string'],
                    'errorInformation': {'code': ['MISSING_GITHUB_TOKEN',
                                                  'MISSING_BLUE_GREEN_DEPLOYMENT_CONFIGURATION',
                                                  'ELASTIC_LOAD_BALANCING_INVALID',
                                                  'INVALID_LAMBDA_CONFIGURATION',
                                                  'INVALID_LAMBDA_FUNCTION',
                                                  'ELB_INVALID_INSTANCE',
                                                  'MISSING_ELB_INFORMATION',
                                                  'HOOK_EXECUTION_FAILURE']},
                    'previousRevision': {'revisionType': ['String'],
                                         's3Location': {'bundleType': ['YAML',
                                                                       'JSON']},
                                         'string': {'content': 'string',
                                                    'sha256': 'string'}},
                    'revision': {'revisionType': ['String'],
                                 's3Location': {'bundleType': ['YAML', 'JSON']},
                                 'string': {'content': 'string',
                                            'sha256': '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',
        'previousRevision': {
            'revisionType': 'S3'|'GitHub'|'String',
            's3Location': {
                'bucket': 'string',
                'key': 'string',
                'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
                'version': 'string',
                'eTag': 'string'
            },
            'gitHubLocation': {
                'repository': 'string',
                'commitId': 'string'
            },
            'string': {
                'content': 'string',
                'sha256': 'string'
            }
        },
        'revision': {
            'revisionType': 'S3'|'GitHub'|'String',
            's3Location': {
                'bucket': 'string',
                'key': 'string',
                'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
                'version': 'string',
                'eTag': 'string'
            },
            'gitHubLocation': {
                'repository': 'string',
                'commitId': 'string'
            },
            'string': {
                'content': 'string',
                'sha256': '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'|'MISSING_BLUE_GREEN_DEPLOYMENT_CONFIGURATION'|'MISSING_ELB_INFORMATION'|'MISSING_GITHUB_TOKEN'|'ELASTIC_LOAD_BALANCING_INVALID'|'ELB_INVALID_INSTANCE'|'INVALID_LAMBDA_CONFIGURATION'|'INVALID_LAMBDA_FUNCTION'|'HOOK_EXECUTION_FAILURE',
            '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',
            ],
            'ec2TagSet': {
                'ec2TagSetList': [
                    [
                        {
                            'Key': 'string',
                            'Value': 'string',
                            'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
                        },
                    ],
                ]
            }
        },
        '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'
                },
            ],
            'targetGroupInfoList': [
                {
                    'name': 'string'
                },
            ]
        },
        'additionalDeploymentStatusInfo': 'string',
        'fileExistsBehavior': 'DISALLOW'|'OVERWRITE'|'RETAIN',
        'deploymentStatusMessages': [
            'string',
        ],
        'computePlatform': 'Server'|'Lambda'
    }
}

Response Structure

  • (dict) --

    Represents the output of a GetDeployment 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.

      • previousRevision (dict) --

        Information about the application revision that was deployed to the deployment group before the most recent successful deployment.

        • revisionType (string) --

          The type of application revision:

          • S3: An application revision stored in Amazon S3.

          • GitHub: An application revision stored in GitHub (EC2/On-premises deployments only)

          • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

        • s3Location (dict) --

          Information about the location of a revision 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.

        • string (dict) --

          Information about the location of an AWS Lambda deployment revision stored as a RawString.

          • content (string) --

            The YAML-formatted or JSON-formatted revision string. It includes information about what Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

          • sha256 (string) --

            The SHA256 hash value of the revision that is specified as a RawString.

      • 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 (EC2/On-premises deployments only)

          • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

        • s3Location (dict) --

          Information about the location of a revision 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.

        • string (dict) --

          Information about the location of an AWS Lambda deployment revision stored as a RawString.

          • content (string) --

            The YAML-formatted or JSON-formatted revision string. It includes information about what Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

          • sha256 (string) --

            The SHA256 hash value of the revision that is specified as a RawString.

      • 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 in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.

        • deploymentType (string) --

          Indicates whether to run an in-place 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. Cannot be used in the same call as ec2TagSet.

          • (dict) --

            Information about an EC2 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) --

        • ec2TagSet (dict) --

          Information about the groups of EC2 instance tags that an instance must be identified by in order for it to be included in the replacement environment for a blue/green deployment. Cannot be used in the same call as tagFilters.

          • ec2TagSetList (list) --

            A list containing other lists of EC2 instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.

            • (list) --

              • (dict) --

                Information about an EC2 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.

      • 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 the deployment.

        • elbInfoList (list) --

          An array containing information about the load balancer to use for load balancing in a deployment. In Elastic Load Balancing, load balancers are used with Classic Load Balancers.

          • (dict) --

            Information about a load balancer in Elastic Load Balancing to use in a deployment. Instances are registered directly with a load balancer, and traffic is routed to the load balancer.

            • name (string) --

              For blue/green deployments, the name of the load balancer that will be used to route traffic from original instances to replacement instances in a blue/green deployment. For in-place deployments, the name of the load balancer that instances are deregistered from so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.

        • targetGroupInfoList (list) --

          An array containing information about the target group to use for load balancing in a deployment. In Elastic Load Balancing, target groups are used with Application Load Balancers.

          • (dict) --

            Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.

            • name (string) --

              For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.

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

      • fileExistsBehavior (string) --

        Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.

        • DISALLOW: The deployment fails. This is also the default behavior if no option is specified.

        • OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.

        • RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.

      • deploymentStatusMessages (list) --

        Messages that contain information about the status of a deployment.

        • (string) --

      • computePlatform (string) --

        The destination platform type for the deployment (Lambda or Server ).

GetDeploymentConfig (updated) Link ¶
Changes (response)
{'deploymentConfigInfo': {'computePlatform': 'Server | Lambda',
                          'trafficRoutingConfig': {'timeBasedCanary': {'canaryInterval': 'integer',
                                                                       'canaryPercentage': 'integer'},
                                                   'timeBasedLinear': {'linearInterval': 'integer',
                                                                       'linearPercentage': 'integer'},
                                                   'type': 'TimeBasedCanary | '
                                                           'TimeBasedLinear | '
                                                           'AllAtOnce'}}}

Gets information about a deployment configuration.

See also: AWS API Documentation

Request Syntax

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

string

param deploymentConfigName

[REQUIRED]

The name of a deployment configuration associated with the applicable IAM user or AWS account.

rtype

dict

returns

Response Syntax

{
    'deploymentConfigInfo': {
        'deploymentConfigId': 'string',
        'deploymentConfigName': 'string',
        'minimumHealthyHosts': {
            'value': 123,
            'type': 'HOST_COUNT'|'FLEET_PERCENT'
        },
        'createTime': datetime(2015, 1, 1),
        'computePlatform': 'Server'|'Lambda',
        'trafficRoutingConfig': {
            'type': 'TimeBasedCanary'|'TimeBasedLinear'|'AllAtOnce',
            'timeBasedCanary': {
                'canaryPercentage': 123,
                'canaryInterval': 123
            },
            'timeBasedLinear': {
                'linearPercentage': 123,
                'linearInterval': 123
            }
        }
    }
}

Response Structure

  • (dict) --

    Represents the output of a GetDeploymentConfig operation.

    • deploymentConfigInfo (dict) --

      Information about the deployment configuration.

      • deploymentConfigId (string) --

        The deployment configuration ID.

      • deploymentConfigName (string) --

        The deployment configuration name.

      • minimumHealthyHosts (dict) --

        Information about the number or percentage of minimum healthy instance.

        • value (integer) --

          The minimum healthy instance value.

        • type (string) --

          The minimum healthy instance type:

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

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

          In an example of nine instance, if a HOST_COUNT of six is specified, deploy to up to three instances at a time. The deployment will be successful if six or more instances are deployed to successfully; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to five instance at a time. The deployment will be successful if four or more instance are deployed to successfully; otherwise, the deployment fails.

          Note

          In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instance type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instance at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, with CodeDeployDefault.OneAtATime, AWS CodeDeploy will try to ensure that all instances but one are kept in a healthy state during the deployment. Although this allows one instance at a time to be taken offline for a new deployment, it also means that if the deployment to the last instance fails, the overall deployment still succeeds.

          For more information, see AWS CodeDeploy Instance Health in the AWS CodeDeploy User Guide .

      • createTime (datetime) --

        The time at which the deployment configuration was created.

      • computePlatform (string) --

        The destination platform type for the deployment (Lambda or Server ).

      • trafficRoutingConfig (dict) --

        The configuration specifying how the deployment traffic will be routed. Only deployments with a Lambda compute platform can specify this.

        • type (string) --

          The type of traffic shifting a deployment configuration uses (TimeBasedCanary or TimeBasedLinear ).

        • timeBasedCanary (dict) --

          A configuration that shifts traffic from one version of a Lambda function to another in two increments. The original and target Lambda function versions are specified in the deployment's AppSpec file.

          • canaryPercentage (integer) --

            The percentage of traffic to shift in the first increment of a TimeBasedCanary deployment.

          • canaryInterval (integer) --

            The number of minutes between the first and second traffic shifts of a TimeBasedCanary deployment.

        • timeBasedLinear (dict) --

          A configuration that shifts traffic from one version of a Lambda function to another in equal increments, with an equal number of minutes between each increment. The original and target Lambda function versions are specified in the deployment's AppSpec file.

          • linearPercentage (integer) --

            The percentage of traffic that is shifted at the start of each increment of a TimeBasedLinear deployment.

          • linearInterval (integer) --

            The number of minutes between each incremental traffic shift of a TimeBasedLinear deployment.

GetDeploymentGroup (updated) Link ¶
Changes (response)
{'deploymentGroupInfo': {'computePlatform': 'Server | Lambda',
                         'targetRevision': {'revisionType': ['String'],
                                            's3Location': {'bundleType': ['YAML',
                                                                          'JSON']},
                                            'string': {'content': 'string',
                                                       'sha256': 'string'}}}}

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'|'String',
            's3Location': {
                'bucket': 'string',
                'key': 'string',
                'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
                'version': 'string',
                'eTag': 'string'
            },
            'gitHubLocation': {
                'repository': 'string',
                'commitId': 'string'
            },
            'string': {
                'content': 'string',
                'sha256': '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'
                },
            ],
            'targetGroupInfoList': [
                {
                    'name': 'string'
                },
            ]
        },
        'lastSuccessfulDeployment': {
            'deploymentId': 'string',
            'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped'|'Ready',
            'endTime': datetime(2015, 1, 1),
            'createTime': datetime(2015, 1, 1)
        },
        'lastAttemptedDeployment': {
            'deploymentId': 'string',
            'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped'|'Ready',
            'endTime': datetime(2015, 1, 1),
            'createTime': datetime(2015, 1, 1)
        },
        'ec2TagSet': {
            'ec2TagSetList': [
                [
                    {
                        'Key': 'string',
                        'Value': 'string',
                        'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
                    },
                ],
            ]
        },
        'onPremisesTagSet': {
            'onPremisesTagSetList': [
                [
                    {
                        'Key': 'string',
                        'Value': 'string',
                        'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
                    },
                ],
            ]
        },
        'computePlatform': 'Server'|'Lambda'
    }
}

Response Structure

  • (dict) --

    Represents the output of a GetDeploymentGroup 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. The deployment group includes EC2 instances with any of the specified tags.

        • (dict) --

          Information about an EC2 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. The deployment group includes on-premises instances with any of the specified tags.

        • (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 (EC2/On-premises deployments only)

          • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

        • s3Location (dict) --

          Information about the location of a revision 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.

        • string (dict) --

          Information about the location of an AWS Lambda deployment revision stored as a RawString.

          • content (string) --

            The YAML-formatted or JSON-formatted revision string. It includes information about what Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

          • sha256 (string) --

            The SHA256 hash value of the revision that is specified as a RawString.

      • 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 in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.

        • deploymentType (string) --

          Indicates whether to run an in-place 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 deployment.

        • elbInfoList (list) --

          An array containing information about the load balancer to use for load balancing in a deployment. In Elastic Load Balancing, load balancers are used with Classic Load Balancers.

          • (dict) --

            Information about a load balancer in Elastic Load Balancing to use in a deployment. Instances are registered directly with a load balancer, and traffic is routed to the load balancer.

            • name (string) --

              For blue/green deployments, the name of the load balancer that will be used to route traffic from original instances to replacement instances in a blue/green deployment. For in-place deployments, the name of the load balancer that instances are deregistered from so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.

        • targetGroupInfoList (list) --

          An array containing information about the target group to use for load balancing in a deployment. In Elastic Load Balancing, target groups are used with Application Load Balancers.

          • (dict) --

            Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.

            • name (string) --

              For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.

      • lastSuccessfulDeployment (dict) --

        Information about the most recent successful deployment to the deployment group.

        • deploymentId (string) --

          The deployment ID.

        • status (string) --

          The status of the most recent deployment.

        • endTime (datetime) --

          A timestamp indicating when the most recent deployment to the deployment group completed.

        • createTime (datetime) --

          A timestamp indicating when the most recent deployment to the deployment group started.

      • lastAttemptedDeployment (dict) --

        Information about the most recent attempted deployment to the deployment group.

        • deploymentId (string) --

          The deployment ID.

        • status (string) --

          The status of the most recent deployment.

        • endTime (datetime) --

          A timestamp indicating when the most recent deployment to the deployment group completed.

        • createTime (datetime) --

          A timestamp indicating when the most recent deployment to the deployment group started.

      • ec2TagSet (dict) --

        Information about groups of tags applied to an EC2 instance. The deployment group includes only EC2 instances identified by all the tag groups. Cannot be used in the same call as ec2TagFilters.

        • ec2TagSetList (list) --

          A list containing other lists of EC2 instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.

          • (list) --

            • (dict) --

              Information about an EC2 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.

      • onPremisesTagSet (dict) --

        Information about groups of tags applied to an on-premises instance. The deployment group includes only on-premises instances identified by all the tag groups. Cannot be used in the same call as onPremisesInstanceTagFilters.

        • onPremisesTagSetList (list) --

          A list containing other lists of on-premises instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.

          • (list) --

            • (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.

      • computePlatform (string) --

        The destination platform type for the deployment group (Lambda or Server ).

ListApplicationRevisions (updated) Link ¶
Changes (response)
{'revisions': {'revisionType': ['String'],
               's3Location': {'bundleType': ['YAML', 'JSON']},
               'string': {'content': 'string', 'sha256': 'string'}}}

Lists information about revisions for an application.

See also: AWS API Documentation

Request Syntax

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

string

param applicationName

[REQUIRED]

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

type sortBy

string

param sortBy

The column name to use to sort the list results:

  • registerTime: Sort by the time the revisions were registered with AWS CodeDeploy.

  • firstUsedTime: Sort by the time the revisions were first used in a deployment.

  • lastUsedTime: Sort by the time the revisions were last used in a deployment.

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

type sortOrder

string

param sortOrder

The order in which to sort the list results:

  • ascending: ascending order.

  • descending: descending order.

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

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

type s3Bucket

string

param s3Bucket

An Amazon S3 bucket name to limit the search for revisions.

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

type s3KeyPrefix

string

param s3KeyPrefix

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

type deployed

string

param deployed

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

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

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

  • ignore: List all revisions.

type nextToken

string

param nextToken

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

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    Represents the output of a ListApplicationRevisions operation.

    • revisions (list) --

      A list of locations that contain the matching revisions.

      • (dict) --

        Information about the location of an application revision.

        • revisionType (string) --

          The type of application revision:

          • S3: An application revision stored in Amazon S3.

          • GitHub: An application revision stored in GitHub (EC2/On-premises deployments only)

          • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

        • s3Location (dict) --

          Information about the location of a revision 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.

        • string (dict) --

          Information about the location of an AWS Lambda deployment revision stored as a RawString.

          • content (string) --

            The YAML-formatted or JSON-formatted revision string. It includes information about what Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

          • sha256 (string) --

            The SHA256 hash value of the revision that is specified as a RawString.

    • nextToken (string) --

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

RegisterApplicationRevision (updated) Link ¶
Changes (request)
{'revision': {'revisionType': ['String'],
              's3Location': {'bundleType': ['YAML', 'JSON']},
              'string': {'content': 'string', 'sha256': 'string'}}}

Registers with AWS CodeDeploy a revision for the specified application.

See also: AWS API Documentation

Request Syntax

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

string

param applicationName

[REQUIRED]

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

type description

string

param description

A comment about the revision.

type revision

dict

param revision

[REQUIRED]

Information about the application revision to register, including 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 (EC2/On-premises deployments only)

    • String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only)

  • s3Location (dict) --

    Information about the location of a revision 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.

  • string (dict) --

    Information about the location of an AWS Lambda deployment revision stored as a RawString.

    • content (string) --

      The YAML-formatted or JSON-formatted revision string. It includes information about what Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

    • sha256 (string) --

      The SHA256 hash value of the revision that is specified as a RawString.

returns

None