Class: AWSCDK::APIGatewayv2::CfnStageProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gatewayv2/cfn_stage_props.rb

Overview

Properties for defining a CfnStage.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_id:, stage_name:, access_log_settings: nil, access_policy_id: nil, auto_deploy: nil, client_certificate_id: nil, default_route_settings: nil, deployment_id: nil, description: nil, route_settings: nil, stage_variables: nil, tags: nil) ⇒ CfnStageProps

Returns a new instance of CfnStageProps.

Parameters:

  • api_id (String)

    The API identifier.

  • stage_name (String)

    The stage name.

  • access_log_settings (AWSCDK::IResolvable, AWSCDK::APIGatewayv2::CfnStage::AccessLogSettingsProperty, nil) (defaults to: nil)

    Settings for logging access in this stage.

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

    This parameter is not currently supported.

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

    Specifies whether updates to an API automatically trigger a new deployment.

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

    The identifier of a client certificate for a Stage .

  • default_route_settings (AWSCDK::IResolvable, AWSCDK::APIGatewayv2::CfnStage::RouteSettingsProperty, nil) (defaults to: nil)

    The default route settings for the stage.

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

    The deployment identifier for the API stage.

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

    The description for the API stage.

  • route_settings (Object, nil) (defaults to: nil)

    Route settings for the stage.

  • stage_variables (Object, nil) (defaults to: nil)

    A map that defines the stage variables for a Stage .

  • tags (Object, nil) (defaults to: nil)

    The collection of tags.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'api_gatewayv2/cfn_stage_props.rb', line 21

def initialize(api_id:, stage_name:, access_log_settings: nil, access_policy_id: nil, auto_deploy: nil, client_certificate_id: nil, default_route_settings: nil, deployment_id: nil, description: nil, route_settings: nil, stage_variables: nil, tags: nil)
  @api_id = api_id
  Jsii::Type.check_type(@api_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiId")
  @stage_name = stage_name
  Jsii::Type.check_type(@stage_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stageName")
  @access_log_settings = access_log_settings.is_a?(Hash) ? ::AWSCDK::APIGatewayv2::CfnStage::AccessLogSettingsProperty.new(**access_log_settings.transform_keys(&:to_sym)) : access_log_settings
  Jsii::Type.check_type(@access_log_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5djIuQ2ZuU3RhZ2UuQWNjZXNzTG9nU2V0dGluZ3NQcm9wZXJ0eSJ9XX19")), "accessLogSettings") unless @access_log_settings.nil?
  @access_policy_id = access_policy_id
  Jsii::Type.check_type(@access_policy_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accessPolicyId") unless @access_policy_id.nil?
  @auto_deploy = auto_deploy
  Jsii::Type.check_type(@auto_deploy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "autoDeploy") unless @auto_deploy.nil?
  @client_certificate_id = client_certificate_id
  Jsii::Type.check_type(@client_certificate_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientCertificateId") unless @client_certificate_id.nil?
  @default_route_settings = default_route_settings.is_a?(Hash) ? ::AWSCDK::APIGatewayv2::CfnStage::RouteSettingsProperty.new(**default_route_settings.transform_keys(&:to_sym)) : default_route_settings
  Jsii::Type.check_type(@default_route_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5djIuQ2ZuU3RhZ2UuUm91dGVTZXR0aW5nc1Byb3BlcnR5In1dfX0=")), "defaultRouteSettings") unless @default_route_settings.nil?
  @deployment_id = deployment_id
  Jsii::Type.check_type(@deployment_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deploymentId") unless @deployment_id.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @route_settings = route_settings
  Jsii::Type.check_type(@route_settings, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "routeSettings") unless @route_settings.nil?
  @stage_variables = stage_variables
  Jsii::Type.check_type(@stage_variables, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "stageVariables") unless @stage_variables.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "tags") unless @tags.nil?
end

Instance Attribute Details

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

Settings for logging access in this stage.



64
65
66
# File 'api_gatewayv2/cfn_stage_props.rb', line 64

def access_log_settings
  @access_log_settings
end

#access_policy_idString? (readonly)

This parameter is not currently supported.



69
70
71
# File 'api_gatewayv2/cfn_stage_props.rb', line 69

def access_policy_id
  @access_policy_id
end

#api_idString (readonly)

The API identifier.



52
53
54
# File 'api_gatewayv2/cfn_stage_props.rb', line 52

def api_id
  @api_id
end

#auto_deployBoolean, ... (readonly)

Specifies whether updates to an API automatically trigger a new deployment.

The default value is false .



76
77
78
# File 'api_gatewayv2/cfn_stage_props.rb', line 76

def auto_deploy
  @auto_deploy
end

#client_certificate_idString? (readonly)

The identifier of a client certificate for a Stage .

Supported only for WebSocket APIs.



83
84
85
# File 'api_gatewayv2/cfn_stage_props.rb', line 83

def client_certificate_id
  @client_certificate_id
end

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

The default route settings for the stage.



88
89
90
# File 'api_gatewayv2/cfn_stage_props.rb', line 88

def default_route_settings
  @default_route_settings
end

#deployment_idString? (readonly)

The deployment identifier for the API stage.

Can't be updated if auto_deploy is enabled.



95
96
97
# File 'api_gatewayv2/cfn_stage_props.rb', line 95

def deployment_id
  @deployment_id
end

#descriptionString? (readonly)

The description for the API stage.



100
101
102
# File 'api_gatewayv2/cfn_stage_props.rb', line 100

def description
  @description
end

#route_settingsObject? (readonly)

Route settings for the stage.



105
106
107
# File 'api_gatewayv2/cfn_stage_props.rb', line 105

def route_settings
  @route_settings
end

#stage_nameString (readonly)

The stage name.

Stage names can contain only alphanumeric characters, hyphens, and underscores, or be $default . Maximum length is 128 characters.



59
60
61
# File 'api_gatewayv2/cfn_stage_props.rb', line 59

def stage_name
  @stage_name
end

#stage_variablesObject? (readonly)

A map that defines the stage variables for a Stage .

Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.



112
113
114
# File 'api_gatewayv2/cfn_stage_props.rb', line 112

def stage_variables
  @stage_variables
end

#tagsObject? (readonly)

The collection of tags.

Each tag element is associated with a given resource.



119
120
121
# File 'api_gatewayv2/cfn_stage_props.rb', line 119

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'api_gatewayv2/cfn_stage_props.rb', line 121

def self.jsii_properties
  {
    :api_id => "apiId",
    :stage_name => "stageName",
    :access_log_settings => "accessLogSettings",
    :access_policy_id => "accessPolicyId",
    :auto_deploy => "autoDeploy",
    :client_certificate_id => "clientCertificateId",
    :default_route_settings => "defaultRouteSettings",
    :deployment_id => "deploymentId",
    :description => "description",
    :route_settings => "routeSettings",
    :stage_variables => "stageVariables",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'api_gatewayv2/cfn_stage_props.rb', line 138

def to_jsii
  result = {}
  result.merge!({
    "apiId" => @api_id,
    "stageName" => @stage_name,
    "accessLogSettings" => @access_log_settings,
    "accessPolicyId" => @access_policy_id,
    "autoDeploy" => @auto_deploy,
    "clientCertificateId" => @client_certificate_id,
    "defaultRouteSettings" => @default_route_settings,
    "deploymentId" => @deployment_id,
    "description" => @description,
    "routeSettings" => @route_settings,
    "stageVariables" => @stage_variables,
    "tags" => @tags,
  })
  result.compact
end