Class: AWSCDK::APIGatewayv2::AddRoutesOptions

Inherits:
BatchHttpRouteOptions
  • Object
show all
Defined in:
api_gatewayv2/add_routes_options.rb

Overview

Options for the Route with Integration resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(integration:, path:, authorization_scopes: nil, authorizer: nil, methods: nil) ⇒ AddRoutesOptions

Returns a new instance of AddRoutesOptions.

Parameters:



12
13
14
15
16
17
18
19
20
21
22
23
# File 'api_gatewayv2/add_routes_options.rb', line 12

def initialize(integration:, path:, authorization_scopes: nil, authorizer: nil, methods: nil)
  @integration = integration
  Jsii::Type.check_type(@integration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLkh0dHBSb3V0ZUludGVncmF0aW9uIn0=")), "integration")
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path")
  @authorization_scopes = authorization_scopes
  Jsii::Type.check_type(@authorization_scopes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "authorizationScopes") unless @authorization_scopes.nil?
  @authorizer = authorizer
  Jsii::Type.check_type(@authorizer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLklIdHRwUm91dGVBdXRob3JpemVyIn0=")), "authorizer") unless @authorizer.nil?
  @methods = methods
  Jsii::Type.check_type(@methods, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5djIuSHR0cE1ldGhvZCJ9LCJraW5kIjoiYXJyYXkifX0=")), "methods") unless @methods.nil?
end

Instance Attribute Details

#authorization_scopesArray<String>? (readonly)

Note:

Default: - uses defaultAuthorizationScopes if configured on the API, otherwise none.

The list of OIDC scopes to include in the authorization.

These scopes will override the default authorization scopes on the gateway. Set to [] to remove default scopes

Returns:

  • (Array<String>, nil)


40
41
42
# File 'api_gatewayv2/add_routes_options.rb', line 40

def authorization_scopes
  @authorization_scopes
end

#authorizerAWSCDK::APIGatewayv2::IHttpRouteAuthorizer? (readonly)

Note:

Default: - uses the default authorizer if one is specified on the HttpApi

Authorizer to be associated to these routes.

Use NoneAuthorizer to remove the default authorizer for the api



47
48
49
# File 'api_gatewayv2/add_routes_options.rb', line 47

def authorizer
  @authorizer
end

#integrationAWSCDK::APIGatewayv2::HttpRouteIntegration (readonly)

The integration to be configured on this route.



28
29
30
# File 'api_gatewayv2/add_routes_options.rb', line 28

def integration
  @integration
end

#methodsArray<AWSCDK::APIGatewayv2::HttpMethod>? (readonly)

Note:

Default: HttpMethod.ANY

The HTTP methods to be configured.

Returns:



52
53
54
# File 'api_gatewayv2/add_routes_options.rb', line 52

def methods
  @methods
end

#pathString (readonly)

The path at which all of these routes are configured.

Returns:

  • (String)


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

def path
  @path
end

Class Method Details

.jsii_propertiesObject



54
55
56
57
58
59
60
61
62
# File 'api_gatewayv2/add_routes_options.rb', line 54

def self.jsii_properties
  {
    :integration => "integration",
    :path => "path",
    :authorization_scopes => "authorizationScopes",
    :authorizer => "authorizer",
    :methods => "methods",
  }
end

Instance Method Details

#to_jsiiObject



64
65
66
67
68
69
70
71
72
73
74
75
# File 'api_gatewayv2/add_routes_options.rb', line 64

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "integration" => @integration,
    "path" => @path,
    "authorizationScopes" => @authorization_scopes,
    "authorizer" => @authorizer,
    "methods" => @methods,
  })
  result.compact
end