Class: AWSCDK::CloudFront::CfnContinuousDeploymentPolicy::ContinuousDeploymentPolicyConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_front/cfn_continuous_deployment_policy.rb

Overview

Contains the configuration for a continuous deployment policy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:



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

#enabledBoolean, 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_configAWSCDK::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_configAWSCDK::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_namesArray<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_configAWSCDK::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

#typeString? (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_propertiesObject



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_jsiiObject



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