deployments
Creates, updates, deletes or gets a deployment
resource or lists deployments
in a region
Overview
Name | deployments |
Type | Resource |
Description | Represents a deployment resource of an AWS Mainframe Modernization (M2) application to a specified environment |
Id | aws.m2.deployments |
Fields
Name | Datatype | Description |
---|---|---|
environment_id | string | The environment ID. |
application_id | string | The application ID. |
application_version | integer | The version number of the application to deploy |
deployment_id | string | The deployment ID. |
status | string | The status of the deployment. |
region | string | AWS region. |
For more information, see AWS::M2::Deployment
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | EnvironmentId, ApplicationId, ApplicationVersion, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all deployments
in a region.
SELECT
region,
environment_id,
application_id,
application_version,
deployment_id,
status
FROM aws.m2.deployments
WHERE region = 'us-east-1';
Gets all properties from an individual deployment
.
SELECT
region,
environment_id,
application_id,
application_version,
deployment_id,
status
FROM aws.m2.deployments
WHERE region = 'us-east-1' AND data__Identifier = '<ApplicationId>';
INSERT
example
Use the following StackQL query and manifest file to create a new deployment
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.m2.deployments (
EnvironmentId,
ApplicationId,
ApplicationVersion,
region
)
SELECT
'{{ EnvironmentId }}',
'{{ ApplicationId }}',
'{{ ApplicationVersion }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.m2.deployments (
EnvironmentId,
ApplicationId,
ApplicationVersion,
region
)
SELECT
'{{ EnvironmentId }}',
'{{ ApplicationId }}',
'{{ ApplicationVersion }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: deployment
props:
- name: EnvironmentId
value: '{{ EnvironmentId }}'
- name: ApplicationId
value: '{{ ApplicationId }}'
- name: ApplicationVersion
value: '{{ ApplicationVersion }}'
DELETE
example
/*+ delete */
DELETE FROM aws.m2.deployments
WHERE data__Identifier = '<ApplicationId>'
AND region = 'us-east-1';
Permissions
To operate on the deployments
resource, the following permissions are required:
Create
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
Read
m2:ListDeployments,
m2:GetDeployment
Update
m2:CreateDeployment,
m2:ListDeployments,
m2:GetDeployment,
elasticloadbalancing:CreateListener,
elasticloadbalancing:CreateLoadBalancer,
elasticloadbalancing:CreateTargetGroup,
elasticloadbalancing:DeleteListener,
elasticloadbalancing:DeleteTargetGroup,
elasticloadbalancing:DeregisterTargets,
elasticloadbalancing:DeleteLoadBalancer,
elasticloadbalancing:AddTags,
elasticloadbalancing:RegisterTargets,
ec2:DescribeNetworkInterfaces
Delete
elasticloadbalancing:DeleteListener,
elasticloadbalancing:DeleteTargetGroup,
elasticloadbalancing:DeregisterTargets,
elasticloadbalancing:DeleteLoadBalancer,
logs:DeleteLogDelivery,
m2:ListDeployments,
m2:GetDeployment,
m2:DeleteApplicationFromEnvironment
List
m2:ListDeployments