aws.cloudfront.ContinuousDeploymentPolicy
Explore with Pulumi AI
Resource for managing an AWS CloudFront Continuous Deployment Policy.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const staging = new aws.cloudfront.Distribution("staging", {
enabled: true,
staging: true,
});
const example = new aws.cloudfront.ContinuousDeploymentPolicy("example", {
enabled: true,
stagingDistributionDnsNames: {
items: [staging.domainName],
quantity: 1,
},
trafficConfig: {
type: "SingleWeight",
singleWeightConfig: {
weight: 0.01,
},
},
});
const production = new aws.cloudfront.Distribution("production", {
enabled: true,
continuousDeploymentPolicyId: example.id,
});
import pulumi
import pulumi_aws as aws
staging = aws.cloudfront.Distribution("staging",
enabled=True,
staging=True)
example = aws.cloudfront.ContinuousDeploymentPolicy("example",
enabled=True,
staging_distribution_dns_names={
"items": [staging.domain_name],
"quantity": 1,
},
traffic_config={
"type": "SingleWeight",
"single_weight_config": {
"weight": 0.01,
},
})
production = aws.cloudfront.Distribution("production",
enabled=True,
continuous_deployment_policy_id=example.id)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
staging, err := cloudfront.NewDistribution(ctx, "staging", &cloudfront.DistributionArgs{
Enabled: pulumi.Bool(true),
Staging: pulumi.Bool(true),
})
if err != nil {
return err
}
example, err := cloudfront.NewContinuousDeploymentPolicy(ctx, "example", &cloudfront.ContinuousDeploymentPolicyArgs{
Enabled: pulumi.Bool(true),
StagingDistributionDnsNames: &cloudfront.ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs{
Items: pulumi.StringArray{
staging.DomainName,
},
Quantity: pulumi.Int(1),
},
TrafficConfig: &cloudfront.ContinuousDeploymentPolicyTrafficConfigArgs{
Type: pulumi.String("SingleWeight"),
SingleWeightConfig: &cloudfront.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigArgs{
Weight: pulumi.Float64(0.01),
},
},
})
if err != nil {
return err
}
_, err = cloudfront.NewDistribution(ctx, "production", &cloudfront.DistributionArgs{
Enabled: pulumi.Bool(true),
ContinuousDeploymentPolicyId: example.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var staging = new Aws.CloudFront.Distribution("staging", new()
{
Enabled = true,
Staging = true,
});
var example = new Aws.CloudFront.ContinuousDeploymentPolicy("example", new()
{
Enabled = true,
StagingDistributionDnsNames = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs
{
Items = new[]
{
staging.DomainName,
},
Quantity = 1,
},
TrafficConfig = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyTrafficConfigArgs
{
Type = "SingleWeight",
SingleWeightConfig = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigArgs
{
Weight = 0.01,
},
},
});
var production = new Aws.CloudFront.Distribution("production", new()
{
Enabled = true,
ContinuousDeploymentPolicyId = example.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.Distribution;
import com.pulumi.aws.cloudfront.DistributionArgs;
import com.pulumi.aws.cloudfront.ContinuousDeploymentPolicy;
import com.pulumi.aws.cloudfront.ContinuousDeploymentPolicyArgs;
import com.pulumi.aws.cloudfront.inputs.ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs;
import com.pulumi.aws.cloudfront.inputs.ContinuousDeploymentPolicyTrafficConfigArgs;
import com.pulumi.aws.cloudfront.inputs.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var staging = new Distribution("staging", DistributionArgs.builder()
.enabled(true)
.staging(true)
.build());
var example = new ContinuousDeploymentPolicy("example", ContinuousDeploymentPolicyArgs.builder()
.enabled(true)
.stagingDistributionDnsNames(ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs.builder()
.items(staging.domainName())
.quantity(1)
.build())
.trafficConfig(ContinuousDeploymentPolicyTrafficConfigArgs.builder()
.type("SingleWeight")
.singleWeightConfig(ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigArgs.builder()
.weight("0.01")
.build())
.build())
.build());
var production = new Distribution("production", DistributionArgs.builder()
.enabled(true)
.continuousDeploymentPolicyId(example.id())
.build());
}
}
resources:
staging:
type: aws:cloudfront:Distribution
properties:
enabled: true
staging: true # ... other configuration ...
example:
type: aws:cloudfront:ContinuousDeploymentPolicy
properties:
enabled: true
stagingDistributionDnsNames:
items:
- ${staging.domainName}
quantity: 1
trafficConfig:
type: SingleWeight
singleWeightConfig:
weight: '0.01'
production:
type: aws:cloudfront:Distribution
properties:
enabled: true # NOTE: A continuous deployment policy cannot be associated to distribution
# # on creation. Set this argument once the resource exists.
continuousDeploymentPolicyId: ${example.id}
Single Weight Config with Session Stickiness
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.cloudfront.ContinuousDeploymentPolicy("example", {
enabled: true,
stagingDistributionDnsNames: {
items: [staging.domainName],
quantity: 1,
},
trafficConfig: {
type: "SingleWeight",
singleWeightConfig: {
weight: 0.01,
sessionStickinessConfig: {
idleTtl: 300,
maximumTtl: 600,
},
},
},
});
import pulumi
import pulumi_aws as aws
example = aws.cloudfront.ContinuousDeploymentPolicy("example",
enabled=True,
staging_distribution_dns_names={
"items": [staging["domainName"]],
"quantity": 1,
},
traffic_config={
"type": "SingleWeight",
"single_weight_config": {
"weight": 0.01,
"session_stickiness_config": {
"idle_ttl": 300,
"maximum_ttl": 600,
},
},
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfront.NewContinuousDeploymentPolicy(ctx, "example", &cloudfront.ContinuousDeploymentPolicyArgs{
Enabled: pulumi.Bool(true),
StagingDistributionDnsNames: &cloudfront.ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs{
Items: pulumi.StringArray{
staging.DomainName,
},
Quantity: pulumi.Int(1),
},
TrafficConfig: &cloudfront.ContinuousDeploymentPolicyTrafficConfigArgs{
Type: pulumi.String("SingleWeight"),
SingleWeightConfig: &cloudfront.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigArgs{
Weight: pulumi.Float64(0.01),
SessionStickinessConfig: &cloudfront.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigSessionStickinessConfigArgs{
IdleTtl: pulumi.Int(300),
MaximumTtl: pulumi.Int(600),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CloudFront.ContinuousDeploymentPolicy("example", new()
{
Enabled = true,
StagingDistributionDnsNames = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs
{
Items = new[]
{
staging.DomainName,
},
Quantity = 1,
},
TrafficConfig = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyTrafficConfigArgs
{
Type = "SingleWeight",
SingleWeightConfig = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigArgs
{
Weight = 0.01,
SessionStickinessConfig = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigSessionStickinessConfigArgs
{
IdleTtl = 300,
MaximumTtl = 600,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.ContinuousDeploymentPolicy;
import com.pulumi.aws.cloudfront.ContinuousDeploymentPolicyArgs;
import com.pulumi.aws.cloudfront.inputs.ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs;
import com.pulumi.aws.cloudfront.inputs.ContinuousDeploymentPolicyTrafficConfigArgs;
import com.pulumi.aws.cloudfront.inputs.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigArgs;
import com.pulumi.aws.cloudfront.inputs.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigSessionStickinessConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ContinuousDeploymentPolicy("example", ContinuousDeploymentPolicyArgs.builder()
.enabled(true)
.stagingDistributionDnsNames(ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs.builder()
.items(staging.domainName())
.quantity(1)
.build())
.trafficConfig(ContinuousDeploymentPolicyTrafficConfigArgs.builder()
.type("SingleWeight")
.singleWeightConfig(ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigArgs.builder()
.weight("0.01")
.sessionStickinessConfig(ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigSessionStickinessConfigArgs.builder()
.idleTtl(300)
.maximumTtl(600)
.build())
.build())
.build())
.build());
}
}
resources:
example:
type: aws:cloudfront:ContinuousDeploymentPolicy
properties:
enabled: true
stagingDistributionDnsNames:
items:
- ${staging.domainName}
quantity: 1
trafficConfig:
type: SingleWeight
singleWeightConfig:
weight: '0.01'
sessionStickinessConfig:
idleTtl: 300
maximumTtl: 600
Single Header Config
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.cloudfront.ContinuousDeploymentPolicy("example", {
enabled: true,
stagingDistributionDnsNames: {
items: [staging.domainName],
quantity: 1,
},
trafficConfig: {
type: "SingleHeader",
singleHeaderConfig: {
header: "aws-cf-cd-example",
value: "example",
},
},
});
import pulumi
import pulumi_aws as aws
example = aws.cloudfront.ContinuousDeploymentPolicy("example",
enabled=True,
staging_distribution_dns_names={
"items": [staging["domainName"]],
"quantity": 1,
},
traffic_config={
"type": "SingleHeader",
"single_header_config": {
"header": "aws-cf-cd-example",
"value": "example",
},
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfront.NewContinuousDeploymentPolicy(ctx, "example", &cloudfront.ContinuousDeploymentPolicyArgs{
Enabled: pulumi.Bool(true),
StagingDistributionDnsNames: &cloudfront.ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs{
Items: pulumi.StringArray{
staging.DomainName,
},
Quantity: pulumi.Int(1),
},
TrafficConfig: &cloudfront.ContinuousDeploymentPolicyTrafficConfigArgs{
Type: pulumi.String("SingleHeader"),
SingleHeaderConfig: &cloudfront.ContinuousDeploymentPolicyTrafficConfigSingleHeaderConfigArgs{
Header: pulumi.String("aws-cf-cd-example"),
Value: pulumi.String("example"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CloudFront.ContinuousDeploymentPolicy("example", new()
{
Enabled = true,
StagingDistributionDnsNames = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs
{
Items = new[]
{
staging.DomainName,
},
Quantity = 1,
},
TrafficConfig = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyTrafficConfigArgs
{
Type = "SingleHeader",
SingleHeaderConfig = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyTrafficConfigSingleHeaderConfigArgs
{
Header = "aws-cf-cd-example",
Value = "example",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.ContinuousDeploymentPolicy;
import com.pulumi.aws.cloudfront.ContinuousDeploymentPolicyArgs;
import com.pulumi.aws.cloudfront.inputs.ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs;
import com.pulumi.aws.cloudfront.inputs.ContinuousDeploymentPolicyTrafficConfigArgs;
import com.pulumi.aws.cloudfront.inputs.ContinuousDeploymentPolicyTrafficConfigSingleHeaderConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ContinuousDeploymentPolicy("example", ContinuousDeploymentPolicyArgs.builder()
.enabled(true)
.stagingDistributionDnsNames(ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs.builder()
.items(staging.domainName())
.quantity(1)
.build())
.trafficConfig(ContinuousDeploymentPolicyTrafficConfigArgs.builder()
.type("SingleHeader")
.singleHeaderConfig(ContinuousDeploymentPolicyTrafficConfigSingleHeaderConfigArgs.builder()
.header("aws-cf-cd-example")
.value("example")
.build())
.build())
.build());
}
}
resources:
example:
type: aws:cloudfront:ContinuousDeploymentPolicy
properties:
enabled: true
stagingDistributionDnsNames:
items:
- ${staging.domainName}
quantity: 1
trafficConfig:
type: SingleHeader
singleHeaderConfig:
header: aws-cf-cd-example
value: example
Create ContinuousDeploymentPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ContinuousDeploymentPolicy(name: string, args: ContinuousDeploymentPolicyArgs, opts?: CustomResourceOptions);
@overload
def ContinuousDeploymentPolicy(resource_name: str,
args: ContinuousDeploymentPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ContinuousDeploymentPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
staging_distribution_dns_names: Optional[ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs] = None,
traffic_config: Optional[ContinuousDeploymentPolicyTrafficConfigArgs] = None)
func NewContinuousDeploymentPolicy(ctx *Context, name string, args ContinuousDeploymentPolicyArgs, opts ...ResourceOption) (*ContinuousDeploymentPolicy, error)
public ContinuousDeploymentPolicy(string name, ContinuousDeploymentPolicyArgs args, CustomResourceOptions? opts = null)
public ContinuousDeploymentPolicy(String name, ContinuousDeploymentPolicyArgs args)
public ContinuousDeploymentPolicy(String name, ContinuousDeploymentPolicyArgs args, CustomResourceOptions options)
type: aws:cloudfront:ContinuousDeploymentPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ContinuousDeploymentPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ContinuousDeploymentPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ContinuousDeploymentPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ContinuousDeploymentPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ContinuousDeploymentPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var continuousDeploymentPolicyResource = new Aws.CloudFront.ContinuousDeploymentPolicy("continuousDeploymentPolicyResource", new()
{
Enabled = false,
StagingDistributionDnsNames = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs
{
Quantity = 0,
Items = new[]
{
"string",
},
},
TrafficConfig = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyTrafficConfigArgs
{
Type = "string",
SingleHeaderConfig = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyTrafficConfigSingleHeaderConfigArgs
{
Header = "string",
Value = "string",
},
SingleWeightConfig = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigArgs
{
Weight = 0,
SessionStickinessConfig = new Aws.CloudFront.Inputs.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigSessionStickinessConfigArgs
{
IdleTtl = 0,
MaximumTtl = 0,
},
},
},
});
example, err := cloudfront.NewContinuousDeploymentPolicy(ctx, "continuousDeploymentPolicyResource", &cloudfront.ContinuousDeploymentPolicyArgs{
Enabled: pulumi.Bool(false),
StagingDistributionDnsNames: &cloudfront.ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs{
Quantity: pulumi.Int(0),
Items: pulumi.StringArray{
pulumi.String("string"),
},
},
TrafficConfig: &cloudfront.ContinuousDeploymentPolicyTrafficConfigArgs{
Type: pulumi.String("string"),
SingleHeaderConfig: &cloudfront.ContinuousDeploymentPolicyTrafficConfigSingleHeaderConfigArgs{
Header: pulumi.String("string"),
Value: pulumi.String("string"),
},
SingleWeightConfig: &cloudfront.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigArgs{
Weight: pulumi.Float64(0),
SessionStickinessConfig: &cloudfront.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigSessionStickinessConfigArgs{
IdleTtl: pulumi.Int(0),
MaximumTtl: pulumi.Int(0),
},
},
},
})
var continuousDeploymentPolicyResource = new ContinuousDeploymentPolicy("continuousDeploymentPolicyResource", ContinuousDeploymentPolicyArgs.builder()
.enabled(false)
.stagingDistributionDnsNames(ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs.builder()
.quantity(0)
.items("string")
.build())
.trafficConfig(ContinuousDeploymentPolicyTrafficConfigArgs.builder()
.type("string")
.singleHeaderConfig(ContinuousDeploymentPolicyTrafficConfigSingleHeaderConfigArgs.builder()
.header("string")
.value("string")
.build())
.singleWeightConfig(ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigArgs.builder()
.weight(0)
.sessionStickinessConfig(ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigSessionStickinessConfigArgs.builder()
.idleTtl(0)
.maximumTtl(0)
.build())
.build())
.build())
.build());
continuous_deployment_policy_resource = aws.cloudfront.ContinuousDeploymentPolicy("continuousDeploymentPolicyResource",
enabled=False,
staging_distribution_dns_names={
"quantity": 0,
"items": ["string"],
},
traffic_config={
"type": "string",
"single_header_config": {
"header": "string",
"value": "string",
},
"single_weight_config": {
"weight": 0,
"session_stickiness_config": {
"idle_ttl": 0,
"maximum_ttl": 0,
},
},
})
const continuousDeploymentPolicyResource = new aws.cloudfront.ContinuousDeploymentPolicy("continuousDeploymentPolicyResource", {
enabled: false,
stagingDistributionDnsNames: {
quantity: 0,
items: ["string"],
},
trafficConfig: {
type: "string",
singleHeaderConfig: {
header: "string",
value: "string",
},
singleWeightConfig: {
weight: 0,
sessionStickinessConfig: {
idleTtl: 0,
maximumTtl: 0,
},
},
},
});
type: aws:cloudfront:ContinuousDeploymentPolicy
properties:
enabled: false
stagingDistributionDnsNames:
items:
- string
quantity: 0
trafficConfig:
singleHeaderConfig:
header: string
value: string
singleWeightConfig:
sessionStickinessConfig:
idleTtl: 0
maximumTtl: 0
weight: 0
type: string
ContinuousDeploymentPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ContinuousDeploymentPolicy resource accepts the following input properties:
- Enabled bool
- Whether this continuous deployment policy is enabled.
- Staging
Distribution ContinuousDns Names Deployment Policy Staging Distribution Dns Names - CloudFront domain name of the staging distribution. See
staging_distribution_dns_names
. - Traffic
Config ContinuousDeployment Policy Traffic Config - Parameters for routing production traffic from primary to staging distributions. See
traffic_config
.
- Enabled bool
- Whether this continuous deployment policy is enabled.
- Staging
Distribution ContinuousDns Names Deployment Policy Staging Distribution Dns Names Args - CloudFront domain name of the staging distribution. See
staging_distribution_dns_names
. - Traffic
Config ContinuousDeployment Policy Traffic Config Args - Parameters for routing production traffic from primary to staging distributions. See
traffic_config
.
- enabled Boolean
- Whether this continuous deployment policy is enabled.
- staging
Distribution ContinuousDns Names Deployment Policy Staging Distribution Dns Names - CloudFront domain name of the staging distribution. See
staging_distribution_dns_names
. - traffic
Config ContinuousDeployment Policy Traffic Config - Parameters for routing production traffic from primary to staging distributions. See
traffic_config
.
- enabled boolean
- Whether this continuous deployment policy is enabled.
- staging
Distribution ContinuousDns Names Deployment Policy Staging Distribution Dns Names - CloudFront domain name of the staging distribution. See
staging_distribution_dns_names
. - traffic
Config ContinuousDeployment Policy Traffic Config - Parameters for routing production traffic from primary to staging distributions. See
traffic_config
.
- enabled bool
- Whether this continuous deployment policy is enabled.
- staging_
distribution_ Continuousdns_ names Deployment Policy Staging Distribution Dns Names Args - CloudFront domain name of the staging distribution. See
staging_distribution_dns_names
. - traffic_
config ContinuousDeployment Policy Traffic Config Args - Parameters for routing production traffic from primary to staging distributions. See
traffic_config
.
- enabled Boolean
- Whether this continuous deployment policy is enabled.
- staging
Distribution Property MapDns Names - CloudFront domain name of the staging distribution. See
staging_distribution_dns_names
. - traffic
Config Property Map - Parameters for routing production traffic from primary to staging distributions. See
traffic_config
.
Outputs
All input properties are implicitly available as output properties. Additionally, the ContinuousDeploymentPolicy resource produces the following output properties:
- Etag string
- Current version of the continuous distribution policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified stringTime - Date and time the continuous deployment policy was last modified.
- Etag string
- Current version of the continuous distribution policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified stringTime - Date and time the continuous deployment policy was last modified.
- etag String
- Current version of the continuous distribution policy.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified StringTime - Date and time the continuous deployment policy was last modified.
- etag string
- Current version of the continuous distribution policy.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Modified stringTime - Date and time the continuous deployment policy was last modified.
- etag str
- Current version of the continuous distribution policy.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
modified_ strtime - Date and time the continuous deployment policy was last modified.
- etag String
- Current version of the continuous distribution policy.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified StringTime - Date and time the continuous deployment policy was last modified.
Look up Existing ContinuousDeploymentPolicy Resource
Get an existing ContinuousDeploymentPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ContinuousDeploymentPolicyState, opts?: CustomResourceOptions): ContinuousDeploymentPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
etag: Optional[str] = None,
last_modified_time: Optional[str] = None,
staging_distribution_dns_names: Optional[ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs] = None,
traffic_config: Optional[ContinuousDeploymentPolicyTrafficConfigArgs] = None) -> ContinuousDeploymentPolicy
func GetContinuousDeploymentPolicy(ctx *Context, name string, id IDInput, state *ContinuousDeploymentPolicyState, opts ...ResourceOption) (*ContinuousDeploymentPolicy, error)
public static ContinuousDeploymentPolicy Get(string name, Input<string> id, ContinuousDeploymentPolicyState? state, CustomResourceOptions? opts = null)
public static ContinuousDeploymentPolicy get(String name, Output<String> id, ContinuousDeploymentPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Enabled bool
- Whether this continuous deployment policy is enabled.
- Etag string
- Current version of the continuous distribution policy.
- Last
Modified stringTime - Date and time the continuous deployment policy was last modified.
- Staging
Distribution ContinuousDns Names Deployment Policy Staging Distribution Dns Names - CloudFront domain name of the staging distribution. See
staging_distribution_dns_names
. - Traffic
Config ContinuousDeployment Policy Traffic Config - Parameters for routing production traffic from primary to staging distributions. See
traffic_config
.
- Enabled bool
- Whether this continuous deployment policy is enabled.
- Etag string
- Current version of the continuous distribution policy.
- Last
Modified stringTime - Date and time the continuous deployment policy was last modified.
- Staging
Distribution ContinuousDns Names Deployment Policy Staging Distribution Dns Names Args - CloudFront domain name of the staging distribution. See
staging_distribution_dns_names
. - Traffic
Config ContinuousDeployment Policy Traffic Config Args - Parameters for routing production traffic from primary to staging distributions. See
traffic_config
.
- enabled Boolean
- Whether this continuous deployment policy is enabled.
- etag String
- Current version of the continuous distribution policy.
- last
Modified StringTime - Date and time the continuous deployment policy was last modified.
- staging
Distribution ContinuousDns Names Deployment Policy Staging Distribution Dns Names - CloudFront domain name of the staging distribution. See
staging_distribution_dns_names
. - traffic
Config ContinuousDeployment Policy Traffic Config - Parameters for routing production traffic from primary to staging distributions. See
traffic_config
.
- enabled boolean
- Whether this continuous deployment policy is enabled.
- etag string
- Current version of the continuous distribution policy.
- last
Modified stringTime - Date and time the continuous deployment policy was last modified.
- staging
Distribution ContinuousDns Names Deployment Policy Staging Distribution Dns Names - CloudFront domain name of the staging distribution. See
staging_distribution_dns_names
. - traffic
Config ContinuousDeployment Policy Traffic Config - Parameters for routing production traffic from primary to staging distributions. See
traffic_config
.
- enabled bool
- Whether this continuous deployment policy is enabled.
- etag str
- Current version of the continuous distribution policy.
- last_
modified_ strtime - Date and time the continuous deployment policy was last modified.
- staging_
distribution_ Continuousdns_ names Deployment Policy Staging Distribution Dns Names Args - CloudFront domain name of the staging distribution. See
staging_distribution_dns_names
. - traffic_
config ContinuousDeployment Policy Traffic Config Args - Parameters for routing production traffic from primary to staging distributions. See
traffic_config
.
- enabled Boolean
- Whether this continuous deployment policy is enabled.
- etag String
- Current version of the continuous distribution policy.
- last
Modified StringTime - Date and time the continuous deployment policy was last modified.
- staging
Distribution Property MapDns Names - CloudFront domain name of the staging distribution. See
staging_distribution_dns_names
. - traffic
Config Property Map - Parameters for routing production traffic from primary to staging distributions. See
traffic_config
.
Supporting Types
ContinuousDeploymentPolicyStagingDistributionDnsNames, ContinuousDeploymentPolicyStagingDistributionDnsNamesArgs
ContinuousDeploymentPolicyTrafficConfig, ContinuousDeploymentPolicyTrafficConfigArgs
- Type string
- Type of traffic configuration. Valid values are
SingleWeight
andSingleHeader
. - Single
Header ContinuousConfig Deployment Policy Traffic Config Single Header Config - Determines which HTTP requests are sent to the staging distribution. See
single_header_config
. - Single
Weight ContinuousConfig Deployment Policy Traffic Config Single Weight Config - Contains the percentage of traffic to send to the staging distribution. See
single_weight_config
.
- Type string
- Type of traffic configuration. Valid values are
SingleWeight
andSingleHeader
. - Single
Header ContinuousConfig Deployment Policy Traffic Config Single Header Config - Determines which HTTP requests are sent to the staging distribution. See
single_header_config
. - Single
Weight ContinuousConfig Deployment Policy Traffic Config Single Weight Config - Contains the percentage of traffic to send to the staging distribution. See
single_weight_config
.
- type String
- Type of traffic configuration. Valid values are
SingleWeight
andSingleHeader
. - single
Header ContinuousConfig Deployment Policy Traffic Config Single Header Config - Determines which HTTP requests are sent to the staging distribution. See
single_header_config
. - single
Weight ContinuousConfig Deployment Policy Traffic Config Single Weight Config - Contains the percentage of traffic to send to the staging distribution. See
single_weight_config
.
- type string
- Type of traffic configuration. Valid values are
SingleWeight
andSingleHeader
. - single
Header ContinuousConfig Deployment Policy Traffic Config Single Header Config - Determines which HTTP requests are sent to the staging distribution. See
single_header_config
. - single
Weight ContinuousConfig Deployment Policy Traffic Config Single Weight Config - Contains the percentage of traffic to send to the staging distribution. See
single_weight_config
.
- type str
- Type of traffic configuration. Valid values are
SingleWeight
andSingleHeader
. - single_
header_ Continuousconfig Deployment Policy Traffic Config Single Header Config - Determines which HTTP requests are sent to the staging distribution. See
single_header_config
. - single_
weight_ Continuousconfig Deployment Policy Traffic Config Single Weight Config - Contains the percentage of traffic to send to the staging distribution. See
single_weight_config
.
- type String
- Type of traffic configuration. Valid values are
SingleWeight
andSingleHeader
. - single
Header Property MapConfig - Determines which HTTP requests are sent to the staging distribution. See
single_header_config
. - single
Weight Property MapConfig - Contains the percentage of traffic to send to the staging distribution. See
single_weight_config
.
ContinuousDeploymentPolicyTrafficConfigSingleHeaderConfig, ContinuousDeploymentPolicyTrafficConfigSingleHeaderConfigArgs
ContinuousDeploymentPolicyTrafficConfigSingleWeightConfig, ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigArgs
- Weight double
- The percentage of traffic to send to a staging distribution, expressed as a decimal number between
0
and.15
. - Session
Stickiness ContinuousConfig Deployment Policy Traffic Config Single Weight Config Session Stickiness Config - Session stickiness provides the ability to define multiple requests from a single viewer as a single session. This prevents the potentially inconsistent experience of sending some of a given user's requests to the staging distribution, while others are sent to the primary distribution. Define the session duration using TTL values. See
session_stickiness_config
.
- Weight float64
- The percentage of traffic to send to a staging distribution, expressed as a decimal number between
0
and.15
. - Session
Stickiness ContinuousConfig Deployment Policy Traffic Config Single Weight Config Session Stickiness Config - Session stickiness provides the ability to define multiple requests from a single viewer as a single session. This prevents the potentially inconsistent experience of sending some of a given user's requests to the staging distribution, while others are sent to the primary distribution. Define the session duration using TTL values. See
session_stickiness_config
.
- weight Double
- The percentage of traffic to send to a staging distribution, expressed as a decimal number between
0
and.15
. - session
Stickiness ContinuousConfig Deployment Policy Traffic Config Single Weight Config Session Stickiness Config - Session stickiness provides the ability to define multiple requests from a single viewer as a single session. This prevents the potentially inconsistent experience of sending some of a given user's requests to the staging distribution, while others are sent to the primary distribution. Define the session duration using TTL values. See
session_stickiness_config
.
- weight number
- The percentage of traffic to send to a staging distribution, expressed as a decimal number between
0
and.15
. - session
Stickiness ContinuousConfig Deployment Policy Traffic Config Single Weight Config Session Stickiness Config - Session stickiness provides the ability to define multiple requests from a single viewer as a single session. This prevents the potentially inconsistent experience of sending some of a given user's requests to the staging distribution, while others are sent to the primary distribution. Define the session duration using TTL values. See
session_stickiness_config
.
- weight float
- The percentage of traffic to send to a staging distribution, expressed as a decimal number between
0
and.15
. - session_
stickiness_ Continuousconfig Deployment Policy Traffic Config Single Weight Config Session Stickiness Config - Session stickiness provides the ability to define multiple requests from a single viewer as a single session. This prevents the potentially inconsistent experience of sending some of a given user's requests to the staging distribution, while others are sent to the primary distribution. Define the session duration using TTL values. See
session_stickiness_config
.
- weight Number
- The percentage of traffic to send to a staging distribution, expressed as a decimal number between
0
and.15
. - session
Stickiness Property MapConfig - Session stickiness provides the ability to define multiple requests from a single viewer as a single session. This prevents the potentially inconsistent experience of sending some of a given user's requests to the staging distribution, while others are sent to the primary distribution. Define the session duration using TTL values. See
session_stickiness_config
.
ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigSessionStickinessConfig, ContinuousDeploymentPolicyTrafficConfigSingleWeightConfigSessionStickinessConfigArgs
- Idle
Ttl int - The amount of time in seconds after which sessions will cease if no requests are received. Valid values are
300
–3600
(5–60 minutes). The value must be less than or equal tomaximum_ttl
. - Maximum
Ttl int - The maximum amount of time in seconds to consider requests from the viewer as being part of the same session. Valid values are
300
–3600
(5–60 minutes). The value must be greater than or equal toidle_ttl
.
- Idle
Ttl int - The amount of time in seconds after which sessions will cease if no requests are received. Valid values are
300
–3600
(5–60 minutes). The value must be less than or equal tomaximum_ttl
. - Maximum
Ttl int - The maximum amount of time in seconds to consider requests from the viewer as being part of the same session. Valid values are
300
–3600
(5–60 minutes). The value must be greater than or equal toidle_ttl
.
- idle
Ttl Integer - The amount of time in seconds after which sessions will cease if no requests are received. Valid values are
300
–3600
(5–60 minutes). The value must be less than or equal tomaximum_ttl
. - maximum
Ttl Integer - The maximum amount of time in seconds to consider requests from the viewer as being part of the same session. Valid values are
300
–3600
(5–60 minutes). The value must be greater than or equal toidle_ttl
.
- idle
Ttl number - The amount of time in seconds after which sessions will cease if no requests are received. Valid values are
300
–3600
(5–60 minutes). The value must be less than or equal tomaximum_ttl
. - maximum
Ttl number - The maximum amount of time in seconds to consider requests from the viewer as being part of the same session. Valid values are
300
–3600
(5–60 minutes). The value must be greater than or equal toidle_ttl
.
- idle_
ttl int - The amount of time in seconds after which sessions will cease if no requests are received. Valid values are
300
–3600
(5–60 minutes). The value must be less than or equal tomaximum_ttl
. - maximum_
ttl int - The maximum amount of time in seconds to consider requests from the viewer as being part of the same session. Valid values are
300
–3600
(5–60 minutes). The value must be greater than or equal toidle_ttl
.
- idle
Ttl Number - The amount of time in seconds after which sessions will cease if no requests are received. Valid values are
300
–3600
(5–60 minutes). The value must be less than or equal tomaximum_ttl
. - maximum
Ttl Number - The maximum amount of time in seconds to consider requests from the viewer as being part of the same session. Valid values are
300
–3600
(5–60 minutes). The value must be greater than or equal toidle_ttl
.
Import
Using pulumi import
, import CloudFront Continuous Deployment Policy using the id
. For example:
$ pulumi import aws:cloudfront/continuousDeploymentPolicy:ContinuousDeploymentPolicy example abcd-1234
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.