Class: AWSCDK::APIGateway::ResourceAttributes

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

Overview

Attributes that can be specified when importing a Resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:, resource_id:, rest_api:) ⇒ ResourceAttributes

Returns a new instance of ResourceAttributes.

Parameters:

  • path (String)

    The full path of this resource.

  • resource_id (String)

    The ID of the resource.

  • rest_api (AWSCDK::APIGateway::IRestAPI)

    The rest API that this resource is part of.



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

def initialize(path:, resource_id:, rest_api:)
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path")
  @resource_id = resource_id
  Jsii::Type.check_type(@resource_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceId")
  @rest_api = rest_api
  Jsii::Type.check_type(@rest_api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5JUmVzdEFwaSJ9")), "restApi")
end

Instance Attribute Details

#pathString (readonly)

The full path of this resource.

Returns:

  • (String)


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

def path
  @path
end

#resource_idString (readonly)

The ID of the resource.

Returns:

  • (String)


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

def resource_id
  @resource_id
end

#rest_apiAWSCDK::APIGateway::IRestAPI (readonly)

The rest API that this resource is part of.



30
31
32
# File 'api_gateway/resource_attributes.rb', line 30

def rest_api
  @rest_api
end

Class Method Details

.jsii_propertiesObject



32
33
34
35
36
37
38
# File 'api_gateway/resource_attributes.rb', line 32

def self.jsii_properties
  {
    :path => "path",
    :resource_id => "resourceId",
    :rest_api => "restApi",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "path" => @path,
    "resourceId" => @resource_id,
    "restApi" => @rest_api,
  })
  result.compact
end