Skip to main content

deployments

Creates, updates, deletes, gets or lists a deployments resource.

Overview

Namedeployments
TypeResource
Idaws.codedeploy.deployments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
deployments_infoarrayInformation about the deployments.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
batch_get_deploymentsselectregionGets information about one or more deployments. The maximum number of deployments that can be returned is 25.
get_deploymentselectregionGets 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.
list_deploymentsselectregionLists the deployments in a deployment group for an application registered with the user or Amazon Web Services account.
create_deploymentinsertregion, applicationNameDeploys an application revision through the specified deployment group.
stop_deploymentexecregion, deploymentIdAttempts to stop an ongoing deployment.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

SELECT
deployments_info
FROM aws.codedeploy.deployments
WHERE region = '{{ region }}' -- required
;

INSERT examples

Deploys an application revision through the specified deployment group.

INSERT INTO aws.codedeploy.deployments (
applicationName,
deploymentGroupName,
revision,
deploymentConfigName,
description,
ignoreApplicationStopFailures,
targetInstances,
autoRollbackConfiguration,
updateOutdatedInstancesOnly,
fileExistsBehavior,
overrideAlarmConfiguration,
region
)
SELECT
'{{ applicationName }}' /* required */,
'{{ deploymentGroupName }}',
'{{ revision }}',
'{{ deploymentConfigName }}',
'{{ description }}',
{{ ignoreApplicationStopFailures }},
'{{ targetInstances }}',
'{{ autoRollbackConfiguration }}',
{{ updateOutdatedInstancesOnly }},
'{{ fileExistsBehavior }}',
'{{ overrideAlarmConfiguration }}',
'{{ region }}'
RETURNING
deployment_id
;

Lifecycle Methods

Attempts to stop an ongoing deployment.

EXEC aws.codedeploy.deployments.stop_deployment
@region='{{ region }}' --required
@@json=
'{
"deploymentId": "{{ deploymentId }}",
"autoRollbackEnabled": {{ autoRollbackEnabled }}
}'
;