Class: AWSCDK::CloudFront::CfnContinuousDeploymentPolicy::ContinuousDeploymentPolicyConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnContinuousDeploymentPolicy::ContinuousDeploymentPolicyConfigProperty
- Defined in:
- cloud_front/cfn_continuous_deployment_policy.rb
Overview
Contains the configuration for a continuous deployment policy.
Instance Attribute Summary collapse
-
#enabled ⇒ Boolean, AWSCDK::IResolvable
readonly
A Boolean that indicates whether this continuous deployment policy is enabled (in effect).
-
#single_header_policy_config ⇒ AWSCDK::IResolvable, ...
readonly
This configuration determines which HTTP requests are sent to the staging distribution.
-
#single_weight_policy_config ⇒ AWSCDK::IResolvable, ...
readonly
This configuration determines the percentage of HTTP requests that are sent to the staging distribution.
-
#staging_distribution_dns_names ⇒ Array<String>
readonly
The CloudFront domain name of the staging distribution.
-
#traffic_config ⇒ AWSCDK::IResolvable, ...
readonly
Contains the parameters for routing production traffic from your primary to staging distributions.
-
#type ⇒ String?
readonly
The type of traffic configuration.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(enabled:, staging_distribution_dns_names:, single_header_policy_config: nil, single_weight_policy_config: nil, traffic_config: nil, type: nil) ⇒ ContinuousDeploymentPolicyConfigProperty
constructor
A new instance of ContinuousDeploymentPolicyConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(enabled:, staging_distribution_dns_names:, single_header_policy_config: nil, single_weight_policy_config: nil, traffic_config: nil, type: nil) ⇒ ContinuousDeploymentPolicyConfigProperty
Returns a new instance of ContinuousDeploymentPolicyConfigProperty.
525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'cloud_front/cfn_continuous_deployment_policy.rb', line 525 def initialize(enabled:, staging_distribution_dns_names:, single_header_policy_config: nil, single_weight_policy_config: nil, traffic_config: nil, type: nil) @enabled = enabled Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") @staging_distribution_dns_names = staging_distribution_dns_names Jsii::Type.check_type(@staging_distribution_dns_names, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "stagingDistributionDnsNames") @single_header_policy_config = single_header_policy_config.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnContinuousDeploymentPolicy::SingleHeaderPolicyConfigProperty.new(**single_header_policy_config.transform_keys(&:to_sym)) : single_header_policy_config Jsii::Type.check_type(@single_header_policy_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkNvbnRpbnVvdXNEZXBsb3ltZW50UG9saWN5LlNpbmdsZUhlYWRlclBvbGljeUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "singleHeaderPolicyConfig") unless @single_header_policy_config.nil? @single_weight_policy_config = single_weight_policy_config.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnContinuousDeploymentPolicy::SingleWeightPolicyConfigProperty.new(**single_weight_policy_config.transform_keys(&:to_sym)) : single_weight_policy_config Jsii::Type.check_type(@single_weight_policy_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkNvbnRpbnVvdXNEZXBsb3ltZW50UG9saWN5LlNpbmdsZVdlaWdodFBvbGljeUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "singleWeightPolicyConfig") unless @single_weight_policy_config.nil? @traffic_config = traffic_config.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnContinuousDeploymentPolicy::TrafficConfigProperty.new(**traffic_config.transform_keys(&:to_sym)) : traffic_config Jsii::Type.check_type(@traffic_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkNvbnRpbnVvdXNEZXBsb3ltZW50UG9saWN5LlRyYWZmaWNDb25maWdQcm9wZXJ0eSJ9XX19")), "trafficConfig") unless @traffic_config.nil? @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") unless @type.nil? end |
Instance Attribute Details
#enabled ⇒ Boolean, AWSCDK::IResolvable (readonly)
A Boolean that indicates whether this continuous deployment policy is enabled (in effect).
When this value is true , this policy is enabled and in effect. When this value is false , this policy is not enabled and has no effect.
546 547 548 |
# File 'cloud_front/cfn_continuous_deployment_policy.rb', line 546 def enabled @enabled end |
#single_header_policy_config ⇒ AWSCDK::IResolvable, ... (readonly)
This configuration determines which HTTP requests are sent to the staging distribution.
If the HTTP request contains a header and value that matches what you specify here, the request is sent to the staging distribution. Otherwise the request is sent to the primary distribution.
560 561 562 |
# File 'cloud_front/cfn_continuous_deployment_policy.rb', line 560 def single_header_policy_config @single_header_policy_config end |
#single_weight_policy_config ⇒ AWSCDK::IResolvable, ... (readonly)
This configuration determines the percentage of HTTP requests that are sent to the staging distribution.
565 566 567 |
# File 'cloud_front/cfn_continuous_deployment_policy.rb', line 565 def single_weight_policy_config @single_weight_policy_config end |
#staging_distribution_dns_names ⇒ Array<String> (readonly)
The CloudFront domain name of the staging distribution.
For example: d111111abcdef8.cloudfront.net .
553 554 555 |
# File 'cloud_front/cfn_continuous_deployment_policy.rb', line 553 def staging_distribution_dns_names @staging_distribution_dns_names end |
#traffic_config ⇒ AWSCDK::IResolvable, ... (readonly)
Contains the parameters for routing production traffic from your primary to staging distributions.
570 571 572 |
# File 'cloud_front/cfn_continuous_deployment_policy.rb', line 570 def traffic_config @traffic_config end |
#type ⇒ String? (readonly)
The type of traffic configuration.
575 576 577 |
# File 'cloud_front/cfn_continuous_deployment_policy.rb', line 575 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
577 578 579 580 581 582 583 584 585 586 |
# File 'cloud_front/cfn_continuous_deployment_policy.rb', line 577 def self.jsii_properties { :enabled => "enabled", :staging_distribution_dns_names => "stagingDistributionDnsNames", :single_header_policy_config => "singleHeaderPolicyConfig", :single_weight_policy_config => "singleWeightPolicyConfig", :traffic_config => "trafficConfig", :type => "type", } end |
Instance Method Details
#to_jsii ⇒ Object
588 589 590 591 592 593 594 595 596 597 598 599 |
# File 'cloud_front/cfn_continuous_deployment_policy.rb', line 588 def to_jsii result = {} result.merge!({ "enabled" => @enabled, "stagingDistributionDnsNames" => @staging_distribution_dns_names, "singleHeaderPolicyConfig" => @single_header_policy_config, "singleWeightPolicyConfig" => @single_weight_policy_config, "trafficConfig" => @traffic_config, "type" => @type, }) result.compact end |