Class: AWSCDK::APIGateway::CfnDeploymentProps

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

Overview

Properties for defining a CfnDeployment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rest_api_id:, deployment_canary_settings: nil, description: nil, stage_description: nil, stage_name: nil) ⇒ CfnDeploymentProps

Returns a new instance of CfnDeploymentProps.

Parameters:



14
15
16
17
18
19
20
21
22
23
24
25
# File 'api_gateway/cfn_deployment_props.rb', line 14

def initialize(rest_api_id:, deployment_canary_settings: nil, description: nil, stage_description: nil, stage_name: nil)
  @rest_api_id = rest_api_id
  Jsii::Type.check_type(@rest_api_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5LklSZXN0QXBpUmVmIn1dfX0=")), "restApiId")
  @deployment_canary_settings = deployment_canary_settings.is_a?(Hash) ? ::AWSCDK::APIGateway::CfnDeployment::DeploymentCanarySettingsProperty.new(**deployment_canary_settings.transform_keys(&:to_sym)) : deployment_canary_settings
  Jsii::Type.check_type(@deployment_canary_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5LkNmbkRlcGxveW1lbnQuRGVwbG95bWVudENhbmFyeVNldHRpbmdzUHJvcGVydHkifV19fQ==")), "deploymentCanarySettings") unless @deployment_canary_settings.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @stage_description = stage_description.is_a?(Hash) ? ::AWSCDK::APIGateway::CfnDeployment::StageDescriptionProperty.new(**stage_description.transform_keys(&:to_sym)) : stage_description
  Jsii::Type.check_type(@stage_description, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5LkNmbkRlcGxveW1lbnQuU3RhZ2VEZXNjcmlwdGlvblByb3BlcnR5In1dfX0=")), "stageDescription") unless @stage_description.nil?
  @stage_name = stage_name
  Jsii::Type.check_type(@stage_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stageName") unless @stage_name.nil?
end

Instance Attribute Details

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

The input configuration for a canary deployment.



36
37
38
# File 'api_gateway/cfn_deployment_props.rb', line 36

def deployment_canary_settings
  @deployment_canary_settings
end

#descriptionString? (readonly)

The description for the Deployment resource to create.



41
42
43
# File 'api_gateway/cfn_deployment_props.rb', line 41

def description
  @description
end

#rest_api_idString, AWSCDK::Interfaces::AWSApigateway::IRestAPIRef (readonly)

The string identifier of the associated RestApi.



31
32
33
# File 'api_gateway/cfn_deployment_props.rb', line 31

def rest_api_id
  @rest_api_id
end

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

The description of the Stage resource for the Deployment resource to create.

To specify a stage description, you must also provide a stage name.



48
49
50
# File 'api_gateway/cfn_deployment_props.rb', line 48

def stage_description
  @stage_description
end

#stage_nameString? (readonly)

The name of the Stage resource for the Deployment resource to create.



53
54
55
# File 'api_gateway/cfn_deployment_props.rb', line 53

def stage_name
  @stage_name
end

Class Method Details

.jsii_propertiesObject



55
56
57
58
59
60
61
62
63
# File 'api_gateway/cfn_deployment_props.rb', line 55

def self.jsii_properties
  {
    :rest_api_id => "restApiId",
    :deployment_canary_settings => "deploymentCanarySettings",
    :description => "description",
    :stage_description => "stageDescription",
    :stage_name => "stageName",
  }
end

Instance Method Details

#to_jsiiObject



65
66
67
68
69
70
71
72
73
74
75
# File 'api_gateway/cfn_deployment_props.rb', line 65

def to_jsii
  result = {}
  result.merge!({
    "restApiId" => @rest_api_id,
    "deploymentCanarySettings" => @deployment_canary_settings,
    "description" => @description,
    "stageDescription" => @stage_description,
    "stageName" => @stage_name,
  })
  result.compact
end