Class: AWSCDK::APIGatewayv2::HttpAPIAttributes

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

Overview

Attributes for importing an HttpApi into the CDK.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_api_id:, api_endpoint: nil) ⇒ HttpAPIAttributes

Returns a new instance of HttpAPIAttributes.

Parameters:

  • http_api_id (String)

    The identifier of the HttpApi.

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

    The endpoint URL of the HttpApi.



9
10
11
12
13
14
# File 'api_gatewayv2/http_api_attributes.rb', line 9

def initialize(http_api_id:, api_endpoint: nil)
  @http_api_id = http_api_id
  Jsii::Type.check_type(@http_api_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "httpApiId")
  @api_endpoint = api_endpoint
  Jsii::Type.check_type(@api_endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiEndpoint") unless @api_endpoint.nil?
end

Instance Attribute Details

#api_endpointString? (readonly)

Note:

Default: - throws an error if apiEndpoint is accessed.

The endpoint URL of the HttpApi.

Returns:

  • (String, nil)


25
26
27
# File 'api_gatewayv2/http_api_attributes.rb', line 25

def api_endpoint
  @api_endpoint
end

#http_api_idString (readonly)

The identifier of the HttpApi.



20
21
22
# File 'api_gatewayv2/http_api_attributes.rb', line 20

def http_api_id
  @http_api_id
end

Class Method Details

.jsii_propertiesObject



27
28
29
30
31
32
# File 'api_gatewayv2/http_api_attributes.rb', line 27

def self.jsii_properties
  {
    :http_api_id => "httpApiId",
    :api_endpoint => "apiEndpoint",
  }
end

Instance Method Details

#to_jsiiObject



34
35
36
37
38
39
40
41
# File 'api_gatewayv2/http_api_attributes.rb', line 34

def to_jsii
  result = {}
  result.merge!({
    "httpApiId" => @http_api_id,
    "apiEndpoint" => @api_endpoint,
  })
  result.compact
end