Class: AWSCDK::Interfaces::AWSApigateway::MethodReference

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
interfaces/aws_apigateway/method_reference.rb

Overview

A reference to a Method resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_method:, resource_id:, rest_api_id:) ⇒ MethodReference

Returns a new instance of MethodReference.

Parameters:

  • http_method (String)

    The HttpMethod of the Method resource.

  • resource_id (String)

    The ResourceId of the Method resource.

  • rest_api_id (String)

    The RestApiId of the Method resource.



10
11
12
13
14
15
16
17
# File 'interfaces/aws_apigateway/method_reference.rb', line 10

def initialize(http_method:, resource_id:, rest_api_id:)
  @http_method = http_method
  Jsii::Type.check_type(@http_method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "httpMethod")
  @resource_id = resource_id
  Jsii::Type.check_type(@resource_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceId")
  @rest_api_id = rest_api_id
  Jsii::Type.check_type(@rest_api_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "restApiId")
end

Instance Attribute Details

#http_methodString (readonly)

The HttpMethod of the Method resource.

Returns:

  • (String)


22
23
24
# File 'interfaces/aws_apigateway/method_reference.rb', line 22

def http_method
  @http_method
end

#resource_idString (readonly)

The ResourceId of the Method resource.

Returns:

  • (String)


26
27
28
# File 'interfaces/aws_apigateway/method_reference.rb', line 26

def resource_id
  @resource_id
end

#rest_api_idString (readonly)

The RestApiId of the Method resource.

Returns:

  • (String)


30
31
32
# File 'interfaces/aws_apigateway/method_reference.rb', line 30

def rest_api_id
  @rest_api_id
end

Class Method Details

.jsii_propertiesObject



32
33
34
35
36
37
38
# File 'interfaces/aws_apigateway/method_reference.rb', line 32

def self.jsii_properties
  {
    :http_method => "httpMethod",
    :resource_id => "resourceId",
    :rest_api_id => "restApiId",
  }
end

Instance Method Details

#to_jsiiObject



40
41
42
43
44
45
46
47
48
# File 'interfaces/aws_apigateway/method_reference.rb', line 40

def to_jsii
  result = {}
  result.merge!({
    "httpMethod" => @http_method,
    "resourceId" => @resource_id,
    "restApiId" => @rest_api_id,
  })
  result.compact
end