Skip to main content

continuous_deployment_policies

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

Overview

Namecontinuous_deployment_policies
TypeResource
Idaws.cloudfront.continuous_deployment_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
continuous_deployment_policy_configstringContains the configuration for a continuous deployment policy.
idstringThe identifier of the continuous deployment policy.
last_modified_timestringThe date and time the continuous deployment policy was last modified.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_continuous_deployment_policyselectid, regionGets a continuous deployment policy, including metadata (the policy's identifier and the date and time when the policy was last modified).
list_continuous_deployment_policiesselectregionMarker, MaxItemsGets 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_policyinsertregion, ContinuousDeploymentPolicyConfigCreates 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_policyupdateid, region, ContinuousDeploymentPolicyConfigIf-MatchUpdates 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_policydeleteid, regionIf-MatchDeletes 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.

NameDatatypeDescription
idstringThe identifier of the continuous deployment policy that you are deleting.
regionstringAWS region (default: us-east-1)
If-MatchstringThe current version (ETag value) of the continuous deployment policy that you are deleting.
MarkerstringUse 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.
MaxItemsstringThe maximum number of continuous deployment policies that you want returned in the response.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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 }}'
;