Class: AWSCDK::APIGatewayv2::WebSocketAPIKeySelectionExpression

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

Overview

Represents the currently available API Key Selection Expressions.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(custom_api_key_selector) ⇒ WebSocketAPIKeySelectionExpression

Returns a new instance of WebSocketAPIKeySelectionExpression.

Parameters:

  • custom_api_key_selector (String)

    The expression used by API Gateway.



9
10
11
12
# File 'api_gatewayv2/web_socket_api_key_selection_expression.rb', line 9

def initialize(custom_api_key_selector)
  Jsii::Type.check_type(custom_api_key_selector, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customApiKeySelector")
  Jsii::Object.instance_method(:initialize).bind(self).call(custom_api_key_selector)
end

Class Method Details

.AUTHORIZER_USAGE_IDENTIFIER_KEYAWSCDK::APIGatewayv2::WebSocketAPIKeySelectionExpression

The API will extract the key value from the usageIdentifierKey attribute in the context map, returned by the Lambda Authorizer.

See https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html

Returns:

  • (AWSCDK::APIGatewayv2::WebSocketAPIKeySelectionExpression)


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

def self.AUTHORIZER_USAGE_IDENTIFIER_KEY()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_apigatewayv2.WebSocketApiKeySelectionExpression", "AUTHORIZER_USAGE_IDENTIFIER_KEY")
end

.HEADER_X_API_KEYAWSCDK::APIGatewayv2::WebSocketAPIKeySelectionExpression

The API will extract the key value from the x-api-key header in the user request.

Returns:

  • (AWSCDK::APIGatewayv2::WebSocketAPIKeySelectionExpression)


32
33
34
# File 'api_gatewayv2/web_socket_api_key_selection_expression.rb', line 32

def self.HEADER_X_API_KEY()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_apigatewayv2.WebSocketApiKeySelectionExpression", "HEADER_X_API_KEY")
end

.jsii_overridable_methodsObject



14
15
16
17
18
# File 'api_gatewayv2/web_socket_api_key_selection_expression.rb', line 14

def self.jsii_overridable_methods
  {
    :custom_api_key_selector => { kind: :property, name: "customApiKeySelector", is_optional: false },
  }
end

Instance Method Details

#custom_api_key_selectorString

The expression used by API Gateway.

Returns:

  • (String)


39
40
41
# File 'api_gatewayv2/web_socket_api_key_selection_expression.rb', line 39

def custom_api_key_selector()
  jsii_get_property("customApiKeySelector")
end