Class: AWSCDK::APIGatewayv2::AddRoutesOptions
- Inherits:
-
BatchHttpRouteOptions
- Object
- BatchHttpRouteOptions
- AWSCDK::APIGatewayv2::AddRoutesOptions
- Defined in:
- api_gatewayv2/add_routes_options.rb
Overview
Options for the Route with Integration resource.
Instance Attribute Summary collapse
-
#authorization_scopes ⇒ Array<String>?
readonly
The list of OIDC scopes to include in the authorization.
-
#authorizer ⇒ AWSCDK::APIGatewayv2::IHttpRouteAuthorizer?
readonly
Authorizer to be associated to these routes.
-
#integration ⇒ AWSCDK::APIGatewayv2::HttpRouteIntegration
readonly
The integration to be configured on this route.
-
#methods ⇒ Array<AWSCDK::APIGatewayv2::HttpMethod>?
readonly
The HTTP methods to be configured.
-
#path ⇒ String
readonly
The path at which all of these routes are configured.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(integration:, path:, authorization_scopes: nil, authorizer: nil, methods: nil) ⇒ AddRoutesOptions
constructor
A new instance of AddRoutesOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(integration:, path:, authorization_scopes: nil, authorizer: nil, methods: nil) ⇒ AddRoutesOptions
Returns a new instance of AddRoutesOptions.
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 = Jsii::Type.check_type(@authorization_scopes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "authorizationScopes") unless @authorization_scopes.nil? @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_scopes ⇒ Array<String>? (readonly)
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
40 41 42 |
# File 'api_gatewayv2/add_routes_options.rb', line 40 def @authorization_scopes end |
#authorizer ⇒ AWSCDK::APIGatewayv2::IHttpRouteAuthorizer? (readonly)
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 end |
#integration ⇒ AWSCDK::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 |
#methods ⇒ Array<AWSCDK::APIGatewayv2::HttpMethod>? (readonly)
Default: HttpMethod.ANY
The HTTP methods to be configured.
52 53 54 |
# File 'api_gatewayv2/add_routes_options.rb', line 52 def methods @methods end |
#path ⇒ String (readonly)
The path at which all of these routes are configured.
32 33 34 |
# File 'api_gatewayv2/add_routes_options.rb', line 32 def path @path end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |