CodeDeployClient

CodeDeploy is a deployment service that automates application deployments to Amazon EC2 instances, on-premises instances running in your own facility, serverless Lambda functions, or applications in an Amazon ECS service.

You can deploy a nearly unlimited variety of application content, such as an updated Lambda function, updated applications in an Amazon ECS service, code, web and configuration files, executables, packages, scripts, multimedia files, and so on. CodeDeploy can deploy application content stored in Amazon S3 buckets, GitHub repositories, or Bitbucket repositories. You do not need to make changes to your existing code before you can use CodeDeploy.

CodeDeploy makes it easier for you to rapidly release new features, helps you avoid downtime during application deployment, and handles the complexity of updating your applications, without many of the risks associated with error-prone manual deployments.

CodeDeploy Components

Use the information in this guide to help you work with the following CodeDeploy components:

  • Application: A name that uniquely identifies the application you want to deploy. CodeDeploy uses this name, which functions as a container, to ensure the correct combination of revision, deployment configuration, and deployment group are referenced during a deployment.

  • Deployment group: A set of individual instances, CodeDeploy Lambda deployment configuration settings, or an Amazon ECS service and network details. A Lambda deployment group specifies how to route traffic to a new version of a Lambda function. An Amazon ECS deployment group specifies the service created in Amazon ECS to deploy, a load balancer, and a listener to reroute production traffic to an updated containerized application. An Amazon EC2/On-premises deployment group contains individually tagged instances, Amazon EC2 instances in Amazon EC2 Auto Scaling groups, or both. All deployment groups can specify optional trigger, alarm, and rollback settings.

  • Deployment configuration: A set of deployment rules and deployment success and failure conditions used by CodeDeploy during a deployment.

  • Deployment: The process and the components used when updating a Lambda function, a containerized application in an Amazon ECS service, or of installing content on one or more instances.

  • Application revisions: For an Lambda deployment, this is an AppSpec file that specifies the Lambda function to be updated and one or more functions to validate deployment lifecycle events. For an Amazon ECS deployment, this is an AppSpec file that specifies the Amazon ECS task definition, container, and port where production traffic is rerouted. For an EC2/On-premises deployment, this is an archive file that contains source content—source code, webpages, executable files, and deployment scripts—along with an AppSpec file. Revisions are stored in Amazon S3 buckets or GitHub repositories. For Amazon S3, a revision is uniquely identified by its Amazon S3 object key and its ETag, version, or both. For GitHub, a revision is uniquely identified by its commit ID.

This guide also contains information to help you get details about the instances in your deployments, to make on-premises instances available for CodeDeploy deployments, to get details about a Lambda function deployment, and to get details about Amazon ECS service deployments.

CodeDeploy Information Resources

Properties

Link copied to clipboard
abstract override val config: CodeDeployClient.Config

CodeDeployClient's configuration

Functions

Link copied to clipboard

Adds tags to on-premises instances.

Link copied to clipboard

Gets information about one or more application revisions. The maximum number of application revisions that can be returned is 25.

Link copied to clipboard

Gets information about one or more applications. The maximum number of applications that can be returned is 100.

Link copied to clipboard

Gets information about one or more deployment groups.

Link copied to clipboard

This method works, but is deprecated. Use BatchGetDeploymentTargets instead.

Link copied to clipboard

Gets information about one or more deployments. The maximum number of deployments that can be returned is 25.

Link copied to clipboard

Returns an array of one or more targets associated with a deployment. This method works with all compute types and should be used instead of the deprecated BatchGetDeploymentInstances. The maximum number of targets that can be returned is 25.

Link copied to clipboard

Gets information about one or more on-premises instances. The maximum number of on-premises instances that can be returned is 25.

Link copied to clipboard
abstract suspend fun continueDeployment(input: ContinueDeploymentRequest = ContinueDeploymentRequest { }): ContinueDeploymentResponse

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

Link copied to clipboard

Creates an application.

Link copied to clipboard

Deploys an application revision through the specified deployment group.

Link copied to clipboard

Creates a deployment configuration.

Link copied to clipboard

Creates a deployment group to which application revisions are deployed.

Link copied to clipboard

Deletes an application.

Link copied to clipboard

Deletes a deployment configuration.

Link copied to clipboard

Deletes a deployment group.

Link copied to clipboard
abstract suspend fun deleteGitHubAccountToken(input: DeleteGitHubAccountTokenRequest = DeleteGitHubAccountTokenRequest { }): DeleteGitHubAccountTokenResponse

Deletes a GitHub account connection.

Link copied to clipboard
abstract suspend fun deleteResourcesByExternalId(input: DeleteResourcesByExternalIdRequest = DeleteResourcesByExternalIdRequest { }): DeleteResourcesByExternalIdResponse

Deletes resources linked to an external ID. This action only applies if you have configured blue/green deployments through CloudFormation.

Link copied to clipboard

Deregisters an on-premises instance.

Link copied to clipboard

Gets information about an application.

Link copied to clipboard

Gets information about an application revision.

Link copied to clipboard

Gets information about a deployment.

Link copied to clipboard

Gets information about a deployment configuration.

Link copied to clipboard

Gets information about a deployment group.

Link copied to clipboard

Gets information about an instance as part of a deployment.

Link copied to clipboard

Returns information about a deployment target.

Link copied to clipboard

Gets information about an on-premises instance.

Link copied to clipboard

Lists information about revisions for an application.

Link copied to clipboard
abstract suspend fun listApplications(input: ListApplicationsRequest = ListApplicationsRequest { }): ListApplicationsResponse

Lists the applications registered with the user or Amazon Web Services account.

Link copied to clipboard
abstract suspend fun listDeploymentConfigs(input: ListDeploymentConfigsRequest = ListDeploymentConfigsRequest { }): ListDeploymentConfigsResponse

Lists the deployment configurations with the user or Amazon Web Services account.

Link copied to clipboard

Lists the deployment groups for an application registered with the Amazon Web Services user or Amazon Web Services account.

Link copied to clipboard

The newer BatchGetDeploymentTargets should be used instead because it works with all compute types. ListDeploymentInstances throws an exception if it is used with a compute platform other than EC2/On-premises or Lambda.

Link copied to clipboard
abstract suspend fun listDeployments(input: ListDeploymentsRequest = ListDeploymentsRequest { }): ListDeploymentsResponse

Lists the deployments in a deployment group for an application registered with the user or Amazon Web Services account.

Link copied to clipboard

Returns an array of target IDs that are associated a deployment.

Link copied to clipboard
abstract suspend fun listGitHubAccountTokenNames(input: ListGitHubAccountTokenNamesRequest = ListGitHubAccountTokenNamesRequest { }): ListGitHubAccountTokenNamesResponse

Lists the names of stored connections to GitHub accounts.

Link copied to clipboard
abstract suspend fun listOnPremisesInstances(input: ListOnPremisesInstancesRequest = ListOnPremisesInstancesRequest { }): ListOnPremisesInstancesResponse

Gets a list of names for one or more on-premises instances.

Link copied to clipboard

Returns a list of tags for the resource identified by a specified Amazon Resource Name (ARN). Tags are used to organize and categorize your CodeDeploy resources.

Link copied to clipboard
abstract suspend fun putLifecycleEventHookExecutionStatus(input: PutLifecycleEventHookExecutionStatusRequest = PutLifecycleEventHookExecutionStatusRequest { }): PutLifecycleEventHookExecutionStatusResponse

Sets the result of a Lambda validation function. The function validates lifecycle hooks during a deployment that uses the Lambda or Amazon ECS compute platform. For Lambda deployments, the available lifecycle hooks are BeforeAllowTraffic and AfterAllowTraffic. For Amazon ECS deployments, the available lifecycle hooks are BeforeInstall, AfterInstall, AfterAllowTestTraffic, BeforeAllowTraffic, and AfterAllowTraffic. Lambda validation functions return Succeeded or Failed. For more information, see AppSpec 'hooks' Section for an Lambda Deployment and AppSpec 'hooks' Section for an Amazon ECS Deployment.

Link copied to clipboard

Registers with CodeDeploy a revision for the specified application.

Link copied to clipboard

Registers an on-premises instance.

Link copied to clipboard

Removes one or more tags from one or more on-premises instances.

Link copied to clipboard
abstract suspend fun skipWaitTimeForInstanceTermination(input: SkipWaitTimeForInstanceTerminationRequest = SkipWaitTimeForInstanceTerminationRequest { }): SkipWaitTimeForInstanceTerminationResponse

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

Link copied to clipboard

Attempts to stop an ongoing deployment.

Link copied to clipboard
abstract suspend fun tagResource(input: TagResourceRequest): TagResourceResponse

Associates the list of tags in the input Tags parameter with the resource identified by the ResourceArn input parameter.

Link copied to clipboard

Disassociates a resource from a list of tags. The resource is identified by the ResourceArn input parameter. The tags are identified by the list of keys in the TagKeys input parameter.

Link copied to clipboard
abstract suspend fun updateApplication(input: UpdateApplicationRequest = UpdateApplicationRequest { }): UpdateApplicationResponse

Changes the name of an application.

Link copied to clipboard

Changes information about a deployment group.

Inherited functions

Link copied to clipboard

Adds tags to on-premises instances.

Link copied to clipboard

Gets information about one or more application revisions. The maximum number of application revisions that can be returned is 25.

Link copied to clipboard

Gets information about one or more applications. The maximum number of applications that can be returned is 100.

Link copied to clipboard

Gets information about one or more deployment groups.

Link copied to clipboard

This method works, but is deprecated. Use BatchGetDeploymentTargets instead.

Link copied to clipboard

Gets information about one or more deployments. The maximum number of deployments that can be returned is 25.

Link copied to clipboard

Returns an array of one or more targets associated with a deployment. This method works with all compute types and should be used instead of the deprecated BatchGetDeploymentInstances. The maximum number of targets that can be returned is 25.

Link copied to clipboard

Gets information about one or more on-premises instances. The maximum number of on-premises instances that can be returned is 25.

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard

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

Link copied to clipboard

Creates an application.

Link copied to clipboard

Deploys an application revision through the specified deployment group.

Link copied to clipboard

Creates a deployment configuration.

Link copied to clipboard

Creates a deployment group to which application revisions are deployed.

Link copied to clipboard

Deletes an application.

Link copied to clipboard

Deletes a deployment configuration.

Link copied to clipboard

Deletes a deployment group.

Link copied to clipboard

Deletes a GitHub account connection.

Link copied to clipboard

Deletes resources linked to an external ID. This action only applies if you have configured blue/green deployments through CloudFormation.

Link copied to clipboard

Deregisters an on-premises instance.

Link copied to clipboard

Gets information about an application.

Link copied to clipboard

Gets information about an application revision.

Link copied to clipboard

Gets information about a deployment.

Link copied to clipboard

Gets information about a deployment configuration.

Link copied to clipboard

Gets information about a deployment group.

Link copied to clipboard

Gets information about an instance as part of a deployment.

Link copied to clipboard

Returns information about a deployment target.

Link copied to clipboard

Gets information about an on-premises instance.

Link copied to clipboard

Lists information about revisions for an application.

Link copied to clipboard

Lists the applications registered with the user or Amazon Web Services account.

Link copied to clipboard

Lists the deployment configurations with the user or Amazon Web Services account.

Link copied to clipboard

Lists the deployment groups for an application registered with the Amazon Web Services user or Amazon Web Services account.

Link copied to clipboard

The newer BatchGetDeploymentTargets should be used instead because it works with all compute types. ListDeploymentInstances throws an exception if it is used with a compute platform other than EC2/On-premises or Lambda.

Link copied to clipboard

Lists the deployments in a deployment group for an application registered with the user or Amazon Web Services account.

Link copied to clipboard

Returns an array of target IDs that are associated a deployment.

Link copied to clipboard

Lists the names of stored connections to GitHub accounts.

Link copied to clipboard

Gets a list of names for one or more on-premises instances.

Link copied to clipboard

Returns a list of tags for the resource identified by a specified Amazon Resource Name (ARN). Tags are used to organize and categorize your CodeDeploy resources.

Link copied to clipboard

Sets the result of a Lambda validation function. The function validates lifecycle hooks during a deployment that uses the Lambda or Amazon ECS compute platform. For Lambda deployments, the available lifecycle hooks are BeforeAllowTraffic and AfterAllowTraffic. For Amazon ECS deployments, the available lifecycle hooks are BeforeInstall, AfterInstall, AfterAllowTestTraffic, BeforeAllowTraffic, and AfterAllowTraffic. Lambda validation functions return Succeeded or Failed. For more information, see AppSpec 'hooks' Section for an Lambda Deployment and AppSpec 'hooks' Section for an Amazon ECS Deployment.

Link copied to clipboard

Registers with CodeDeploy a revision for the specified application.

Link copied to clipboard

Registers an on-premises instance.

Link copied to clipboard

Removes one or more tags from one or more on-premises instances.

Link copied to clipboard

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

Link copied to clipboard

Attempts to stop an ongoing deployment.

Link copied to clipboard

Associates the list of tags in the input Tags parameter with the resource identified by the ResourceArn input parameter.

Link copied to clipboard

Disassociates a resource from a list of tags. The resource is identified by the ResourceArn input parameter. The tags are identified by the list of keys in the TagKeys input parameter.

Link copied to clipboard

Changes the name of an application.

Link copied to clipboard

Changes information about a deployment group.

Link copied to clipboard

Create a copy of the client with one or more configuration values overridden. This method allows the caller to perform scoped config overrides for one or more client operations.