Skip to main content

deployments

Creates, updates, deletes or gets a deployment resource or lists deployments in a region

Overview

Namedeployments
TypeResource
DescriptionRepresents a deployment resource of an AWS Mainframe Modernization (M2) application to a specified environment
Idawscc.m2.deployments

Fields

NameDatatypeDescription
environment_idstringThe environment ID.
application_idstringThe application ID.
application_versionintegerThe version number of the application to deploy
deployment_idstringThe deployment ID.
statusstringThe status of the deployment.
regionstringAWS region.

For more information, see AWS::M2::Deployment.

Methods

NameResourceAccessible byRequired Params
create_resourcedeploymentsINSERTEnvironmentId, ApplicationId, ApplicationVersion, region
delete_resourcedeploymentsDELETEIdentifier, region
update_resourcedeploymentsUPDATEIdentifier, PatchDocument, region
list_resourcesdeployments_list_onlySELECTregion
get_resourcedeploymentsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual deployment.

SELECT
region,
environment_id,
application_id,
application_version,
deployment_id,
status
FROM awscc.m2.deployments
WHERE
region = 'us-east-1' AND
Identifier = '{{ application_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new deployment resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.m2.deployments (
EnvironmentId,
ApplicationId,
ApplicationVersion,
region
)
SELECT
'{{ environment_id }}',
'{{ application_id }}',
'{{ application_version }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a deployment resource, using stack-deploy.

/*+ update */
UPDATE awscc.m2.deployments
SET PatchDocument = string('{{ {
"ApplicationVersion": application_version
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ application_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.m2.deployments
WHERE
Identifier = '{{ application_id }}' AND
region = 'us-east-1';

Permissions

To operate on the deployments resource, the following permissions are required:

m2:CreateDeployment,
m2:ListDeployments,
m2:GetDeployment,
iam:PassRole,
ec2:DescribeNetworkInterfaces,
elasticloadbalancing:CreateListener,
elasticloadbalancing:CreateLoadBalancer,
elasticloadbalancing:CreateTargetGroup,
elasticloadbalancing:AddTags,
elasticloadbalancing:RegisterTargets,
logs:DescribeResourcePolicies,
logs:DescribeLogGroups,
logs:CreateLogDelivery,
logs:GetLogDelivery,
logs:UpdateLogDelivery,
logs:DeleteLogDelivery,
logs:ListLogDeliveries,
logs:CreateLogGroup,
logs:PutResourcePolicy