Class: AWSCDK::APIGatewayv2::HttpAPIHelper

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

Overview

Calculations and operations for HTTP APIs.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ HttpAPIHelper

Returns a new instance of HttpAPIHelper.

Raises:

  • (NoMethodError)


8
9
10
# File 'api_gatewayv2/http_api_helper.rb', line 8

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.aws_apigatewayv2.HttpApiHelper does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.from_http_api(http_api) ⇒ AWSCDK::APIGatewayv2::HttpAPIHelper

Return an HttpApiHelper for the given HTTP API.

Parameters:

Returns:

  • (AWSCDK::APIGatewayv2::HttpAPIHelper)


22
23
24
25
# File 'api_gatewayv2/http_api_helper.rb', line 22

def self.from_http_api(http_api)
  Jsii::Type.check_type(http_api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLklIdHRwQXBpUmVmIn0=")), "httpApi")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_apigatewayv2.HttpApiHelper", "fromHttpApi", [http_api])
end

.jsii_overridable_methodsObject



12
13
14
15
16
# File 'api_gatewayv2/http_api_helper.rb', line 12

def self.jsii_overridable_methods
  {
    :arn_for_execute_api => { kind: :method, name: "arnForExecuteApi", is_optional: false },
  }
end

Instance Method Details

#arn_for_execute_api(method = nil, path = nil, stage = nil) ⇒ String

Note:

Default: - The default behavior applies when no specific method, path, or stage is provided. In this case, the ARN will cover all methods, all resources, and all stages of this API. Specifically, if 'method' is not specified, it defaults to '', representing all methods. If 'path' is not specified, it defaults to '/', representing all paths. If 'stage' is not specified, it also defaults to '*', representing all stages.

Get the "execute-api" ARN.

When 'ANY' is passed to the method, an ARN with the method set to '*' is obtained.

Parameters:

  • method (String, nil) (defaults to: nil)
  • path (String, nil) (defaults to: nil)
  • stage (String, nil) (defaults to: nil)

Returns:

  • (String)


36
37
38
39
40
41
# File 'api_gatewayv2/http_api_helper.rb', line 36

def arn_for_execute_api(method = nil, path = nil, stage = nil)
  Jsii::Type.check_type(method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "method") unless method.nil?
  Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless path.nil?
  Jsii::Type.check_type(stage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stage") unless stage.nil?
  jsii_call_method("arnForExecuteApi", [method, path, stage])
end