Class: AWSCDK::APIGateway::CfnStage::CanarySettingProperty

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

Overview

Configuration settings of a canary deployment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of CanarySettingProperty.

Parameters:

  • deployment_id (String, nil) (defaults to: nil)

    The ID of the canary deployment.

  • 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.



723
724
725
726
727
728
729
730
731
732
# File 'api_gateway/cfn_stage.rb', line 723

def initialize(deployment_id: nil, percent_traffic: nil, stage_variable_overrides: nil, use_stage_cache: nil)
  @deployment_id = deployment_id
  Jsii::Type.check_type(@deployment_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deploymentId") unless @deployment_id.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

#deployment_idString? (readonly)

The ID of the canary deployment.



738
739
740
# File 'api_gateway/cfn_stage.rb', line 738

def deployment_id
  @deployment_id
end

#percent_trafficNumeric? (readonly)

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



743
744
745
# File 'api_gateway/cfn_stage.rb', line 743

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.



750
751
752
# File 'api_gateway/cfn_stage.rb', line 750

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.



755
756
757
# File 'api_gateway/cfn_stage.rb', line 755

def use_stage_cache
  @use_stage_cache
end

Class Method Details

.jsii_propertiesObject



757
758
759
760
761
762
763
764
# File 'api_gateway/cfn_stage.rb', line 757

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

Instance Method Details

#to_jsiiObject



766
767
768
769
770
771
772
773
774
775
# File 'api_gateway/cfn_stage.rb', line 766

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