Class: AWSCDK::APIGateway::RestAPIAttributes

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

Overview

Attributes that can be specified when importing a RestApi.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rest_api_id:, root_resource_id:, rest_api_name: nil) ⇒ RestAPIAttributes

Returns a new instance of RestAPIAttributes.

Parameters:

  • rest_api_id (String)

    The ID of the API Gateway RestApi.

  • root_resource_id (String)

    The resource ID of the root resource.

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

    The name of the API Gateway RestApi.



10
11
12
13
14
15
16
17
# File 'api_gateway/rest_api_attributes.rb', line 10

def initialize(rest_api_id:, root_resource_id:, rest_api_name: nil)
  @rest_api_id = rest_api_id
  Jsii::Type.check_type(@rest_api_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "restApiId")
  @root_resource_id = root_resource_id
  Jsii::Type.check_type(@root_resource_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "rootResourceId")
  @rest_api_name = rest_api_name
  Jsii::Type.check_type(@rest_api_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "restApiName") unless @rest_api_name.nil?
end

Instance Attribute Details

#rest_api_idString (readonly)

The ID of the API Gateway RestApi.

Returns:

  • (String)


22
23
24
# File 'api_gateway/rest_api_attributes.rb', line 22

def rest_api_id
  @rest_api_id
end

#rest_api_nameString? (readonly)

Note:

Default: - ID of the RestApi construct.

The name of the API Gateway RestApi.

Returns:

  • (String, nil)


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

def rest_api_name
  @rest_api_name
end

#root_resource_idString (readonly)

The resource ID of the root resource.

Returns:

  • (String)


26
27
28
# File 'api_gateway/rest_api_attributes.rb', line 26

def root_resource_id
  @root_resource_id
end

Class Method Details

.jsii_propertiesObject



33
34
35
36
37
38
39
# File 'api_gateway/rest_api_attributes.rb', line 33

def self.jsii_properties
  {
    :rest_api_id => "restApiId",
    :root_resource_id => "rootResourceId",
    :rest_api_name => "restApiName",
  }
end

Instance Method Details

#to_jsiiObject



41
42
43
44
45
46
47
48
49
# File 'api_gateway/rest_api_attributes.rb', line 41

def to_jsii
  result = {}
  result.merge!({
    "restApiId" => @rest_api_id,
    "rootResourceId" => @root_resource_id,
    "restApiName" => @rest_api_name,
  })
  result.compact
end