SDK for PHP 3.x

Client: Aws\CodeDeploy\CodeDeployClient
Service ID: codedeploy
Version: 2014-10-06

This page describes the parameters and results for the operations of the AWS CodeDeploy (2014-10-06), and shows how to use the Aws\CodeDeploy\CodeDeployClient object to call the described operations. This documentation is specific to the 2014-10-06 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

AddTagsToOnPremisesInstances ( array $params = [] )
Adds tags to on-premises instances.
BatchGetApplicationRevisions ( array $params = [] )
Gets information about one or more application revisions.
BatchGetApplications ( array $params = [] )
Gets information about one or more applications.
BatchGetDeploymentGroups ( array $params = [] )
Gets information about one or more deployment groups.
BatchGetDeploymentInstances ( array $params = [] )
This method works, but is deprecated.
BatchGetDeploymentTargets ( array $params = [] )
Returns an array of one or more targets associated with a deployment.
BatchGetDeployments ( array $params = [] )
Gets information about one or more deployments.
BatchGetOnPremisesInstances ( array $params = [] )
Gets information about one or more on-premises instances.
ContinueDeployment ( array $params = [] )
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.
CreateApplication ( array $params = [] )
Creates an application.
CreateDeployment ( array $params = [] )
Deploys an application revision through the specified deployment group.
CreateDeploymentConfig ( array $params = [] )
Creates a deployment configuration.
CreateDeploymentGroup ( array $params = [] )
Creates a deployment group to which application revisions are deployed.
DeleteApplication ( array $params = [] )
Deletes an application.
DeleteDeploymentConfig ( array $params = [] )
Deletes a deployment configuration.
DeleteDeploymentGroup ( array $params = [] )
Deletes a deployment group.
DeleteGitHubAccountToken ( array $params = [] )
Deletes a GitHub account connection.
DeleteResourcesByExternalId ( array $params = [] )
Deletes resources linked to an external ID.
DeregisterOnPremisesInstance ( array $params = [] )
Deregisters an on-premises instance.
GetApplication ( array $params = [] )
Gets information about an application.
GetApplicationRevision ( array $params = [] )
Gets information about an application revision.
GetDeployment ( array $params = [] )
Gets information about a deployment.
GetDeploymentConfig ( array $params = [] )
Gets information about a deployment configuration.
GetDeploymentGroup ( array $params = [] )
Gets information about a deployment group.
GetDeploymentInstance ( array $params = [] )
Gets information about an instance as part of a deployment.
GetDeploymentTarget ( array $params = [] )
Returns information about a deployment target.
GetOnPremisesInstance ( array $params = [] )
Gets information about an on-premises instance.
ListApplicationRevisions ( array $params = [] )
Lists information about revisions for an application.
ListApplications ( array $params = [] )
Lists the applications registered with the user or Amazon Web Services account.
ListDeploymentConfigs ( array $params = [] )
Lists the deployment configurations with the user or Amazon Web Services account.
ListDeploymentGroups ( array $params = [] )
Lists the deployment groups for an application registered with the Amazon Web Services user or Amazon Web Services account.
ListDeploymentInstances ( array $params = [] )
The newer BatchGetDeploymentTargets should be used instead because it works with all compute types.
ListDeploymentTargets ( array $params = [] )
Returns an array of target IDs that are associated a deployment.
ListDeployments ( array $params = [] )
Lists the deployments in a deployment group for an application registered with the user or Amazon Web Services account.
ListGitHubAccountTokenNames ( array $params = [] )
Lists the names of stored connections to GitHub accounts.
ListOnPremisesInstances ( array $params = [] )
Gets a list of names for one or more on-premises instances.
ListTagsForResource ( array $params = [] )
Returns a list of tags for the resource identified by a specified Amazon Resource Name (ARN).
PutLifecycleEventHookExecutionStatus ( array $params = [] )
Sets the result of a Lambda validation function.
RegisterApplicationRevision ( array $params = [] )
Registers with CodeDeploy a revision for the specified application.
RegisterOnPremisesInstance ( array $params = [] )
Registers an on-premises instance.
RemoveTagsFromOnPremisesInstances ( array $params = [] )
Removes one or more tags from one or more on-premises instances.
SkipWaitTimeForInstanceTermination ( array $params = [] )
In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is complete.
StopDeployment ( array $params = [] )
Attempts to stop an ongoing deployment.
TagResource ( array $params = [] )
Associates the list of tags in the input Tags parameter with the resource identified by the ResourceArn input parameter.
UntagResource ( array $params = [] )
Disassociates a resource from a list of tags.
UpdateApplication ( array $params = [] )
Changes the name of an application.
UpdateDeploymentGroup ( array $params = [] )
Changes information about a deployment group.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListApplicationRevisions
ListApplications
ListDeploymentConfigs
ListDeploymentGroups
ListDeploymentInstances
ListDeployments

Waiters

Waiters allow you to poll a resource until it enters into a desired state. A waiter has a name used to describe what it does, and is associated with an API operation. When creating a waiter, you can provide the API operation parameters associated with the corresponding operation. Waiters can be accessed using the getWaiter($waiterName, $operationParameters) method of a client object. This client supports the following waiters:

Waiter name API Operation Delay Max Attempts
DeploymentSuccessful GetDeployment 15 120

Operations

AddTagsToOnPremisesInstances

$result = $client->addTagsToOnPremisesInstances([/* ... */]);
$promise = $client->addTagsToOnPremisesInstancesAsync([/* ... */]);

Adds tags to on-premises instances.

Parameter Syntax

