Class: AWS.CodeDeploy

Inherits:
AWS.Service show all
Identifier:
codedeploy
API Version:
2014-10-06
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

AWS CodeDeploy is a deployment service that automates application deployments to Amazon EC2 instances, on-premises instances running in your own facility, serverless AWS 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. AWS 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 AWS CodeDeploy.

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

AWS CodeDeploy Components

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

  • Application: A name that uniquely identifies the application you want to deploy. AWS 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 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 AWS 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 AWS 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 AWS CodeDeploy deployments, to get details about a Lambda function deployment, and to get details about Amazon ECS service deployments.

AWS CodeDeploy Information Resources

Sending a Request Using CodeDeploy

var codedeploy = new AWS.CodeDeploy();
codedeploy.batchGetDeploymentTargets(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the CodeDeploy object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var codedeploy = new AWS.CodeDeploy({apiVersion: '2014-10-06'});

You can also set the API version globally in AWS.config.apiVersions using the codedeploy service identifier:

AWS.config.apiVersions = {
  codedeploy: '2014-10-06',
  // other service API versions
};

var codedeploy = new AWS.CodeDeploy();

Version:

  • 2014-10-06

Waiter Resource States

This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:

deploymentSuccessful

Constructor Summary

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService

Constructor Details

new AWS.CodeDeploy(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a CodeDeploy object

var codedeploy = new AWS.CodeDeploy({apiVersion: '2014-10-06'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.CodeDeploy.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.CodeDeploy.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.CodeDeploy.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

addTagsToOnPremisesInstances(params = {}, callback) ⇒ AWS.Request

Adds tags to on-premises instances.

Service Reference:

Examples:

Calling the addTagsToOnPremisesInstances operation

var params = {
  instanceNames: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  tags: [ /* required */
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
codedeploy.addTagsToOnPremisesInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • tags — (Array<map>)

      The tag key-value pairs to add to the on-premises instances.

      Keys and values are both required. Keys cannot be null or empty strings. Value-only tags are not allowed.

      • Key — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

    • instanceNames — (Array<String>)

      The names of the on-premises instances to which to add tags.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchGetApplicationRevisions(params = {}, callback) ⇒ AWS.Request

Gets information about one or more application revisions.

Service Reference:

Examples:

Calling the batchGetApplicationRevisions operation

var params = {
  applicationName: 'STRING_VALUE', /* required */
  revisions: [ /* required */
    {
      appSpecContent: {
        content: 'STRING_VALUE',
        sha256: 'STRING_VALUE'
      },
      gitHubLocation: {
        commitId: 'STRING_VALUE',
        repository: 'STRING_VALUE'
      },
      revisionType: S3 | GitHub | String | AppSpecContent,
      s3Location: {
        bucket: 'STRING_VALUE',
        bundleType: tar | tgz | zip | YAML | JSON,
        eTag: 'STRING_VALUE',
        key: 'STRING_VALUE',
        version: 'STRING_VALUE'
      },
      string: {
        content: 'STRING_VALUE',
        sha256: 'STRING_VALUE'
      }
    },
    /* more items */
  ]
};
codedeploy.batchGetApplicationRevisions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

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

    • revisions — (Array<map>)

      Information to get about the application revisions, 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).

        Possible values include:
        • "S3"
        • "GitHub"
        • "String"
        • "AppSpecContent"
      • s3Location — (map)

        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.

          Possible values include:
          • "tar"
          • "tgz"
          • "zip"
          • "YAML"
          • "JSON"
        • 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 uses 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 is skipped.

      • gitHubLocation — (map)

        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 — (map)

        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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

        • sha256 — (String)

          The SHA256 hash value of the revision content.

      • appSpecContent — (map)

        The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

        • content — (String)

          The YAML-formatted or JSON-formatted revision string.

          For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

          For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

          For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

        • sha256 — (String)

          The SHA256 hash value of the revision content.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • applicationName — (String)

        The name of the application that corresponds to the revisions.

      • errorMessage — (String)

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

      • revisions — (Array<map>)

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

        • revisionLocation — (map)

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

            Possible values include:
            • "S3"
            • "GitHub"
            • "String"
            • "AppSpecContent"
          • s3Location — (map)

            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.

              Possible values include:
              • "tar"
              • "tgz"
              • "zip"
              • "YAML"
              • "JSON"
            • 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 uses 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 is skipped.

          • gitHubLocation — (map)

            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 — (map)

            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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

          • appSpecContent — (map)

            The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

            • content — (String)

              The YAML-formatted or JSON-formatted revision string.

              For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

              For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

              For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

        • genericRevisionInfo — (map)

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

          • description — (String)

            A comment about the revision.

          • deploymentGroups — (Array<String>)

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

          • firstUsedTime — (Date)

            When the revision was first used by AWS CodeDeploy.

          • lastUsedTime — (Date)

            When the revision was last used by AWS CodeDeploy.

          • registerTime — (Date)

            When the revision was registered with AWS CodeDeploy.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchGetApplications(params = {}, callback) ⇒ AWS.Request

Gets information about one or more applications.

Service Reference:

Examples:

Calling the batchGetApplications operation

var params = {
  applicationNames: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
codedeploy.batchGetApplications(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationNames — (Array<String>)

      A list of application names separated by spaces.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • applicationsInfo — (Array<map>)

        Information about the applications.

        • applicationId — (String)

          The application ID.

        • applicationName — (String)

          The application name.

        • createTime — (Date)

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

          Possible values include:
          • "Server"
          • "Lambda"
          • "ECS"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchGetDeploymentGroups(params = {}, callback) ⇒ AWS.Request

Gets information about one or more deployment groups.

Service Reference:

Examples:

Calling the batchGetDeploymentGroups operation

var params = {
  applicationName: 'STRING_VALUE', /* required */
  deploymentGroupNames: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
codedeploy.batchGetDeploymentGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

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

    • deploymentGroupNames — (Array<String>)

      The names of the deployment groups.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deploymentGroupsInfo — (Array<map>)

        Information about the deployment groups.

        • applicationName — (String)

          The application name.

        • deploymentGroupId — (String)

          The deployment group ID.

        • deploymentGroupName — (String)

          The deployment group name.

        • deploymentConfigName — (String)

          The deployment configuration name.

        • ec2TagFilters — (Array<map>)

          The Amazon EC2 tags on which to filter. The deployment group includes EC2 instances with any of the specified tags.

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

            Possible values include:
            • "KEY_ONLY"
            • "VALUE_ONLY"
            • "KEY_AND_VALUE"
        • onPremisesInstanceTagFilters — (Array<map>)

          The on-premises instance tags on which to filter. The deployment group includes on-premises instances with any of the specified tags.

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

            Possible values include:
            • "KEY_ONLY"
            • "VALUE_ONLY"
            • "KEY_AND_VALUE"
        • autoScalingGroups — (Array<map>)

          A list of associated Auto Scaling groups.

          • name — (String)

            The Auto Scaling group name.

          • hook — (String)

            An Auto Scaling lifecycle event hook name.

        • serviceRoleArn — (String)

          A service role ARN.

        • targetRevision — (map)

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

            Possible values include:
            • "S3"
            • "GitHub"
            • "String"
            • "AppSpecContent"
          • s3Location — (map)

            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.

              Possible values include:
              • "tar"
              • "tgz"
              • "zip"
              • "YAML"
              • "JSON"
            • 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 uses 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 is skipped.

          • gitHubLocation — (map)

            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 — (map)

            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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

          • appSpecContent — (map)

            The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

            • content — (String)

              The YAML-formatted or JSON-formatted revision string.

              For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

              For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

              For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

        • triggerConfigurations — (Array<map>)

          Information about triggers associated with 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 — (Array<String>)

            The event type or types for which notifications are triggered.

        • alarmConfiguration — (map)

          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 proceeds even if alarm status information can't be retrieved from Amazon CloudWatch.

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

          • alarms — (Array<map>)

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

            • 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 — (map)

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

          • enabled — (Boolean)

            Indicates whether a defined automatic rollback configuration is currently enabled.

          • events — (Array<String>)

            The event type or types that trigger a rollback.

        • deploymentStyle — (map)

          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.

            Possible values include:
            • "IN_PLACE"
            • "BLUE_GREEN"
          • deploymentOption — (String)

            Indicates whether to route deployment traffic behind a load balancer.

            Possible values include:
            • "WITH_TRAFFIC_CONTROL"
            • "WITHOUT_TRAFFIC_CONTROL"
        • blueGreenDeploymentConfiguration — (map)

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

          • terminateBlueInstancesOnDeploymentSuccess — (map)

            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.

              Possible values include:
              • "TERMINATE"
              • "KEEP_ALIVE"
            • terminationWaitTimeInMinutes — (Integer)

              The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).

          • deploymentReadyOption — (map)

            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 a load balancer unless traffic rerouting is started using ContinueDeployment. If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.

              Possible values include:
              • "CONTINUE_DEPLOYMENT"
              • "STOP_DEPLOYMENT"
            • waitTimeInMinutes — (Integer)

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

          • greenFleetProvisioningOption — (map)

            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.

              Possible values include:
              • "DISCOVER_EXISTING"
              • "COPY_AUTO_SCALING_GROUP"
        • loadBalancerInfo — (map)

          Information about the load balancer to use in a deployment.

          • elbInfoList — (Array<map>)

            An array that contains 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.

            Note: Adding more than one load balancer to the array is not supported.
            • name — (String)

              For blue/green deployments, the name of the load balancer that is 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 is complete.

          • targetGroupInfoList — (Array<map>)

            An array that contains 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.

            Note: Adding more than one target group to the array is not supported.
            • 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 are 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 is complete.

          • targetGroupPairInfoList — (Array<map>)

            The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.

            • targetGroups — (Array<map>)

              One pair of target groups. One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.

              • 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 are 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 is complete.

            • prodTrafficRoute — (map)

              The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.

              • listenerArns — (Array<String>)

                The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

            • testTrafficRoute — (map)

              An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can occur while test traffic is served during a deployment.

              • listenerArns — (Array<String>)

                The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

        • lastSuccessfulDeployment — (map)

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

          • deploymentId — (String)

            The unique ID of a deployment.

          • status — (String)

            The status of the most recent deployment.

            Possible values include:
            • "Created"
            • "Queued"
            • "InProgress"
            • "Succeeded"
            • "Failed"
            • "Stopped"
            • "Ready"
          • endTime — (Date)

            A timestamp that indicates when the most recent deployment to the deployment group was complete.

          • createTime — (Date)

            A timestamp that indicates when the most recent deployment to the deployment group started.

        • lastAttemptedDeployment — (map)

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

          • deploymentId — (String)

            The unique ID of a deployment.

          • status — (String)

            The status of the most recent deployment.

            Possible values include:
            • "Created"
            • "Queued"
            • "InProgress"
            • "Succeeded"
            • "Failed"
            • "Stopped"
            • "Ready"
          • endTime — (Date)

            A timestamp that indicates when the most recent deployment to the deployment group was complete.

          • createTime — (Date)

            A timestamp that indicates when the most recent deployment to the deployment group started.

        • ec2TagSet — (map)

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

          • ec2TagSetList — (Array<Array<map>>)

            A list that contains other lists of EC2 instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.

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

              Possible values include:
              • "KEY_ONLY"
              • "VALUE_ONLY"
              • "KEY_AND_VALUE"
        • onPremisesTagSet — (map)

          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 — (Array<Array<map>>)

            A list that contains other lists of on-premises instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.

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

              Possible values include:
              • "KEY_ONLY"
              • "VALUE_ONLY"
              • "KEY_AND_VALUE"
        • computePlatform — (String)

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

          Possible values include:
          • "Server"
          • "Lambda"
          • "ECS"
        • ecsServices — (Array<map>)

          The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format <clustername>:<servicename>.

          • serviceName — (String)

            The name of the target Amazon ECS service.

          • clusterName — (String)

            The name of the cluster that the Amazon ECS service is associated with.

      • errorMessage — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchGetDeploymentInstances(params = {}, callback) ⇒ AWS.Request

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

Returns an array of instances associated with a deployment. This method works with EC2/On-premises and AWS Lambda compute platforms. The newer BatchGetDeploymentTargets works with all compute platforms.

Service Reference:

Examples:

Calling the batchGetDeploymentInstances operation

var params = {
  deploymentId: 'STRING_VALUE', /* required */
  instanceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
codedeploy.batchGetDeploymentInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentId — (String)

      The unique ID of a deployment.

    • instanceIds — (Array<String>)

      The unique IDs of instances used in the deployment.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • instancesSummary — (Array<map>)

        Information about the instance.

        • deploymentId — (String)

          The unique ID of a deployment.

        • instanceId — (String)

          The instance ID.

        • status — (String)

          The deployment status for this instance:

          • Pending: The deployment is pending for this instance.

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

          • Succeeded: The deployment has succeeded for this instance.

          • Failed: The deployment has failed for this instance.

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

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

          Possible values include:
          • "Pending"
          • "InProgress"
          • "Succeeded"
          • "Failed"
          • "Skipped"
          • "Unknown"
          • "Ready"
        • lastUpdatedAt — (Date)

          A timestamp that indicaties when the instance information was last updated.

        • lifecycleEvents — (Array<map>)

          A list of lifecycle events for this instance.

          • lifecycleEventName — (String)

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

          • diagnostics — (map)

            Diagnostic information about the deployment lifecycle event.

            • errorCode — (String)

              The associated error code:

              • Success: The specified script ran.

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

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

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

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

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

              Possible values include:
              • "Success"
              • "ScriptMissing"
              • "ScriptNotExecutable"
              • "ScriptTimedOut"
              • "ScriptFailed"
              • "UnknownError"
            • scriptName — (String)

              The name of the script.

            • message — (String)

              The message associated with the error.

            • logTail — (String)

              The last portion of the diagnostic log.

              If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.

          • startTime — (Date)

            A timestamp that indicates when the deployment lifecycle event started.

          • endTime — (Date)

            A timestamp that indicates when the deployment lifecycle event ended.

          • status — (String)

            The deployment lifecycle event status:

            • Pending: The deployment lifecycle event is pending.

            • InProgress: The deployment lifecycle event is in progress.

            • Succeeded: The deployment lifecycle event ran successfully.

            • Failed: The deployment lifecycle event has failed.

            • Skipped: The deployment lifecycle event has been skipped.

            • Unknown: The deployment lifecycle event is unknown.

            Possible values include:
            • "Pending"
            • "InProgress"
            • "Succeeded"
            • "Failed"
            • "Skipped"
            • "Unknown"
        • instanceType — (String)

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

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

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

          Possible values include:
          • "Blue"
          • "Green"
      • errorMessage — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchGetDeployments(params = {}, callback) ⇒ AWS.Request

Gets information about one or more deployments.

Service Reference:

Examples:

Calling the batchGetDeployments operation

var params = {
  deploymentIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
codedeploy.batchGetDeployments(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentIds — (Array<String>)

      A list of deployment IDs, separated by spaces.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deploymentsInfo — (Array<map>)

        Information about the deployments.

        • applicationName — (String)

          The application name.

        • deploymentGroupName — (String)

          The deployment group name.

        • deploymentConfigName — (String)

          The deployment configuration name.

        • deploymentId — (String)

          The unique ID of a deployment.

        • previousRevision — (map)

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

            Possible values include:
            • "S3"
            • "GitHub"
            • "String"
            • "AppSpecContent"
          • s3Location — (map)

            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.

              Possible values include:
              • "tar"
              • "tgz"
              • "zip"
              • "YAML"
              • "JSON"
            • 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 uses 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 is skipped.

          • gitHubLocation — (map)

            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 — (map)

            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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

          • appSpecContent — (map)

            The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

            • content — (String)

              The YAML-formatted or JSON-formatted revision string.

              For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

              For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

              For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

        • revision — (map)

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

            Possible values include:
            • "S3"
            • "GitHub"
            • "String"
            • "AppSpecContent"
          • s3Location — (map)

            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.

              Possible values include:
              • "tar"
              • "tgz"
              • "zip"
              • "YAML"
              • "JSON"
            • 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 uses 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 is skipped.

          • gitHubLocation — (map)

            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 — (map)

            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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

          • appSpecContent — (map)

            The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

            • content — (String)

              The YAML-formatted or JSON-formatted revision string.

              For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

              For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

              For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

        • status — (String)

          The current state of the deployment as a whole.

          Possible values include:
          • "Created"
          • "Queued"
          • "InProgress"
          • "Succeeded"
          • "Failed"
          • "Stopped"
          • "Ready"
        • errorInformation — (map)

          Information about any error associated with this deployment.

          • code — (String)

            For more information, see Error Codes for AWS CodeDeploy in the AWS CodeDeploy User Guide.

            The error code:

            • APPLICATION_MISSING: The application was missing. This error code is most likely 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 is most likely 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 Amazon EC2.

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

            • OVER_MAX_INSTANCES: The maximum number of instances 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 is most likely raised if the revision is deleted after the deployment is created, but before it is started.

            Possible values include:
            • "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"
            • "AUTOSCALING_VALIDATION_ERROR"
            • "INVALID_ECS_SERVICE"
            • "ECS_UPDATE_ERROR"
            • "INVALID_REVISION"
          • message — (String)

            An accompanying error message.

        • createTime — (Date)

          A timestamp that indicates when the deployment was created.

        • startTime — (Date)

          A timestamp that indicates when the deployment was deployed to the deployment group.

          In some cases, the reported value of the start time might be later than the complete time. This is due to differences in the clock settings of backend servers that participate in the deployment process.

        • completeTime — (Date)

          A timestamp that indicates when the deployment was complete.

        • deploymentOverview — (map)

          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: Amazon EC2 Auto Scaling created the deployment.

          • codeDeployRollback: A rollback process created the deployment.

          Possible values include:
          • "user"
          • "autoscaling"
          • "codeDeployRollback"
        • ignoreApplicationStopFailures — (Boolean)

          If true, then if an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if ApplicationStop fails, the deployment continues with DownloadBundle. If BeforeBlockTraffic fails, the deployment continues with BlockTraffic. If AfterBlockTraffic fails, the deployment continues with ApplicationStop.

          If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.

          During a deployment, the AWS CodeDeploy agent runs the scripts specified for ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.

          If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use ignoreApplicationStopFailures to specify that the ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic failures should be ignored.

        • autoRollbackConfiguration — (map)

          Information about the automatic rollback configuration associated with the deployment.

          • enabled — (Boolean)

            Indicates whether a defined automatic rollback configuration is currently enabled.

          • events — (Array<String>)

            The event type or types that trigger a rollback.

        • updateOutdatedInstancesOnly — (Boolean)

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

        • rollbackInfo — (map)

          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 that describes the status of a deployment rollback (for example, whether the deployment can't be rolled back, is in progress, failed, or succeeded).

        • deploymentStyle — (map)

          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.

            Possible values include:
            • "IN_PLACE"
            • "BLUE_GREEN"
          • deploymentOption — (String)

            Indicates whether to route deployment traffic behind a load balancer.

            Possible values include:
            • "WITH_TRAFFIC_CONTROL"
            • "WITHOUT_TRAFFIC_CONTROL"
        • targetInstances — (map)

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

          • tagFilters — (Array<map>)

            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.

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

              Possible values include:
              • "KEY_ONLY"
              • "VALUE_ONLY"
              • "KEY_AND_VALUE"
          • autoScalingGroups — (Array<String>)

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

          • ec2TagSet — (map)

            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 — (Array<Array<map>>)

              A list that contains other lists of EC2 instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.

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

                Possible values include:
                • "KEY_ONLY"
                • "VALUE_ONLY"
                • "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 — (map)

          Information about blue/green deployment options for this deployment.

          • terminateBlueInstancesOnDeploymentSuccess — (map)

            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.

              Possible values include:
              • "TERMINATE"
              • "KEEP_ALIVE"
            • terminationWaitTimeInMinutes — (Integer)

              The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).

          • deploymentReadyOption — (map)

            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 a load balancer unless traffic rerouting is started using ContinueDeployment. If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.

              Possible values include:
              • "CONTINUE_DEPLOYMENT"
              • "STOP_DEPLOYMENT"
            • waitTimeInMinutes — (Integer)

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

          • greenFleetProvisioningOption — (map)

            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.

              Possible values include:
              • "DISCOVER_EXISTING"
              • "COPY_AUTO_SCALING_GROUP"
        • loadBalancerInfo — (map)

          Information about the load balancer used in the deployment.

          • elbInfoList — (Array<map>)

            An array that contains 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.

            Note: Adding more than one load balancer to the array is not supported.
            • name — (String)

              For blue/green deployments, the name of the load balancer that is 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 is complete.

          • targetGroupInfoList — (Array<map>)

            An array that contains 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.

            Note: Adding more than one target group to the array is not supported.
            • 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 are 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 is complete.

          • targetGroupPairInfoList — (Array<map>)

            The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.

            • targetGroups — (Array<map>)

              One pair of target groups. One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.

              • 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 are 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 is complete.

            • prodTrafficRoute — (map)

              The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.

              • listenerArns — (Array<String>)

                The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

            • testTrafficRoute — (map)

              An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can occur while test traffic is served during a deployment.

              • listenerArns — (Array<String>)

                The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

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

          Possible values include:
          • "DISALLOW"
          • "OVERWRITE"
          • "RETAIN"
        • deploymentStatusMessages — (Array<String>)

          Messages that contain information about the status of a deployment.

        • computePlatform — (String)

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

          Possible values include:
          • "Server"
          • "Lambda"
          • "ECS"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchGetDeploymentTargets(params = {}, callback) ⇒ AWS.Request

Returns an array of targets associated with a deployment. This method works with all compute types and should be used instead of the deprecated BatchGetDeploymentInstances.

The type of targets returned depends on the deployment's compute platform:

  • EC2/On-premises: Information about EC2 instance targets.

  • AWS Lambda: Information about Lambda functions targets.

  • Amazon ECS: Information about Amazon ECS service targets.

Service Reference:

Examples:

Calling the batchGetDeploymentTargets operation

var params = {
  deploymentId: 'STRING_VALUE',
  targetIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
codedeploy.batchGetDeploymentTargets(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentId — (String)

      The unique ID of a deployment.

    • targetIds — (Array<String>)

      The unique IDs of the deployment targets. The compute platform of the deployment determines the type of the targets and their formats.

      • For deployments that use the EC2/On-premises compute platform, the target IDs are EC2 or on-premises instances IDs, and their target type is instanceTarget.

      • For deployments that use the AWS Lambda compute platform, the target IDs are the names of Lambda functions, and their target type is instanceTarget.

      • For deployments that use the Amazon ECS compute platform, the target IDs are pairs of Amazon ECS clusters and services specified using the format <clustername>:<servicename>. Their target type is ecsTarget.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deploymentTargets — (Array<map>)

        A list of target objects for a deployment. Each target object contains details about the target, such as its status and lifecycle events. The type of the target objects depends on the deployment' compute platform.

        • EC2/On-premises: Each target object is an EC2 or on-premises instance.

        • AWS Lambda: The target object is a specific version of an AWS Lambda function.

        • Amazon ECS: The target object is an Amazon ECS service.

        • deploymentTargetType — (String)

          The deployment type that is specific to the deployment's compute platform.

          Possible values include:
          • "InstanceTarget"
          • "LambdaTarget"
          • "ECSTarget"
        • instanceTarget — (map)

          Information about the target for a deployment that uses the EC2/On-premises compute platform.

          • deploymentId — (String)

            The unique ID of a deployment.

          • targetId — (String)

            The unique ID of a deployment target that has a type of instanceTarget.

          • targetArn — (String)

            The ARN of the target.

          • status — (String)

            The status an EC2/On-premises deployment's target instance.

            Possible values include:
            • "Pending"
            • "InProgress"
            • "Succeeded"
            • "Failed"
            • "Skipped"
            • "Unknown"
            • "Ready"
          • lastUpdatedAt — (Date)

            The date and time when the target instance was updated by a deployment.

          • lifecycleEvents — (Array<map>)

            The lifecycle events of the deployment to this target instance.

            • lifecycleEventName — (String)

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

            • diagnostics — (map)

              Diagnostic information about the deployment lifecycle event.

              • errorCode — (String)

                The associated error code:

                • Success: The specified script ran.

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

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

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

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

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

                Possible values include:
                • "Success"
                • "ScriptMissing"
                • "ScriptNotExecutable"
                • "ScriptTimedOut"
                • "ScriptFailed"
                • "UnknownError"
              • scriptName — (String)

                The name of the script.

              • message — (String)

                The message associated with the error.

              • logTail — (String)

                The last portion of the diagnostic log.

                If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.

            • startTime — (Date)

              A timestamp that indicates when the deployment lifecycle event started.

            • endTime — (Date)

              A timestamp that indicates when the deployment lifecycle event ended.

            • status — (String)

              The deployment lifecycle event status:

              • Pending: The deployment lifecycle event is pending.

              • InProgress: The deployment lifecycle event is in progress.

              • Succeeded: The deployment lifecycle event ran successfully.

              • Failed: The deployment lifecycle event has failed.

              • Skipped: The deployment lifecycle event has been skipped.

              • Unknown: The deployment lifecycle event is unknown.

              Possible values include:
              • "Pending"
              • "InProgress"
              • "Succeeded"
              • "Failed"
              • "Skipped"
              • "Unknown"
          • instanceLabel — (String)

            A label that identifies whether the instance is an original target (BLUE) or a replacement target (GREEN).

            Possible values include:
            • "Blue"
            • "Green"
        • lambdaTarget — (map)

          Information about the target for a deployment that uses the AWS Lambda compute platform.

          • deploymentId — (String)

            The unique ID of a deployment.

          • targetId — (String)

            The unique ID of a deployment target that has a type of lambdaTarget.

          • targetArn — (String)

            The ARN of the target.

          • status — (String)

            The status an AWS Lambda deployment's target Lambda function.

            Possible values include:
            • "Pending"
            • "InProgress"
            • "Succeeded"
            • "Failed"
            • "Skipped"
            • "Unknown"
            • "Ready"
          • lastUpdatedAt — (Date)

            The date and time when the target Lambda function was updated by a deployment.

          • lifecycleEvents — (Array<map>)

            The lifecycle events of the deployment to this target Lambda function.

            • lifecycleEventName — (String)

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

            • diagnostics — (map)

              Diagnostic information about the deployment lifecycle event.

              • errorCode — (String)

                The associated error code:

                • Success: The specified script ran.

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

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

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

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

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

                Possible values include:
                • "Success"
                • "ScriptMissing"
                • "ScriptNotExecutable"
                • "ScriptTimedOut"
                • "ScriptFailed"
                • "UnknownError"
              • scriptName — (String)

                The name of the script.

              • message — (String)

                The message associated with the error.

              • logTail — (String)

                The last portion of the diagnostic log.

                If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.

            • startTime — (Date)

              A timestamp that indicates when the deployment lifecycle event started.

            • endTime — (Date)

              A timestamp that indicates when the deployment lifecycle event ended.

            • status — (String)

              The deployment lifecycle event status:

              • Pending: The deployment lifecycle event is pending.

              • InProgress: The deployment lifecycle event is in progress.

              • Succeeded: The deployment lifecycle event ran successfully.

              • Failed: The deployment lifecycle event has failed.

              • Skipped: The deployment lifecycle event has been skipped.

              • Unknown: The deployment lifecycle event is unknown.

              Possible values include:
              • "Pending"
              • "InProgress"
              • "Succeeded"
              • "Failed"
              • "Skipped"
              • "Unknown"
        • ecsTarget — (map)

          Information about the target for a deployment that uses the Amazon ECS compute platform.

          • deploymentId — (String)

            The unique ID of a deployment.

          • targetId — (String)

            The unique ID of a deployment target that has a type of ecsTarget.

          • targetArn — (String)

            The ARN of the target.

          • lastUpdatedAt — (Date)

            The date and time when the target Amazon ECS application was updated by a deployment.

          • lifecycleEvents — (Array<map>)

            The lifecycle events of the deployment to this target Amazon ECS application.

            • lifecycleEventName — (String)

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

            • diagnostics — (map)

              Diagnostic information about the deployment lifecycle event.

              • errorCode — (String)

                The associated error code:

                • Success: The specified script ran.

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

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

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

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

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

                Possible values include:
                • "Success"
                • "ScriptMissing"
                • "ScriptNotExecutable"
                • "ScriptTimedOut"
                • "ScriptFailed"
                • "UnknownError"
              • scriptName — (String)

                The name of the script.

              • message — (String)

                The message associated with the error.

              • logTail — (String)

                The last portion of the diagnostic log.

                If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.

            • startTime — (Date)

              A timestamp that indicates when the deployment lifecycle event started.

            • endTime — (Date)

              A timestamp that indicates when the deployment lifecycle event ended.

            • status — (String)

              The deployment lifecycle event status:

              • Pending: The deployment lifecycle event is pending.

              • InProgress: The deployment lifecycle event is in progress.

              • Succeeded: The deployment lifecycle event ran successfully.

              • Failed: The deployment lifecycle event has failed.

              • Skipped: The deployment lifecycle event has been skipped.

              • Unknown: The deployment lifecycle event is unknown.

              Possible values include:
              • "Pending"
              • "InProgress"
              • "Succeeded"
              • "Failed"
              • "Skipped"
              • "Unknown"
          • status — (String)

            The status an Amazon ECS deployment's target ECS application.

            Possible values include:
            • "Pending"
            • "InProgress"
            • "Succeeded"
            • "Failed"
            • "Skipped"
            • "Unknown"
            • "Ready"
          • taskSetsInfo — (Array<map>)

            The ECSTaskSet objects associated with the ECS target.

            • identifer — (String)

              A unique ID of an ECSTaskSet.

            • desiredCount — (Integer)

              The number of tasks in a task set. During a deployment that uses the Amazon ECS compute type, CodeDeploy instructs Amazon ECS to create a new task set and uses this value to determine how many tasks to create. After the updated task set is created, CodeDeploy shifts traffic to the new task set.

            • pendingCount — (Integer)

              The number of tasks in the task set that are in the PENDING status during an Amazon ECS deployment. A task in the PENDING state is preparing to enter the RUNNING state. A task set enters the PENDING status when it launches for the first time, or when it is restarted after being in the STOPPED state.

            • runningCount — (Integer)

              The number of tasks in the task set that are in the RUNNING status during an Amazon ECS deployment. A task in the RUNNING state is running and ready for use.

            • status — (String)

              The status of the task set. There are three valid task set statuses:

              • PRIMARY: Indicates the task set is serving production traffic.

              • ACTIVE: Indicates the task set is not serving production traffic.

              • DRAINING: Indicates the tasks in the task set are being stopped and their corresponding targets are being deregistered from their target group.

            • trafficWeight — (Float)

              The percentage of traffic served by this task set.

            • targetGroup — (map)

              The target group associated with the task set. The target group is used by AWS CodeDeploy to manage traffic to a task set.

              • 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 are 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 is complete.

            • taskSetLabel — (String)

              A label that identifies whether the ECS task set is an original target (BLUE) or a replacement target (GREEN).

              Possible values include:
              • "Blue"
              • "Green"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchGetOnPremisesInstances(params = {}, callback) ⇒ AWS.Request

Gets information about one or more on-premises instances.

Service Reference:

Examples:

Calling the batchGetOnPremisesInstances operation

var params = {
  instanceNames: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
codedeploy.batchGetOnPremisesInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • instanceNames — (Array<String>)

      The names of the on-premises instances about which to get information.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • instanceInfos — (Array<map>)

        Information about the on-premises instances.

        • instanceName — (String)

          The name of the on-premises instance.

        • iamSessionArn — (String)

          The ARN of the IAM session associated with the on-premises instance.

        • iamUserArn — (String)

          The IAM user ARN associated with the on-premises instance.

        • instanceArn — (String)

          The ARN of the on-premises instance.

        • registerTime — (Date)

          The time at which the on-premises instance was registered.

        • deregisterTime — (Date)

          If the on-premises instance was deregistered, the time at which the on-premises instance was deregistered.

        • tags — (Array<map>)

          The tags currently associated with the on-premises instance.

          • Key — (String)

            The tag's key.

          • Value — (String)

            The tag's value.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

continueDeployment(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the continueDeployment operation

var params = {
  deploymentId: 'STRING_VALUE',
  deploymentWaitType: READY_WAIT | TERMINATION_WAIT
};
codedeploy.continueDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentId — (String)

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

    • deploymentWaitType — (String)

      The status of the deployment's waiting period. READY_WAIT indicates the deployment is ready to start shifting traffic. TERMINATION_WAIT indicates the traffic is shifted, but the original target is not terminated.

      Possible values include:
      • "READY_WAIT"
      • "TERMINATION_WAIT"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createApplication(params = {}, callback) ⇒ AWS.Request

Creates an application.

Service Reference:

Examples:

Calling the createApplication operation

var params = {
  applicationName: 'STRING_VALUE', /* required */
  computePlatform: Server | Lambda | ECS
};
codedeploy.createApplication(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

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

    • computePlatform — (String)

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

      Possible values include:
      • "Server"
      • "Lambda"
      • "ECS"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • applicationId — (String)

        A unique application ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDeployment(params = {}, callback) ⇒ AWS.Request

Deploys an application revision through the specified deployment group.

Service Reference:

Examples:

Calling the createDeployment operation

var params = {
  applicationName: 'STRING_VALUE', /* required */
  autoRollbackConfiguration: {
    enabled: true || false,
    events: [
      DEPLOYMENT_FAILURE | DEPLOYMENT_STOP_ON_ALARM | DEPLOYMENT_STOP_ON_REQUEST,
      /* more items */
    ]
  },
  deploymentConfigName: 'STRING_VALUE',
  deploymentGroupName: 'STRING_VALUE',
  description: 'STRING_VALUE',
  fileExistsBehavior: DISALLOW | OVERWRITE | RETAIN,
  ignoreApplicationStopFailures: true || false,
  revision: {
    appSpecContent: {
      content: 'STRING_VALUE',
      sha256: 'STRING_VALUE'
    },
    gitHubLocation: {
      commitId: 'STRING_VALUE',
      repository: 'STRING_VALUE'
    },
    revisionType: S3 | GitHub | String | AppSpecContent,
    s3Location: {
      bucket: 'STRING_VALUE',
      bundleType: tar | tgz | zip | YAML | JSON,
      eTag: 'STRING_VALUE',
      key: 'STRING_VALUE',
      version: 'STRING_VALUE'
    },
    string: {
      content: 'STRING_VALUE',
      sha256: 'STRING_VALUE'
    }
  },
  targetInstances: {
    autoScalingGroups: [
      'STRING_VALUE',
      /* more items */
    ],
    ec2TagSet: {
      ec2TagSetList: [
        [
          {
            Key: 'STRING_VALUE',
            Type: KEY_ONLY | VALUE_ONLY | KEY_AND_VALUE,
            Value: 'STRING_VALUE'
          },
          /* more items */
        ],
        /* more items */
      ]
    },
    tagFilters: [
      {
        Key: 'STRING_VALUE',
        Type: KEY_ONLY | VALUE_ONLY | KEY_AND_VALUE,
        Value: 'STRING_VALUE'
      },
      /* more items */
    ]
  },
  updateOutdatedInstancesOnly: true || false
};
codedeploy.createDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

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

    • deploymentGroupName — (String)

      The name of the deployment group.

    • revision — (map)

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

        Possible values include:
        • "S3"
        • "GitHub"
        • "String"
        • "AppSpecContent"
      • s3Location — (map)

        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.

          Possible values include:
          • "tar"
          • "tgz"
          • "zip"
          • "YAML"
          • "JSON"
        • 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 uses 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 is skipped.

      • gitHubLocation — (map)

        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 — (map)

        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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

        • sha256 — (String)

          The SHA256 hash value of the revision content.

      • appSpecContent — (map)

        The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

        • content — (String)

          The YAML-formatted or JSON-formatted revision string.

          For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

          For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

          For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

        • sha256 — (String)

          The SHA256 hash value of the revision content.

    • deploymentConfigName — (String)

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

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

    • description — (String)

      A comment about the deployment.

    • ignoreApplicationStopFailures — (Boolean)

      If true, then if an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if ApplicationStop fails, the deployment continues with DownloadBundle. If BeforeBlockTraffic fails, the deployment continues with BlockTraffic. If AfterBlockTraffic fails, the deployment continues with ApplicationStop.

      If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.

      During a deployment, the AWS CodeDeploy agent runs the scripts specified for ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.

      If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use ignoreApplicationStopFailures to specify that the ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic failures should be ignored.

    • targetInstances — (map)

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

      • tagFilters — (Array<map>)

        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.

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

          Possible values include:
          • "KEY_ONLY"
          • "VALUE_ONLY"
          • "KEY_AND_VALUE"
      • autoScalingGroups — (Array<String>)

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

      • ec2TagSet — (map)

        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 — (Array<Array<map>>)

          A list that contains other lists of EC2 instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.

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

            Possible values include:
            • "KEY_ONLY"
            • "VALUE_ONLY"
            • "KEY_AND_VALUE"
    • autoRollbackConfiguration — (map)

      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 — (Array<String>)

        The event type or types that trigger a rollback.

    • updateOutdatedInstancesOnly — (Boolean)

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

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

      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.

      Possible values include:
      • "DISALLOW"
      • "OVERWRITE"
      • "RETAIN"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deploymentId — (String)

        The unique ID of a deployment.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDeploymentConfig(params = {}, callback) ⇒ AWS.Request

Creates a deployment configuration.

Service Reference:

Examples:

Calling the createDeploymentConfig operation

var params = {
  deploymentConfigName: 'STRING_VALUE', /* required */
  computePlatform: Server | Lambda | ECS,
  minimumHealthyHosts: {
    type: HOST_COUNT | FLEET_PERCENT,
    value: 'NUMBER_VALUE'
  },
  trafficRoutingConfig: {
    timeBasedCanary: {
      canaryInterval: 'NUMBER_VALUE',
      canaryPercentage: 'NUMBER_VALUE'
    },
    timeBasedLinear: {
      linearInterval: 'NUMBER_VALUE',
      linearPercentage: 'NUMBER_VALUE'
    },
    type: TimeBasedCanary | TimeBasedLinear | AllAtOnce
  }
};
codedeploy.createDeploymentConfig(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentConfigName — (String)

      The name of the deployment configuration to create.

    • minimumHealthyHosts — (map)

      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 is 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 is 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 returns 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 attempts 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 is still successful.

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

        Possible values include:
        • "HOST_COUNT"
        • "FLEET_PERCENT"
    • trafficRoutingConfig — (map)

      The configuration that specifies how the deployment traffic is routed.

      • type — (String)

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

        Possible values include:
        • "TimeBasedCanary"
        • "TimeBasedLinear"
        • "AllAtOnce"
      • timeBasedCanary — (map)

        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 — (map)

        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.

    • computePlatform — (String)

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

      Possible values include:
      • "Server"
      • "Lambda"
      • "ECS"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deploymentConfigId — (String)

        A unique deployment configuration ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDeploymentGroup(params = {}, callback) ⇒ AWS.Request

Creates a deployment group to which application revisions are deployed.

Service Reference:

Examples:

Calling the createDeploymentGroup operation

var params = {
  applicationName: 'STRING_VALUE', /* required */
  deploymentGroupName: 'STRING_VALUE', /* required */
  serviceRoleArn: 'STRING_VALUE', /* required */
  alarmConfiguration: {
    alarms: [
      {
        name: 'STRING_VALUE'
      },
      /* more items */
    ],
    enabled: true || false,
    ignorePollAlarmFailure: true || false
  },
  autoRollbackConfiguration: {
    enabled: true || false,
    events: [
      DEPLOYMENT_FAILURE | DEPLOYMENT_STOP_ON_ALARM | DEPLOYMENT_STOP_ON_REQUEST,
      /* more items */
    ]
  },
  autoScalingGroups: [
    'STRING_VALUE',
    /* more items */
  ],
  blueGreenDeploymentConfiguration: {
    deploymentReadyOption: {
      actionOnTimeout: CONTINUE_DEPLOYMENT | STOP_DEPLOYMENT,
      waitTimeInMinutes: 'NUMBER_VALUE'
    },
    greenFleetProvisioningOption: {
      action: DISCOVER_EXISTING | COPY_AUTO_SCALING_GROUP
    },
    terminateBlueInstancesOnDeploymentSuccess: {
      action: TERMINATE | KEEP_ALIVE,
      terminationWaitTimeInMinutes: 'NUMBER_VALUE'
    }
  },
  deploymentConfigName: 'STRING_VALUE',
  deploymentStyle: {
    deploymentOption: WITH_TRAFFIC_CONTROL | WITHOUT_TRAFFIC_CONTROL,
    deploymentType: IN_PLACE | BLUE_GREEN
  },
  ec2TagFilters: [
    {
      Key: 'STRING_VALUE',
      Type: KEY_ONLY | VALUE_ONLY | KEY_AND_VALUE,
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  ec2TagSet: {
    ec2TagSetList: [
      [
        {
          Key: 'STRING_VALUE',
          Type: KEY_ONLY | VALUE_ONLY | KEY_AND_VALUE,
          Value: 'STRING_VALUE'
        },
        /* more items */
      ],
      /* more items */
    ]
  },
  ecsServices: [
    {
      clusterName: 'STRING_VALUE',
      serviceName: 'STRING_VALUE'
    },
    /* more items */
  ],
  loadBalancerInfo: {
    elbInfoList: [
      {
        name: 'STRING_VALUE'
      },
      /* more items */
    ],
    targetGroupInfoList: [
      {
        name: 'STRING_VALUE'
      },
      /* more items */
    ],
    targetGroupPairInfoList: [
      {
        prodTrafficRoute: {
          listenerArns: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        targetGroups: [
          {
            name: 'STRING_VALUE'
          },
          /* more items */
        ],
        testTrafficRoute: {
          listenerArns: [
            'STRING_VALUE',
            /* more items */
          ]
        }
      },
      /* more items */
    ]
  },
  onPremisesInstanceTagFilters: [
    {
      Key: 'STRING_VALUE',
      Type: KEY_ONLY | VALUE_ONLY | KEY_AND_VALUE,
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  onPremisesTagSet: {
    onPremisesTagSetList: [
      [
        {
          Key: 'STRING_VALUE',
          Type: KEY_ONLY | VALUE_ONLY | KEY_AND_VALUE,
          Value: 'STRING_VALUE'
        },
        /* more items */
      ],
      /* more items */
    ]
  },
  triggerConfigurations: [
    {
      triggerEvents: [
        DeploymentStart | DeploymentSuccess | DeploymentFailure | DeploymentStop | DeploymentRollback | DeploymentReady | InstanceStart | InstanceSuccess | InstanceFailure | InstanceReady,
        /* more items */
      ],
      triggerName: 'STRING_VALUE',
      triggerTargetArn: 'STRING_VALUE'
    },
    /* more items */
  ]
};
codedeploy.createDeploymentGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

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

    • deploymentGroupName — (String)

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

    • deploymentConfigName — (String)

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

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

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

    • ec2TagFilters — (Array<map>)

      The Amazon EC2 tags on which to filter. The deployment group includes EC2 instances with any of the specified tags. Cannot be used in the same call as ec2TagSet.

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

        Possible values include:
        • "KEY_ONLY"
        • "VALUE_ONLY"
        • "KEY_AND_VALUE"
    • onPremisesInstanceTagFilters — (Array<map>)

      The on-premises instance tags on which to filter. The deployment group includes on-premises instances with any of the specified tags. Cannot be used in the same call as OnPremisesTagSet.

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

        Possible values include:
        • "KEY_ONLY"
        • "VALUE_ONLY"
        • "KEY_AND_VALUE"
    • autoScalingGroups — (Array<String>)

      A list of associated Amazon EC2 Auto Scaling groups.

    • serviceRoleArn — (String)

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

    • triggerConfigurations — (Array<map>)

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

      • 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 — (Array<String>)

        The event type or types for which notifications are triggered.

    • alarmConfiguration — (map)

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

      • enabled — (Boolean)

        Indicates whether the alarm configuration is enabled.

      • ignorePollAlarmFailure — (Boolean)

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

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

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

      • alarms — (Array<map>)

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

        • 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 — (map)

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

      • enabled — (Boolean)

        Indicates whether a defined automatic rollback configuration is currently enabled.

      • events — (Array<String>)

        The event type or types that trigger a rollback.

    • deploymentStyle — (map)

      Information about the type of deployment, in-place or blue/green, that 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.

        Possible values include:
        • "IN_PLACE"
        • "BLUE_GREEN"
      • deploymentOption — (String)

        Indicates whether to route deployment traffic behind a load balancer.

        Possible values include:
        • "WITH_TRAFFIC_CONTROL"
        • "WITHOUT_TRAFFIC_CONTROL"
    • blueGreenDeploymentConfiguration — (map)

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

      • terminateBlueInstancesOnDeploymentSuccess — (map)

        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.

          Possible values include:
          • "TERMINATE"
          • "KEEP_ALIVE"
        • terminationWaitTimeInMinutes — (Integer)

          The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).

      • deploymentReadyOption — (map)

        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 a load balancer unless traffic rerouting is started using ContinueDeployment. If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.

          Possible values include:
          • "CONTINUE_DEPLOYMENT"
          • "STOP_DEPLOYMENT"
        • waitTimeInMinutes — (Integer)

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

      • greenFleetProvisioningOption — (map)

        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.

          Possible values include:
          • "DISCOVER_EXISTING"
          • "COPY_AUTO_SCALING_GROUP"
    • loadBalancerInfo — (map)

      Information about the load balancer used in a deployment.

      • elbInfoList — (Array<map>)

        An array that contains 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.

        Note: Adding more than one load balancer to the array is not supported.
        • name — (String)

          For blue/green deployments, the name of the load balancer that is 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 is complete.

      • targetGroupInfoList — (Array<map>)

        An array that contains 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.

        Note: Adding more than one target group to the array is not supported.
        • 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 are 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 is complete.

      • targetGroupPairInfoList — (Array<map>)

        The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.

        • targetGroups — (Array<map>)

          One pair of target groups. One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.

          • 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 are 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 is complete.

        • prodTrafficRoute — (map)

          The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.

          • listenerArns — (Array<String>)

            The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

        • testTrafficRoute — (map)

          An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can occur while test traffic is served during a deployment.

          • listenerArns — (Array<String>)

            The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

    • ec2TagSet — (map)

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

      • ec2TagSetList — (Array<Array<map>>)

        A list that contains other lists of EC2 instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.

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

          Possible values include:
          • "KEY_ONLY"
          • "VALUE_ONLY"
          • "KEY_AND_VALUE"
    • ecsServices — (Array<map>)

      The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format <clustername>:<servicename>.

      • serviceName — (String)

        The name of the target Amazon ECS service.

      • clusterName — (String)

        The name of the cluster that the Amazon ECS service is associated with.

    • onPremisesTagSet — (map)

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

      • onPremisesTagSetList — (Array<Array<map>>)

        A list that contains other lists of on-premises instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.

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

          Possible values include:
          • "KEY_ONLY"
          • "VALUE_ONLY"
          • "KEY_AND_VALUE"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deploymentGroupId — (String)

        A unique deployment group ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteApplication(params = {}, callback) ⇒ AWS.Request

Deletes an application.

Service Reference:

Examples:

Calling the deleteApplication operation

var params = {
  applicationName: 'STRING_VALUE' /* required */
};
codedeploy.deleteApplication(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDeploymentConfig(params = {}, callback) ⇒ AWS.Request

Deletes a deployment configuration.

Note: A deployment configuration cannot be deleted if it is currently in use. Predefined configurations cannot be deleted.

Service Reference:

Examples:

Calling the deleteDeploymentConfig operation

var params = {
  deploymentConfigName: 'STRING_VALUE' /* required */
};
codedeploy.deleteDeploymentConfig(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentConfigName — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDeploymentGroup(params = {}, callback) ⇒ AWS.Request

Deletes a deployment group.

Service Reference:

Examples:

Calling the deleteDeploymentGroup operation

var params = {
  applicationName: 'STRING_VALUE', /* required */
  deploymentGroupName: 'STRING_VALUE' /* required */
};
codedeploy.deleteDeploymentGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

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

    • deploymentGroupName — (String)

      The name of a deployment group for the specified application.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • hooksNotCleanedUp — (Array<map>)

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

        • name — (String)

          The Auto Scaling group name.

        • hook — (String)

          An Auto Scaling lifecycle event hook name.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteGitHubAccountToken(params = {}, callback) ⇒ AWS.Request

Deletes a GitHub account connection.

Service Reference:

Examples:

Calling the deleteGitHubAccountToken operation

var params = {
  tokenName: 'STRING_VALUE'
};
codedeploy.deleteGitHubAccountToken(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • tokenName — (String)

      The name of the GitHub account connection to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • tokenName — (String)

        The name of the GitHub account connection that was deleted.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deregisterOnPremisesInstance(params = {}, callback) ⇒ AWS.Request

Deregisters an on-premises instance.

Service Reference:

Examples:

Calling the deregisterOnPremisesInstance operation

var params = {
  instanceName: 'STRING_VALUE' /* required */
};
codedeploy.deregisterOnPremisesInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • instanceName — (String)

      The name of the on-premises instance to deregister.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getApplication(params = {}, callback) ⇒ AWS.Request

Gets information about an application.

Service Reference:

Examples:

Calling the getApplication operation

var params = {
  applicationName: 'STRING_VALUE' /* required */
};
codedeploy.getApplication(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • application — (map)

        Information about the application.

        • applicationId — (String)

          The application ID.

        • applicationName — (String)

          The application name.

        • createTime — (Date)

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

          Possible values include:
          • "Server"
          • "Lambda"
          • "ECS"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getApplicationRevision(params = {}, callback) ⇒ AWS.Request

Gets information about an application revision.

Service Reference:

Examples:

Calling the getApplicationRevision operation

var params = {
  applicationName: 'STRING_VALUE', /* required */
  revision: { /* required */
    appSpecContent: {
      content: 'STRING_VALUE',
      sha256: 'STRING_VALUE'
    },
    gitHubLocation: {
      commitId: 'STRING_VALUE',
      repository: 'STRING_VALUE'
    },
    revisionType: S3 | GitHub | String | AppSpecContent,
    s3Location: {
      bucket: 'STRING_VALUE',
      bundleType: tar | tgz | zip | YAML | JSON,
      eTag: 'STRING_VALUE',
      key: 'STRING_VALUE',
      version: 'STRING_VALUE'
    },
    string: {
      content: 'STRING_VALUE',
      sha256: 'STRING_VALUE'
    }
  }
};
codedeploy.getApplicationRevision(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

      The name of the application that corresponds to the revision.

    • revision — (map)

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

        Possible values include:
        • "S3"
        • "GitHub"
        • "String"
        • "AppSpecContent"
      • s3Location — (map)

        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.

          Possible values include:
          • "tar"
          • "tgz"
          • "zip"
          • "YAML"
          • "JSON"
        • 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 uses 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 is skipped.

      • gitHubLocation — (map)

        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 — (map)

        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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

        • sha256 — (String)

          The SHA256 hash value of the revision content.

      • appSpecContent — (map)

        The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

        • content — (String)

          The YAML-formatted or JSON-formatted revision string.

          For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

          For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

          For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

        • sha256 — (String)

          The SHA256 hash value of the revision content.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • applicationName — (String)

        The name of the application that corresponds to the revision.

      • revision — (map)

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

          Possible values include:
          • "S3"
          • "GitHub"
          • "String"
          • "AppSpecContent"
        • s3Location — (map)

          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.

            Possible values include:
            • "tar"
            • "tgz"
            • "zip"
            • "YAML"
            • "JSON"
          • 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 uses 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 is skipped.

        • gitHubLocation — (map)

          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 — (map)

          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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

          • sha256 — (String)

            The SHA256 hash value of the revision content.

        • appSpecContent — (map)

          The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

          • content — (String)

            The YAML-formatted or JSON-formatted revision string.

            For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

            For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

            For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

          • sha256 — (String)

            The SHA256 hash value of the revision content.

      • revisionInfo — (map)

        General information about the revision.

        • description — (String)

          A comment about the revision.

        • deploymentGroups — (Array<String>)

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

        • firstUsedTime — (Date)

          When the revision was first used by AWS CodeDeploy.

        • lastUsedTime — (Date)

          When the revision was last used by AWS CodeDeploy.

        • registerTime — (Date)

          When the revision was registered with AWS CodeDeploy.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDeployment(params = {}, callback) ⇒ AWS.Request

Gets information about a deployment.

Note: The content property of the appSpecContent object in the returned revision is always null. Use GetApplicationRevision and the sha256 property of the returned appSpecContent object to get the content of the deployment’s AppSpec file.

Service Reference:

Examples:

Calling the getDeployment operation

var params = {
  deploymentId: 'STRING_VALUE' /* required */
};
codedeploy.getDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentId — (String)

      The unique ID of a deployment associated with the IAM user or AWS account.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deploymentInfo — (map)

        Information about the deployment.

        • applicationName — (String)

          The application name.

        • deploymentGroupName — (String)

          The deployment group name.

        • deploymentConfigName — (String)

          The deployment configuration name.

        • deploymentId — (String)

          The unique ID of a deployment.

        • previousRevision — (map)

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

            Possible values include:
            • "S3"
            • "GitHub"
            • "String"
            • "AppSpecContent"
          • s3Location — (map)

            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.

              Possible values include:
              • "tar"
              • "tgz"
              • "zip"
              • "YAML"
              • "JSON"
            • 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 uses 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 is skipped.

          • gitHubLocation — (map)

            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 — (map)

            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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

          • appSpecContent — (map)

            The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

            • content — (String)

              The YAML-formatted or JSON-formatted revision string.

              For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

              For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

              For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

        • revision — (map)

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

            Possible values include:
            • "S3"
            • "GitHub"
            • "String"
            • "AppSpecContent"
          • s3Location — (map)

            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.

              Possible values include:
              • "tar"
              • "tgz"
              • "zip"
              • "YAML"
              • "JSON"
            • 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 uses 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 is skipped.

          • gitHubLocation — (map)

            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 — (map)

            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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

          • appSpecContent — (map)

            The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

            • content — (String)

              The YAML-formatted or JSON-formatted revision string.

              For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

              For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

              For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

        • status — (String)

          The current state of the deployment as a whole.

          Possible values include:
          • "Created"
          • "Queued"
          • "InProgress"
          • "Succeeded"
          • "Failed"
          • "Stopped"
          • "Ready"
        • errorInformation — (map)

          Information about any error associated with this deployment.

          • code — (String)

            For more information, see Error Codes for AWS CodeDeploy in the AWS CodeDeploy User Guide.

            The error code:

            • APPLICATION_MISSING: The application was missing. This error code is most likely 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 is most likely 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 Amazon EC2.

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

            • OVER_MAX_INSTANCES: The maximum number of instances 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 is most likely raised if the revision is deleted after the deployment is created, but before it is started.

            Possible values include:
            • "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"
            • "AUTOSCALING_VALIDATION_ERROR"
            • "INVALID_ECS_SERVICE"
            • "ECS_UPDATE_ERROR"
            • "INVALID_REVISION"
          • message — (String)

            An accompanying error message.

        • createTime — (Date)

          A timestamp that indicates when the deployment was created.

        • startTime — (Date)

          A timestamp that indicates when the deployment was deployed to the deployment group.

          In some cases, the reported value of the start time might be later than the complete time. This is due to differences in the clock settings of backend servers that participate in the deployment process.

        • completeTime — (Date)

          A timestamp that indicates when the deployment was complete.

        • deploymentOverview — (map)

          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: Amazon EC2 Auto Scaling created the deployment.

          • codeDeployRollback: A rollback process created the deployment.

          Possible values include:
          • "user"
          • "autoscaling"
          • "codeDeployRollback"
        • ignoreApplicationStopFailures — (Boolean)

          If true, then if an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if ApplicationStop fails, the deployment continues with DownloadBundle. If BeforeBlockTraffic fails, the deployment continues with BlockTraffic. If AfterBlockTraffic fails, the deployment continues with ApplicationStop.

          If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.

          During a deployment, the AWS CodeDeploy agent runs the scripts specified for ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.

          If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use ignoreApplicationStopFailures to specify that the ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic failures should be ignored.

        • autoRollbackConfiguration — (map)

          Information about the automatic rollback configuration associated with the deployment.

          • enabled — (Boolean)

            Indicates whether a defined automatic rollback configuration is currently enabled.

          • events — (Array<String>)

            The event type or types that trigger a rollback.

        • updateOutdatedInstancesOnly — (Boolean)

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

        • rollbackInfo — (map)

          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 that describes the status of a deployment rollback (for example, whether the deployment can't be rolled back, is in progress, failed, or succeeded).

        • deploymentStyle — (map)

          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.

            Possible values include:
            • "IN_PLACE"
            • "BLUE_GREEN"
          • deploymentOption — (String)

            Indicates whether to route deployment traffic behind a load balancer.

            Possible values include:
            • "WITH_TRAFFIC_CONTROL"
            • "WITHOUT_TRAFFIC_CONTROL"
        • targetInstances — (map)

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

          • tagFilters — (Array<map>)

            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.

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

              Possible values include:
              • "KEY_ONLY"
              • "VALUE_ONLY"
              • "KEY_AND_VALUE"
          • autoScalingGroups — (Array<String>)

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

          • ec2TagSet — (map)

            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 — (Array<Array<map>>)

              A list that contains other lists of EC2 instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.

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

                Possible values include:
                • "KEY_ONLY"
                • "VALUE_ONLY"
                • "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 — (map)

          Information about blue/green deployment options for this deployment.

          • terminateBlueInstancesOnDeploymentSuccess — (map)

            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.

              Possible values include:
              • "TERMINATE"
              • "KEEP_ALIVE"
            • terminationWaitTimeInMinutes — (Integer)

              The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).

          • deploymentReadyOption — (map)

            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 a load balancer unless traffic rerouting is started using ContinueDeployment. If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.

              Possible values include:
              • "CONTINUE_DEPLOYMENT"
              • "STOP_DEPLOYMENT"
            • waitTimeInMinutes — (Integer)

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

          • greenFleetProvisioningOption — (map)

            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.

              Possible values include:
              • "DISCOVER_EXISTING"
              • "COPY_AUTO_SCALING_GROUP"
        • loadBalancerInfo — (map)

          Information about the load balancer used in the deployment.

          • elbInfoList — (Array<map>)

            An array that contains 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.

            Note: Adding more than one load balancer to the array is not supported.
            • name — (String)

              For blue/green deployments, the name of the load balancer that is 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 is complete.

          • targetGroupInfoList — (Array<map>)

            An array that contains 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.

            Note: Adding more than one target group to the array is not supported.
            • 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 are 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 is complete.

          • targetGroupPairInfoList — (Array<map>)

            The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.

            • targetGroups — (Array<map>)

              One pair of target groups. One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.

              • 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 are 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 is complete.

            • prodTrafficRoute — (map)

              The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.

              • listenerArns — (Array<String>)

                The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

            • testTrafficRoute — (map)

              An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can occur while test traffic is served during a deployment.

              • listenerArns — (Array<String>)

                The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

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

          Possible values include:
          • "DISALLOW"
          • "OVERWRITE"
          • "RETAIN"
        • deploymentStatusMessages — (Array<String>)

          Messages that contain information about the status of a deployment.

        • computePlatform — (String)

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

          Possible values include:
          • "Server"
          • "Lambda"
          • "ECS"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

getDeploymentConfig(params = {}, callback) ⇒ AWS.Request

Gets information about a deployment configuration.

Service Reference:

Examples:

Calling the getDeploymentConfig operation

var params = {
  deploymentConfigName: 'STRING_VALUE' /* required */
};
codedeploy.getDeploymentConfig(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentConfigName — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deploymentConfigInfo — (map)

        Information about the deployment configuration.

        • deploymentConfigId — (String)

          The deployment configuration ID.

        • deploymentConfigName — (String)

          The deployment configuration name.

        • minimumHealthyHosts — (map)

          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 is 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 is 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 returns 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 attempts 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 is still successful.

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

            Possible values include:
            • "HOST_COUNT"
            • "FLEET_PERCENT"
        • createTime — (Date)

          The time at which the deployment configuration was created.

        • computePlatform — (String)

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

          Possible values include:
          • "Server"
          • "Lambda"
          • "ECS"
        • trafficRoutingConfig — (map)

          The configuration that specifies how the deployment traffic is routed. Only deployments with a Lambda compute platform can specify this.

          • type — (String)

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

            Possible values include:
            • "TimeBasedCanary"
            • "TimeBasedLinear"
            • "AllAtOnce"
          • timeBasedCanary — (map)

            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 — (map)

            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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDeploymentGroup(params = {}, callback) ⇒ AWS.Request

Gets information about a deployment group.

Service Reference:

Examples:

Calling the getDeploymentGroup operation

var params = {
  applicationName: 'STRING_VALUE', /* required */
  deploymentGroupName: 'STRING_VALUE' /* required */
};
codedeploy.getDeploymentGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

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

    • deploymentGroupName — (String)

      The name of a deployment group for the specified application.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deploymentGroupInfo — (map)

        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 — (Array<map>)

          The Amazon EC2 tags on which to filter. The deployment group includes EC2 instances with any of the specified tags.

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

            Possible values include:
            • "KEY_ONLY"
            • "VALUE_ONLY"
            • "KEY_AND_VALUE"
        • onPremisesInstanceTagFilters — (Array<map>)

          The on-premises instance tags on which to filter. The deployment group includes on-premises instances with any of the specified tags.

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

            Possible values include:
            • "KEY_ONLY"
            • "VALUE_ONLY"
            • "KEY_AND_VALUE"
        • autoScalingGroups — (Array<map>)

          A list of associated Auto Scaling groups.

          • name — (String)

            The Auto Scaling group name.

          • hook — (String)

            An Auto Scaling lifecycle event hook name.

        • serviceRoleArn — (String)

          A service role ARN.

        • targetRevision — (map)

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

            Possible values include:
            • "S3"
            • "GitHub"
            • "String"
            • "AppSpecContent"
          • s3Location — (map)

            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.

              Possible values include:
              • "tar"
              • "tgz"
              • "zip"
              • "YAML"
              • "JSON"
            • 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 uses 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 is skipped.

          • gitHubLocation — (map)

            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 — (map)

            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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

          • appSpecContent — (map)

            The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

            • content — (String)

              The YAML-formatted or JSON-formatted revision string.

              For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

              For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

              For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

        • triggerConfigurations — (Array<map>)

          Information about triggers associated with 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 — (Array<String>)

            The event type or types for which notifications are triggered.

        • alarmConfiguration — (map)

          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 proceeds even if alarm status information can't be retrieved from Amazon CloudWatch.

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

          • alarms — (Array<map>)

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

            • 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 — (map)

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

          • enabled — (Boolean)

            Indicates whether a defined automatic rollback configuration is currently enabled.

          • events — (Array<String>)

            The event type or types that trigger a rollback.

        • deploymentStyle — (map)

          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.

            Possible values include:
            • "IN_PLACE"
            • "BLUE_GREEN"
          • deploymentOption — (String)

            Indicates whether to route deployment traffic behind a load balancer.

            Possible values include:
            • "WITH_TRAFFIC_CONTROL"
            • "WITHOUT_TRAFFIC_CONTROL"
        • blueGreenDeploymentConfiguration — (map)

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

          • terminateBlueInstancesOnDeploymentSuccess — (map)

            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.

              Possible values include:
              • "TERMINATE"
              • "KEEP_ALIVE"
            • terminationWaitTimeInMinutes — (Integer)

              The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).

          • deploymentReadyOption — (map)

            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 a load balancer unless traffic rerouting is started using ContinueDeployment. If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.

              Possible values include:
              • "CONTINUE_DEPLOYMENT"
              • "STOP_DEPLOYMENT"
            • waitTimeInMinutes — (Integer)

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

          • greenFleetProvisioningOption — (map)

            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.

              Possible values include:
              • "DISCOVER_EXISTING"
              • "COPY_AUTO_SCALING_GROUP"
        • loadBalancerInfo — (map)

          Information about the load balancer to use in a deployment.

          • elbInfoList — (Array<map>)

            An array that contains 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.

            Note: Adding more than one load balancer to the array is not supported.
            • name — (String)

              For blue/green deployments, the name of the load balancer that is 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 is complete.

          • targetGroupInfoList — (Array<map>)

            An array that contains 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.

            Note: Adding more than one target group to the array is not supported.
            • 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 are 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 is complete.

          • targetGroupPairInfoList — (Array<map>)

            The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.

            • targetGroups — (Array<map>)

              One pair of target groups. One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.

              • 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 are 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 is complete.

            • prodTrafficRoute — (map)

              The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.

              • listenerArns — (Array<String>)

                The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

            • testTrafficRoute — (map)

              An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can occur while test traffic is served during a deployment.

              • listenerArns — (Array<String>)

                The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

        • lastSuccessfulDeployment — (map)

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

          • deploymentId — (String)

            The unique ID of a deployment.

          • status — (String)

            The status of the most recent deployment.

            Possible values include:
            • "Created"
            • "Queued"
            • "InProgress"
            • "Succeeded"
            • "Failed"
            • "Stopped"
            • "Ready"
          • endTime — (Date)

            A timestamp that indicates when the most recent deployment to the deployment group was complete.

          • createTime — (Date)

            A timestamp that indicates when the most recent deployment to the deployment group started.

        • lastAttemptedDeployment — (map)

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

          • deploymentId — (String)

            The unique ID of a deployment.

          • status — (String)

            The status of the most recent deployment.

            Possible values include:
            • "Created"
            • "Queued"
            • "InProgress"
            • "Succeeded"
            • "Failed"
            • "Stopped"
            • "Ready"
          • endTime — (Date)

            A timestamp that indicates when the most recent deployment to the deployment group was complete.

          • createTime — (Date)

            A timestamp that indicates when the most recent deployment to the deployment group started.

        • ec2TagSet — (map)

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

          • ec2TagSetList — (Array<Array<map>>)

            A list that contains other lists of EC2 instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.

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

              Possible values include:
              • "KEY_ONLY"
              • "VALUE_ONLY"
              • "KEY_AND_VALUE"
        • onPremisesTagSet — (map)

          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 — (Array<Array<map>>)

            A list that contains other lists of on-premises instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.

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

              Possible values include:
              • "KEY_ONLY"
              • "VALUE_ONLY"
              • "KEY_AND_VALUE"
        • computePlatform — (String)

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

          Possible values include:
          • "Server"
          • "Lambda"
          • "ECS"
        • ecsServices — (Array<map>)

          The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format <clustername>:<servicename>.

          • serviceName — (String)

            The name of the target Amazon ECS service.

          • clusterName — (String)

            The name of the cluster that the Amazon ECS service is associated with.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDeploymentInstance(params = {}, callback) ⇒ AWS.Request

Gets information about an instance as part of a deployment.

Service Reference:

Examples:

Calling the getDeploymentInstance operation

var params = {
  deploymentId: 'STRING_VALUE', /* required */
  instanceId: 'STRING_VALUE' /* required */
};
codedeploy.getDeploymentInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentId — (String)

      The unique ID of a deployment.

    • instanceId — (String)

      The unique ID of an instance in the deployment group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • instanceSummary — (map)

        Information about the instance.

        • deploymentId — (String)

          The unique ID of a deployment.

        • instanceId — (String)

          The instance ID.

        • status — (String)

          The deployment status for this instance:

          • Pending: The deployment is pending for this instance.

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

          • Succeeded: The deployment has succeeded for this instance.

          • Failed: The deployment has failed for this instance.

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

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

          Possible values include:
          • "Pending"
          • "InProgress"
          • "Succeeded"
          • "Failed"
          • "Skipped"
          • "Unknown"
          • "Ready"
        • lastUpdatedAt — (Date)

          A timestamp that indicaties when the instance information was last updated.

        • lifecycleEvents — (Array<map>)

          A list of lifecycle events for this instance.

          • lifecycleEventName — (String)

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

          • diagnostics — (map)

            Diagnostic information about the deployment lifecycle event.

            • errorCode — (String)

              The associated error code:

              • Success: The specified script ran.

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

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

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

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

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

              Possible values include:
              • "Success"
              • "ScriptMissing"
              • "ScriptNotExecutable"
              • "ScriptTimedOut"
              • "ScriptFailed"
              • "UnknownError"
            • scriptName — (String)

              The name of the script.

            • message — (String)

              The message associated with the error.

            • logTail — (String)

              The last portion of the diagnostic log.

              If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.

          • startTime — (Date)

            A timestamp that indicates when the deployment lifecycle event started.

          • endTime — (Date)

            A timestamp that indicates when the deployment lifecycle event ended.

          • status — (String)

            The deployment lifecycle event status:

            • Pending: The deployment lifecycle event is pending.

            • InProgress: The deployment lifecycle event is in progress.

            • Succeeded: The deployment lifecycle event ran successfully.

            • Failed: The deployment lifecycle event has failed.

            • Skipped: The deployment lifecycle event has been skipped.

            • Unknown: The deployment lifecycle event is unknown.

            Possible values include:
            • "Pending"
            • "InProgress"
            • "Succeeded"
            • "Failed"
            • "Skipped"
            • "Unknown"
        • instanceType — (String)

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

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

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

          Possible values include:
          • "Blue"
          • "Green"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDeploymentTarget(params = {}, callback) ⇒ AWS.Request

Returns information about a deployment target.

Service Reference:

Examples:

Calling the getDeploymentTarget operation

var params = {
  deploymentId: 'STRING_VALUE',
  targetId: 'STRING_VALUE'
};
codedeploy.getDeploymentTarget(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentId — (String)

      The unique ID of a deployment.

    • targetId — (String)

      The unique ID of a deployment target.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deploymentTarget — (map)

        A deployment target that contains information about a deployment such as its status, lifecyle events, and when it was last updated. It also contains metadata about the deployment target. The deployment target metadata depends on the deployment target's type (instanceTarget, lambdaTarget, or ecsTarget).

        • deploymentTargetType — (String)

          The deployment type that is specific to the deployment's compute platform.

          Possible values include:
          • "InstanceTarget"
          • "LambdaTarget"
          • "ECSTarget"
        • instanceTarget — (map)

          Information about the target for a deployment that uses the EC2/On-premises compute platform.

          • deploymentId — (String)

            The unique ID of a deployment.

          • targetId — (String)

            The unique ID of a deployment target that has a type of instanceTarget.

          • targetArn — (String)

            The ARN of the target.

          • status — (String)

            The status an EC2/On-premises deployment's target instance.

            Possible values include:
            • "Pending"
            • "InProgress"
            • "Succeeded"
            • "Failed"
            • "Skipped"
            • "Unknown"
            • "Ready"
          • lastUpdatedAt — (Date)

            The date and time when the target instance was updated by a deployment.

          • lifecycleEvents — (Array<map>)

            The lifecycle events of the deployment to this target instance.

            • lifecycleEventName — (String)

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

            • diagnostics — (map)

              Diagnostic information about the deployment lifecycle event.

              • errorCode — (String)

                The associated error code:

                • Success: The specified script ran.

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

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

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

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

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

                Possible values include:
                • "Success"
                • "ScriptMissing"
                • "ScriptNotExecutable"
                • "ScriptTimedOut"
                • "ScriptFailed"
                • "UnknownError"
              • scriptName — (String)

                The name of the script.

              • message — (String)

                The message associated with the error.

              • logTail — (String)

                The last portion of the diagnostic log.

                If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.

            • startTime — (Date)

              A timestamp that indicates when the deployment lifecycle event started.

            • endTime — (Date)

              A timestamp that indicates when the deployment lifecycle event ended.

            • status — (String)

              The deployment lifecycle event status:

              • Pending: The deployment lifecycle event is pending.

              • InProgress: The deployment lifecycle event is in progress.

              • Succeeded: The deployment lifecycle event ran successfully.

              • Failed: The deployment lifecycle event has failed.

              • Skipped: The deployment lifecycle event has been skipped.

              • Unknown: The deployment lifecycle event is unknown.

              Possible values include:
              • "Pending"
              • "InProgress"
              • "Succeeded"
              • "Failed"
              • "Skipped"
              • "Unknown"
          • instanceLabel — (String)

            A label that identifies whether the instance is an original target (BLUE) or a replacement target (GREEN).

            Possible values include:
            • "Blue"
            • "Green"
        • lambdaTarget — (map)

          Information about the target for a deployment that uses the AWS Lambda compute platform.

          • deploymentId — (String)

            The unique ID of a deployment.

          • targetId — (String)

            The unique ID of a deployment target that has a type of lambdaTarget.

          • targetArn — (String)

            The ARN of the target.

          • status — (String)

            The status an AWS Lambda deployment's target Lambda function.

            Possible values include:
            • "Pending"
            • "InProgress"
            • "Succeeded"
            • "Failed"
            • "Skipped"
            • "Unknown"
            • "Ready"
          • lastUpdatedAt — (Date)

            The date and time when the target Lambda function was updated by a deployment.

          • lifecycleEvents — (Array<map>)

            The lifecycle events of the deployment to this target Lambda function.

            • lifecycleEventName — (String)

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

            • diagnostics — (map)

              Diagnostic information about the deployment lifecycle event.

              • errorCode — (String)

                The associated error code:

                • Success: The specified script ran.

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

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

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

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

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

                Possible values include:
                • "Success"
                • "ScriptMissing"
                • "ScriptNotExecutable"
                • "ScriptTimedOut"
                • "ScriptFailed"
                • "UnknownError"
              • scriptName — (String)

                The name of the script.

              • message — (String)

                The message associated with the error.

              • logTail — (String)

                The last portion of the diagnostic log.

                If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.

            • startTime — (Date)

              A timestamp that indicates when the deployment lifecycle event started.

            • endTime — (Date)

              A timestamp that indicates when the deployment lifecycle event ended.

            • status — (String)

              The deployment lifecycle event status:

              • Pending: The deployment lifecycle event is pending.

              • InProgress: The deployment lifecycle event is in progress.

              • Succeeded: The deployment lifecycle event ran successfully.

              • Failed: The deployment lifecycle event has failed.

              • Skipped: The deployment lifecycle event has been skipped.

              • Unknown: The deployment lifecycle event is unknown.

              Possible values include:
              • "Pending"
              • "InProgress"
              • "Succeeded"
              • "Failed"
              • "Skipped"
              • "Unknown"
        • ecsTarget — (map)

          Information about the target for a deployment that uses the Amazon ECS compute platform.

          • deploymentId — (String)

            The unique ID of a deployment.

          • targetId — (String)

            The unique ID of a deployment target that has a type of ecsTarget.

          • targetArn — (String)

            The ARN of the target.

          • lastUpdatedAt — (Date)

            The date and time when the target Amazon ECS application was updated by a deployment.

          • lifecycleEvents — (Array<map>)

            The lifecycle events of the deployment to this target Amazon ECS application.

            • lifecycleEventName — (String)

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

            • diagnostics — (map)

              Diagnostic information about the deployment lifecycle event.

              • errorCode — (String)

                The associated error code:

                • Success: The specified script ran.

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

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

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

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

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

                Possible values include:
                • "Success"
                • "ScriptMissing"
                • "ScriptNotExecutable"
                • "ScriptTimedOut"
                • "ScriptFailed"
                • "UnknownError"
              • scriptName — (String)

                The name of the script.

              • message — (String)

                The message associated with the error.

              • logTail — (String)

                The last portion of the diagnostic log.

                If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.

            • startTime — (Date)

              A timestamp that indicates when the deployment lifecycle event started.

            • endTime — (Date)

              A timestamp that indicates when the deployment lifecycle event ended.

            • status — (String)

              The deployment lifecycle event status:

              • Pending: The deployment lifecycle event is pending.

              • InProgress: The deployment lifecycle event is in progress.

              • Succeeded: The deployment lifecycle event ran successfully.

              • Failed: The deployment lifecycle event has failed.

              • Skipped: The deployment lifecycle event has been skipped.

              • Unknown: The deployment lifecycle event is unknown.

              Possible values include:
              • "Pending"
              • "InProgress"
              • "Succeeded"
              • "Failed"
              • "Skipped"
              • "Unknown"
          • status — (String)

            The status an Amazon ECS deployment's target ECS application.

            Possible values include:
            • "Pending"
            • "InProgress"
            • "Succeeded"
            • "Failed"
            • "Skipped"
            • "Unknown"
            • "Ready"
          • taskSetsInfo — (Array<map>)

            The ECSTaskSet objects associated with the ECS target.

            • identifer — (String)

              A unique ID of an ECSTaskSet.

            • desiredCount — (Integer)

              The number of tasks in a task set. During a deployment that uses the Amazon ECS compute type, CodeDeploy instructs Amazon ECS to create a new task set and uses this value to determine how many tasks to create. After the updated task set is created, CodeDeploy shifts traffic to the new task set.

            • pendingCount — (Integer)

              The number of tasks in the task set that are in the PENDING status during an Amazon ECS deployment. A task in the PENDING state is preparing to enter the RUNNING state. A task set enters the PENDING status when it launches for the first time, or when it is restarted after being in the STOPPED state.

            • runningCount — (Integer)

              The number of tasks in the task set that are in the RUNNING status during an Amazon ECS deployment. A task in the RUNNING state is running and ready for use.

            • status — (String)

              The status of the task set. There are three valid task set statuses:

              • PRIMARY: Indicates the task set is serving production traffic.

              • ACTIVE: Indicates the task set is not serving production traffic.

              • DRAINING: Indicates the tasks in the task set are being stopped and their corresponding targets are being deregistered from their target group.

            • trafficWeight — (Float)

              The percentage of traffic served by this task set.

            • targetGroup — (map)

              The target group associated with the task set. The target group is used by AWS CodeDeploy to manage traffic to a task set.

              • 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 are 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 is complete.

            • taskSetLabel — (String)

              A label that identifies whether the ECS task set is an original target (BLUE) or a replacement target (GREEN).

              Possible values include:
              • "Blue"
              • "Green"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getOnPremisesInstance(params = {}, callback) ⇒ AWS.Request

Gets information about an on-premises instance.

Service Reference:

Examples:

Calling the getOnPremisesInstance operation

var params = {
  instanceName: 'STRING_VALUE' /* required */
};
codedeploy.getOnPremisesInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • instanceName — (String)

      The name of the on-premises instance about which to get information.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • instanceInfo — (map)

        Information about the on-premises instance.

        • instanceName — (String)

          The name of the on-premises instance.

        • iamSessionArn — (String)

          The ARN of the IAM session associated with the on-premises instance.

        • iamUserArn — (String)

          The IAM user ARN associated with the on-premises instance.

        • instanceArn — (String)

          The ARN of the on-premises instance.

        • registerTime — (Date)

          The time at which the on-premises instance was registered.

        • deregisterTime — (Date)

          If the on-premises instance was deregistered, the time at which the on-premises instance was deregistered.

        • tags — (Array<map>)

          The tags currently associated with the on-premises instance.

          • Key — (String)

            The tag's key.

          • Value — (String)

            The tag's value.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listApplicationRevisions(params = {}, callback) ⇒ AWS.Request

Lists information about revisions for an application.

Service Reference:

Examples:

Calling the listApplicationRevisions operation

var params = {
  applicationName: 'STRING_VALUE', /* required */
  deployed: include | exclude | ignore,
  nextToken: 'STRING_VALUE',
  s3Bucket: 'STRING_VALUE',
  s3KeyPrefix: 'STRING_VALUE',
  sortBy: registerTime | firstUsedTime | lastUsedTime,
  sortOrder: ascending | descending
};
codedeploy.listApplicationRevisions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

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

    • sortBy — (String)

      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 are returned in an arbitrary order.

      Possible values include:
      • "registerTime"
      • "firstUsedTime"
      • "lastUsedTime"
    • sortOrder — (String)

      The order in which to sort the list results:

      • ascending: ascending order.

      • descending: descending order.

      If not specified, the results are sorted in ascending order.

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

      Possible values include:
      • "ascending"
      • "descending"
    • s3Bucket — (String)

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

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

    • s3KeyPrefix — (String)

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

    • deployed — (String)

      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.

      Possible values include:
      • "include"
      • "exclude"
      • "ignore"
    • nextToken — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • revisions — (Array<map>)

        A list of locations that contain the matching revisions.

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

          Possible values include:
          • "S3"
          • "GitHub"
          • "String"
          • "AppSpecContent"
        • s3Location — (map)

          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.

            Possible values include:
            • "tar"
            • "tgz"
            • "zip"
            • "YAML"
            • "JSON"
          • 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 uses 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 is skipped.

        • gitHubLocation — (map)

          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 — (map)

          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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

          • sha256 — (String)

            The SHA256 hash value of the revision content.

        • appSpecContent — (map)

          The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

          • content — (String)

            The YAML-formatted or JSON-formatted revision string.

            For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

            For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

            For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

          • sha256 — (String)

            The SHA256 hash value of the revision content.

      • nextToken — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listApplications(params = {}, callback) ⇒ AWS.Request

Lists the applications registered with the IAM user or AWS account.

Service Reference:

Examples:

Calling the listApplications operation

var params = {
  nextToken: 'STRING_VALUE'
};
codedeploy.listApplications(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • applications — (Array<String>)

        A list of application names.

      • nextToken — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDeploymentConfigs(params = {}, callback) ⇒ AWS.Request

Lists the deployment configurations with the IAM user or AWS account.

Service Reference:

Examples:

Calling the listDeploymentConfigs operation

var params = {
  nextToken: 'STRING_VALUE'
};
codedeploy.listDeploymentConfigs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      An identifier returned from the previous ListDeploymentConfigs call. It can be used to return the next set of deployment configurations in the list.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deploymentConfigsList — (Array<String>)

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

      • nextToken — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDeploymentGroups(params = {}, callback) ⇒ AWS.Request

Lists the deployment groups for an application registered with the IAM user or AWS account.

Service Reference:

Examples:

Calling the listDeploymentGroups operation

var params = {
  applicationName: 'STRING_VALUE', /* required */
  nextToken: 'STRING_VALUE'
};
codedeploy.listDeploymentGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

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

    • nextToken — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • applicationName — (String)

        The application name.

      • deploymentGroups — (Array<String>)

        A list of deployment group names.

      • nextToken — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDeploymentInstances(params = {}, callback) ⇒ AWS.Request

Note: 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 AWS Lambda.

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

Service Reference:

Examples:

Calling the listDeploymentInstances operation

var params = {
  deploymentId: 'STRING_VALUE', /* required */
  instanceStatusFilter: [
    Pending | InProgress | Succeeded | Failed | Skipped | Unknown | Ready,
    /* more items */
  ],
  instanceTypeFilter: [
    Blue | Green,
    /* more items */
  ],
  nextToken: 'STRING_VALUE'
};
codedeploy.listDeploymentInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentId — (String)

      The unique ID of a deployment.

    • nextToken — (String)

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

    • instanceStatusFilter — (Array<String>)

      A subset of instances to list by status:

      • Pending: Include those instances with pending deployments.

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

      • Succeeded: Include those instances with successful deployments.

      • Failed: Include those instances with failed deployments.

      • Skipped: Include those instances with skipped deployments.

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

    • instanceTypeFilter — (Array<String>)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • instancesList — (Array<String>)

        A list of instance IDs.

      • nextToken — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDeployments(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listDeployments operation

var params = {
  applicationName: 'STRING_VALUE',
  createTimeRange: {
    end: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
    start: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
  },
  deploymentGroupName: 'STRING_VALUE',
  includeOnlyStatuses: [
    Created | Queued | InProgress | Succeeded | Failed | Stopped | Ready,
    /* more items */
  ],
  nextToken: 'STRING_VALUE'
};
codedeploy.listDeployments(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

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

    • deploymentGroupName — (String)

      The name of a deployment group for the specified application.

    • includeOnlyStatuses — (Array<String>)

      A subset of deployments to list by status:

      • Created: Include created deployments in the resulting list.

      • Queued: Include queued deployments in the resulting list.

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

      • Succeeded: Include successful deployments in the resulting list.

      • Failed: Include failed deployments in the resulting list.

      • Stopped: Include stopped deployments in the resulting list.

    • createTimeRange — (map)

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

      • start — (Date)

        The start time of the time range.

        Note: Specify null to leave the start time open-ended.
      • end — (Date)

        The end time of the time range.

        Note: Specify null to leave the end time open-ended.
    • nextToken — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deployments — (Array<String>)

        A list of deployment IDs.

      • nextToken — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDeploymentTargets(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listDeploymentTargets operation

var params = {
  deploymentId: 'STRING_VALUE',
  nextToken: 'STRING_VALUE',
  targetFilters: {
    '<TargetFilterName>': [
      'STRING_VALUE',
      /* more items */
    ],
    /* '<TargetFilterName>': ... */
  }
};
codedeploy.listDeploymentTargets(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentId — (String)

      The unique ID of a deployment.

    • nextToken — (String)

      A token identifier returned from the previous ListDeploymentTargets call. It can be used to return the next set of deployment targets in the list.

    • targetFilters — (map<Array<String>>)

      A key used to filter the returned targets.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • targetIds — (Array<String>)

        The unique IDs of deployment targets.

      • nextToken — (String)

        If a large amount of information is returned, a token identifier is also returned. It can be used in a subsequent ListDeploymentTargets call to return the next set of deployment targets in the list.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listGitHubAccountTokenNames(params = {}, callback) ⇒ AWS.Request

Lists the names of stored connections to GitHub accounts.

Service Reference:

Examples:

Calling the listGitHubAccountTokenNames operation

var params = {
  nextToken: 'STRING_VALUE'
};
codedeploy.listGitHubAccountTokenNames(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      An identifier returned from the previous ListGitHubAccountTokenNames call. It can be used to return the next set of names in the list.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • tokenNameList — (Array<String>)

        A list of names of connections to GitHub accounts.

      • nextToken — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listOnPremisesInstances(params = {}, callback) ⇒ AWS.Request

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

Unless otherwise specified, both registered and deregistered on-premises instance names are listed. To list only registered or deregistered on-premises instance names, use the registration status parameter.

Service Reference:

Examples:

Calling the listOnPremisesInstances operation

var params = {
  nextToken: 'STRING_VALUE',
  registrationStatus: Registered | Deregistered,
  tagFilters: [
    {
      Key: 'STRING_VALUE',
      Type: KEY_ONLY | VALUE_ONLY | KEY_AND_VALUE,
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
codedeploy.listOnPremisesInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registrationStatus — (String)

      The registration status of the on-premises instances:

      • Deregistered: Include deregistered on-premises instances in the resulting list.

      • Registered: Include registered on-premises instances in the resulting list.

      Possible values include:
      • "Registered"
      • "Deregistered"
    • tagFilters — (Array<map>)

      The on-premises instance tags that are used to restrict the on-premises instance names returned.

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

        Possible values include:
        • "KEY_ONLY"
        • "VALUE_ONLY"
        • "KEY_AND_VALUE"
    • nextToken — (String)

      An identifier returned from the previous list on-premises instances call. It can be used to return the next set of on-premises instances in the list.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • instanceNames — (Array<String>)

        The list of matching on-premises instance names.

      • nextToken — (String)

        If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list on-premises instances call to return the next set of on-premises instances in the list.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putLifecycleEventHookExecutionStatus(params = {}, callback) ⇒ AWS.Request

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

Examples:

Calling the putLifecycleEventHookExecutionStatus operation

var params = {
  deploymentId: 'STRING_VALUE',
  lifecycleEventHookExecutionId: 'STRING_VALUE',
  status: Pending | InProgress | Succeeded | Failed | Skipped | Unknown
};
codedeploy.putLifecycleEventHookExecutionStatus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentId — (String)

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

    • lifecycleEventHookExecutionId — (String)

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

    • status — (String)

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

      Possible values include:
      • "Pending"
      • "InProgress"
      • "Succeeded"
      • "Failed"
      • "Skipped"
      • "Unknown"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • lifecycleEventHookExecutionId — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerApplicationRevision(params = {}, callback) ⇒ AWS.Request

Registers with AWS CodeDeploy a revision for the specified application.

Service Reference:

Examples:

Calling the registerApplicationRevision operation

var params = {
  applicationName: 'STRING_VALUE', /* required */
  revision: { /* required */
    appSpecContent: {
      content: 'STRING_VALUE',
      sha256: 'STRING_VALUE'
    },
    gitHubLocation: {
      commitId: 'STRING_VALUE',
      repository: 'STRING_VALUE'
    },
    revisionType: S3 | GitHub | String | AppSpecContent,
    s3Location: {
      bucket: 'STRING_VALUE',
      bundleType: tar | tgz | zip | YAML | JSON,
      eTag: 'STRING_VALUE',
      key: 'STRING_VALUE',
      version: 'STRING_VALUE'
    },
    string: {
      content: 'STRING_VALUE',
      sha256: 'STRING_VALUE'
    }
  },
  description: 'STRING_VALUE'
};
codedeploy.registerApplicationRevision(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

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

    • description — (String)

      A comment about the revision.

    • revision — (map)

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

        Possible values include:
        • "S3"
        • "GitHub"
        • "String"
        • "AppSpecContent"
      • s3Location — (map)

        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.

          Possible values include:
          • "tar"
          • "tgz"
          • "zip"
          • "YAML"
          • "JSON"
        • 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 uses 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 is skipped.

      • gitHubLocation — (map)

        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 — (map)

        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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

        • sha256 — (String)

          The SHA256 hash value of the revision content.

      • appSpecContent — (map)

        The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

        • content — (String)

          The YAML-formatted or JSON-formatted revision string.

          For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

          For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

          For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

        • sha256 — (String)

          The SHA256 hash value of the revision content.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerOnPremisesInstance(params = {}, callback) ⇒ AWS.Request

Registers an on-premises instance.

Note: Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the request. You cannot use both.

Service Reference:

Examples:

Calling the registerOnPremisesInstance operation

var params = {
  instanceName: 'STRING_VALUE', /* required */
  iamSessionArn: 'STRING_VALUE',
  iamUserArn: 'STRING_VALUE'
};
codedeploy.registerOnPremisesInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • instanceName — (String)

      The name of the on-premises instance to register.

    • iamSessionArn — (String)

      The ARN of the IAM session to associate with the on-premises instance.

    • iamUserArn — (String)

      The ARN of the IAM user to associate with the on-premises instance.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

removeTagsFromOnPremisesInstances(params = {}, callback) ⇒ AWS.Request

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

Examples:

Calling the removeTagsFromOnPremisesInstances operation

var params = {
  instanceNames: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  tags: [ /* required */
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
codedeploy.removeTagsFromOnPremisesInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • tags — (Array<map>)

      The tag key-value pairs to remove from the on-premises instances.

      • Key — (String)

        The tag's key.

      • Value — (String)

        The tag's value.

    • instanceNames — (Array<String>)

      The names of the on-premises instances from which to remove tags.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

skipWaitTimeForInstanceTermination(params = {}, callback) ⇒ AWS.Request

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

Examples:

Calling the skipWaitTimeForInstanceTermination operation

var params = {
  deploymentId: 'STRING_VALUE'
};
codedeploy.skipWaitTimeForInstanceTermination(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentId — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

stopDeployment(params = {}, callback) ⇒ AWS.Request

Attempts to stop an ongoing deployment.

Service Reference:

Examples:

Calling the stopDeployment operation

var params = {
  deploymentId: 'STRING_VALUE', /* required */
  autoRollbackEnabled: true || false
};
codedeploy.stopDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • deploymentId — (String)

      The unique ID of a deployment.

    • autoRollbackEnabled — (Boolean)

      Indicates, when a deployment is stopped, whether instances that have been updated should be rolled back to the previous version of the application revision.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The status of the stop deployment operation:

        • Pending: The stop operation is pending.

        • Succeeded: The stop operation was successful.

        Possible values include:
        • "Pending"
        • "Succeeded"
      • statusMessage — (String)

        An accompanying status message.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateApplication(params = {}, callback) ⇒ AWS.Request

Changes the name of an application.

Service Reference:

Examples:

Calling the updateApplication operation

var params = {
  applicationName: 'STRING_VALUE',
  newApplicationName: 'STRING_VALUE'
};
codedeploy.updateApplication(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

      The current name of the application you want to change.

    • newApplicationName — (String)

      The new name to give the application.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDeploymentGroup(params = {}, callback) ⇒ AWS.Request

Changes information about a deployment group.

Service Reference:

Examples:

Calling the updateDeploymentGroup operation

var params = {
  applicationName: 'STRING_VALUE', /* required */
  currentDeploymentGroupName: 'STRING_VALUE', /* required */
  alarmConfiguration: {
    alarms: [
      {
        name: 'STRING_VALUE'
      },
      /* more items */
    ],
    enabled: true || false,
    ignorePollAlarmFailure: true || false
  },
  autoRollbackConfiguration: {
    enabled: true || false,
    events: [
      DEPLOYMENT_FAILURE | DEPLOYMENT_STOP_ON_ALARM | DEPLOYMENT_STOP_ON_REQUEST,
      /* more items */
    ]
  },
  autoScalingGroups: [
    'STRING_VALUE',
    /* more items */
  ],
  blueGreenDeploymentConfiguration: {
    deploymentReadyOption: {
      actionOnTimeout: CONTINUE_DEPLOYMENT | STOP_DEPLOYMENT,
      waitTimeInMinutes: 'NUMBER_VALUE'
    },
    greenFleetProvisioningOption: {
      action: DISCOVER_EXISTING | COPY_AUTO_SCALING_GROUP
    },
    terminateBlueInstancesOnDeploymentSuccess: {
      action: TERMINATE | KEEP_ALIVE,
      terminationWaitTimeInMinutes: 'NUMBER_VALUE'
    }
  },
  deploymentConfigName: 'STRING_VALUE',
  deploymentStyle: {
    deploymentOption: WITH_TRAFFIC_CONTROL | WITHOUT_TRAFFIC_CONTROL,
    deploymentType: IN_PLACE | BLUE_GREEN
  },
  ec2TagFilters: [
    {
      Key: 'STRING_VALUE',
      Type: KEY_ONLY | VALUE_ONLY | KEY_AND_VALUE,
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  ec2TagSet: {
    ec2TagSetList: [
      [
        {
          Key: 'STRING_VALUE',
          Type: KEY_ONLY | VALUE_ONLY | KEY_AND_VALUE,
          Value: 'STRING_VALUE'
        },
        /* more items */
      ],
      /* more items */
    ]
  },
  ecsServices: [
    {
      clusterName: 'STRING_VALUE',
      serviceName: 'STRING_VALUE'
    },
    /* more items */
  ],
  loadBalancerInfo: {
    elbInfoList: [
      {
        name: 'STRING_VALUE'
      },
      /* more items */
    ],
    targetGroupInfoList: [
      {
        name: 'STRING_VALUE'
      },
      /* more items */
    ],
    targetGroupPairInfoList: [
      {
        prodTrafficRoute: {
          listenerArns: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        targetGroups: [
          {
            name: 'STRING_VALUE'
          },
          /* more items */
        ],
        testTrafficRoute: {
          listenerArns: [
            'STRING_VALUE',
            /* more items */
          ]
        }
      },
      /* more items */
    ]
  },
  newDeploymentGroupName: 'STRING_VALUE',
  onPremisesInstanceTagFilters: [
    {
      Key: 'STRING_VALUE',
      Type: KEY_ONLY | VALUE_ONLY | KEY_AND_VALUE,
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  onPremisesTagSet: {
    onPremisesTagSetList: [
      [
        {
          Key: 'STRING_VALUE',
          Type: KEY_ONLY | VALUE_ONLY | KEY_AND_VALUE,
          Value: 'STRING_VALUE'
        },
        /* more items */
      ],
      /* more items */
    ]
  },
  serviceRoleArn: 'STRING_VALUE',
  triggerConfigurations: [
    {
      triggerEvents: [
        DeploymentStart | DeploymentSuccess | DeploymentFailure | DeploymentStop | DeploymentRollback | DeploymentReady | InstanceStart | InstanceSuccess | InstanceFailure | InstanceReady,
        /* more items */
      ],
      triggerName: 'STRING_VALUE',
      triggerTargetArn: 'STRING_VALUE'
    },
    /* more items */
  ]
};
codedeploy.updateDeploymentGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • applicationName — (String)

      The application name that corresponds to the deployment group to update.

    • currentDeploymentGroupName — (String)

      The current name of the deployment group.

    • newDeploymentGroupName — (String)

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

    • deploymentConfigName — (String)

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

    • ec2TagFilters — (Array<map>)

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

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

        Possible values include:
        • "KEY_ONLY"
        • "VALUE_ONLY"
        • "KEY_AND_VALUE"
    • onPremisesInstanceTagFilters — (Array<map>)

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

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

        Possible values include:
        • "KEY_ONLY"
        • "VALUE_ONLY"
        • "KEY_AND_VALUE"
    • autoScalingGroups — (Array<String>)

      The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them. To keep the Auto Scaling groups, enter their names. To remove Auto Scaling groups, do not enter any Auto Scaling group names.

    • serviceRoleArn — (String)

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

    • triggerConfigurations — (Array<map>)

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

      • 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 — (Array<String>)

        The event type or types for which notifications are triggered.

    • alarmConfiguration — (map)

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

      • enabled — (Boolean)

        Indicates whether the alarm configuration is enabled.

      • ignorePollAlarmFailure — (Boolean)

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

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

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

      • alarms — (Array<map>)

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

        • 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 — (map)

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

      • enabled — (Boolean)

        Indicates whether a defined automatic rollback configuration is currently enabled.

      • events — (Array<String>)

        The event type or types that trigger a rollback.

    • deploymentStyle — (map)

      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.

        Possible values include:
        • "IN_PLACE"
        • "BLUE_GREEN"
      • deploymentOption — (String)

        Indicates whether to route deployment traffic behind a load balancer.

        Possible values include:
        • "WITH_TRAFFIC_CONTROL"
        • "WITHOUT_TRAFFIC_CONTROL"
    • blueGreenDeploymentConfiguration — (map)

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

      • terminateBlueInstancesOnDeploymentSuccess — (map)

        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.

          Possible values include:
          • "TERMINATE"
          • "KEEP_ALIVE"
        • terminationWaitTimeInMinutes — (Integer)

          The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).

      • deploymentReadyOption — (map)

        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 a load balancer unless traffic rerouting is started using ContinueDeployment. If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.

          Possible values include:
          • "CONTINUE_DEPLOYMENT"
          • "STOP_DEPLOYMENT"
        • waitTimeInMinutes — (Integer)

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

      • greenFleetProvisioningOption — (map)

        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.

          Possible values include:
          • "DISCOVER_EXISTING"
          • "COPY_AUTO_SCALING_GROUP"
    • loadBalancerInfo — (map)

      Information about the load balancer used in a deployment.

      • elbInfoList — (Array<map>)

        An array that contains 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.

        Note: Adding more than one load balancer to the array is not supported.
        • name — (String)

          For blue/green deployments, the name of the load balancer that is 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 is complete.

      • targetGroupInfoList — (Array<map>)

        An array that contains 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.

        Note: Adding more than one target group to the array is not supported.
        • 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 are 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 is complete.

      • targetGroupPairInfoList — (Array<map>)

        The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.

        • targetGroups — (Array<map>)

          One pair of target groups. One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.

          • 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 are 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 is complete.

        • prodTrafficRoute — (map)

          The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.

          • listenerArns — (Array<String>)

            The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

        • testTrafficRoute — (map)

          An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can occur while test traffic is served during a deployment.

          • listenerArns — (Array<String>)

            The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

    • ec2TagSet — (map)

      Information about groups of tags applied to on-premises instances. The deployment group includes only EC2 instances identified by all the tag groups.

      • ec2TagSetList — (Array<Array<map>>)

        A list that contains other lists of EC2 instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.

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

          Possible values include:
          • "KEY_ONLY"
          • "VALUE_ONLY"
          • "KEY_AND_VALUE"
    • ecsServices — (Array<map>)

      The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format <clustername>:<servicename>.

      • serviceName — (String)

        The name of the target Amazon ECS service.

      • clusterName — (String)

        The name of the cluster that the Amazon ECS service is associated with.

    • onPremisesTagSet — (map)

      Information about an on-premises instance tag set. The deployment group includes only on-premises instances identified by all the tag groups.

      • onPremisesTagSetList — (Array<Array<map>>)

        A list that contains other lists of on-premises instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.

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

          Possible values include:
          • "KEY_ONLY"
          • "VALUE_ONLY"
          • "KEY_AND_VALUE"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • hooksNotCleanedUp — (Array<map>)

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

        • name — (String)

          The Auto Scaling group name.

        • hook — (String)

          An Auto Scaling lifecycle event hook name.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

waitFor(state, params = {}, callback) ⇒ AWS.Request

Waits for a given CodeDeploy resource. The final callback or 'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.

Examples:

Waiting for the deploymentSuccessful state

var params = {
  deploymentId: 'STRING_VALUE' /* required */
};
codedeploy.waitFor('deploymentSuccessful', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • state (String)

    the resource state to wait for. Available states for this service are listed in "Waiter Resource States" below.

  • params (map) (defaults to: {})

    a list of parameters for the given state. See each waiter resource state for required parameters.

Callback (callback):

  • function(err, data) { ... }

    Callback containing error and data information. See the respective resource state for the expected error or data information.

    If the waiter times out its requests, it will return a ResourceNotReady error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

Waiter Resource Details

codedeploy.waitFor('deploymentSuccessful', params = {}, [callback]) ⇒ AWS.Request

Waits for the deploymentSuccessful state by periodically calling the underlying CodeDeploy.getDeployment() operation every 15 seconds (at most 120 times).

Examples:

Waiting for the deploymentSuccessful state

var params = {
  deploymentId: 'STRING_VALUE' /* required */
};
codedeploy.waitFor('deploymentSuccessful', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • deploymentId — (String)

      The unique ID of a deployment associated with the IAM user or AWS account.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deploymentInfo — (map)

        Information about the deployment.

        • applicationName — (String)

          The application name.

        • deploymentGroupName — (String)

          The deployment group name.

        • deploymentConfigName — (String)

          The deployment configuration name.

        • deploymentId — (String)

          The unique ID of a deployment.

        • previousRevision — (map)

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

            Possible values include:
            • "S3"
            • "GitHub"
            • "String"
            • "AppSpecContent"
          • s3Location — (map)

            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.

              Possible values include:
              • "tar"
              • "tgz"
              • "zip"
              • "YAML"
              • "JSON"
            • 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 uses 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 is skipped.

          • gitHubLocation — (map)

            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 — (map)

            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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

          • appSpecContent — (map)

            The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

            • content — (String)

              The YAML-formatted or JSON-formatted revision string.

              For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

              For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

              For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

        • revision — (map)

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

            Possible values include:
            • "S3"
            • "GitHub"
            • "String"
            • "AppSpecContent"
          • s3Location — (map)

            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.

              Possible values include:
              • "tar"
              • "tgz"
              • "zip"
              • "YAML"
              • "JSON"
            • 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 uses 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 is skipped.

          • gitHubLocation — (map)

            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 — (map)

            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 which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

          • appSpecContent — (map)

            The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

            • content — (String)

              The YAML-formatted or JSON-formatted revision string.

              For an AWS Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

              For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.

              For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.

            • sha256 — (String)

              The SHA256 hash value of the revision content.

        • status — (String)

          The current state of the deployment as a whole.

          Possible values include:
          • "Created"
          • "Queued"
          • "InProgress"
          • "Succeeded"
          • "Failed"
          • "Stopped"
          • "Ready"
        • errorInformation — (map)

          Information about any error associated with this deployment.

          • code — (String)

            For more information, see Error Codes for AWS CodeDeploy in the AWS CodeDeploy User Guide.

            The error code:

            • APPLICATION_MISSING: The application was missing. This error code is most likely 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 is most likely 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 Amazon EC2.

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

            • OVER_MAX_INSTANCES: The maximum number of instances 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 is most likely raised if the revision is deleted after the deployment is created, but before it is started.

            Possible values include:
            • "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"
            • "AUTOSCALING_VALIDATION_ERROR"
            • "INVALID_ECS_SERVICE"
            • "ECS_UPDATE_ERROR"
            • "INVALID_REVISION"
          • message — (String)

            An accompanying error message.

        • createTime — (Date)

          A timestamp that indicates when the deployment was created.

        • startTime — (Date)

          A timestamp that indicates when the deployment was deployed to the deployment group.

          In some cases, the reported value of the start time might be later than the complete time. This is due to differences in the clock settings of backend servers that participate in the deployment process.

        • completeTime — (Date)

          A timestamp that indicates when the deployment was complete.

        • deploymentOverview — (map)

          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: Amazon EC2 Auto Scaling created the deployment.

          • codeDeployRollback: A rollback process created the deployment.

          Possible values include:
          • "user"
          • "autoscaling"
          • "codeDeployRollback"
        • ignoreApplicationStopFailures — (Boolean)

          If true, then if an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if ApplicationStop fails, the deployment continues with DownloadBundle. If BeforeBlockTraffic fails, the deployment continues with BlockTraffic. If AfterBlockTraffic fails, the deployment continues with ApplicationStop.

          If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.

          During a deployment, the AWS CodeDeploy agent runs the scripts specified for ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.

          If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use ignoreApplicationStopFailures to specify that the ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic failures should be ignored.

        • autoRollbackConfiguration — (map)

          Information about the automatic rollback configuration associated with the deployment.

          • enabled — (Boolean)

            Indicates whether a defined automatic rollback configuration is currently enabled.

          • events — (Array<String>)

            The event type or types that trigger a rollback.

        • updateOutdatedInstancesOnly — (Boolean)

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

        • rollbackInfo — (map)

          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 that describes the status of a deployment rollback (for example, whether the deployment can't be rolled back, is in progress, failed, or succeeded).

        • deploymentStyle — (map)

          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.

            Possible values include:
            • "IN_PLACE"
            • "BLUE_GREEN"
          • deploymentOption — (String)

            Indicates whether to route deployment traffic behind a load balancer.

            Possible values include:
            • "WITH_TRAFFIC_CONTROL"
            • "WITHOUT_TRAFFIC_CONTROL"
        • targetInstances — (map)

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

          • tagFilters — (Array<map>)

            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.

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

              Possible values include:
              • "KEY_ONLY"
              • "VALUE_ONLY"
              • "KEY_AND_VALUE"
          • autoScalingGroups — (Array<String>)

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

          • ec2TagSet — (map)

            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 — (Array<Array<map>>)

              A list that contains other lists of EC2 instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.

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

                Possible values include:
                • "KEY_ONLY"
                • "VALUE_ONLY"
                • "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 — (map)

          Information about blue/green deployment options for this deployment.

          • terminateBlueInstancesOnDeploymentSuccess — (map)

            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.

              Possible values include:
              • "TERMINATE"
              • "KEEP_ALIVE"
            • terminationWaitTimeInMinutes — (Integer)

              The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).

          • deploymentReadyOption — (map)

            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 a load balancer unless traffic rerouting is started using ContinueDeployment. If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.

              Possible values include:
              • "CONTINUE_DEPLOYMENT"
              • "STOP_DEPLOYMENT"
            • waitTimeInMinutes — (Integer)

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

          • greenFleetProvisioningOption — (map)

            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.

              Possible values include:
              • "DISCOVER_EXISTING"
              • "COPY_AUTO_SCALING_GROUP"
        • loadBalancerInfo — (map)

          Information about the load balancer used in the deployment.

          • elbInfoList — (Array<map>)

            An array that contains 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.

            Note: Adding more than one load balancer to the array is not supported.
            • name — (String)

              For blue/green deployments, the name of the load balancer that is 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 is complete.

          • targetGroupInfoList — (Array<map>)

            An array that contains 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.

            Note: Adding more than one target group to the array is not supported.
            • 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 are 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 is complete.

          • targetGroupPairInfoList — (Array<map>)

            The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.

            • targetGroups — (Array<map>)

              One pair of target groups. One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.

              • 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 are 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 is complete.

            • prodTrafficRoute — (map)

              The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.

              • listenerArns — (Array<String>)

                The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

            • testTrafficRoute — (map)

              An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can occur while test traffic is served during a deployment.

              • listenerArns — (Array<String>)

                The ARN of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.

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

          Possible values include:
          • "DISALLOW"
          • "OVERWRITE"
          • "RETAIN"
        • deploymentStatusMessages — (Array<String>)

          Messages that contain information about the status of a deployment.

        • computePlatform — (String)

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

          Possible values include:
          • "Server"
          • "Lambda"
          • "ECS"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also: