Class: AWSCDK::APIGateway::CfnDeployment::CanarySettingProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gateway/cfn_deployment.rb

Overview

The CanarySetting property type specifies settings for the canary deployment in this stage.

CanarySetting is a property of the StageDescription property type.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(percent_traffic: nil, stage_variable_overrides: nil, use_stage_cache: nil) ⇒ CanarySettingProperty

Returns a new instance of CanarySettingProperty.

Parameters:

  • percent_traffic (Numeric, nil) (defaults to: nil)

    The percent (0-100) of traffic diverted to a canary deployment.

  • stage_variable_overrides (AWSCDK::IResolvable, Hash{String => String}, nil) (defaults to: nil)

    Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary.

  • use_stage_cache (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    A Boolean flag to indicate whether the canary deployment uses the stage cache or not.



611
612
613
614
615
616
617
618
# File 'api_gateway/cfn_deployment.rb', line 611

def initialize(percent_traffic: nil, stage_variable_overrides: nil, use_stage_cache: nil)
  @percent_traffic = percent_traffic
  Jsii::Type.check_type(@percent_traffic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "percentTraffic") unless @percent_traffic.nil?
  @stage_variable_overrides = stage_variable_overrides
  Jsii::Type.check_type(@stage_variable_overrides, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "stageVariableOverrides") unless @stage_variable_overrides.nil?
  @use_stage_cache = use_stage_cache
  Jsii::Type.check_type(@use_stage_cache, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "useStageCache") unless @use_stage_cache.nil?
end

Instance Attribute Details

#percent_trafficNumeric? (readonly)

The percent (0-100) of traffic diverted to a canary deployment.



624
625
626
# File 'api_gateway/cfn_deployment.rb', line 624

def percent_traffic
  @percent_traffic
end

#stage_variable_overridesAWSCDK::IResolvable, ... (readonly)

Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary.

These stage variables are represented as a string-to-string map between stage variable names and their values.



631
632
633
# File 'api_gateway/cfn_deployment.rb', line 631

def stage_variable_overrides
  @stage_variable_overrides
end

#use_stage_cacheBoolean, ... (readonly)

A Boolean flag to indicate whether the canary deployment uses the stage cache or not.



636
637
638
# File 'api_gateway/cfn_deployment.rb', line 636

def use_stage_cache
  @use_stage_cache
end

Class Method Details

.jsii_propertiesObject



638
639
640
641
642
643
644
# File 'api_gateway/cfn_deployment.rb', line 638

def self.jsii_properties
  {
    :percent_traffic => "percentTraffic",
    :stage_variable_overrides => "stageVariableOverrides",
    :use_stage_cache => "useStageCache",
  }
end

Instance Method Details

#to_jsiiObject



646
647
648
649
650
651
652
653
654
# File 'api_gateway/cfn_deployment.rb', line 646

def to_jsii
  result = {}
  result.merge!({
    "percentTraffic" => @percent_traffic,
    "stageVariableOverrides" => @stage_variable_overrides,
    "useStageCache" => @use_stage_cache,
  })
  result.compact
end