Class: AWSCDK::APIGatewayv2::WebSocketAPIAttributes

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

Overview

Attributes for importing a WebSocketApi into the CDK.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(web_socket_id:, api_endpoint: nil) ⇒ WebSocketAPIAttributes

Returns a new instance of WebSocketAPIAttributes.

Parameters:

  • web_socket_id (String)

    The identifier of the WebSocketApi.

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

    The endpoint URL of the WebSocketApi.



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

def initialize(web_socket_id:, api_endpoint: nil)
  @web_socket_id = web_socket_id
  Jsii::Type.check_type(@web_socket_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "webSocketId")
  @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: - throw san error if apiEndpoint is accessed.

The endpoint URL of the WebSocketApi.

Returns:

  • (String, nil)


24
25
26
# File 'api_gatewayv2/web_socket_api_attributes.rb', line 24

def api_endpoint
  @api_endpoint
end

#web_socket_idString (readonly)

The identifier of the WebSocketApi.

Returns:

  • (String)


19
20
21
# File 'api_gatewayv2/web_socket_api_attributes.rb', line 19

def web_socket_id
  @web_socket_id
end

Class Method Details

.jsii_propertiesObject



26
27
28
29
30
31
# File 'api_gatewayv2/web_socket_api_attributes.rb', line 26

def self.jsii_properties
  {
    :web_socket_id => "webSocketId",
    :api_endpoint => "apiEndpoint",
  }
end

Instance Method Details

#to_jsiiObject



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

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