$result = $client->addTagsToOnPremisesInstances([
    'instanceNames' => ['<string>', ...], // REQUIRED
    'tags' => [ // REQUIRED
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
instanceNames
Required: Yes
Type: Array of strings

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

tags
Required: Yes
Type: Array of Tag structures

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.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InstanceNameRequiredException:

An on-premises instance name was not specified.

InvalidInstanceNameException:

The on-premises instance name was specified in an invalid format.

TagRequiredException:

A tag was not specified.

InvalidTagException:

The tag was specified in an invalid format.

TagLimitExceededException:

The maximum allowed number of tags was exceeded.

InstanceLimitExceededException:

The maximum number of allowed on-premises instances in a single call was exceeded.

InstanceNotRegisteredException:

The specified on-premises instance is not registered.

BatchGetApplicationRevisions

$result = $client->batchGetApplicationRevisions([/* ... */]);
$promise = $client->batchGetApplicationRevisionsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->batchGetApplicationRevisions([
    'applicationName' => '<string>', // REQUIRED
    'revisions' => [ // REQUIRED
        [
            'appSpecContent' => [
                'content' => '<string>',
                'sha256' => '<string>',
            ],
            'gitHubLocation' => [
                'commitId' => '<string>',
                'repository' => '<string>',
            ],
            'revisionType' => 'S3|GitHub|String|AppSpecContent',
            's3Location' => [
                'bucket' => '<string>',
                'bundleType' => 'tar|tgz|zip|YAML|JSON',
                'eTag' => '<string>',
                'key' => '<string>',
                'version' => '<string>',
            ],
            'string' => [
                'content' => '<string>',
                'sha256' => '<string>',
            ],
        ],
        // ...
    ],
]);

Parameter Details

Members
applicationName
Required: Yes
Type: string

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

revisions
Required: Yes
Type: Array of RevisionLocation structures

An array of RevisionLocation objects that specify information to get about the application revisions, including type and location. The maximum number of RevisionLocation objects you can specify is 25.

Result Syntax

[
    'applicationName' => '<string>',
    'errorMessage' => '<string>',
    'revisions' => [
        [
            'genericRevisionInfo' => [
                'deploymentGroups' => ['<string>', ...],
                'description' => '<string>',
                'firstUsedTime' => <DateTime>,
                'lastUsedTime' => <DateTime>,
                'registerTime' => <DateTime>,
            ],
            'revisionLocation' => [
                'appSpecContent' => [
                    'content' => '<string>',
                    'sha256' => '<string>',
                ],
                'gitHubLocation' => [
                    'commitId' => '<string>',
                    'repository' => '<string>',
                ],
                'revisionType' => 'S3|GitHub|String|AppSpecContent',
                's3Location' => [
                    'bucket' => '<string>',
                    'bundleType' => 'tar|tgz|zip|YAML|JSON',
                    'eTag' => '<string>',
                    'key' => '<string>',
                    'version' => '<string>',
                ],
                'string' => [
                    'content' => '<string>',
                    'sha256' => '<string>',
                ],
            ],
        ],
        // ...
    ],
]

Result Details

Members
applicationName
Type: string

The name of the application that corresponds to the revisions.

errorMessage
Type: string

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

revisions
Type: Array of RevisionInfo structures

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

Errors

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

RevisionRequiredException:

The revision ID was not specified.

InvalidRevisionException:

The revision was specified in an invalid format.

BatchLimitExceededException:

The maximum number of names or IDs allowed for this request (100) was exceeded.

BatchGetApplications

$result = $client->batchGetApplications([/* ... */]);
$promise = $client->batchGetApplicationsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->batchGetApplications([
    'applicationNames' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
applicationNames
Required: Yes
Type: Array of strings

A list of application names separated by spaces. The maximum number of application names you can specify is 100.

Result Syntax

[
    'applicationsInfo' => [
        [
            'applicationId' => '<string>',
            'applicationName' => '<string>',
            'computePlatform' => 'Server|Lambda|ECS',
            'createTime' => <DateTime>,
            'gitHubAccountName' => '<string>',
            'linkedToGitHub' => true || false,
        ],
        // ...
    ],
]

Result Details

Members
applicationsInfo
Type: Array of ApplicationInfo structures

Information about the applications.

Errors

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

BatchLimitExceededException:

The maximum number of names or IDs allowed for this request (100) was exceeded.

BatchGetDeploymentGroups

$result = $client->batchGetDeploymentGroups([/* ... */]);
$promise = $client->batchGetDeploymentGroupsAsync([/* ... */]);

Gets information about one or more deployment groups.

Parameter Syntax

$result = $client->batchGetDeploymentGroups([
    'applicationName' => '<string>', // REQUIRED
    'deploymentGroupNames' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
applicationName
Required: Yes
Type: string

The name of an CodeDeploy application associated with the applicable user or Amazon Web Services account.

deploymentGroupNames
Required: Yes
Type: Array of strings

The names of the deployment groups.

Result Syntax

[
    'deploymentGroupsInfo' => [
        [
            'alarmConfiguration' => [
                'alarms' => [
                    [
                        'name' => '<string>',
                    ],
                    // ...
                ],
                'enabled' => true || false,
                'ignorePollAlarmFailure' => true || false,
            ],
            'applicationName' => '<string>',
            'autoRollbackConfiguration' => [
                'enabled' => true || false,
                'events' => ['<string>', ...],
            ],
            'autoScalingGroups' => [
                [
                    'hook' => '<string>',
                    'name' => '<string>',
                    'terminationHook' => '<string>',
                ],
                // ...
            ],
            'blueGreenDeploymentConfiguration' => [
                'deploymentReadyOption' => [
                    'actionOnTimeout' => 'CONTINUE_DEPLOYMENT|STOP_DEPLOYMENT',
                    'waitTimeInMinutes' => <integer>,
                ],
                'greenFleetProvisioningOption' => [
                    'action' => 'DISCOVER_EXISTING|COPY_AUTO_SCALING_GROUP',
                ],
                'terminateBlueInstancesOnDeploymentSuccess' => [
                    'action' => 'TERMINATE|KEEP_ALIVE',
                    'terminationWaitTimeInMinutes' => <integer>,
                ],
            ],
            'computePlatform' => 'Server|Lambda|ECS',
            'deploymentConfigName' => '<string>',
            'deploymentGroupId' => '<string>',
            'deploymentGroupName' => '<string>',
            'deploymentStyle' => [
                'deploymentOption' => 'WITH_TRAFFIC_CONTROL|WITHOUT_TRAFFIC_CONTROL',
                'deploymentType' => 'IN_PLACE|BLUE_GREEN',
            ],
            'ec2TagFilters' => [
                [
                    'Key' => '<string>',
                    'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                    'Value' => '<string>',
                ],
                // ...
            ],
            'ec2TagSet' => [
                'ec2TagSetList' => [
                    [
                        [
                            'Key' => '<string>',
                            'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                            'Value' => '<string>',
                        ],
                        // ...
                    ],
                    // ...
                ],
            ],
            'ecsServices' => [
                [
                    'clusterName' => '<string>',
                    'serviceName' => '<string>',
                ],
                // ...
            ],
            'lastAttemptedDeployment' => [
                'createTime' => <DateTime>,
                'deploymentId' => '<string>',
                'endTime' => <DateTime>,
                'status' => 'Created|Queued|InProgress|Baking|Succeeded|Failed|Stopped|Ready',
            ],
            'lastSuccessfulDeployment' => [
                'createTime' => <DateTime>,
                'deploymentId' => '<string>',
                'endTime' => <DateTime>,
                'status' => 'Created|Queued|InProgress|Baking|Succeeded|Failed|Stopped|Ready',
            ],
            'loadBalancerInfo' => [
                'elbInfoList' => [
                    [
                        'name' => '<string>',
                    ],
                    // ...
                ],
                'targetGroupInfoList' => [
                    [
                        'name' => '<string>',
                    ],
                    // ...
                ],
                'targetGroupPairInfoList' => [
                    [
                        'prodTrafficRoute' => [
                            'listenerArns' => ['<string>', ...],
                        ],
                        'targetGroups' => [
                            [
                                'name' => '<string>',
                            ],
                            // ...
                        ],
                        'testTrafficRoute' => [
                            'listenerArns' => ['<string>', ...],
                        ],
                    ],
                    // ...
                ],
            ],
            'onPremisesInstanceTagFilters' => [
                [
                    'Key' => '<string>',
                    'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                    'Value' => '<string>',
                ],
                // ...
            ],
            'onPremisesTagSet' => [
                'onPremisesTagSetList' => [
                    [
                        [
                            'Key' => '<string>',
                            'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                            'Value' => '<string>',
                        ],
                        // ...
                    ],
                    // ...
                ],
            ],
            'outdatedInstancesStrategy' => 'UPDATE|IGNORE',
            'serviceRoleArn' => '<string>',
            'targetRevision' => [
                'appSpecContent' => [
                    'content' => '<string>',
                    'sha256' => '<string>',
                ],
                'gitHubLocation' => [
                    'commitId' => '<string>',
                    'repository' => '<string>',
                ],
                'revisionType' => 'S3|GitHub|String|AppSpecContent',
                's3Location' => [
                    'bucket' => '<string>',
                    'bundleType' => 'tar|tgz|zip|YAML|JSON',
                    'eTag' => '<string>',
                    'key' => '<string>',
                    'version' => '<string>',
                ],
                'string' => [
                    'content' => '<string>',
                    'sha256' => '<string>',
                ],
            ],
            'terminationHookEnabled' => true || false,
            'triggerConfigurations' => [
                [
                    'triggerEvents' => ['<string>', ...],
                    'triggerName' => '<string>',
                    'triggerTargetArn' => '<string>',
                ],
                // ...
            ],
        ],
        // ...
    ],
    'errorMessage' => '<string>',
]

Result Details

Members
deploymentGroupsInfo
Type: Array of DeploymentGroupInfo structures

Information about the deployment groups.

errorMessage
Type: string

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

Errors

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

DeploymentGroupNameRequiredException:

The deployment group name was not specified.

InvalidDeploymentGroupNameException:

The deployment group name was specified in an invalid format.

BatchLimitExceededException:

The maximum number of names or IDs allowed for this request (100) was exceeded.

DeploymentConfigDoesNotExistException:

The deployment configuration does not exist with the user or Amazon Web Services account.

BatchGetDeploymentInstances

$result = $client->batchGetDeploymentInstances([/* ... */]);
$promise = $client->batchGetDeploymentInstancesAsync([/* ... */]);

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

Returns an array of one or more instances associated with a deployment. This method works with EC2/On-premises and Lambda compute platforms. The newer BatchGetDeploymentTargets works with all compute platforms. The maximum number of instances that can be returned is 25.

Parameter Syntax

$result = $client->batchGetDeploymentInstances([
    'deploymentId' => '<string>', // REQUIRED
    'instanceIds' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
deploymentId
Required: Yes
Type: string

The unique ID of a deployment.

instanceIds
Required: Yes
Type: Array of strings

The unique IDs of instances used in the deployment. The maximum number of instance IDs you can specify is 25.

Result Syntax

[
    'errorMessage' => '<string>',
    'instancesSummary' => [
        [
            'deploymentId' => '<string>',
            'instanceId' => '<string>',
            'instanceType' => 'Blue|Green',
            'lastUpdatedAt' => <DateTime>,
            'lifecycleEvents' => [
                [
                    'diagnostics' => [
                        'errorCode' => 'Success|ScriptMissing|ScriptNotExecutable|ScriptTimedOut|ScriptFailed|UnknownError',
                        'logTail' => '<string>',
                        'message' => '<string>',
                        'scriptName' => '<string>',
                    ],
                    'endTime' => <DateTime>,
                    'lifecycleEventName' => '<string>',
                    'startTime' => <DateTime>,
                    'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown',
                ],
                // ...
            ],
            'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown|Ready',
        ],
        // ...
    ],
]

Result Details

Members
errorMessage
Type: string

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

instancesSummary
Type: Array of InstanceSummary structures

Information about the instance.

Errors

DeploymentIdRequiredException:

At least one deployment ID must be specified.

DeploymentDoesNotExistException:

The deployment with the user or Amazon Web Services account does not exist.

InstanceIdRequiredException:

The instance ID was not specified.

InvalidDeploymentIdException:

At least one of the deployment IDs was specified in an invalid format.

InvalidInstanceNameException:

The on-premises instance name was specified in an invalid format.

BatchLimitExceededException:

The maximum number of names or IDs allowed for this request (100) was exceeded.

InvalidComputePlatformException:

The computePlatform is invalid. The computePlatform should be Lambda, Server, or ECS.

BatchGetDeploymentTargets

$result = $client->batchGetDeploymentTargets([/* ... */]);
$promise = $client->batchGetDeploymentTargetsAsync([/* ... */]);

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

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

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

  • Lambda: Information about Lambda functions targets.

  • Amazon ECS: Information about Amazon ECS service targets.

  • CloudFormation: Information about targets of blue/green deployments initiated by a CloudFormation stack update.

Parameter Syntax

$result = $client->batchGetDeploymentTargets([
    'deploymentId' => '<string>', // REQUIRED
    'targetIds' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
deploymentId
Required: Yes
Type: string

The unique ID of a deployment.

targetIds
Required: Yes
Type: Array of strings

The unique IDs of the deployment targets. The compute platform of the deployment determines the type of the targets and their formats. The maximum number of deployment target IDs you can specify is 25.

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

  • For deployments that use the 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.

  • For deployments that are deployed with CloudFormation, the target IDs are CloudFormation stack IDs. Their target type is cloudFormationTarget.

Result Syntax

[
    'deploymentTargets' => [
        [
            'cloudFormationTarget' => [
                'deploymentId' => '<string>',
                'lastUpdatedAt' => <DateTime>,
                'lifecycleEvents' => [
                    [
                        'diagnostics' => [
                            'errorCode' => 'Success|ScriptMissing|ScriptNotExecutable|ScriptTimedOut|ScriptFailed|UnknownError',
                            'logTail' => '<string>',
                            'message' => '<string>',
                            'scriptName' => '<string>',
                        ],
                        'endTime' => <DateTime>,
                        'lifecycleEventName' => '<string>',
                        'startTime' => <DateTime>,
                        'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown',
                    ],
                    // ...
                ],
                'resourceType' => '<string>',
                'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown|Ready',
                'targetId' => '<string>',
                'targetVersionWeight' => <float>,
            ],
            'deploymentTargetType' => 'InstanceTarget|LambdaTarget|ECSTarget|CloudFormationTarget',
            'ecsTarget' => [
                'deploymentId' => '<string>',
                'lastUpdatedAt' => <DateTime>,
                'lifecycleEvents' => [
                    [
                        'diagnostics' => [
                            'errorCode' => 'Success|ScriptMissing|ScriptNotExecutable|ScriptTimedOut|ScriptFailed|UnknownError',
                            'logTail' => '<string>',
                            'message' => '<string>',
                            'scriptName' => '<string>',
                        ],
                        'endTime' => <DateTime>,
                        'lifecycleEventName' => '<string>',
                        'startTime' => <DateTime>,
                        'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown',
                    ],
                    // ...
                ],
                'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown|Ready',
                'targetArn' => '<string>',
                'targetId' => '<string>',
                'taskSetsInfo' => [
                    [
                        'desiredCount' => <integer>,
                        'identifer' => '<string>',
                        'pendingCount' => <integer>,
                        'runningCount' => <integer>,
                        'status' => '<string>',
                        'targetGroup' => [
                            'name' => '<string>',
                        ],
                        'taskSetLabel' => 'Blue|Green',
                        'trafficWeight' => <float>,
                    ],
                    // ...
                ],
            ],
            'instanceTarget' => [
                'deploymentId' => '<string>',
                'instanceLabel' => 'Blue|Green',
                'lastUpdatedAt' => <DateTime>,
                'lifecycleEvents' => [
                    [
                        'diagnostics' => [
                            'errorCode' => 'Success|ScriptMissing|ScriptNotExecutable|ScriptTimedOut|ScriptFailed|UnknownError',
                            'logTail' => '<string>',
                            'message' => '<string>',
                            'scriptName' => '<string>',
                        ],
                        'endTime' => <DateTime>,
                        'lifecycleEventName' => '<string>',
                        'startTime' => <DateTime>,
                        'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown',
                    ],
                    // ...
                ],
                'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown|Ready',
                'targetArn' => '<string>',
                'targetId' => '<string>',
            ],
            'lambdaTarget' => [
                'deploymentId' => '<string>',
                'lambdaFunctionInfo' => [
                    'currentVersion' => '<string>',
                    'functionAlias' => '<string>',
                    'functionName' => '<string>',
                    'targetVersion' => '<string>',
                    'targetVersionWeight' => <float>,
                ],
                'lastUpdatedAt' => <DateTime>,
                'lifecycleEvents' => [
                    [
                        'diagnostics' => [
                            'errorCode' => 'Success|ScriptMissing|ScriptNotExecutable|ScriptTimedOut|ScriptFailed|UnknownError',
                            'logTail' => '<string>',
                            'message' => '<string>',
                            'scriptName' => '<string>',
                        ],
                        'endTime' => <DateTime>,
                        'lifecycleEventName' => '<string>',
                        'startTime' => <DateTime>,
                        'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown',
                    ],
                    // ...
                ],
                'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown|Ready',
                'targetArn' => '<string>',
                'targetId' => '<string>',
            ],
        ],
        // ...
    ],
]

Result Details

Members
deploymentTargets
Type: Array of DeploymentTarget structures

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 Amazon EC2 or on-premises instance.

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

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

  • CloudFormation: The target object is an CloudFormation blue/green deployment.

Errors

InvalidDeploymentIdException:

At least one of the deployment IDs was specified in an invalid format.

DeploymentIdRequiredException:

At least one deployment ID must be specified.

DeploymentDoesNotExistException:

The deployment with the user or Amazon Web Services account does not exist.

DeploymentNotStartedException:

The specified deployment has not started.

DeploymentTargetIdRequiredException:

A deployment target ID was not provided.

InvalidDeploymentTargetIdException:

The target ID provided was not valid.

DeploymentTargetDoesNotExistException:

The provided target ID does not belong to the attempted deployment.

DeploymentTargetListSizeExceededException:

The maximum number of targets that can be associated with an Amazon ECS or Lambda deployment was exceeded. The target list of both types of deployments must have exactly one item. This exception does not apply to EC2/On-premises deployments.

InstanceDoesNotExistException:

The specified instance does not exist in the deployment group.

BatchGetDeployments

$result = $client->batchGetDeployments([/* ... */]);
$promise = $client->batchGetDeploymentsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->batchGetDeployments([
    'deploymentIds' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
deploymentIds
Required: Yes
Type: Array of strings

A list of deployment IDs, separated by spaces. The maximum number of deployment IDs you can specify is 25.

Result Syntax

[
    'deploymentsInfo' => [
        [
            'additionalDeploymentStatusInfo' => '<string>',
            'applicationName' => '<string>',
            'autoRollbackConfiguration' => [
                'enabled' => true || false,
                'events' => ['<string>', ...],
            ],
            'blueGreenDeploymentConfiguration' => [
                'deploymentReadyOption' => [
                    'actionOnTimeout' => 'CONTINUE_DEPLOYMENT|STOP_DEPLOYMENT',
                    'waitTimeInMinutes' => <integer>,
                ],
                'greenFleetProvisioningOption' => [
                    'action' => 'DISCOVER_EXISTING|COPY_AUTO_SCALING_GROUP',
                ],
                'terminateBlueInstancesOnDeploymentSuccess' => [
                    'action' => 'TERMINATE|KEEP_ALIVE',
                    'terminationWaitTimeInMinutes' => <integer>,
                ],
            ],
            'completeTime' => <DateTime>,
            'computePlatform' => 'Server|Lambda|ECS',
            'createTime' => <DateTime>,
            'creator' => 'user|autoscaling|codeDeployRollback|CodeDeploy|CodeDeployAutoUpdate|CloudFormation|CloudFormationRollback|autoscalingTermination',
            'deploymentConfigName' => '<string>',
            'deploymentGroupName' => '<string>',
            'deploymentId' => '<string>',
            'deploymentOverview' => [
                'Failed' => <integer>,
                'InProgress' => <integer>,
                'Pending' => <integer>,
                'Ready' => <integer>,
                'Skipped' => <integer>,
                'Succeeded' => <integer>,
            ],
            'deploymentStatusMessages' => ['<string>', ...],
            'deploymentStyle' => [
                'deploymentOption' => 'WITH_TRAFFIC_CONTROL|WITHOUT_TRAFFIC_CONTROL',
                'deploymentType' => 'IN_PLACE|BLUE_GREEN',
            ],
            'description' => '<string>',
            'errorInformation' => [
                'code' => 'AGENT_ISSUE|ALARM_ACTIVE|APPLICATION_MISSING|AUTOSCALING_VALIDATION_ERROR|AUTO_SCALING_CONFIGURATION|AUTO_SCALING_IAM_ROLE_PERMISSIONS|CODEDEPLOY_RESOURCE_CANNOT_BE_FOUND|CUSTOMER_APPLICATION_UNHEALTHY|DEPLOYMENT_GROUP_MISSING|ECS_UPDATE_ERROR|ELASTIC_LOAD_BALANCING_INVALID|ELB_INVALID_INSTANCE|HEALTH_CONSTRAINTS|HEALTH_CONSTRAINTS_INVALID|HOOK_EXECUTION_FAILURE|IAM_ROLE_MISSING|IAM_ROLE_PERMISSIONS|INTERNAL_ERROR|INVALID_ECS_SERVICE|INVALID_LAMBDA_CONFIGURATION|INVALID_LAMBDA_FUNCTION|INVALID_REVISION|MANUAL_STOP|MISSING_BLUE_GREEN_DEPLOYMENT_CONFIGURATION|MISSING_ELB_INFORMATION|MISSING_GITHUB_TOKEN|NO_EC2_SUBSCRIPTION|NO_INSTANCES|OVER_MAX_INSTANCES|RESOURCE_LIMIT_EXCEEDED|REVISION_MISSING|THROTTLED|TIMEOUT|CLOUDFORMATION_STACK_FAILURE',
                'message' => '<string>',
            ],
            'externalId' => '<string>',
            'fileExistsBehavior' => 'DISALLOW|OVERWRITE|RETAIN',
            'ignoreApplicationStopFailures' => true || false,
            'instanceTerminationWaitTimeStarted' => true || false,
            'loadBalancerInfo' => [
                'elbInfoList' => [
                    [
                        'name' => '<string>',
                    ],
                    // ...
                ],
                'targetGroupInfoList' => [
                    [
                        'name' => '<string>',
                    ],
                    // ...
                ],
                'targetGroupPairInfoList' => [
                    [
                        'prodTrafficRoute' => [
                            'listenerArns' => ['<string>', ...],
                        ],
                        'targetGroups' => [
                            [
                                'name' => '<string>',
                            ],
                            // ...
                        ],
                        'testTrafficRoute' => [
                            'listenerArns' => ['<string>', ...],
                        ],
                    ],
                    // ...
                ],
            ],
            'overrideAlarmConfiguration' => [
                'alarms' => [
                    [
                        'name' => '<string>',
                    ],
                    // ...
                ],
                'enabled' => true || false,
                'ignorePollAlarmFailure' => true || false,
            ],
            'previousRevision' => [
                'appSpecContent' => [
                    'content' => '<string>',
                    'sha256' => '<string>',
                ],
                'gitHubLocation' => [
                    'commitId' => '<string>',
                    'repository' => '<string>',
                ],
                'revisionType' => 'S3|GitHub|String|AppSpecContent',
                's3Location' => [
                    'bucket' => '<string>',
                    'bundleType' => 'tar|tgz|zip|YAML|JSON',
                    'eTag' => '<string>',
                    'key' => '<string>',
                    'version' => '<string>',
                ],
                'string' => [
                    'content' => '<string>',
                    'sha256' => '<string>',
                ],
            ],
            'relatedDeployments' => [
                'autoUpdateOutdatedInstancesDeploymentIds' => ['<string>', ...],
                'autoUpdateOutdatedInstancesRootDeploymentId' => '<string>',
            ],
            'revision' => [
                'appSpecContent' => [
                    'content' => '<string>',
                    'sha256' => '<string>',
                ],
                'gitHubLocation' => [
                    'commitId' => '<string>',
                    'repository' => '<string>',
                ],
                'revisionType' => 'S3|GitHub|String|AppSpecContent',
                's3Location' => [
                    'bucket' => '<string>',
                    'bundleType' => 'tar|tgz|zip|YAML|JSON',
                    'eTag' => '<string>',
                    'key' => '<string>',
                    'version' => '<string>',
                ],
                'string' => [
                    'content' => '<string>',
                    'sha256' => '<string>',
                ],
            ],
            'rollbackInfo' => [
                'rollbackDeploymentId' => '<string>',
                'rollbackMessage' => '<string>',
                'rollbackTriggeringDeploymentId' => '<string>',
            ],
            'startTime' => <DateTime>,
            'status' => 'Created|Queued|InProgress|Baking|Succeeded|Failed|Stopped|Ready',
            'targetInstances' => [
                'autoScalingGroups' => ['<string>', ...],
                'ec2TagSet' => [
                    'ec2TagSetList' => [
                        [
                            [
                                'Key' => '<string>',
                                'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                                'Value' => '<string>',
                            ],
                            // ...
                        ],
                        // ...
                    ],
                ],
                'tagFilters' => [
                    [
                        'Key' => '<string>',
                        'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                        'Value' => '<string>',
                    ],
                    // ...
                ],
            ],
            'updateOutdatedInstancesOnly' => true || false,
        ],
        // ...
    ],
]

Result Details

Members
deploymentsInfo
Type: Array of DeploymentInfo structures

Information about the deployments.

Errors

DeploymentIdRequiredException:

At least one deployment ID must be specified.

InvalidDeploymentIdException:

At least one of the deployment IDs was specified in an invalid format.

BatchLimitExceededException:

The maximum number of names or IDs allowed for this request (100) was exceeded.

BatchGetOnPremisesInstances

$result = $client->batchGetOnPremisesInstances([/* ... */]);
$promise = $client->batchGetOnPremisesInstancesAsync([/* ... */]);

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

Parameter Syntax

$result = $client->batchGetOnPremisesInstances([
    'instanceNames' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
instanceNames
Required: Yes
Type: Array of strings

The names of the on-premises instances about which to get information. The maximum number of instance names you can specify is 25.

Result Syntax

[
    'instanceInfos' => [
        [
            'deregisterTime' => <DateTime>,
            'iamSessionArn' => '<string>',
            'iamUserArn' => '<string>',
            'instanceArn' => '<string>',
            'instanceName' => '<string>',
            'registerTime' => <DateTime>,
            'tags' => [
                [
                    'Key' => '<string>',
                    'Value' => '<string>',
                ],
                // ...
            ],
        ],
        // ...
    ],
]

Result Details

Members
instanceInfos
Type: Array of InstanceInfo structures

Information about the on-premises instances.

Errors

InstanceNameRequiredException:

An on-premises instance name was not specified.

InvalidInstanceNameException:

The on-premises instance name was specified in an invalid format.

BatchLimitExceededException:

The maximum number of names or IDs allowed for this request (100) was exceeded.

ContinueDeployment

$result = $client->continueDeployment([/* ... */]);
$promise = $client->continueDeploymentAsync([/* ... */]);

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

Parameter Syntax

$result = $client->continueDeployment([
    'deploymentId' => '<string>',
    'deploymentWaitType' => 'READY_WAIT|TERMINATION_WAIT',
]);

Parameter Details

Members
deploymentId
Type: string

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

deploymentWaitType
Type: string

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

DeploymentIdRequiredException:

At least one deployment ID must be specified.

DeploymentDoesNotExistException:

The deployment with the user or Amazon Web Services account does not exist.

DeploymentAlreadyCompletedException:

The deployment is already complete.

InvalidDeploymentIdException:

At least one of the deployment IDs was specified in an invalid format.

DeploymentIsNotInReadyStateException:

The deployment does not have a status of Ready and can't continue yet.

UnsupportedActionForDeploymentTypeException:

A call was submitted that is not supported for the specified deployment type.

InvalidDeploymentWaitTypeException:

The wait type is invalid.

InvalidDeploymentStatusException:

The specified deployment status doesn't exist or cannot be determined.

CreateApplication

$result = $client->createApplication([/* ... */]);
$promise = $client->createApplicationAsync([/* ... */]);

Creates an application.

Parameter Syntax

$result = $client->createApplication([
    'applicationName' => '<string>', // REQUIRED
    'computePlatform' => 'Server|Lambda|ECS',
    'tags' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
applicationName
Required: Yes
Type: string

The name of the application. This name must be unique with the applicable user or Amazon Web Services account.

computePlatform
Type: string

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

tags
Type: Array of Tag structures

The metadata that you apply to CodeDeploy applications to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define.

Result Syntax

[
    'applicationId' => '<string>',
]

Result Details

Members
applicationId
Type: string

A unique application ID.

Errors

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

ApplicationAlreadyExistsException:

An application with the specified name with the user or Amazon Web Services account already exists.

ApplicationLimitExceededException:

More applications were attempted to be created than are allowed.

InvalidComputePlatformException:

The computePlatform is invalid. The computePlatform should be Lambda, Server, or ECS.

InvalidTagsToAddException:

The specified tags are not valid.

CreateDeployment

$result = $client->createDeployment([/* ... */]);
$promise = $client->createDeploymentAsync([/* ... */]);

Deploys an application revision through the specified deployment group.

Parameter Syntax

$result = $client->createDeployment([
    'applicationName' => '<string>', // REQUIRED
    'autoRollbackConfiguration' => [
        'enabled' => true || false,
        'events' => ['<string>', ...],
    ],
    'deploymentConfigName' => '<string>',
    'deploymentGroupName' => '<string>',
    'description' => '<string>',
    'fileExistsBehavior' => 'DISALLOW|OVERWRITE|RETAIN',
    'ignoreApplicationStopFailures' => true || false,
    'overrideAlarmConfiguration' => [
        'alarms' => [
            [
                'name' => '<string>',
            ],
            // ...
        ],
        'enabled' => true || false,
        'ignorePollAlarmFailure' => true || false,
    ],
    'revision' => [
        'appSpecContent' => [
            'content' => '<string>',
            'sha256' => '<string>',
        ],
        'gitHubLocation' => [
            'commitId' => '<string>',
            'repository' => '<string>',
        ],
        'revisionType' => 'S3|GitHub|String|AppSpecContent',
        's3Location' => [
            'bucket' => '<string>',
            'bundleType' => 'tar|tgz|zip|YAML|JSON',
            'eTag' => '<string>',
            'key' => '<string>',
            'version' => '<string>',
        ],
        'string' => [
            'content' => '<string>',
            'sha256' => '<string>',
        ],
    ],
    'targetInstances' => [
        'autoScalingGroups' => ['<string>', ...],
        'ec2TagSet' => [
            'ec2TagSetList' => [
                [
                    [
                        'Key' => '<string>',
                        'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                        'Value' => '<string>',
                    ],
                    // ...
                ],
                // ...
            ],
        ],
        'tagFilters' => [
            [
                'Key' => '<string>',
                'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                'Value' => '<string>',
            ],
            // ...
        ],
    ],
    'updateOutdatedInstancesOnly' => true || false,
]);

Parameter Details

Members
applicationName
Required: Yes
Type: string

The name of an CodeDeploy application associated with the user or Amazon Web Services account.

autoRollbackConfiguration
Type: AutoRollbackConfiguration structure

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

deploymentConfigName
Type: string

The name of a deployment configuration associated with the user or Amazon Web Services 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.

deploymentGroupName
Type: string

The name of the deployment group.

description
Type: string

A comment about the deployment.

fileExistsBehavior
Type: string

Information about how 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.

ignoreApplicationStopFailures
Type: 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 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.

overrideAlarmConfiguration
Type: AlarmConfiguration structure

Allows you to specify information about alarms associated with a deployment. The alarm configuration that you specify here will override the alarm configuration at the deployment group level. Consider overriding the alarm configuration if you have set up alarms at the deployment group level that are causing deployment failures. In this case, you would call CreateDeployment to create a new deployment that uses a previous application revision that is known to work, and set its alarm configuration to turn off alarm polling. Turning off alarm polling ensures that the new deployment proceeds without being blocked by the alarm that was generated by the previous, failed, deployment.

If you specify an overrideAlarmConfiguration, you need the UpdateDeploymentGroup IAM permission when calling CreateDeployment.

revision
Type: RevisionLocation structure

The type and location of the revision to deploy.

targetInstances
Type: TargetInstances structure

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

updateOutdatedInstancesOnly
Type: boolean

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

Result Syntax

[
    'deploymentId' => '<string>',
]

Result Details

Members
deploymentId
Type: string

The unique ID of a deployment.

Errors

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

DeploymentGroupNameRequiredException:

The deployment group name was not specified.

InvalidDeploymentGroupNameException:

The deployment group name was specified in an invalid format.

DeploymentGroupDoesNotExistException:

The named deployment group with the user or Amazon Web Services account does not exist.

RevisionRequiredException:

The revision ID was not specified.

RevisionDoesNotExistException:

The named revision does not exist with the user or Amazon Web Services account.

InvalidRevisionException:

The revision was specified in an invalid format.

InvalidDeploymentConfigNameException:

The deployment configuration name was specified in an invalid format.

DeploymentConfigDoesNotExistException:

The deployment configuration does not exist with the user or Amazon Web Services account.

DescriptionTooLongException:

The description is too long.

DeploymentLimitExceededException:

The number of allowed deployments was exceeded.

InvalidTargetInstancesException:

The target instance configuration is invalid. Possible causes include:

  • Configuration data for target instances was entered for an in-place deployment.

  • The limit of 10 tags for a tag type was exceeded.

  • The combined length of the tag names exceeded the limit.

  • A specified tag is not currently applied to any instances.

InvalidAlarmConfigException:

The format of the alarm configuration is invalid. Possible causes include:

  • The alarm list is null.

  • The alarm object is null.

  • The alarm name is empty or null or exceeds the limit of 255 characters.

  • Two alarms with the same name have been specified.

  • The alarm configuration is enabled, but the alarm list is empty.

AlarmsLimitExceededException:

The maximum number of alarms for a deployment group (10) was exceeded.

InvalidAutoRollbackConfigException:

The automatic rollback configuration was specified in an invalid format. For example, automatic rollback is enabled, but an invalid triggering event type or no event types were listed.

InvalidLoadBalancerInfoException:

An invalid load balancer name, or no load balancer name, was specified.

InvalidFileExistsBehaviorException:

An invalid fileExistsBehavior option was specified to determine how CodeDeploy handles files or directories that already exist in a deployment target location, but weren't part of the previous successful deployment. Valid values include "DISALLOW," "OVERWRITE," and "RETAIN."

InvalidRoleException:

The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.

InvalidAutoScalingGroupException:

The Auto Scaling group was specified in an invalid format or does not exist.

ThrottlingException:

An API function was called too frequently.

InvalidUpdateOutdatedInstancesOnlyValueException:

The UpdateOutdatedInstancesOnly value is invalid. For Lambda deployments, false is expected. For EC2/On-premises deployments, true or false is expected.

InvalidIgnoreApplicationStopFailuresValueException:

The IgnoreApplicationStopFailures value is invalid. For Lambda deployments, false is expected. For EC2/On-premises deployments, true or false is expected.

InvalidGitHubAccountTokenException:

The GitHub token is not valid.

InvalidTrafficRoutingConfigurationException:

The configuration that specifies how traffic is routed during a deployment is invalid.

CreateDeploymentConfig

$result = $client->createDeploymentConfig([/* ... */]);
$promise = $client->createDeploymentConfigAsync([/* ... */]);

Creates a deployment configuration.

Parameter Syntax

$result = $client->createDeploymentConfig([
    'computePlatform' => 'Server|Lambda|ECS',
    'deploymentConfigName' => '<string>', // REQUIRED
    'minimumHealthyHosts' => [
        'type' => 'HOST_COUNT|FLEET_PERCENT',
        'value' => <integer>,
    ],
    'trafficRoutingConfig' => [
        'timeBasedCanary' => [
            'canaryInterval' => <integer>,
            'canaryPercentage' => <integer>,
        ],
        'timeBasedLinear' => [
            'linearInterval' => <integer>,
            'linearPercentage' => <integer>,
        ],
        'type' => 'TimeBasedCanary|TimeBasedLinear|AllAtOnce',
    ],
    'zonalConfig' => [
        'firstZoneMonitorDurationInSeconds' => <integer>,
        'minimumHealthyHostsPerZone' => [
            'type' => 'HOST_COUNT|FLEET_PERCENT',
            'value' => <integer>,
        ],
        'monitorDurationInSeconds' => <integer>,
    ],
]);

Parameter Details

Members
computePlatform
Type: string

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

deploymentConfigName
Required: Yes
Type: string

The name of the deployment configuration to create.

minimumHealthyHosts
Type: MinimumHealthyHosts structure

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, CodeDeploy converts the percentage to the equivalent number of instances 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.

trafficRoutingConfig
Type: TrafficRoutingConfig structure

The configuration that specifies how the deployment traffic is routed.

zonalConfig
Type: ZonalConfig structure

Configure the ZonalConfig object if you want CodeDeploy to deploy your application to one Availability Zone at a time, within an Amazon Web Services Region.

For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide.

Result Syntax

[
    'deploymentConfigId' => '<string>',
]

Result Details

Members
deploymentConfigId
Type: string

A unique deployment configuration ID.

Errors

InvalidDeploymentConfigNameException:

The deployment configuration name was specified in an invalid format.

DeploymentConfigNameRequiredException:

The deployment configuration name was not specified.

DeploymentConfigAlreadyExistsException:

A deployment configuration with the specified name with the user or Amazon Web Services account already exists.

InvalidMinimumHealthyHostValueException:

The minimum healthy instance value was specified in an invalid format.

DeploymentConfigLimitExceededException:

The deployment configurations limit was exceeded.

InvalidComputePlatformException:

The computePlatform is invalid. The computePlatform should be Lambda, Server, or ECS.

InvalidTrafficRoutingConfigurationException:

The configuration that specifies how traffic is routed during a deployment is invalid.

InvalidZonalDeploymentConfigurationException:

The ZonalConfig object is not valid.

CreateDeploymentGroup

$result = $client->createDeploymentGroup([/* ... */]);
$promise = $client->createDeploymentGroupAsync([/* ... */]);

Creates a deployment group to which application revisions are deployed.

Parameter Syntax

$result = $client->createDeploymentGroup([
    'alarmConfiguration' => [
        'alarms' => [
            [
                'name' => '<string>',
            ],
            // ...
        ],
        'enabled' => true || false,
        'ignorePollAlarmFailure' => true || false,
    ],
    'applicationName' => '<string>', // REQUIRED
    'autoRollbackConfiguration' => [
        'enabled' => true || false,
        'events' => ['<string>', ...],
    ],
    'autoScalingGroups' => ['<string>', ...],
    'blueGreenDeploymentConfiguration' => [
        'deploymentReadyOption' => [
            'actionOnTimeout' => 'CONTINUE_DEPLOYMENT|STOP_DEPLOYMENT',
            'waitTimeInMinutes' => <integer>,
        ],
        'greenFleetProvisioningOption' => [
            'action' => 'DISCOVER_EXISTING|COPY_AUTO_SCALING_GROUP',
        ],
        'terminateBlueInstancesOnDeploymentSuccess' => [
            'action' => 'TERMINATE|KEEP_ALIVE',
            'terminationWaitTimeInMinutes' => <integer>,
        ],
    ],
    'deploymentConfigName' => '<string>',
    'deploymentGroupName' => '<string>', // REQUIRED
    'deploymentStyle' => [
        'deploymentOption' => 'WITH_TRAFFIC_CONTROL|WITHOUT_TRAFFIC_CONTROL',
        'deploymentType' => 'IN_PLACE|BLUE_GREEN',
    ],
    'ec2TagFilters' => [
        [
            'Key' => '<string>',
            'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
            'Value' => '<string>',
        ],
        // ...
    ],
    'ec2TagSet' => [
        'ec2TagSetList' => [
            [
                [
                    'Key' => '<string>',
                    'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                    'Value' => '<string>',
                ],
                // ...
            ],
            // ...
        ],
    ],
    'ecsServices' => [
        [
            'clusterName' => '<string>',
            'serviceName' => '<string>',
        ],
        // ...
    ],
    'loadBalancerInfo' => [
        'elbInfoList' => [
            [
                'name' => '<string>',
            ],
            // ...
        ],
        'targetGroupInfoList' => [
            [
                'name' => '<string>',
            ],
            // ...
        ],
        'targetGroupPairInfoList' => [
            [
                'prodTrafficRoute' => [
                    'listenerArns' => ['<string>', ...],
                ],
                'targetGroups' => [
                    [
                        'name' => '<string>',
                    ],
                    // ...
                ],
                'testTrafficRoute' => [
                    'listenerArns' => ['<string>', ...],
                ],
            ],
            // ...
        ],
    ],
    'onPremisesInstanceTagFilters' => [
        [
            'Key' => '<string>',
            'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
            'Value' => '<string>',
        ],
        // ...
    ],
    'onPremisesTagSet' => [
        'onPremisesTagSetList' => [
            [
                [
                    'Key' => '<string>',
                    'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                    'Value' => '<string>',
                ],
                // ...
            ],
            // ...
        ],
    ],
    'outdatedInstancesStrategy' => 'UPDATE|IGNORE',
    'serviceRoleArn' => '<string>', // REQUIRED
    'tags' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
    'terminationHookEnabled' => true || false,
    'triggerConfigurations' => [
        [
            'triggerEvents' => ['<string>', ...],
            'triggerName' => '<string>',
            'triggerTargetArn' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
alarmConfiguration
Type: AlarmConfiguration structure

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

applicationName
Required: Yes
Type: string

The name of an CodeDeploy application associated with the user or Amazon Web Services account.

autoRollbackConfiguration
Type: AutoRollbackConfiguration structure

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

autoScalingGroups
Type: Array of strings

A list of associated Amazon EC2 Auto Scaling groups.

blueGreenDeploymentConfiguration

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

deploymentConfigName
Type: string

If specified, the deployment configuration name can be either one of the predefined configurations provided with 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 CodeDeploy, see Working with Deployment Configurations in CodeDeploy in the CodeDeploy User Guide.

deploymentGroupName
Required: Yes
Type: string

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

deploymentStyle
Type: DeploymentStyle structure

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.

ec2TagFilters
Type: Array of EC2TagFilter structures

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

ec2TagSet
Type: EC2TagSet structure

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

ecsServices
Type: Array of ECSService structures

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

loadBalancerInfo
Type: LoadBalancerInfo structure

Information about the load balancer used in a deployment.

onPremisesInstanceTagFilters
Type: Array of TagFilter structures

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.

onPremisesTagSet
Type: OnPremisesTagSet structure

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.

outdatedInstancesStrategy
Type: string

Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.

If this option is set to UPDATE or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.

If this option is set to IGNORE, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.

serviceRoleArn
Required: Yes
Type: string

A service role Amazon Resource Name (ARN) that allows CodeDeploy to act on the user's behalf when interacting with Amazon Web Services services.

tags
Type: Array of Tag structures

The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define.

terminationHookEnabled
Type: boolean

This parameter only applies if you are using CodeDeploy with Amazon EC2 Auto Scaling. For more information, see Integrating CodeDeploy with Amazon EC2 Auto Scaling in the CodeDeploy User Guide.

Set terminationHookEnabled to true to have CodeDeploy install a termination hook into your Auto Scaling group when you create a deployment group. When this hook is installed, CodeDeploy will perform termination deployments.

For information about termination deployments, see Enabling termination deployments during Auto Scaling scale-in events in the CodeDeploy User Guide.

For more information about Auto Scaling scale-in events, see the Scale in topic in the Amazon EC2 Auto Scaling User Guide.

triggerConfigurations
Type: Array of TriggerConfig structures

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

Result Syntax

[
    'deploymentGroupId' => '<string>',
]

Result Details

Members
deploymentGroupId
Type: string

A unique deployment group ID.

Errors

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

DeploymentGroupNameRequiredException:

The deployment group name was not specified.

InvalidDeploymentGroupNameException:

The deployment group name was specified in an invalid format.

DeploymentGroupAlreadyExistsException:

A deployment group with the specified name with the user or Amazon Web Services account already exists.

InvalidEC2TagException:

The tag was specified in an invalid format.

InvalidTagException:

The tag was specified in an invalid format.

InvalidAutoScalingGroupException:

The Auto Scaling group was specified in an invalid format or does not exist.

InvalidDeploymentConfigNameException:

The deployment configuration name was specified in an invalid format.

DeploymentConfigDoesNotExistException:

The deployment configuration does not exist with the user or Amazon Web Services account.

RoleRequiredException:

The role ID was not specified.

InvalidRoleException:

The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.

DeploymentGroupLimitExceededException:

The deployment groups limit was exceeded.

LifecycleHookLimitExceededException:

The limit for lifecycle hooks was exceeded.

InvalidTriggerConfigException:

The trigger was specified in an invalid format.

TriggerTargetsLimitExceededException:

The maximum allowed number of triggers was exceeded.

InvalidAlarmConfigException:

The format of the alarm configuration is invalid. Possible causes include:

  • The alarm list is null.

  • The alarm object is null.

  • The alarm name is empty or null or exceeds the limit of 255 characters.

  • Two alarms with the same name have been specified.

  • The alarm configuration is enabled, but the alarm list is empty.

AlarmsLimitExceededException:

The maximum number of alarms for a deployment group (10) was exceeded.

InvalidAutoRollbackConfigException:

The automatic rollback configuration was specified in an invalid format. For example, automatic rollback is enabled, but an invalid triggering event type or no event types were listed.

InvalidLoadBalancerInfoException:

An invalid load balancer name, or no load balancer name, was specified.

InvalidDeploymentStyleException:

An invalid deployment style was specified. Valid deployment types include "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" and "WITHOUT_TRAFFIC_CONTROL."

InvalidBlueGreenDeploymentConfigurationException:

The configuration for the blue/green deployment group was provided in an invalid format. For information about deployment configuration format, see CreateDeploymentConfig.

InvalidEC2TagCombinationException:

A call was submitted that specified both Ec2TagFilters and Ec2TagSet, but only one of these data types can be used in a single call.

InvalidOnPremisesTagCombinationException:

A call was submitted that specified both OnPremisesTagFilters and OnPremisesTagSet, but only one of these data types can be used in a single call.

TagSetListLimitExceededException:

The number of tag groups included in the tag set list exceeded the maximum allowed limit of 3.

InvalidInputException:

The input was specified in an invalid format.

ThrottlingException:

An API function was called too frequently.

InvalidECSServiceException:

The Amazon ECS service identifier is not valid.

InvalidTargetGroupPairException:

A target group pair associated with this deployment is not valid.

ECSServiceMappingLimitExceededException:

The Amazon ECS service is associated with more than one deployment groups. An Amazon ECS service can be associated with only one deployment group.

InvalidTagsToAddException:

The specified tags are not valid.

InvalidTrafficRoutingConfigurationException:

The configuration that specifies how traffic is routed during a deployment is invalid.

DeleteApplication

$result = $client->deleteApplication([/* ... */]);
$promise = $client->deleteApplicationAsync([/* ... */]);

Deletes an application.

Parameter Syntax

$result = $client->deleteApplication([
    'applicationName' => '<string>', // REQUIRED
]);

Parameter Details

Members
applicationName
Required: Yes
Type: string

The name of an CodeDeploy application associated with the user or Amazon Web Services account.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

InvalidRoleException:

The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.

DeleteDeploymentConfig

$result = $client->deleteDeploymentConfig([/* ... */]);
$promise = $client->deleteDeploymentConfigAsync([/* ... */]);

Deletes a deployment configuration.

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

Parameter Syntax

$result = $client->deleteDeploymentConfig([
    'deploymentConfigName' => '<string>', // REQUIRED
]);

Parameter Details

Members
deploymentConfigName
Required: Yes
Type: string

The name of a deployment configuration associated with the user or Amazon Web Services account.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InvalidDeploymentConfigNameException:

The deployment configuration name was specified in an invalid format.

DeploymentConfigNameRequiredException:

The deployment configuration name was not specified.

DeploymentConfigInUseException:

The deployment configuration is still in use.

InvalidOperationException:

An invalid operation was detected.

DeleteDeploymentGroup

$result = $client->deleteDeploymentGroup([/* ... */]);
$promise = $client->deleteDeploymentGroupAsync([/* ... */]);

Deletes a deployment group.

Parameter Syntax

$result = $client->deleteDeploymentGroup([
    'applicationName' => '<string>', // REQUIRED
    'deploymentGroupName' => '<string>', // REQUIRED
]);

Parameter Details

Members
applicationName
Required: Yes
Type: string

The name of an CodeDeploy application associated with the user or Amazon Web Services account.

deploymentGroupName
Required: Yes
Type: string

The name of a deployment group for the specified application.

Result Syntax

[
    'hooksNotCleanedUp' => [
        [
            'hook' => '<string>',
            'name' => '<string>',
            'terminationHook' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
hooksNotCleanedUp
Type: Array of AutoScalingGroup structures

If the output contains no data, and the corresponding deployment group contained at least one Auto Scaling group, 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, CodeDeploy could not remove some Auto Scaling lifecycle event hooks from the Amazon EC2 instances in the Auto Scaling group.

Errors

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

DeploymentGroupNameRequiredException:

The deployment group name was not specified.

InvalidDeploymentGroupNameException:

The deployment group name was specified in an invalid format.

InvalidRoleException:

The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.

DeleteGitHubAccountToken

$result = $client->deleteGitHubAccountToken([/* ... */]);
$promise = $client->deleteGitHubAccountTokenAsync([/* ... */]);

Deletes a GitHub account connection.

Parameter Syntax

$result = $client->deleteGitHubAccountToken([
    'tokenName' => '<string>',
]);

Parameter Details

Members
tokenName
Type: string

The name of the GitHub account connection to delete.

Result Syntax

[
    'tokenName' => '<string>',
]

Result Details

Members
tokenName
Type: string

The name of the GitHub account connection that was deleted.

Errors

GitHubAccountTokenNameRequiredException:

The call is missing a required GitHub account connection name.

GitHubAccountTokenDoesNotExistException:

No GitHub account connection exists with the named specified in the call.

InvalidGitHubAccountTokenNameException:

The format of the specified GitHub account connection name is invalid.

ResourceValidationException:

The specified resource could not be validated.

OperationNotSupportedException:

The API used does not support the deployment.

DeleteResourcesByExternalId

$result = $client->deleteResourcesByExternalId([/* ... */]);
$promise = $client->deleteResourcesByExternalIdAsync([/* ... */]);

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

It is not necessary to call this action directly. CloudFormation calls it on your behalf when it needs to delete stack resources. This action is offered publicly in case you need to delete resources to comply with General Data Protection Regulation (GDPR) requirements.

Parameter Syntax

$result = $client->deleteResourcesByExternalId([
    'externalId' => '<string>',
]);

Parameter Details

Members
externalId
Type: string

The unique ID of an external resource (for example, a CloudFormation stack ID) that is linked to one or more CodeDeploy resources.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

There are no errors described for this operation.

DeregisterOnPremisesInstance

$result = $client->deregisterOnPremisesInstance([/* ... */]);
$promise = $client->deregisterOnPremisesInstanceAsync([/* ... */]);

Deregisters an on-premises instance.

Parameter Syntax

$result = $client->deregisterOnPremisesInstance([
    'instanceName' => '<string>', // REQUIRED
]);

Parameter Details

Members
instanceName
Required: Yes
Type: string

The name of the on-premises instance to deregister.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InstanceNameRequiredException:

An on-premises instance name was not specified.

InvalidInstanceNameException:

The on-premises instance name was specified in an invalid format.

GetApplication

$result = $client->getApplication([/* ... */]);
$promise = $client->getApplicationAsync([/* ... */]);

Gets information about an application.

Parameter Syntax

$result = $client->getApplication([
    'applicationName' => '<string>', // REQUIRED
]);

Parameter Details

Members
applicationName
Required: Yes
Type: string

The name of an CodeDeploy application associated with the user or Amazon Web Services account.

Result Syntax

[
    'application' => [
        'applicationId' => '<string>',
        'applicationName' => '<string>',
        'computePlatform' => 'Server|Lambda|ECS',
        'createTime' => <DateTime>,
        'gitHubAccountName' => '<string>',
        'linkedToGitHub' => true || false,
    ],
]

Result Details

Members
application
Type: ApplicationInfo structure

Information about the application.

Errors

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

GetApplicationRevision

$result = $client->getApplicationRevision([/* ... */]);
$promise = $client->getApplicationRevisionAsync([/* ... */]);

Gets information about an application revision.

Parameter Syntax

$result = $client->getApplicationRevision([
    'applicationName' => '<string>', // REQUIRED
    'revision' => [ // REQUIRED
        'appSpecContent' => [
            'content' => '<string>',
            'sha256' => '<string>',
        ],
        'gitHubLocation' => [
            'commitId' => '<string>',
            'repository' => '<string>',
        ],
        'revisionType' => 'S3|GitHub|String|AppSpecContent',
        's3Location' => [
            'bucket' => '<string>',
            'bundleType' => 'tar|tgz|zip|YAML|JSON',
            'eTag' => '<string>',
            'key' => '<string>',
            'version' => '<string>',
        ],
        'string' => [
            'content' => '<string>',
            'sha256' => '<string>',
        ],
    ],
]);

Parameter Details

Members
applicationName
Required: Yes
Type: string

The name of the application that corresponds to the revision.

revision
Required: Yes
Type: RevisionLocation structure

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

Result Syntax

[
    'applicationName' => '<string>',
    'revision' => [
        'appSpecContent' => [
            'content' => '<string>',
            'sha256' => '<string>',
        ],
        'gitHubLocation' => [
            'commitId' => '<string>',
            'repository' => '<string>',
        ],
        'revisionType' => 'S3|GitHub|String|AppSpecContent',
        's3Location' => [
            'bucket' => '<string>',
            'bundleType' => 'tar|tgz|zip|YAML|JSON',
            'eTag' => '<string>',
            'key' => '<string>',
            'version' => '<string>',
        ],
        'string' => [
            'content' => '<string>',
            'sha256' => '<string>',
        ],
    ],
    'revisionInfo' => [
        'deploymentGroups' => ['<string>', ...],
        'description' => '<string>',
        'firstUsedTime' => <DateTime>,
        'lastUsedTime' => <DateTime>,
        'registerTime' => <DateTime>,
    ],
]

Result Details

Members
applicationName
Type: string

The name of the application that corresponds to the revision.

revision
Type: RevisionLocation structure

Additional information about the revision, including type and location.

revisionInfo
Type: GenericRevisionInfo structure

General information about the revision.

Errors

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

RevisionDoesNotExistException:

The named revision does not exist with the user or Amazon Web Services account.

RevisionRequiredException:

The revision ID was not specified.

InvalidRevisionException:

The revision was specified in an invalid format.

GetDeployment

$result = $client->getDeployment([/* ... */]);
$promise = $client->getDeploymentAsync([/* ... */]);

Gets information about a deployment.

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.

Parameter Syntax

$result = $client->getDeployment([
    'deploymentId' => '<string>', // REQUIRED
]);

Parameter Details

Members
deploymentId
Required: Yes
Type: string

The unique ID of a deployment associated with the user or Amazon Web Services account.

Result Syntax

[
    'deploymentInfo' => [
        'additionalDeploymentStatusInfo' => '<string>',
        'applicationName' => '<string>',
        'autoRollbackConfiguration' => [
            'enabled' => true || false,
            'events' => ['<string>', ...],
        ],
        'blueGreenDeploymentConfiguration' => [
            'deploymentReadyOption' => [
                'actionOnTimeout' => 'CONTINUE_DEPLOYMENT|STOP_DEPLOYMENT',
                'waitTimeInMinutes' => <integer>,
            ],
            'greenFleetProvisioningOption' => [
                'action' => 'DISCOVER_EXISTING|COPY_AUTO_SCALING_GROUP',
            ],
            'terminateBlueInstancesOnDeploymentSuccess' => [
                'action' => 'TERMINATE|KEEP_ALIVE',
                'terminationWaitTimeInMinutes' => <integer>,
            ],
        ],
        'completeTime' => <DateTime>,
        'computePlatform' => 'Server|Lambda|ECS',
        'createTime' => <DateTime>,
        'creator' => 'user|autoscaling|codeDeployRollback|CodeDeploy|CodeDeployAutoUpdate|CloudFormation|CloudFormationRollback|autoscalingTermination',
        'deploymentConfigName' => '<string>',
        'deploymentGroupName' => '<string>',
        'deploymentId' => '<string>',
        'deploymentOverview' => [
            'Failed' => <integer>,
            'InProgress' => <integer>,
            'Pending' => <integer>,
            'Ready' => <integer>,
            'Skipped' => <integer>,
            'Succeeded' => <integer>,
        ],
        'deploymentStatusMessages' => ['<string>', ...],
        'deploymentStyle' => [
            'deploymentOption' => 'WITH_TRAFFIC_CONTROL|WITHOUT_TRAFFIC_CONTROL',
            'deploymentType' => 'IN_PLACE|BLUE_GREEN',
        ],
        'description' => '<string>',
        'errorInformation' => [
            'code' => 'AGENT_ISSUE|ALARM_ACTIVE|APPLICATION_MISSING|AUTOSCALING_VALIDATION_ERROR|AUTO_SCALING_CONFIGURATION|AUTO_SCALING_IAM_ROLE_PERMISSIONS|CODEDEPLOY_RESOURCE_CANNOT_BE_FOUND|CUSTOMER_APPLICATION_UNHEALTHY|DEPLOYMENT_GROUP_MISSING|ECS_UPDATE_ERROR|ELASTIC_LOAD_BALANCING_INVALID|ELB_INVALID_INSTANCE|HEALTH_CONSTRAINTS|HEALTH_CONSTRAINTS_INVALID|HOOK_EXECUTION_FAILURE|IAM_ROLE_MISSING|IAM_ROLE_PERMISSIONS|INTERNAL_ERROR|INVALID_ECS_SERVICE|INVALID_LAMBDA_CONFIGURATION|INVALID_LAMBDA_FUNCTION|INVALID_REVISION|MANUAL_STOP|MISSING_BLUE_GREEN_DEPLOYMENT_CONFIGURATION|MISSING_ELB_INFORMATION|MISSING_GITHUB_TOKEN|NO_EC2_SUBSCRIPTION|NO_INSTANCES|OVER_MAX_INSTANCES|RESOURCE_LIMIT_EXCEEDED|REVISION_MISSING|THROTTLED|TIMEOUT|CLOUDFORMATION_STACK_FAILURE',
            'message' => '<string>',
        ],
        'externalId' => '<string>',
        'fileExistsBehavior' => 'DISALLOW|OVERWRITE|RETAIN',
        'ignoreApplicationStopFailures' => true || false,
        'instanceTerminationWaitTimeStarted' => true || false,
        'loadBalancerInfo' => [
            'elbInfoList' => [
                [
                    'name' => '<string>',
                ],
                // ...
            ],
            'targetGroupInfoList' => [
                [
                    'name' => '<string>',
                ],
                // ...
            ],
            'targetGroupPairInfoList' => [
                [
                    'prodTrafficRoute' => [
                        'listenerArns' => ['<string>', ...],
                    ],
                    'targetGroups' => [
                        [
                            'name' => '<string>',
                        ],
                        // ...
                    ],
                    'testTrafficRoute' => [
                        'listenerArns' => ['<string>', ...],
                    ],
                ],
                // ...
            ],
        ],
        'overrideAlarmConfiguration' => [
            'alarms' => [
                [
                    'name' => '<string>',
                ],
                // ...
            ],
            'enabled' => true || false,
            'ignorePollAlarmFailure' => true || false,
        ],
        'previousRevision' => [
            'appSpecContent' => [
                'content' => '<string>',
                'sha256' => '<string>',
            ],
            'gitHubLocation' => [
                'commitId' => '<string>',
                'repository' => '<string>',
            ],
            'revisionType' => 'S3|GitHub|String|AppSpecContent',
            's3Location' => [
                'bucket' => '<string>',
                'bundleType' => 'tar|tgz|zip|YAML|JSON',
                'eTag' => '<string>',
                'key' => '<string>',
                'version' => '<string>',
            ],
            'string' => [
                'content' => '<string>',
                'sha256' => '<string>',
            ],
        ],
        'relatedDeployments' => [
            'autoUpdateOutdatedInstancesDeploymentIds' => ['<string>', ...],
            'autoUpdateOutdatedInstancesRootDeploymentId' => '<string>',
        ],
        'revision' => [
            'appSpecContent' => [
                'content' => '<string>',
                'sha256' => '<string>',
            ],
            'gitHubLocation' => [
                'commitId' => '<string>',
                'repository' => '<string>',
            ],
            'revisionType' => 'S3|GitHub|String|AppSpecContent',
            's3Location' => [
                'bucket' => '<string>',
                'bundleType' => 'tar|tgz|zip|YAML|JSON',
                'eTag' => '<string>',
                'key' => '<string>',
                'version' => '<string>',
            ],
            'string' => [
                'content' => '<string>',
                'sha256' => '<string>',
            ],
        ],
        'rollbackInfo' => [
            'rollbackDeploymentId' => '<string>',
            'rollbackMessage' => '<string>',
            'rollbackTriggeringDeploymentId' => '<string>',
        ],
        'startTime' => <DateTime>,
        'status' => 'Created|Queued|InProgress|Baking|Succeeded|Failed|Stopped|Ready',
        'targetInstances' => [
            'autoScalingGroups' => ['<string>', ...],
            'ec2TagSet' => [
                'ec2TagSetList' => [
                    [
                        [
                            'Key' => '<string>',
                            'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                            'Value' => '<string>',
                        ],
                        // ...
                    ],
                    // ...
                ],
            ],
            'tagFilters' => [
                [
                    'Key' => '<string>',
                    'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                    'Value' => '<string>',
                ],
                // ...
            ],
        ],
        'updateOutdatedInstancesOnly' => true || false,
    ],
]

Result Details

Members
deploymentInfo
Type: DeploymentInfo structure

Information about the deployment.

Errors

DeploymentIdRequiredException:

At least one deployment ID must be specified.

InvalidDeploymentIdException:

At least one of the deployment IDs was specified in an invalid format.

DeploymentDoesNotExistException:

The deployment with the user or Amazon Web Services account does not exist.

GetDeploymentConfig

$result = $client->getDeploymentConfig([/* ... */]);
$promise = $client->getDeploymentConfigAsync([/* ... */]);

Gets information about a deployment configuration.

Parameter Syntax

$result = $client->getDeploymentConfig([
    'deploymentConfigName' => '<string>', // REQUIRED
]);

Parameter Details

Members
deploymentConfigName
Required: Yes
Type: string

The name of a deployment configuration associated with the user or Amazon Web Services account.

Result Syntax

[
    'deploymentConfigInfo' => [
        'computePlatform' => 'Server|Lambda|ECS',
        'createTime' => <DateTime>,
        'deploymentConfigId' => '<string>',
        'deploymentConfigName' => '<string>',
        'minimumHealthyHosts' => [
            'type' => 'HOST_COUNT|FLEET_PERCENT',
            'value' => <integer>,
        ],
        'trafficRoutingConfig' => [
            'timeBasedCanary' => [
                'canaryInterval' => <integer>,
                'canaryPercentage' => <integer>,
            ],
            'timeBasedLinear' => [
                'linearInterval' => <integer>,
                'linearPercentage' => <integer>,
            ],
            'type' => 'TimeBasedCanary|TimeBasedLinear|AllAtOnce',
        ],
        'zonalConfig' => [
            'firstZoneMonitorDurationInSeconds' => <integer>,
            'minimumHealthyHostsPerZone' => [
                'type' => 'HOST_COUNT|FLEET_PERCENT',
                'value' => <integer>,
            ],
            'monitorDurationInSeconds' => <integer>,
        ],
    ],
]

Result Details

Members
deploymentConfigInfo
Type: DeploymentConfigInfo structure

Information about the deployment configuration.

Errors

InvalidDeploymentConfigNameException:

The deployment configuration name was specified in an invalid format.

DeploymentConfigNameRequiredException:

The deployment configuration name was not specified.

DeploymentConfigDoesNotExistException:

The deployment configuration does not exist with the user or Amazon Web Services account.

InvalidComputePlatformException:

The computePlatform is invalid. The computePlatform should be Lambda, Server, or ECS.

GetDeploymentGroup

$result = $client->getDeploymentGroup([/* ... */]);
$promise = $client->getDeploymentGroupAsync([/* ... */]);

Gets information about a deployment group.

Parameter Syntax

$result = $client->getDeploymentGroup([
    'applicationName' => '<string>', // REQUIRED
    'deploymentGroupName' => '<string>', // REQUIRED
]);

Parameter Details

Members
applicationName
Required: Yes
Type: string

The name of an CodeDeploy application associated with the user or Amazon Web Services account.

deploymentGroupName
Required: Yes
Type: string

The name of a deployment group for the specified application.

Result Syntax

[
    'deploymentGroupInfo' => [
        'alarmConfiguration' => [
            'alarms' => [
                [
                    'name' => '<string>',
                ],
                // ...
            ],
            'enabled' => true || false,
            'ignorePollAlarmFailure' => true || false,
        ],
        'applicationName' => '<string>',
        'autoRollbackConfiguration' => [
            'enabled' => true || false,
            'events' => ['<string>', ...],
        ],
        'autoScalingGroups' => [
            [
                'hook' => '<string>',
                'name' => '<string>',
                'terminationHook' => '<string>',
            ],
            // ...
        ],
        'blueGreenDeploymentConfiguration' => [
            'deploymentReadyOption' => [
                'actionOnTimeout' => 'CONTINUE_DEPLOYMENT|STOP_DEPLOYMENT',
                'waitTimeInMinutes' => <integer>,
            ],
            'greenFleetProvisioningOption' => [
                'action' => 'DISCOVER_EXISTING|COPY_AUTO_SCALING_GROUP',
            ],
            'terminateBlueInstancesOnDeploymentSuccess' => [
                'action' => 'TERMINATE|KEEP_ALIVE',
                'terminationWaitTimeInMinutes' => <integer>,
            ],
        ],
        'computePlatform' => 'Server|Lambda|ECS',
        'deploymentConfigName' => '<string>',
        'deploymentGroupId' => '<string>',
        'deploymentGroupName' => '<string>',
        'deploymentStyle' => [
            'deploymentOption' => 'WITH_TRAFFIC_CONTROL|WITHOUT_TRAFFIC_CONTROL',
            'deploymentType' => 'IN_PLACE|BLUE_GREEN',
        ],
        'ec2TagFilters' => [
            [
                'Key' => '<string>',
                'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                'Value' => '<string>',
            ],
            // ...
        ],
        'ec2TagSet' => [
            'ec2TagSetList' => [
                [
                    [
                        'Key' => '<string>',
                        'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                        'Value' => '<string>',
                    ],
                    // ...
                ],
                // ...
            ],
        ],
        'ecsServices' => [
            [
                'clusterName' => '<string>',
                'serviceName' => '<string>',
            ],
            // ...
        ],
        'lastAttemptedDeployment' => [
            'createTime' => <DateTime>,
            'deploymentId' => '<string>',
            'endTime' => <DateTime>,
            'status' => 'Created|Queued|InProgress|Baking|Succeeded|Failed|Stopped|Ready',
        ],
        'lastSuccessfulDeployment' => [
            'createTime' => <DateTime>,
            'deploymentId' => '<string>',
            'endTime' => <DateTime>,
            'status' => 'Created|Queued|InProgress|Baking|Succeeded|Failed|Stopped|Ready',
        ],
        'loadBalancerInfo' => [
            'elbInfoList' => [
                [
                    'name' => '<string>',
                ],
                // ...
            ],
            'targetGroupInfoList' => [
                [
                    'name' => '<string>',
                ],
                // ...
            ],
            'targetGroupPairInfoList' => [
                [
                    'prodTrafficRoute' => [
                        'listenerArns' => ['<string>', ...],
                    ],
                    'targetGroups' => [
                        [
                            'name' => '<string>',
                        ],
                        // ...
                    ],
                    'testTrafficRoute' => [
                        'listenerArns' => ['<string>', ...],
                    ],
                ],
                // ...
            ],
        ],
        'onPremisesInstanceTagFilters' => [
            [
                'Key' => '<string>',
                'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                'Value' => '<string>',
            ],
            // ...
        ],
        'onPremisesTagSet' => [
            'onPremisesTagSetList' => [
                [
                    [
                        'Key' => '<string>',
                        'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                        'Value' => '<string>',
                    ],
                    // ...
                ],
                // ...
            ],
        ],
        'outdatedInstancesStrategy' => 'UPDATE|IGNORE',
        'serviceRoleArn' => '<string>',
        'targetRevision' => [
            'appSpecContent' => [
                'content' => '<string>',
                'sha256' => '<string>',
            ],
            'gitHubLocation' => [
                'commitId' => '<string>',
                'repository' => '<string>',
            ],
            'revisionType' => 'S3|GitHub|String|AppSpecContent',
            's3Location' => [
                'bucket' => '<string>',
                'bundleType' => 'tar|tgz|zip|YAML|JSON',
                'eTag' => '<string>',
                'key' => '<string>',
                'version' => '<string>',
            ],
            'string' => [
                'content' => '<string>',
                'sha256' => '<string>',
            ],
        ],
        'terminationHookEnabled' => true || false,
        'triggerConfigurations' => [
            [
                'triggerEvents' => ['<string>', ...],
                'triggerName' => '<string>',
                'triggerTargetArn' => '<string>',
            ],
            // ...
        ],
    ],
]

Result Details

Members
deploymentGroupInfo
Type: DeploymentGroupInfo structure

Information about the deployment group.

Errors

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

DeploymentGroupNameRequiredException:

The deployment group name was not specified.

InvalidDeploymentGroupNameException:

The deployment group name was specified in an invalid format.

DeploymentGroupDoesNotExistException:

The named deployment group with the user or Amazon Web Services account does not exist.

DeploymentConfigDoesNotExistException:

The deployment configuration does not exist with the user or Amazon Web Services account.

GetDeploymentInstance

$result = $client->getDeploymentInstance([/* ... */]);
$promise = $client->getDeploymentInstanceAsync([/* ... */]);

Gets information about an instance as part of a deployment.

Parameter Syntax

$result = $client->getDeploymentInstance([
    'deploymentId' => '<string>', // REQUIRED
    'instanceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
deploymentId
Required: Yes
Type: string

The unique ID of a deployment.

instanceId
Required: Yes
Type: string

The unique ID of an instance in the deployment group.

Result Syntax

[
    'instanceSummary' => [
        'deploymentId' => '<string>',
        'instanceId' => '<string>',
        'instanceType' => 'Blue|Green',
        'lastUpdatedAt' => <DateTime>,
        'lifecycleEvents' => [
            [
                'diagnostics' => [
                    'errorCode' => 'Success|ScriptMissing|ScriptNotExecutable|ScriptTimedOut|ScriptFailed|UnknownError',
                    'logTail' => '<string>',
                    'message' => '<string>',
                    'scriptName' => '<string>',
                ],
                'endTime' => <DateTime>,
                'lifecycleEventName' => '<string>',
                'startTime' => <DateTime>,
                'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown',
            ],
            // ...
        ],
        'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown|Ready',
    ],
]

Result Details

Members
instanceSummary
Type: InstanceSummary structure

Information about the instance.

Errors

DeploymentIdRequiredException:

At least one deployment ID must be specified.

DeploymentDoesNotExistException:

The deployment with the user or Amazon Web Services account does not exist.

InstanceIdRequiredException:

The instance ID was not specified.

InvalidDeploymentIdException:

At least one of the deployment IDs was specified in an invalid format.

InstanceDoesNotExistException:

The specified instance does not exist in the deployment group.

InvalidInstanceNameException:

The on-premises instance name was specified in an invalid format.

InvalidComputePlatformException:

The computePlatform is invalid. The computePlatform should be Lambda, Server, or ECS.

GetDeploymentTarget

$result = $client->getDeploymentTarget([/* ... */]);
$promise = $client->getDeploymentTargetAsync([/* ... */]);

Returns information about a deployment target.

Parameter Syntax

$result = $client->getDeploymentTarget([
    'deploymentId' => '<string>', // REQUIRED
    'targetId' => '<string>', // REQUIRED
]);

Parameter Details

Members
deploymentId
Required: Yes
Type: string

The unique ID of a deployment.

targetId
Required: Yes
Type: string

The unique ID of a deployment target.

Result Syntax

[
    'deploymentTarget' => [
        'cloudFormationTarget' => [
            'deploymentId' => '<string>',
            'lastUpdatedAt' => <DateTime>,
            'lifecycleEvents' => [
                [
                    'diagnostics' => [
                        'errorCode' => 'Success|ScriptMissing|ScriptNotExecutable|ScriptTimedOut|ScriptFailed|UnknownError',
                        'logTail' => '<string>',
                        'message' => '<string>',
                        'scriptName' => '<string>',
                    ],
                    'endTime' => <DateTime>,
                    'lifecycleEventName' => '<string>',
                    'startTime' => <DateTime>,
                    'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown',
                ],
                // ...
            ],
            'resourceType' => '<string>',
            'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown|Ready',
            'targetId' => '<string>',
            'targetVersionWeight' => <float>,
        ],
        'deploymentTargetType' => 'InstanceTarget|LambdaTarget|ECSTarget|CloudFormationTarget',
        'ecsTarget' => [
            'deploymentId' => '<string>',
            'lastUpdatedAt' => <DateTime>,
            'lifecycleEvents' => [
                [
                    'diagnostics' => [
                        'errorCode' => 'Success|ScriptMissing|ScriptNotExecutable|ScriptTimedOut|ScriptFailed|UnknownError',
                        'logTail' => '<string>',
                        'message' => '<string>',
                        'scriptName' => '<string>',
                    ],
                    'endTime' => <DateTime>,
                    'lifecycleEventName' => '<string>',
                    'startTime' => <DateTime>,
                    'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown',
                ],
                // ...
            ],
            'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown|Ready',
            'targetArn' => '<string>',
            'targetId' => '<string>',
            'taskSetsInfo' => [
                [
                    'desiredCount' => <integer>,
                    'identifer' => '<string>',
                    'pendingCount' => <integer>,
                    'runningCount' => <integer>,
                    'status' => '<string>',
                    'targetGroup' => [
                        'name' => '<string>',
                    ],
                    'taskSetLabel' => 'Blue|Green',
                    'trafficWeight' => <float>,
                ],
                // ...
            ],
        ],
        'instanceTarget' => [
            'deploymentId' => '<string>',
            'instanceLabel' => 'Blue|Green',
            'lastUpdatedAt' => <DateTime>,
            'lifecycleEvents' => [
                [
                    'diagnostics' => [
                        'errorCode' => 'Success|ScriptMissing|ScriptNotExecutable|ScriptTimedOut|ScriptFailed|UnknownError',
                        'logTail' => '<string>',
                        'message' => '<string>',
                        'scriptName' => '<string>',
                    ],
                    'endTime' => <DateTime>,
                    'lifecycleEventName' => '<string>',
                    'startTime' => <DateTime>,
                    'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown',
                ],
                // ...
            ],
            'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown|Ready',
            'targetArn' => '<string>',
            'targetId' => '<string>',
        ],
        'lambdaTarget' => [
            'deploymentId' => '<string>',
            'lambdaFunctionInfo' => [
                'currentVersion' => '<string>',
                'functionAlias' => '<string>',
                'functionName' => '<string>',
                'targetVersion' => '<string>',
                'targetVersionWeight' => <float>,
            ],
            'lastUpdatedAt' => <DateTime>,
            'lifecycleEvents' => [
                [
                    'diagnostics' => [
                        'errorCode' => 'Success|ScriptMissing|ScriptNotExecutable|ScriptTimedOut|ScriptFailed|UnknownError',
                        'logTail' => '<string>',
                        'message' => '<string>',
                        'scriptName' => '<string>',
                    ],
                    'endTime' => <DateTime>,
                    'lifecycleEventName' => '<string>',
                    'startTime' => <DateTime>,
                    'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown',
                ],
                // ...
            ],
            'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown|Ready',
            'targetArn' => '<string>',
            'targetId' => '<string>',
        ],
    ],
]

Result Details

Members
deploymentTarget
Type: DeploymentTarget structure

A deployment target that contains information about a deployment such as its status, lifecycle 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).

Errors

InvalidDeploymentIdException:

At least one of the deployment IDs was specified in an invalid format.

DeploymentIdRequiredException:

At least one deployment ID must be specified.

DeploymentDoesNotExistException:

The deployment with the user or Amazon Web Services account does not exist.

DeploymentNotStartedException:

The specified deployment has not started.

DeploymentTargetIdRequiredException:

A deployment target ID was not provided.

InvalidDeploymentTargetIdException:

The target ID provided was not valid.

DeploymentTargetDoesNotExistException:

The provided target ID does not belong to the attempted deployment.

InvalidInstanceNameException:

The on-premises instance name was specified in an invalid format.

GetOnPremisesInstance

$result = $client->getOnPremisesInstance([/* ... */]);
$promise = $client->getOnPremisesInstanceAsync([/* ... */]);

Gets information about an on-premises instance.

Parameter Syntax

$result = $client->getOnPremisesInstance([
    'instanceName' => '<string>', // REQUIRED
]);

Parameter Details

Members
instanceName
Required: Yes
Type: string

The name of the on-premises instance about which to get information.

Result Syntax

[
    'instanceInfo' => [
        'deregisterTime' => <DateTime>,
        'iamSessionArn' => '<string>',
        'iamUserArn' => '<string>',
        'instanceArn' => '<string>',
        'instanceName' => '<string>',
        'registerTime' => <DateTime>,
        'tags' => [
            [
                'Key' => '<string>',
                'Value' => '<string>',
            ],
            // ...
        ],
    ],
]

Result Details

Members
instanceInfo
Type: InstanceInfo structure

Information about the on-premises instance.

Errors

InstanceNameRequiredException:

An on-premises instance name was not specified.

InstanceNotRegisteredException:

The specified on-premises instance is not registered.

InvalidInstanceNameException:

The on-premises instance name was specified in an invalid format.

ListApplicationRevisions

$result = $client->listApplicationRevisions([/* ... */]);
$promise = $client->listApplicationRevisionsAsync([/* ... */]);

Lists information about revisions for an application.

Parameter Syntax

$result = $client->listApplicationRevisions([
    'applicationName' => '<string>', // REQUIRED
    'deployed' => 'include|exclude|ignore',
    'nextToken' => '<string>',
    's3Bucket' => '<string>',
    's3KeyPrefix' => '<string>',
    'sortBy' => 'registerTime|firstUsedTime|lastUsedTime',
    'sortOrder' => 'ascending|descending',
]);

Parameter Details

Members
applicationName
Required: Yes
Type: string

The name of an CodeDeploy application associated with the user or Amazon Web Services account.

deployed
Type: string

Whether to list revisions based on whether the revision is the target revision of a 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.

nextToken
Type: string

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

s3Bucket
Type: 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
Type: string

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

sortBy
Type: string

The column name to use to sort the list results:

  • registerTime: Sort by the time the revisions were registered with 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.

sortOrder
Type: 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.

Result Syntax

[
    'nextToken' => '<string>',
    'revisions' => [
        [
            'appSpecContent' => [
                'content' => '<string>',
                'sha256' => '<string>',
            ],
            'gitHubLocation' => [
                'commitId' => '<string>',
                'repository' => '<string>',
            ],
            'revisionType' => 'S3|GitHub|String|AppSpecContent',
            's3Location' => [
                'bucket' => '<string>',
                'bundleType' => 'tar|tgz|zip|YAML|JSON',
                'eTag' => '<string>',
                'key' => '<string>',
                'version' => '<string>',
            ],
            'string' => [
                'content' => '<string>',
                'sha256' => '<string>',
            ],
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: 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.

revisions
Type: Array of RevisionLocation structures

A list of locations that contain the matching revisions.

Errors

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

InvalidSortByException:

The column name to sort by is either not present or was specified in an invalid format.

InvalidSortOrderException:

The sort order was specified in an invalid format.

InvalidBucketNameFilterException:

The bucket name either doesn't exist or was specified in an invalid format.

InvalidKeyPrefixFilterException:

The specified key prefix filter was specified in an invalid format.

BucketNameFilterRequiredException:

A bucket name is required, but was not provided.

InvalidDeployedStateFilterException:

The deployed state filter was specified in an invalid format.

InvalidNextTokenException:

The next token was specified in an invalid format.

ListApplications

$result = $client->listApplications([/* ... */]);
$promise = $client->listApplicationsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->listApplications([
    'nextToken' => '<string>',
]);

Parameter Details

Members
nextToken
Type: string

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

Result Syntax

[
    'applications' => ['<string>', ...],
    'nextToken' => '<string>',
]

Result Details

Members
applications
Type: Array of strings

A list of application names.

nextToken
Type: 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.

Errors

InvalidNextTokenException:

The next token was specified in an invalid format.

ListDeploymentConfigs

$result = $client->listDeploymentConfigs([/* ... */]);
$promise = $client->listDeploymentConfigsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->listDeploymentConfigs([
    'nextToken' => '<string>',
]);

Parameter Details

Members
nextToken
Type: string

An identifier returned from the previous ListDeploymentConfigs call. It can be used to return the next set of deployment configurations in the list.

Result Syntax

[
    'deploymentConfigsList' => ['<string>', ...],
    'nextToken' => '<string>',
]

Result Details

Members
deploymentConfigsList
Type: Array of strings

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

nextToken
Type: 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.

Errors

InvalidNextTokenException:

The next token was specified in an invalid format.

ListDeploymentGroups

$result = $client->listDeploymentGroups([/* ... */]);
$promise = $client->listDeploymentGroupsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->listDeploymentGroups([
    'applicationName' => '<string>', // REQUIRED
    'nextToken' => '<string>',
]);

Parameter Details

Members
applicationName
Required: Yes
Type: string

The name of an CodeDeploy application associated with the user or Amazon Web Services account.

nextToken
Type: 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.

Result Syntax

[
    'applicationName' => '<string>',
    'deploymentGroups' => ['<string>', ...],
    'nextToken' => '<string>',
]

Result Details

Members
applicationName
Type: string

The application name.

deploymentGroups
Type: Array of strings

A list of deployment group names.

nextToken
Type: 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.

Errors

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

InvalidNextTokenException:

The next token was specified in an invalid format.

ListDeploymentInstances

$result = $client->listDeploymentInstances([/* ... */]);
$promise = $client->listDeploymentInstancesAsync([/* ... */]);

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

Lists the instance for a deployment associated with the user or Amazon Web Services account.

Parameter Syntax

$result = $client->listDeploymentInstances([
    'deploymentId' => '<string>', // REQUIRED
    'instanceStatusFilter' => ['<string>', ...],
    'instanceTypeFilter' => ['<string>', ...],
    'nextToken' => '<string>',
]);

Parameter Details

Members
deploymentId
Required: Yes
Type: string

The unique ID of a deployment.

instanceStatusFilter
Type: Array of strings

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
Type: Array of strings

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.

nextToken
Type: 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.

Result Syntax

[
    'instancesList' => ['<string>', ...],
    'nextToken' => '<string>',
]

Result Details

Members
instancesList
Type: Array of strings

A list of instance IDs.

nextToken
Type: 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.

Errors

DeploymentIdRequiredException:

At least one deployment ID must be specified.

DeploymentDoesNotExistException:

The deployment with the user or Amazon Web Services account does not exist.

DeploymentNotStartedException:

The specified deployment has not started.

InvalidNextTokenException:

The next token was specified in an invalid format.

InvalidDeploymentIdException:

At least one of the deployment IDs was specified in an invalid format.

InvalidInstanceStatusException:

The specified instance status does not exist.

InvalidInstanceTypeException:

An invalid instance type was specified for instances in a blue/green deployment. Valid values include "Blue" for an original environment and "Green" for a replacement environment.

InvalidDeploymentInstanceTypeException:

An instance type was specified for an in-place deployment. Instance types are supported for blue/green deployments only.

InvalidTargetFilterNameException:

The target filter name is invalid.

InvalidComputePlatformException:

The computePlatform is invalid. The computePlatform should be Lambda, Server, or ECS.

ListDeploymentTargets

$result = $client->listDeploymentTargets([/* ... */]);
$promise = $client->listDeploymentTargetsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->listDeploymentTargets([
    'deploymentId' => '<string>', // REQUIRED
    'nextToken' => '<string>',
    'targetFilters' => [
        '<TargetFilterName>' => ['<string>', ...],
        // ...
    ],
]);

Parameter Details

Members
deploymentId
Required: Yes
Type: string

The unique ID of a deployment.

nextToken
Type: 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
Type: Associative array of custom strings keys (TargetFilterName) to stringss

A key used to filter the returned targets. The two valid values are:

  • TargetStatus - A TargetStatus filter string can be Failed, InProgress, Pending, Ready, Skipped, Succeeded, or Unknown.

  • ServerInstanceLabel - A ServerInstanceLabel filter string can be Blue or Green.

Result Syntax

[
    'nextToken' => '<string>',
    'targetIds' => ['<string>', ...],
]

Result Details

Members
nextToken
Type: 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.

targetIds
Type: Array of strings

The unique IDs of deployment targets.

Errors

DeploymentIdRequiredException:

At least one deployment ID must be specified.

DeploymentDoesNotExistException:

The deployment with the user or Amazon Web Services account does not exist.

DeploymentNotStartedException:

The specified deployment has not started.

InvalidNextTokenException:

The next token was specified in an invalid format.

InvalidDeploymentIdException:

At least one of the deployment IDs was specified in an invalid format.

InvalidInstanceStatusException:

The specified instance status does not exist.

InvalidInstanceTypeException:

An invalid instance type was specified for instances in a blue/green deployment. Valid values include "Blue" for an original environment and "Green" for a replacement environment.

InvalidDeploymentInstanceTypeException:

An instance type was specified for an in-place deployment. Instance types are supported for blue/green deployments only.

InvalidTargetFilterNameException:

The target filter name is invalid.

ListDeployments

$result = $client->listDeployments([/* ... */]);
$promise = $client->listDeploymentsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->listDeployments([
    'applicationName' => '<string>',
    'createTimeRange' => [
        'end' => <integer || string || DateTime>,
        'start' => <integer || string || DateTime>,
    ],
    'deploymentGroupName' => '<string>',
    'externalId' => '<string>',
    'includeOnlyStatuses' => ['<string>', ...],
    'nextToken' => '<string>',
]);

Parameter Details

Members
applicationName
Type: string

The name of an CodeDeploy application associated with the user or Amazon Web Services account.

If applicationName is specified, then deploymentGroupName must be specified. If it is not specified, then deploymentGroupName must not be specified.

createTimeRange
Type: TimeRange structure

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

deploymentGroupName
Type: string

The name of a deployment group for the specified application.

If deploymentGroupName is specified, then applicationName must be specified. If it is not specified, then applicationName must not be specified.

externalId
Type: string

The unique ID of an external resource for returning deployments linked to the external resource.

includeOnlyStatuses
Type: Array of strings

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.

nextToken
Type: string

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

Result Syntax

[
    'deployments' => ['<string>', ...],
    'nextToken' => '<string>',
]

Result Details

Members
deployments
Type: Array of strings

A list of deployment IDs.

nextToken
Type: 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.

Errors

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

InvalidDeploymentGroupNameException:

The deployment group name was specified in an invalid format.

DeploymentGroupDoesNotExistException:

The named deployment group with the user or Amazon Web Services account does not exist.

DeploymentGroupNameRequiredException:

The deployment group name was not specified.

InvalidTimeRangeException:

The specified time range was specified in an invalid format.

InvalidDeploymentStatusException:

The specified deployment status doesn't exist or cannot be determined.

InvalidNextTokenException:

The next token was specified in an invalid format.

InvalidExternalIdException:

The external ID was specified in an invalid format.

InvalidInputException:

The input was specified in an invalid format.

ListGitHubAccountTokenNames

$result = $client->listGitHubAccountTokenNames([/* ... */]);
$promise = $client->listGitHubAccountTokenNamesAsync([/* ... */]);

Lists the names of stored connections to GitHub accounts.

Parameter Syntax

$result = $client->listGitHubAccountTokenNames([
    'nextToken' => '<string>',
]);

Parameter Details

Members
nextToken
Type: string

An identifier returned from the previous ListGitHubAccountTokenNames call. It can be used to return the next set of names in the list.

Result Syntax

[
    'nextToken' => '<string>',
    'tokenNameList' => ['<string>', ...],
]

Result Details

Members
nextToken
Type: 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.

tokenNameList
Type: Array of strings

A list of names of connections to GitHub accounts.

Errors

InvalidNextTokenException:

The next token was specified in an invalid format.

ResourceValidationException:

The specified resource could not be validated.

OperationNotSupportedException:

The API used does not support the deployment.

ListOnPremisesInstances

$result = $client->listOnPremisesInstances([/* ... */]);
$promise = $client->listOnPremisesInstancesAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listOnPremisesInstances([
    'nextToken' => '<string>',
    'registrationStatus' => 'Registered|Deregistered',
    'tagFilters' => [
        [
            'Key' => '<string>',
            'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
nextToken
Type: 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.

registrationStatus
Type: 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.

tagFilters
Type: Array of TagFilter structures

The on-premises instance tags that are used to restrict the on-premises instance names returned.

Result Syntax

[
    'instanceNames' => ['<string>', ...],
    'nextToken' => '<string>',
]

Result Details

Members
instanceNames
Type: Array of strings

The list of matching on-premises instance names.

nextToken
Type: 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.

Errors

InvalidRegistrationStatusException:

The registration status was specified in an invalid format.

InvalidTagFilterException:

The tag filter was specified in an invalid format.

InvalidNextTokenException:

The next token was specified in an invalid format.

ListTagsForResource

$result = $client->listTagsForResource([/* ... */]);
$promise = $client->listTagsForResourceAsync([/* ... */]);

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

Parameter Syntax

$result = $client->listTagsForResource([
    'NextToken' => '<string>',
    'ResourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
NextToken
Type: string

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

ResourceArn
Required: Yes
Type: string

The ARN of a CodeDeploy resource. ListTagsForResource returns all the tags associated with the resource that is identified by the ResourceArn.

Result Syntax

[
    'NextToken' => '<string>',
    'Tags' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
Type: 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.

Tags
Type: Array of Tag structures

A list of tags returned by ListTagsForResource. The tags are associated with the resource identified by the input ResourceArn parameter.

Errors

ArnNotSupportedException:

The specified ARN is not supported. For example, it might be an ARN for a resource that is not expected.

InvalidArnException:

The specified ARN is not in a valid format.

ResourceArnRequiredException:

The ARN of a resource is required, but was not found.

PutLifecycleEventHookExecutionStatus

$result = $client->putLifecycleEventHookExecutionStatus([/* ... */]);
$promise = $client->putLifecycleEventHookExecutionStatusAsync([/* ... */]);

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

Parameter Syntax

$result = $client->putLifecycleEventHookExecutionStatus([
    'deploymentId' => '<string>',
    'lifecycleEventHookExecutionId' => '<string>',
    'status' => 'Pending|InProgress|Succeeded|Failed|Skipped|Unknown',
]);

Parameter Details

Members
deploymentId
Type: string

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

lifecycleEventHookExecutionId
Type: 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
Type: string

The result of a Lambda function that validates a deployment lifecycle event. The values listed in Valid Values are valid for lifecycle statuses in general; however, only Succeeded and Failed can be passed successfully in your API call.

Result Syntax

[
    'lifecycleEventHookExecutionId' => '<string>',
]

Result Details

Members
lifecycleEventHookExecutionId
Type: string

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

Errors

InvalidLifecycleEventHookExecutionStatusException:

The result of a Lambda validation function that verifies a lifecycle event is invalid. It should return Succeeded or Failed.

InvalidLifecycleEventHookExecutionIdException:

A lifecycle event hook is invalid. Review the hooks section in your AppSpec file to ensure the lifecycle events and hooks functions are valid.

LifecycleEventAlreadyCompletedException:

An attempt to return the status of an already completed lifecycle event occurred.

DeploymentIdRequiredException:

At least one deployment ID must be specified.

DeploymentDoesNotExistException:

The deployment with the user or Amazon Web Services account does not exist.

InvalidDeploymentIdException:

At least one of the deployment IDs was specified in an invalid format.

UnsupportedActionForDeploymentTypeException:

A call was submitted that is not supported for the specified deployment type.

RegisterApplicationRevision

$result = $client->registerApplicationRevision([/* ... */]);
$promise = $client->registerApplicationRevisionAsync([/* ... */]);

Registers with CodeDeploy a revision for the specified application.

Parameter Syntax

$result = $client->registerApplicationRevision([
    'applicationName' => '<string>', // REQUIRED
    'description' => '<string>',
    'revision' => [ // REQUIRED
        'appSpecContent' => [
            'content' => '<string>',
            'sha256' => '<string>',
        ],
        'gitHubLocation' => [
            'commitId' => '<string>',
            'repository' => '<string>',
        ],
        'revisionType' => 'S3|GitHub|String|AppSpecContent',
        's3Location' => [
            'bucket' => '<string>',
            'bundleType' => 'tar|tgz|zip|YAML|JSON',
            'eTag' => '<string>',
            'key' => '<string>',
            'version' => '<string>',
        ],
        'string' => [
            'content' => '<string>',
            'sha256' => '<string>',
        ],
    ],
]);

Parameter Details

Members
applicationName
Required: Yes
Type: string

The name of an CodeDeploy application associated with the user or Amazon Web Services account.

description
Type: string

A comment about the revision.

revision
Required: Yes
Type: RevisionLocation structure

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

DescriptionTooLongException:

The description is too long.

RevisionRequiredException:

The revision ID was not specified.

InvalidRevisionException:

The revision was specified in an invalid format.

RegisterOnPremisesInstance

$result = $client->registerOnPremisesInstance([/* ... */]);
$promise = $client->registerOnPremisesInstanceAsync([/* ... */]);

Registers an on-premises instance.

Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the request. You cannot use both.

Parameter Syntax

$result = $client->registerOnPremisesInstance([
    'iamSessionArn' => '<string>',
    'iamUserArn' => '<string>',
    'instanceName' => '<string>', // REQUIRED
]);

Parameter Details

Members
iamSessionArn
Type: string

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

iamUserArn
Type: string

The ARN of the user to associate with the on-premises instance.

instanceName
Required: Yes
Type: string

The name of the on-premises instance to register.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InstanceNameAlreadyRegisteredException:

The specified on-premises instance name is already registered.

IamArnRequiredException:

No IAM ARN was included in the request. You must use an IAM session ARN or user ARN in the request.

IamSessionArnAlreadyRegisteredException:

The request included an IAM session ARN that has already been used to register a different instance.

IamUserArnAlreadyRegisteredException:

The specified user ARN is already registered with an on-premises instance.

InstanceNameRequiredException:

An on-premises instance name was not specified.

IamUserArnRequiredException:

An user ARN was not specified.

InvalidInstanceNameException:

The on-premises instance name was specified in an invalid format.

InvalidIamSessionArnException:

The IAM session ARN was specified in an invalid format.

InvalidIamUserArnException:

The user ARN was specified in an invalid format.

MultipleIamArnsProvidedException:

Both an user ARN and an IAM session ARN were included in the request. Use only one ARN type.

RemoveTagsFromOnPremisesInstances

$result = $client->removeTagsFromOnPremisesInstances([/* ... */]);
$promise = $client->removeTagsFromOnPremisesInstancesAsync([/* ... */]);

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

Parameter Syntax

$result = $client->removeTagsFromOnPremisesInstances([
    'instanceNames' => ['<string>', ...], // REQUIRED
    'tags' => [ // REQUIRED
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
instanceNames
Required: Yes
Type: Array of strings

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

tags
Required: Yes
Type: Array of Tag structures

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InstanceNameRequiredException:

An on-premises instance name was not specified.

InvalidInstanceNameException:

The on-premises instance name was specified in an invalid format.

TagRequiredException:

A tag was not specified.

InvalidTagException:

The tag was specified in an invalid format.

TagLimitExceededException:

The maximum allowed number of tags was exceeded.

InstanceLimitExceededException:

The maximum number of allowed on-premises instances in a single call was exceeded.

InstanceNotRegisteredException:

The specified on-premises instance is not registered.

SkipWaitTimeForInstanceTermination

$result = $client->skipWaitTimeForInstanceTermination([/* ... */]);
$promise = $client->skipWaitTimeForInstanceTerminationAsync([/* ... */]);

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

Parameter Syntax

$result = $client->skipWaitTimeForInstanceTermination([
    'deploymentId' => '<string>',
]);

Parameter Details

Members
deploymentId
Type: string

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

DeploymentIdRequiredException:

At least one deployment ID must be specified.

DeploymentDoesNotExistException:

The deployment with the user or Amazon Web Services account does not exist.

DeploymentAlreadyCompletedException:

The deployment is already complete.

InvalidDeploymentIdException:

At least one of the deployment IDs was specified in an invalid format.

DeploymentNotStartedException:

The specified deployment has not started.

UnsupportedActionForDeploymentTypeException:

A call was submitted that is not supported for the specified deployment type.

StopDeployment

$result = $client->stopDeployment([/* ... */]);
$promise = $client->stopDeploymentAsync([/* ... */]);

Attempts to stop an ongoing deployment.

Parameter Syntax

$result = $client->stopDeployment([
    'autoRollbackEnabled' => true || false,
    'deploymentId' => '<string>', // REQUIRED
]);

Parameter Details

Members
autoRollbackEnabled
Type: 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.

deploymentId
Required: Yes
Type: string

The unique ID of a deployment.

Result Syntax

[
    'status' => 'Pending|Succeeded',
    'statusMessage' => '<string>',
]

Result Details

Members
status
Type: string

The status of the stop deployment operation:

  • Pending: The stop operation is pending.

  • Succeeded: The stop operation was successful.

statusMessage
Type: string

An accompanying status message.

Errors

DeploymentIdRequiredException:

At least one deployment ID must be specified.

DeploymentDoesNotExistException:

The deployment with the user or Amazon Web Services account does not exist.

DeploymentGroupDoesNotExistException:

The named deployment group with the user or Amazon Web Services account does not exist.

DeploymentAlreadyCompletedException:

The deployment is already complete.

InvalidDeploymentIdException:

At least one of the deployment IDs was specified in an invalid format.

UnsupportedActionForDeploymentTypeException:

A call was submitted that is not supported for the specified deployment type.

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

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

Parameter Syntax

$result = $client->tagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'Tags' => [ // REQUIRED
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The ARN of a resource, such as a CodeDeploy application or deployment group.

Tags
Required: Yes
Type: Array of Tag structures

A list of tags that TagResource associates with a resource. The resource is identified by the ResourceArn input parameter.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceArnRequiredException:

The ARN of a resource is required, but was not found.

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

DeploymentGroupDoesNotExistException:

The named deployment group with the user or Amazon Web Services account does not exist.

DeploymentConfigDoesNotExistException:

The deployment configuration does not exist with the user or Amazon Web Services account.

TagRequiredException:

A tag was not specified.

InvalidTagsToAddException:

The specified tags are not valid.

ArnNotSupportedException:

The specified ARN is not supported. For example, it might be an ARN for a resource that is not expected.

InvalidArnException:

The specified ARN is not in a valid format.

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

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

Parameter Syntax

$result = $client->untagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'TagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) that specifies from which resource to disassociate the tags with the keys in the TagKeys input parameter.

TagKeys
Required: Yes
Type: Array of strings

A list of keys of Tag objects. The Tag objects identified by the keys are disassociated from the resource specified by the ResourceArn input parameter.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceArnRequiredException:

The ARN of a resource is required, but was not found.

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

DeploymentGroupDoesNotExistException:

The named deployment group with the user or Amazon Web Services account does not exist.

DeploymentConfigDoesNotExistException:

The deployment configuration does not exist with the user or Amazon Web Services account.

TagRequiredException:

A tag was not specified.

InvalidTagsToAddException:

The specified tags are not valid.

ArnNotSupportedException:

The specified ARN is not supported. For example, it might be an ARN for a resource that is not expected.

InvalidArnException:

The specified ARN is not in a valid format.

UpdateApplication

$result = $client->updateApplication([/* ... */]);
$promise = $client->updateApplicationAsync([/* ... */]);

Changes the name of an application.

Parameter Syntax

$result = $client->updateApplication([
    'applicationName' => '<string>',
    'newApplicationName' => '<string>',
]);

Parameter Details

Members
applicationName
Type: string

The current name of the application you want to change.

newApplicationName
Type: string

The new name to give the application.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

ApplicationAlreadyExistsException:

An application with the specified name with the user or Amazon Web Services account already exists.

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

UpdateDeploymentGroup

$result = $client->updateDeploymentGroup([/* ... */]);
$promise = $client->updateDeploymentGroupAsync([/* ... */]);

Changes information about a deployment group.

Parameter Syntax

$result = $client->updateDeploymentGroup([
    'alarmConfiguration' => [
        'alarms' => [
            [
                'name' => '<string>',
            ],
            // ...
        ],
        'enabled' => true || false,
        'ignorePollAlarmFailure' => true || false,
    ],
    'applicationName' => '<string>', // REQUIRED
    'autoRollbackConfiguration' => [
        'enabled' => true || false,
        'events' => ['<string>', ...],
    ],
    'autoScalingGroups' => ['<string>', ...],
    'blueGreenDeploymentConfiguration' => [
        'deploymentReadyOption' => [
            'actionOnTimeout' => 'CONTINUE_DEPLOYMENT|STOP_DEPLOYMENT',
            'waitTimeInMinutes' => <integer>,
        ],
        'greenFleetProvisioningOption' => [
            'action' => 'DISCOVER_EXISTING|COPY_AUTO_SCALING_GROUP',
        ],
        'terminateBlueInstancesOnDeploymentSuccess' => [
            'action' => 'TERMINATE|KEEP_ALIVE',
            'terminationWaitTimeInMinutes' => <integer>,
        ],
    ],
    'currentDeploymentGroupName' => '<string>', // REQUIRED
    'deploymentConfigName' => '<string>',
    'deploymentStyle' => [
        'deploymentOption' => 'WITH_TRAFFIC_CONTROL|WITHOUT_TRAFFIC_CONTROL',
        'deploymentType' => 'IN_PLACE|BLUE_GREEN',
    ],
    'ec2TagFilters' => [
        [
            'Key' => '<string>',
            'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
            'Value' => '<string>',
        ],
        // ...
    ],
    'ec2TagSet' => [
        'ec2TagSetList' => [
            [
                [
                    'Key' => '<string>',
                    'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                    'Value' => '<string>',
                ],
                // ...
            ],
            // ...
        ],
    ],
    'ecsServices' => [
        [
            'clusterName' => '<string>',
            'serviceName' => '<string>',
        ],
        // ...
    ],
    'loadBalancerInfo' => [
        'elbInfoList' => [
            [
                'name' => '<string>',
            ],
            // ...
        ],
        'targetGroupInfoList' => [
            [
                'name' => '<string>',
            ],
            // ...
        ],
        'targetGroupPairInfoList' => [
            [
                'prodTrafficRoute' => [
                    'listenerArns' => ['<string>', ...],
                ],
                'targetGroups' => [
                    [
                        'name' => '<string>',
                    ],
                    // ...
                ],
                'testTrafficRoute' => [
                    'listenerArns' => ['<string>', ...],
                ],
            ],
            // ...
        ],
    ],
    'newDeploymentGroupName' => '<string>',
    'onPremisesInstanceTagFilters' => [
        [
            'Key' => '<string>',
            'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
            'Value' => '<string>',
        ],
        // ...
    ],
    'onPremisesTagSet' => [
        'onPremisesTagSetList' => [
            [
                [
                    'Key' => '<string>',
                    'Type' => 'KEY_ONLY|VALUE_ONLY|KEY_AND_VALUE',
                    'Value' => '<string>',
                ],
                // ...
            ],
            // ...
        ],
    ],
    'outdatedInstancesStrategy' => 'UPDATE|IGNORE',
    'serviceRoleArn' => '<string>',
    'terminationHookEnabled' => true || false,
    'triggerConfigurations' => [
        [
            'triggerEvents' => ['<string>', ...],
            'triggerName' => '<string>',
            'triggerTargetArn' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
alarmConfiguration
Type: AlarmConfiguration structure

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

applicationName
Required: Yes
Type: string

The application name that corresponds to the deployment group to update.

autoRollbackConfiguration
Type: AutoRollbackConfiguration structure

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

autoScalingGroups
Type: Array of strings

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

blueGreenDeploymentConfiguration

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

currentDeploymentGroupName
Required: Yes
Type: string

The current name of the deployment group.

deploymentConfigName
Type: string

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

deploymentStyle
Type: DeploymentStyle structure

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.

ec2TagFilters
Type: Array of EC2TagFilter structures

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.

ec2TagSet
Type: EC2TagSet structure

Information about groups of tags applied to on-premises instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups.

ecsServices
Type: Array of ECSService structures

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

loadBalancerInfo
Type: LoadBalancerInfo structure

Information about the load balancer used in a deployment.

newDeploymentGroupName
Type: string

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

onPremisesInstanceTagFilters
Type: Array of TagFilter structures

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.

onPremisesTagSet
Type: OnPremisesTagSet structure

Information about an on-premises instance tag set. The deployment group includes only on-premises instances identified by all the tag groups.

outdatedInstancesStrategy
Type: string

Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.

If this option is set to UPDATE or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.

If this option is set to IGNORE, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.

serviceRoleArn
Type: string

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

terminationHookEnabled
Type: boolean

This parameter only applies if you are using CodeDeploy with Amazon EC2 Auto Scaling. For more information, see Integrating CodeDeploy with Amazon EC2 Auto Scaling in the CodeDeploy User Guide.

Set terminationHookEnabled to true to have CodeDeploy install a termination hook into your Auto Scaling group when you update a deployment group. When this hook is installed, CodeDeploy will perform termination deployments.

For information about termination deployments, see Enabling termination deployments during Auto Scaling scale-in events in the CodeDeploy User Guide.

For more information about Auto Scaling scale-in events, see the Scale in topic in the Amazon EC2 Auto Scaling User Guide.

triggerConfigurations
Type: Array of TriggerConfig structures

Information about triggers to change when the deployment group is updated. For examples, see Edit a Trigger in a CodeDeploy Deployment Group in the CodeDeploy User Guide.

Result Syntax

[
    'hooksNotCleanedUp' => [
        [
            'hook' => '<string>',
            'name' => '<string>',
            'terminationHook' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
hooksNotCleanedUp
Type: Array of AutoScalingGroup structures

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

Errors

ApplicationNameRequiredException:

The minimum number of required application names was not specified.

InvalidApplicationNameException:

The application name was specified in an invalid format.

ApplicationDoesNotExistException:

The application does not exist with the user or Amazon Web Services account.

InvalidDeploymentGroupNameException:

The deployment group name was specified in an invalid format.

DeploymentGroupAlreadyExistsException:

A deployment group with the specified name with the user or Amazon Web Services account already exists.

DeploymentGroupNameRequiredException:

The deployment group name was not specified.

DeploymentGroupDoesNotExistException:

The named deployment group with the user or Amazon Web Services account does not exist.

InvalidEC2TagException:

The tag was specified in an invalid format.

InvalidTagException:

The tag was specified in an invalid format.

InvalidAutoScalingGroupException:

The Auto Scaling group was specified in an invalid format or does not exist.

InvalidDeploymentConfigNameException:

The deployment configuration name was specified in an invalid format.

DeploymentConfigDoesNotExistException:

The deployment configuration does not exist with the user or Amazon Web Services account.

InvalidRoleException:

The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.

LifecycleHookLimitExceededException:

The limit for lifecycle hooks was exceeded.

InvalidTriggerConfigException:

The trigger was specified in an invalid format.

TriggerTargetsLimitExceededException:

The maximum allowed number of triggers was exceeded.

InvalidAlarmConfigException:

The format of the alarm configuration is invalid. Possible causes include:

  • The alarm list is null.

  • The alarm object is null.

  • The alarm name is empty or null or exceeds the limit of 255 characters.

  • Two alarms with the same name have been specified.

  • The alarm configuration is enabled, but the alarm list is empty.

AlarmsLimitExceededException:

The maximum number of alarms for a deployment group (10) was exceeded.

InvalidAutoRollbackConfigException:

The automatic rollback configuration was specified in an invalid format. For example, automatic rollback is enabled, but an invalid triggering event type or no event types were listed.

InvalidLoadBalancerInfoException:

An invalid load balancer name, or no load balancer name, was specified.

InvalidDeploymentStyleException:

An invalid deployment style was specified. Valid deployment types include "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" and "WITHOUT_TRAFFIC_CONTROL."

InvalidBlueGreenDeploymentConfigurationException:

The configuration for the blue/green deployment group was provided in an invalid format. For information about deployment configuration format, see CreateDeploymentConfig.

InvalidEC2TagCombinationException:

A call was submitted that specified both Ec2TagFilters and Ec2TagSet, but only one of these data types can be used in a single call.

InvalidOnPremisesTagCombinationException:

A call was submitted that specified both OnPremisesTagFilters and OnPremisesTagSet, but only one of these data types can be used in a single call.

TagSetListLimitExceededException:

The number of tag groups included in the tag set list exceeded the maximum allowed limit of 3.

InvalidInputException:

The input was specified in an invalid format.

ThrottlingException:

An API function was called too frequently.

InvalidECSServiceException:

The Amazon ECS service identifier is not valid.

InvalidTargetGroupPairException:

A target group pair associated with this deployment is not valid.

ECSServiceMappingLimitExceededException:

The Amazon ECS service is associated with more than one deployment groups. An Amazon ECS service can be associated with only one deployment group.

InvalidTrafficRoutingConfigurationException:

The configuration that specifies how traffic is routed during a deployment is invalid.

Shapes

Alarm

Description

Information about an alarm.

Members
name
Type: string

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

AlarmConfiguration

Description

Information about alarms associated with a deployment or deployment group.

Members
alarms
Type: Array of Alarm structures

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

enabled
Type: boolean

Indicates whether the alarm configuration is enabled.

ignorePollAlarmFailure
Type: 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.

AlarmsLimitExceededException

Description

The maximum number of alarms for a deployment group (10) was exceeded.

Members

AppSpecContent

Description

A revision for an Lambda or Amazon ECS deployment that is a YAML-formatted or JSON-formatted string. For Lambda and Amazon ECS deployments, the revision is the same as the AppSpec file. This method replaces the deprecated RawString data type.

Members
content
Type: string

The YAML-formatted or JSON-formatted revision string.

For an 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
Type: string

The SHA256 hash value of the revision content.

ApplicationAlreadyExistsException

Description

An application with the specified name with the user or Amazon Web Services account already exists.

Members

ApplicationDoesNotExistException

Description

The application does not exist with the user or Amazon Web Services account.

Members

ApplicationInfo

Description

Information about an application.

Members
applicationId
Type: string

The application ID.

applicationName
Type: string

The application name.

computePlatform
Type: string

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

createTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the application was created.

gitHubAccountName
Type: string

The name for a connection to a GitHub account.

linkedToGitHub
Type: boolean

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

ApplicationLimitExceededException

Description

More applications were attempted to be created than are allowed.

Members

ApplicationNameRequiredException

Description

The minimum number of required application names was not specified.

Members

ArnNotSupportedException

Description

The specified ARN is not supported. For example, it might be an ARN for a resource that is not expected.

Members

AutoRollbackConfiguration

Description

Information about a configuration for automatically rolling back to a previous version of an application revision when a deployment is not completed successfully.

Members
enabled
Type: boolean

Indicates whether a defined automatic rollback configuration is currently enabled.

events
Type: Array of strings

The event type or types that trigger a rollback.

AutoScalingGroup

Description

Information about an Auto Scaling group.

Members
hook
Type: string

The name of the launch hook that CodeDeploy installed into the Auto Scaling group.

For more information about the launch hook, see How Amazon EC2 Auto Scaling works with CodeDeploy in the CodeDeploy User Guide.

name
Type: string

The Auto Scaling group name.

terminationHook
Type: string

The name of the termination hook that CodeDeploy installed into the Auto Scaling group.

For more information about the termination hook, see Enabling termination deployments during Auto Scaling scale-in events in the CodeDeploy User Guide.

BatchLimitExceededException

Description

The maximum number of names or IDs allowed for this request (100) was exceeded.

Members

BlueGreenDeploymentConfiguration

Description

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

Members
deploymentReadyOption
Type: DeploymentReadyOption structure

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

greenFleetProvisioningOption

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

terminateBlueInstancesOnDeploymentSuccess

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

BlueInstanceTerminationOption

Description

Information about whether instances in the original environment are terminated when a blue/green deployment is successful. BlueInstanceTerminationOption does not apply to Lambda deployments.

Members
action
Type: string

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

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

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

terminationWaitTimeInMinutes
Type: int

For an Amazon EC2 deployment, the number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment.

For an Amazon ECS deployment, the number of minutes before deleting the original (blue) task set. During an Amazon ECS deployment, CodeDeploy shifts traffic from the original (blue) task set to a replacement (green) task set.

The maximum setting is 2880 minutes (2 days).

BucketNameFilterRequiredException

Description

A bucket name is required, but was not provided.

Members

CloudFormationTarget

Description

Information about the target to be updated by an CloudFormation blue/green deployment. This target type is used for all deployments initiated by a CloudFormation stack update.

Members
deploymentId
Type: string

The unique ID of an CloudFormation blue/green deployment.

lastUpdatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the target application was updated by an CloudFormation blue/green deployment.

lifecycleEvents
Type: Array of LifecycleEvent structures

The lifecycle events of the CloudFormation blue/green deployment to this target application.

resourceType
Type: string

The resource type for the CloudFormation blue/green deployment.

status
Type: string

The status of an CloudFormation blue/green deployment's target application.

targetId
Type: string

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

targetVersionWeight
Type: double

The percentage of production traffic that the target version of an CloudFormation blue/green deployment receives.

DeploymentAlreadyCompletedException

Description

The deployment is already complete.

Members

DeploymentAlreadyStartedException

Description

A deployment to a target was attempted while another deployment was in progress.

Members

DeploymentConfigAlreadyExistsException

Description

A deployment configuration with the specified name with the user or Amazon Web Services account already exists.

Members

DeploymentConfigDoesNotExistException

Description

The deployment configuration does not exist with the user or Amazon Web Services account.

Members

DeploymentConfigInUseException

Description

The deployment configuration is still in use.

Members

DeploymentConfigInfo

Description

Information about a deployment configuration.

Members
computePlatform
Type: string

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

createTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the deployment configuration was created.

deploymentConfigId
Type: string

The deployment configuration ID.

deploymentConfigName
Type: string

The deployment configuration name.

minimumHealthyHosts
Type: MinimumHealthyHosts structure

Information about the number or percentage of minimum healthy instances.

trafficRoutingConfig
Type: TrafficRoutingConfig structure

The configuration that specifies how the deployment traffic is routed. Used for deployments with a Lambda or Amazon ECS compute platform only.

zonalConfig
Type: ZonalConfig structure

Information about a zonal configuration.

DeploymentConfigLimitExceededException

Description

The deployment configurations limit was exceeded.

Members

DeploymentConfigNameRequiredException

Description

The deployment configuration name was not specified.

Members

DeploymentDoesNotExistException

Description

The deployment with the user or Amazon Web Services account does not exist.

Members

DeploymentGroupAlreadyExistsException

Description

A deployment group with the specified name with the user or Amazon Web Services account already exists.

Members

DeploymentGroupDoesNotExistException

Description

The named deployment group with the user or Amazon Web Services account does not exist.

Members

DeploymentGroupInfo

Description

Information about a deployment group.

Members
alarmConfiguration
Type: AlarmConfiguration structure

A list of alarms associated with the deployment group.

applicationName
Type: string

The application name.

autoRollbackConfiguration
Type: AutoRollbackConfiguration structure

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

autoScalingGroups
Type: Array of AutoScalingGroup structures

A list of associated Auto Scaling groups.

blueGreenDeploymentConfiguration

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

computePlatform
Type: string

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

deploymentConfigName
Type: string

The deployment configuration name.

deploymentGroupId
Type: string

The deployment group ID.

deploymentGroupName
Type: string

The deployment group name.

deploymentStyle
Type: DeploymentStyle structure

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.

ec2TagFilters
Type: Array of EC2TagFilter structures

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

ec2TagSet
Type: EC2TagSet structure

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

ecsServices
Type: Array of ECSService structures

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

lastAttemptedDeployment
Type: LastDeploymentInfo structure

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

lastSuccessfulDeployment
Type: LastDeploymentInfo structure

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

loadBalancerInfo
Type: LoadBalancerInfo structure

Information about the load balancer to use in a deployment.

onPremisesInstanceTagFilters
Type: Array of TagFilter structures

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

onPremisesTagSet
Type: OnPremisesTagSet structure

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.

outdatedInstancesStrategy
Type: string

Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.

If this option is set to UPDATE or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.

If this option is set to IGNORE, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.

serviceRoleArn
Type: string

A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to Amazon Web Services services on your behalf. For more information, see Create a Service Role for CodeDeploy in the CodeDeploy User Guide.

targetRevision
Type: RevisionLocation structure

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

terminationHookEnabled
Type: boolean

Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.

For more information about the termination hook, see How Amazon EC2 Auto Scaling works with CodeDeploy in the CodeDeploy User Guide.

triggerConfigurations
Type: Array of TriggerConfig structures

Information about triggers associated with the deployment group.

DeploymentGroupLimitExceededException

Description

The deployment groups limit was exceeded.

Members

DeploymentGroupNameRequiredException

Description

The deployment group name was not specified.

Members

DeploymentIdRequiredException

Description

At least one deployment ID must be specified.

Members

DeploymentInfo

Description

Information about a deployment.

Members
additionalDeploymentStatusInfo
Type: 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.

applicationName
Type: string

The application name.

autoRollbackConfiguration
Type: AutoRollbackConfiguration structure

Information about the automatic rollback configuration associated with the deployment.

blueGreenDeploymentConfiguration

Information about blue/green deployment options for this deployment.

completeTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

A timestamp that indicates when the deployment was complete.

computePlatform
Type: string

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

createTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

A timestamp that indicates when the deployment was created.

creator
Type: 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.

  • CodeDeployAutoUpdate: An auto-update process created the deployment when it detected outdated Amazon EC2 instances.

deploymentConfigName
Type: string

The deployment configuration name.

deploymentGroupName
Type: string

The deployment group name.

deploymentId
Type: string

The unique ID of a deployment.

deploymentOverview
Type: DeploymentOverview structure

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

deploymentStatusMessages
Type: Array of strings

Messages that contain information about the status of a deployment.

deploymentStyle
Type: DeploymentStyle structure

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.

description
Type: string

A comment about the deployment.

errorInformation
Type: ErrorInformation structure

Information about any error associated with this deployment.

externalId
Type: string

The unique ID for an external resource (for example, a CloudFormation stack ID) that is linked to this deployment.

fileExistsBehavior
Type: string

Information about how 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.

ignoreApplicationStopFailures
Type: 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 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.

instanceTerminationWaitTimeStarted
Type: 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.

loadBalancerInfo
Type: LoadBalancerInfo structure

Information about the load balancer used in the deployment.

overrideAlarmConfiguration
Type: AlarmConfiguration structure

Information about alarms associated with a deployment or deployment group.

previousRevision
Type: RevisionLocation structure

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

relatedDeployments
Type: RelatedDeployments structure

Information about deployments related to the specified deployment.

revision
Type: RevisionLocation structure

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

rollbackInfo
Type: RollbackInfo structure

Information about a deployment rollback.

startTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

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.

status
Type: string

The current state of the deployment as a whole.

targetInstances
Type: TargetInstances structure

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

updateOutdatedInstancesOnly
Type: boolean

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

DeploymentIsNotInReadyStateException

Description

The deployment does not have a status of Ready and can't continue yet.

Members

DeploymentLimitExceededException

Description

The number of allowed deployments was exceeded.

Members

DeploymentNotStartedException

Description

The specified deployment has not started.

Members

DeploymentOverview

Description

Information about the deployment status of the instances in the deployment.

Members
Failed
Type: long (int|float)

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

InProgress
Type: long (int|float)

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

Pending
Type: long (int|float)

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

Ready
Type: long (int|float)

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

Skipped
Type: long (int|float)

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

Succeeded
Type: long (int|float)

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

DeploymentReadyOption

Description

Information about how traffic is rerouted to instances in a replacement environment in a blue/green deployment.

Members
actionOnTimeout
Type: 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.

waitTimeInMinutes
Type: int

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.

DeploymentStyle

Description

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.

Members
deploymentOption
Type: string

Indicates whether to route deployment traffic behind a load balancer.

deploymentType
Type: string

Indicates whether to run an in-place deployment or a blue/green deployment.

DeploymentTarget

Description

Information about the deployment target.

Members
cloudFormationTarget
Type: CloudFormationTarget structure

Information about the target to be updated by an CloudFormation blue/green deployment. This target type is used for all deployments initiated by a CloudFormation stack update.

deploymentTargetType
Type: string

The deployment type that is specific to the deployment's compute platform or deployments initiated by a CloudFormation stack update.

ecsTarget
Type: ECSTarget structure

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

instanceTarget
Type: InstanceTarget structure

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

lambdaTarget
Type: LambdaTarget structure

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

DeploymentTargetDoesNotExistException

Description

The provided target ID does not belong to the attempted deployment.

Members

DeploymentTargetIdRequiredException

Description

A deployment target ID was not provided.

Members

DeploymentTargetListSizeExceededException

Description

The maximum number of targets that can be associated with an Amazon ECS or Lambda deployment was exceeded. The target list of both types of deployments must have exactly one item. This exception does not apply to EC2/On-premises deployments.

Members

DescriptionTooLongException

Description

The description is too long.

Members

Diagnostics

Description

Diagnostic information about executable scripts that are part of a deployment.

Members
errorCode
Type: 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.

logTail
Type: string

The last portion of the diagnostic log.

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

message
Type: string

The message associated with the error.

scriptName
Type: string

The name of the script.

EC2TagFilter

Description

Information about an EC2 tag filter.

Members
Key
Type: string

The tag filter key.

Type
Type: string

The tag filter type:

  • KEY_ONLY: Key only.

  • VALUE_ONLY: Value only.

  • KEY_AND_VALUE: Key and value.

Value
Type: string

The tag filter value.

EC2TagSet

Description

Information about groups of Amazon EC2 instance tags.

Members
ec2TagSetList
Type: Array of EC2TagFilter structuress

A list that contains other lists of Amazon 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.

ECSService

Description

Contains the service and cluster names used to identify an Amazon ECS deployment's target.

Members
clusterName
Type: string

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

serviceName
Type: string

The name of the target Amazon ECS service.

ECSServiceMappingLimitExceededException

Description

The Amazon ECS service is associated with more than one deployment groups. An Amazon ECS service can be associated with only one deployment group.

Members

ECSTarget

Description

Information about the target of an Amazon ECS deployment.

Members
deploymentId
Type: string

The unique ID of a deployment.

lastUpdatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

lifecycleEvents
Type: Array of LifecycleEvent structures

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

status
Type: string

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

targetArn
Type: string

The Amazon Resource Name (ARN) of the target.

targetId
Type: string

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

taskSetsInfo
Type: Array of ECSTaskSet structures

The ECSTaskSet objects associated with the ECS target.

ECSTaskSet

Description

Information about a set of Amazon ECS tasks in an CodeDeploy deployment. An Amazon ECS task set includes details such as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic. An CodeDeploy application that uses the Amazon ECS compute platform deploys a containerized application in an Amazon ECS service as a task set.

Members
desiredCount
Type: long (int|float)

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.

identifer
Type: string

A unique ID of an ECSTaskSet.

pendingCount
Type: long (int|float)

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
Type: long (int|float)

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
Type: 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.

targetGroup
Type: TargetGroupInfo structure

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

taskSetLabel
Type: string

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

trafficWeight
Type: double

The percentage of traffic served by this task set.

ELBInfo

Description

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

Members
name
Type: string

For blue/green deployments, the name of the Classic 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 Classic 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.

ErrorInformation

Description

Information about a deployment error.

Members
code
Type: string

For more information, see Error Codes for CodeDeploy in the 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 Amazon Web Services 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.

message
Type: string

An accompanying error message.

GenericRevisionInfo

Description

Information about an application revision.

Members
deploymentGroups
Type: Array of strings

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

description
Type: string

A comment about the revision.

firstUsedTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the revision was first used by CodeDeploy.

lastUsedTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the revision was last used by CodeDeploy.

registerTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the revision was registered with CodeDeploy.

GitHubAccountTokenDoesNotExistException

Description

No GitHub account connection exists with the named specified in the call.

Members

GitHubAccountTokenNameRequiredException

Description

The call is missing a required GitHub account connection name.

Members

GitHubLocation

Description

Information about the location of application artifacts stored in GitHub.

Members
commitId
Type: string

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

repository
Type: 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.

GreenFleetProvisioningOption

Description

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

Members
action
Type: 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.

IamArnRequiredException

Description

No IAM ARN was included in the request. You must use an IAM session ARN or user ARN in the request.

Members

IamSessionArnAlreadyRegisteredException

Description

The request included an IAM session ARN that has already been used to register a different instance.

Members

IamUserArnAlreadyRegisteredException

Description

The specified user ARN is already registered with an on-premises instance.

Members

IamUserArnRequiredException

Description

An user ARN was not specified.

Members

InstanceDoesNotExistException

Description

The specified instance does not exist in the deployment group.

Members

InstanceIdRequiredException

Description

The instance ID was not specified.

Members

InstanceInfo

Description

Information about an on-premises instance.

Members
deregisterTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

iamSessionArn
Type: string

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

iamUserArn
Type: string

The user ARN associated with the on-premises instance.

instanceArn
Type: string

The ARN of the on-premises instance.

instanceName
Type: string

The name of the on-premises instance.

registerTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

tags
Type: Array of Tag structures

The tags currently associated with the on-premises instance.

InstanceLimitExceededException

Description

The maximum number of allowed on-premises instances in a single call was exceeded.

Members

InstanceNameAlreadyRegisteredException

Description

The specified on-premises instance name is already registered.

Members

InstanceNameRequiredException

Description

An on-premises instance name was not specified.

Members

InstanceNotRegisteredException

Description

The specified on-premises instance is not registered.

Members

InstanceSummary

Description

Information about an instance in a deployment.

Members
deploymentId
Type: string

The unique ID of a deployment.

instanceId
Type: string

The instance ID.

instanceType
Type: 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.

lastUpdatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

lifecycleEvents
Type: Array of LifecycleEvent structures

A list of lifecycle events for this instance.

status
Type: 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.

InstanceTarget

Description

A target Amazon EC2 or on-premises instance during a deployment that uses the EC2/On-premises compute platform.

Members
deploymentId
Type: string

The unique ID of a deployment.

instanceLabel
Type: string

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

lastUpdatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

lifecycleEvents
Type: Array of LifecycleEvent structures

The lifecycle events of the deployment to this target instance.

status
Type: string

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

targetArn
Type: string

The Amazon Resource Name (ARN) of the target.

targetId
Type: string

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

InvalidAlarmConfigException

Description

The format of the alarm configuration is invalid. Possible causes include:

  • The alarm list is null.

  • The alarm object is null.

  • The alarm name is empty or null or exceeds the limit of 255 characters.

  • Two alarms with the same name have been specified.

  • The alarm configuration is enabled, but the alarm list is empty.

Members

InvalidApplicationNameException

Description

The application name was specified in an invalid format.

Members

InvalidArnException

Description

The specified ARN is not in a valid format.

Members

InvalidAutoRollbackConfigException

Description

The automatic rollback configuration was specified in an invalid format. For example, automatic rollback is enabled, but an invalid triggering event type or no event types were listed.

Members

InvalidAutoScalingGroupException

Description

The Auto Scaling group was specified in an invalid format or does not exist.

Members

InvalidBlueGreenDeploymentConfigurationException

Description

The configuration for the blue/green deployment group was provided in an invalid format. For information about deployment configuration format, see CreateDeploymentConfig.

Members

InvalidBucketNameFilterException

Description

The bucket name either doesn't exist or was specified in an invalid format.

Members

InvalidComputePlatformException

Description

The computePlatform is invalid. The computePlatform should be Lambda, Server, or ECS.

Members

InvalidDeployedStateFilterException

Description

The deployed state filter was specified in an invalid format.

Members

InvalidDeploymentConfigNameException

Description

The deployment configuration name was specified in an invalid format.

Members

InvalidDeploymentGroupNameException

Description

The deployment group name was specified in an invalid format.

Members

InvalidDeploymentIdException

Description

At least one of the deployment IDs was specified in an invalid format.

Members

InvalidDeploymentInstanceTypeException

Description

An instance type was specified for an in-place deployment. Instance types are supported for blue/green deployments only.

Members

InvalidDeploymentStatusException

Description

The specified deployment status doesn't exist or cannot be determined.

Members

InvalidDeploymentStyleException

Description

An invalid deployment style was specified. Valid deployment types include "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" and "WITHOUT_TRAFFIC_CONTROL."

Members

InvalidDeploymentTargetIdException

Description

The target ID provided was not valid.

Members

InvalidDeploymentWaitTypeException

Description

The wait type is invalid.

Members

InvalidEC2TagCombinationException

Description

A call was submitted that specified both Ec2TagFilters and Ec2TagSet, but only one of these data types can be used in a single call.

Members

InvalidEC2TagException

Description

The tag was specified in an invalid format.

Members

InvalidECSServiceException

Description

The Amazon ECS service identifier is not valid.

Members

InvalidExternalIdException

Description

The external ID was specified in an invalid format.

Members

InvalidFileExistsBehaviorException

Description

An invalid fileExistsBehavior option was specified to determine how CodeDeploy handles files or directories that already exist in a deployment target location, but weren't part of the previous successful deployment. Valid values include "DISALLOW," "OVERWRITE," and "RETAIN."

Members

InvalidGitHubAccountTokenException

Description

The GitHub token is not valid.

Members

InvalidGitHubAccountTokenNameException

Description

The format of the specified GitHub account connection name is invalid.

Members

InvalidIamSessionArnException

Description

The IAM session ARN was specified in an invalid format.

Members

InvalidIamUserArnException

Description

The user ARN was specified in an invalid format.

Members

InvalidIgnoreApplicationStopFailuresValueException

Description

The IgnoreApplicationStopFailures value is invalid. For Lambda deployments, false is expected. For EC2/On-premises deployments, true or false is expected.

Members

InvalidInputException

Description

The input was specified in an invalid format.

Members

InvalidInstanceIdException

Description

Members

InvalidInstanceNameException

Description

The on-premises instance name was specified in an invalid format.

Members

InvalidInstanceStatusException

Description

The specified instance status does not exist.

Members

InvalidInstanceTypeException

Description

An invalid instance type was specified for instances in a blue/green deployment. Valid values include "Blue" for an original environment and "Green" for a replacement environment.

Members

InvalidKeyPrefixFilterException

Description

The specified key prefix filter was specified in an invalid format.

Members

InvalidLifecycleEventHookExecutionIdException

Description

A lifecycle event hook is invalid. Review the hooks section in your AppSpec file to ensure the lifecycle events and hooks functions are valid.

Members

InvalidLifecycleEventHookExecutionStatusException

Description

The result of a Lambda validation function that verifies a lifecycle event is invalid. It should return Succeeded or Failed.

Members

InvalidLoadBalancerInfoException

Description

An invalid load balancer name, or no load balancer name, was specified.

Members

InvalidMinimumHealthyHostValueException

Description

The minimum healthy instance value was specified in an invalid format.

Members

InvalidNextTokenException

Description

The next token was specified in an invalid format.

Members

InvalidOnPremisesTagCombinationException

Description

A call was submitted that specified both OnPremisesTagFilters and OnPremisesTagSet, but only one of these data types can be used in a single call.

Members

InvalidOperationException

Description

An invalid operation was detected.

Members

InvalidRegistrationStatusException

Description

The registration status was specified in an invalid format.

Members

InvalidRevisionException

Description

The revision was specified in an invalid format.

Members

InvalidRoleException

Description

The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.

Members

InvalidSortByException

Description

The column name to sort by is either not present or was specified in an invalid format.

Members

InvalidSortOrderException

Description

The sort order was specified in an invalid format.

Members

InvalidTagException

Description

The tag was specified in an invalid format.

Members

InvalidTagFilterException

Description

The tag filter was specified in an invalid format.

Members

InvalidTagsToAddException

Description

The specified tags are not valid.

Members

InvalidTargetException

Description

A target is not valid.

Members

InvalidTargetFilterNameException

Description

The target filter name is invalid.

Members

InvalidTargetGroupPairException

Description

A target group pair associated with this deployment is not valid.

Members

InvalidTargetInstancesException

Description

The target instance configuration is invalid. Possible causes include:

  • Configuration data for target instances was entered for an in-place deployment.

  • The limit of 10 tags for a tag type was exceeded.

  • The combined length of the tag names exceeded the limit.

  • A specified tag is not currently applied to any instances.

Members

InvalidTimeRangeException

Description

The specified time range was specified in an invalid format.

Members

InvalidTrafficRoutingConfigurationException

Description

The configuration that specifies how traffic is routed during a deployment is invalid.

Members

InvalidTriggerConfigException

Description

The trigger was specified in an invalid format.

Members

InvalidUpdateOutdatedInstancesOnlyValueException

Description

The UpdateOutdatedInstancesOnly value is invalid. For Lambda deployments, false is expected. For EC2/On-premises deployments, true or false is expected.

Members

InvalidZonalDeploymentConfigurationException

Description

The ZonalConfig object is not valid.

Members

LambdaFunctionInfo

Description

Information about a Lambda function specified in a deployment.

Members
currentVersion
Type: string

The version of a Lambda function that production traffic points to.

functionAlias
Type: string

The alias of a Lambda function. For more information, see Lambda Function Aliases in the Lambda Developer Guide.

functionName
Type: string

The name of a Lambda function.

targetVersion
Type: string

The version of a Lambda function that production traffic points to after the Lambda function is deployed.

targetVersionWeight
Type: double

The percentage of production traffic that the target version of a Lambda function receives.

LambdaTarget

Description

Information about the target Lambda function during an Lambda deployment.

Members
deploymentId
Type: string

The unique ID of a deployment.

lambdaFunctionInfo
Type: LambdaFunctionInfo structure

A LambdaFunctionInfo object that describes a target Lambda function.

lastUpdatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

lifecycleEvents
Type: Array of LifecycleEvent structures

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

status
Type: string

The status an Lambda deployment's target Lambda function.

targetArn
Type: string

The Amazon Resource Name (ARN) of the target.

targetId
Type: string

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

LastDeploymentInfo

Description

Information about the most recent attempted or successful deployment to a deployment group.

Members
createTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

deploymentId
Type: string

The unique ID of a deployment.

endTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

status
Type: string

The status of the most recent deployment.

LifecycleEvent

Description

Information about a deployment lifecycle event.

Members
diagnostics
Type: Diagnostics structure

Diagnostic information about the deployment lifecycle event.

endTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

A timestamp that indicates when the deployment lifecycle event ended.

lifecycleEventName
Type: string

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

startTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

A timestamp that indicates when the deployment lifecycle event started.

status
Type: 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.

LifecycleEventAlreadyCompletedException

Description

An attempt to return the status of an already completed lifecycle event occurred.

Members

LifecycleHookLimitExceededException

Description

The limit for lifecycle hooks was exceeded.

Members

LoadBalancerInfo

Description

Information about the Elastic Load Balancing load balancer or target group used in a deployment.

You can use load balancers and target groups in combination. For example, if you have two Classic Load Balancers, and five target groups tied to an Application Load Balancer, you can specify the two Classic Load Balancers in elbInfoList, and the five target groups in targetGroupInfoList.

Members
elbInfoList
Type: Array of ELBInfo structures

An array that contains information about the load balancers to use for load balancing in a deployment. If you're using Classic Load Balancers, specify those load balancers in this array.

You can add up to 10 load balancers to the array.

If you're using Application Load Balancers or Network Load Balancers, use the targetGroupInfoList array instead of this one.

targetGroupInfoList
Type: Array of TargetGroupInfo structures

An array that contains information about the target groups to use for load balancing in a deployment. If you're using Application Load Balancers and Network Load Balancers, specify their associated target groups in this array.

You can add up to 10 target groups to the array.

If you're using Classic Load Balancers, use the elbInfoList array instead of this one.

targetGroupPairInfoList
Type: Array of TargetGroupPairInfo structures

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

MinimumHealthyHosts

Description

Information about the minimum number of healthy instances.

Members
type
Type: string

The minimum healthy instance type:

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

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

In an example of nine instances, 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 instances at a time. The deployment is successful if four or more instances are deployed to successfully. Otherwise, the deployment fails.

In a call to the GetDeploymentConfig, 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, 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 CodeDeploy Instance Health in the CodeDeploy User Guide.

value
Type: int

The minimum healthy instance value.

MinimumHealthyHostsPerZone

Description

Information about the minimum number of healthy instances per Availability Zone.

Members
type
Type: string

The type associated with the MinimumHealthyHostsPerZone option.

value
Type: int

The value associated with the MinimumHealthyHostsPerZone option.

MultipleIamArnsProvidedException

Description

Both an user ARN and an IAM session ARN were included in the request. Use only one ARN type.

Members

OnPremisesTagSet

Description

Information about groups of on-premises instance tags.

Members
onPremisesTagSetList
Type: Array of TagFilter structuress

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.

OperationNotSupportedException

Description

The API used does not support the deployment.

Members

RawString

Description

A revision for an Lambda deployment that is a YAML-formatted or JSON-formatted string. For Lambda deployments, the revision is the same as the AppSpec file.

Members
content
Type: 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
Type: string

The SHA256 hash value of the revision content.

RelatedDeployments

Description

Information about deployments related to the specified deployment.

Members
autoUpdateOutdatedInstancesDeploymentIds
Type: Array of strings

The deployment IDs of 'auto-update outdated instances' deployments triggered by this deployment.

autoUpdateOutdatedInstancesRootDeploymentId
Type: string

The deployment ID of the root deployment that triggered this deployment.

ResourceArnRequiredException

Description

The ARN of a resource is required, but was not found.

Members

ResourceValidationException

Description

The specified resource could not be validated.

Members

RevisionDoesNotExistException

Description

The named revision does not exist with the user or Amazon Web Services account.

Members

RevisionInfo

Description

Information about an application revision.

Members
genericRevisionInfo
Type: GenericRevisionInfo structure

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

revisionLocation
Type: RevisionLocation structure

Information about the location and type of an application revision.

RevisionLocation

Description

Information about the location of an application revision.

Members
appSpecContent
Type: AppSpecContent structure

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

gitHubLocation
Type: GitHubLocation structure

Information about the location of application artifacts stored in GitHub.

revisionType
Type: 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 (Lambda deployments only).

  • AppSpecContent: An AppSpecContent object that contains the contents of an AppSpec file for an Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.

s3Location
Type: S3Location structure

Information about the location of a revision stored in Amazon S3.

string
Type: RawString structure

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

RevisionRequiredException

Description

The revision ID was not specified.

Members

RoleRequiredException

Description

The role ID was not specified.

Members

RollbackInfo

Description

Information about a deployment rollback.

Members
rollbackDeploymentId
Type: string

The ID of the deployment rollback.

rollbackMessage
Type: 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).

rollbackTriggeringDeploymentId
Type: string

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

S3Location

Description

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

Members
bucket
Type: string

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

bundleType
Type: 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.

  • YAML: A YAML-formatted file.

  • JSON: A JSON-formatted file.

eTag
Type: 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.

key
Type: string

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

version
Type: 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.

Tag

Description

Information about a tag.

Members
Key
Type: string

The tag's key.

Value
Type: string

The tag's value.

TagFilter

Description

Information about an on-premises instance tag filter.

Members
Key
Type: string

The on-premises instance tag filter key.

Type
Type: string

The on-premises instance tag filter type:

  • KEY_ONLY: Key only.

  • VALUE_ONLY: Value only.

  • KEY_AND_VALUE: Key and value.

Value
Type: string

The on-premises instance tag filter value.

TagLimitExceededException

Description

The maximum allowed number of tags was exceeded.

Members

TagRequiredException

Description

A tag was not specified.

Members

TagSetListLimitExceededException

Description

The number of tag groups included in the tag set list exceeded the maximum allowed limit of 3.

Members

TargetGroupInfo

Description

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

Members
name
Type: 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.

TargetGroupPairInfo

Description

Information about two target groups and how traffic is routed during an Amazon ECS deployment. An optional test traffic route can be specified.

Members
prodTrafficRoute
Type: TrafficRoute structure

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

targetGroups
Type: Array of TargetGroupInfo structures

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.

testTrafficRoute
Type: TrafficRoute structure

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.

TargetInstances

Description

Information about the instances to be used in the replacement environment in a blue/green deployment.

Members
autoScalingGroups
Type: Array of strings

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

ec2TagSet
Type: EC2TagSet structure

Information about the groups of Amazon 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.

tagFilters
Type: Array of EC2TagFilter structures

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.

ThrottlingException

Description

An API function was called too frequently.

Members

TimeBasedCanary

Description

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

Members
canaryInterval
Type: int

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

canaryPercentage
Type: int

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

TimeBasedLinear

Description

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

Members
linearInterval
Type: int

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

linearPercentage
Type: int

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

TimeRange

Description

Information about a time range.

Members
end
Type: timestamp (string|DateTime or anything parsable by strtotime)

The end time of the time range.

Specify null to leave the end time open-ended.

start
Type: timestamp (string|DateTime or anything parsable by strtotime)

The start time of the time range.

Specify null to leave the start time open-ended.

TrafficRoute

Description

Information about a listener. The listener contains the path used to route traffic that is received from the load balancer to a target group.

Members
listenerArns
Type: Array of strings

The Amazon Resource Name (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.

TrafficRoutingConfig

Description

The configuration that specifies how traffic is shifted from one version of a Lambda function to another version during an Lambda deployment, or from one Amazon ECS task set to another during an Amazon ECS deployment.

Members
timeBasedCanary
Type: TimeBasedCanary structure

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

timeBasedLinear
Type: TimeBasedLinear structure

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

type
Type: string

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

TriggerConfig

Description

Information about notification triggers for the deployment group.

Members
triggerEvents
Type: Array of strings

The event type or types for which notifications are triggered.

triggerName
Type: string

The name of the notification trigger.

triggerTargetArn
Type: string

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

TriggerTargetsLimitExceededException

Description

The maximum allowed number of triggers was exceeded.

Members

UnsupportedActionForDeploymentTypeException

Description

A call was submitted that is not supported for the specified deployment type.

Members

ZonalConfig

Description

Configure the ZonalConfig object if you want CodeDeploy to deploy your application to one Availability Zone at a time, within an Amazon Web Services Region. By deploying to one Availability Zone at a time, you can expose your deployment to a progressively larger audience as confidence in the deployment's performance and viability grows. If you don't configure the ZonalConfig object, CodeDeploy deploys your application to a random selection of hosts across a Region.

For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide.

Members
firstZoneMonitorDurationInSeconds
Type: long (int|float)

The period of time, in seconds, that CodeDeploy must wait after completing a deployment to the first Availability Zone. CodeDeploy will wait this amount of time before starting a deployment to the second Availability Zone. You might set this option if you want to allow extra bake time for the first Availability Zone. If you don't specify a value for firstZoneMonitorDurationInSeconds, then CodeDeploy uses the monitorDurationInSeconds value for the first Availability Zone.

For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide.

minimumHealthyHostsPerZone
Type: MinimumHealthyHostsPerZone structure

The number or percentage of instances that must remain available per Availability Zone during a deployment. This option works in conjunction with the MinimumHealthyHosts option. For more information, see About the minimum number of healthy hosts per Availability Zone in the CodeDeploy User Guide.

If you don't specify the minimumHealthyHostsPerZone option, then CodeDeploy uses a default value of 0 percent.

For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide.

monitorDurationInSeconds
Type: long (int|float)

The period of time, in seconds, that CodeDeploy must wait after completing a deployment to an Availability Zone. CodeDeploy will wait this amount of time before starting a deployment to the next Availability Zone. Consider adding a monitor duration to give the deployment some time to prove itself (or 'bake') in one Availability Zone before it is released in the next zone. If you don't specify a monitorDurationInSeconds, CodeDeploy starts deploying to the next Availability Zone immediately.

For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide.