continuous_deployment_policies
Creates, updates, deletes, gets or lists a continuous_deployment_policies resource.
Overview
| Name | continuous_deployment_policies |
| Type | Resource |
| Id | aws.cloudfront.continuous_deployment_policies |
Fields
The following fields are returned by SELECT queries:
- get_continuous_deployment_policy
- list_continuous_deployment_policies
| Name | Datatype | Description |
|---|---|---|
continuous_deployment_policy_config | string | Contains the configuration for a continuous deployment policy. |
id | string | The identifier of the continuous deployment policy. |
last_modified_time | string | The date and time the continuous deployment policy was last modified. |
| Name | Datatype | Description |
|---|---|---|
items | string | A list of continuous deployment policy items. |
max_items | integer | The maximum number of continuous deployment policies that were specified in your request. |
next_marker | string | Indicates the next page of continuous deployment policies. To get the next page of the list, use this value in the Marker field of your request. |
quantity | integer | The total number of continuous deployment policies in your Amazon Web Services account, regardless of the MaxItems value. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_continuous_deployment_policy | select | id, region | Gets a continuous deployment policy, including metadata (the policy's identifier and the date and time when the policy was last modified). | |
list_continuous_deployment_policies | select | region | Marker, MaxItems | Gets a list of the continuous deployment policies in your Amazon Web Services account. You can optionally specify the maximum number of items to receive in the response. If the total number of items in the list exceeds the maximum that you specify, or the default maximum, the response is paginated. To get the next page of items, send a subsequent request that specifies the NextMarker value from the current response as the Marker value in the subsequent request. |
create_continuous_deployment_policy | insert | region, ContinuousDeploymentPolicyConfig | Creates a continuous deployment policy that distributes traffic for a custom domain name to two different CloudFront distributions. To use a continuous deployment policy, first use CopyDistribution to create a staging distribution, then use UpdateDistribution to modify the staging distribution's configuration. After you create and update a staging distribution, you can use a continuous deployment policy to incrementally move traffic to the staging distribution. This workflow enables you to test changes to a distribution's configuration before moving all of your domain's production traffic to the new configuration. | |
update_continuous_deployment_policy | update | id, region, ContinuousDeploymentPolicyConfig | If-Match | Updates a continuous deployment policy. You can update a continuous deployment policy to enable or disable it, to change the percentage of traffic that it sends to the staging distribution, or to change the staging distribution that it sends traffic to. When you update a continuous deployment policy configuration, all the fields are updated with the values that are provided in the request. You cannot update some fields independent of others. To update a continuous deployment policy configuration: Use GetContinuousDeploymentPolicyConfig to get the current configuration. Locally modify the fields in the continuous deployment policy configuration that you want to update. Use UpdateContinuousDeploymentPolicy, providing the entire continuous deployment policy configuration, including the fields that you modified and those that you didn't. |
delete_continuous_deployment_policy | delete | id, region | If-Match | Deletes a continuous deployment policy. You cannot delete a continuous deployment policy that's attached to a primary distribution. First update your distribution to remove the continuous deployment policy, then you can delete the policy. |
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.
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the continuous deployment policy that you are deleting. |
region | string | AWS region (default: us-east-1) |
If-Match | string | The current version (ETag value) of the continuous deployment policy that you are deleting. |
Marker | string | Use this field when paginating results to indicate where to begin in your list of continuous deployment policies. The response includes policies in the list that occur after the marker. To get the next page of the list, set this field's value to the value of NextMarker from the current page's response. |
MaxItems | string | The maximum number of continuous deployment policies that you want returned in the response. |
SELECT examples
- get_continuous_deployment_policy
- list_continuous_deployment_policies
Gets a continuous deployment policy, including metadata (the policy's identifier and the date and time when the policy was last modified).
SELECT
continuous_deployment_policy_config,
id,
last_modified_time
FROM aws.cloudfront.continuous_deployment_policies
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;
Gets a list of the continuous deployment policies in your Amazon Web Services account. You can optionally specify the maximum number of items to receive in the response. If the total number of items in the list exceeds the maximum that you specify, or the default maximum, the response is paginated. To get the next page of items, send a subsequent request that specifies the NextMarker value from the current response as the Marker value in the subsequent request.
SELECT
items,
max_items,
next_marker,
quantity
FROM aws.cloudfront.continuous_deployment_policies
WHERE region = '{{ region }}' -- required
AND Marker = '{{ Marker }}'
AND MaxItems = '{{ MaxItems }}'
;
INSERT examples
- create_continuous_deployment_policy
- Manifest
Creates a continuous deployment policy that distributes traffic for a custom domain name to two different CloudFront distributions. To use a continuous deployment policy, first use CopyDistribution to create a staging distribution, then use UpdateDistribution to modify the staging distribution's configuration. After you create and update a staging distribution, you can use a continuous deployment policy to incrementally move traffic to the staging distribution. This workflow enables you to test changes to a distribution's configuration before moving all of your domain's production traffic to the new configuration.
INSERT INTO aws.cloudfront.continuous_deployment_policies (
ContinuousDeploymentPolicyConfig,
region
)
SELECT
'{{ ContinuousDeploymentPolicyConfig }}' /* required */,
'{{ region }}'
RETURNING
continuous_deployment_policy_config,
id,
last_modified_time
;
# Description fields are for documentation purposes
- name: continuous_deployment_policies
props:
- name: region
value: "{{ region }}"
description: Required parameter for the continuous_deployment_policies resource.
- name: ContinuousDeploymentPolicyConfig
description: |
Contains the configuration for a continuous deployment policy.
value:
StagingDistributionDnsNames:
Quantity: {{ Quantity }}
Items:
- "{{ Items }}"
Enabled: {{ Enabled }}
TrafficConfig:
SingleWeightConfig:
Weight: {{ Weight }}
SessionStickinessConfig:
IdleTTL: {{ IdleTTL }}
MaximumTTL: {{ MaximumTTL }}
SingleHeaderConfig:
Header: "{{ Header }}"
Value: "{{ Value }}"
Type: "{{ Type }}"
UPDATE examples
- update_continuous_deployment_policy
Updates a continuous deployment policy. You can update a continuous deployment policy to enable or disable it, to change the percentage of traffic that it sends to the staging distribution, or to change the staging distribution that it sends traffic to. When you update a continuous deployment policy configuration, all the fields are updated with the values that are provided in the request. You cannot update some fields independent of others. To update a continuous deployment policy configuration: Use GetContinuousDeploymentPolicyConfig to get the current configuration. Locally modify the fields in the continuous deployment policy configuration that you want to update. Use UpdateContinuousDeploymentPolicy, providing the entire continuous deployment policy configuration, including the fields that you modified and those that you didn't.
UPDATE aws.cloudfront.continuous_deployment_policies
SET
ContinuousDeploymentPolicyConfig = '{{ ContinuousDeploymentPolicyConfig }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND ContinuousDeploymentPolicyConfig = '{{ ContinuousDeploymentPolicyConfig }}' --required
AND `If-Match` = '{{ If-Match}}'
RETURNING
continuous_deployment_policy_config,
id,
last_modified_time;
DELETE examples
- delete_continuous_deployment_policy
Deletes a continuous deployment policy. You cannot delete a continuous deployment policy that's attached to a primary distribution. First update your distribution to remove the continuous deployment policy, then you can delete the policy.
DELETE FROM aws.cloudfront.continuous_deployment_policies
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND `If-Match` = '{{ If-Match }}'
;