deployment_configs
Creates, updates, deletes or gets a deployment_config resource or lists deployment_configs in a region
Overview
| Name | deployment_configs |
| Type | Resource |
| Description | Resource Type definition for AWS::CodeDeploy::DeploymentConfig |
| Id | awscc.codedeploy.deployment_configs |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
compute_platform | string | The destination platform type for the deployment (Lambda, Server, or ECS). |
deployment_config_name | string | A name for the deployment configuration. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the deployment configuration name. For more information, see Name Type. |
minimum_healthy_hosts | object | 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. |
zonal_config | object | The zonal deployment config that specifies how the zonal deployment behaves |
traffic_routing_config | object | The configuration that specifies how the deployment traffic is routed. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
deployment_config_name | string | A name for the deployment configuration. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the deployment configuration name. For more information, see Name Type. |
region | string | AWS region. |
For more information, see AWS::CodeDeploy::DeploymentConfig.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | deployment_configs | INSERT | region |
delete_resource | deployment_configs | DELETE | Identifier, region |
list_resources | deployment_configs_list_only | SELECT | region |
get_resource | deployment_configs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual deployment_config.
SELECT
region,
compute_platform,
deployment_config_name,
minimum_healthy_hosts,
zonal_config,
traffic_routing_config
FROM awscc.codedeploy.deployment_configs
WHERE
region = '{{ region }}' AND
Identifier = '{{ deployment_config_name }}';
Lists all deployment_configs in a region.
SELECT
region,
deployment_config_name
FROM awscc.codedeploy.deployment_configs_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new deployment_config resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.codedeploy.deployment_configs (
ComputePlatform,
DeploymentConfigName,
MinimumHealthyHosts,
ZonalConfig,
TrafficRoutingConfig,
region
)
SELECT
'{{ compute_platform }}',
'{{ deployment_config_name }}',
'{{ minimum_healthy_hosts }}',
'{{ zonal_config }}',
'{{ traffic_routing_config }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.codedeploy.deployment_configs (
ComputePlatform,
DeploymentConfigName,
MinimumHealthyHosts,
ZonalConfig,
TrafficRoutingConfig,
region
)
SELECT
'{{ compute_platform }}',
'{{ deployment_config_name }}',
'{{ minimum_healthy_hosts }}',
'{{ zonal_config }}',
'{{ traffic_routing_config }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: deployment_config
props:
- name: compute_platform
value: '{{ compute_platform }}'
- name: deployment_config_name
value: '{{ deployment_config_name }}'
- name: minimum_healthy_hosts
value:
value: '{{ value }}'
type: '{{ type }}'
- name: zonal_config
value:
first_zone_monitor_duration_in_seconds: '{{ first_zone_monitor_duration_in_seconds }}'
monitor_duration_in_seconds: '{{ monitor_duration_in_seconds }}'
minimum_healthy_hosts_per_zone:
value: '{{ value }}'
type: '{{ type }}'
- name: traffic_routing_config
value:
type: '{{ type }}'
time_based_linear:
linear_interval: '{{ linear_interval }}'
linear_percentage: '{{ linear_percentage }}'
time_based_canary:
canary_percentage: '{{ canary_percentage }}'
canary_interval: '{{ canary_interval }}'
DELETE example
/*+ delete */
DELETE FROM awscc.codedeploy.deployment_configs
WHERE
Identifier = '{{ deployment_config_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the deployment_configs resource, the following permissions are required:
- Create
- Read
- Delete
- List
codedeploy:CreateDeploymentConfig
codedeploy:GetDeploymentConfig
codedeploy:GetDeploymentConfig,
codedeploy:DeleteDeploymentConfig
codedeploy:ListDeploymentConfigs