Class: AWSCDK::AppMesh::CfnRoute::HttpRouteMatchProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppMesh::CfnRoute::HttpRouteMatchProperty
- Defined in:
- app_mesh/cfn_route.rb
Overview
An object that represents the requirements for a route to match HTTP requests for a virtual router.
Instance Attribute Summary collapse
-
#headers ⇒ AWSCDK::IResolvable, ...
readonly
The client request headers to match on.
-
#method ⇒ String?
readonly
The client request method to match on.
-
#path ⇒ AWSCDK::IResolvable, ...
readonly
The client request path to match on.
-
#port ⇒ Numeric?
readonly
The port number to match on.
-
#prefix ⇒ String?
readonly
Specifies the path to match requests with.
-
#query_parameters ⇒ AWSCDK::IResolvable, ...
readonly
The client request query parameters to match on.
-
#scheme ⇒ String?
readonly
The client request scheme to match on.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(headers: nil, method: nil, path: nil, port: nil, prefix: nil, query_parameters: nil, scheme: nil) ⇒ HttpRouteMatchProperty
constructor
A new instance of HttpRouteMatchProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(headers: nil, method: nil, path: nil, port: nil, prefix: nil, query_parameters: nil, scheme: nil) ⇒ HttpRouteMatchProperty
Returns a new instance of HttpRouteMatchProperty.
1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 |
# File 'app_mesh/cfn_route.rb', line 1425 def initialize(headers: nil, method: nil, path: nil, port: nil, prefix: nil, query_parameters: nil, scheme: nil) @headers = headers Jsii::Type.check_type(@headers, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5DZm5Sb3V0ZS5IdHRwUm91dGVIZWFkZXJQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "headers") unless @headers.nil? @method = method Jsii::Type.check_type(@method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "method") unless @method.nil? @path = path.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::HttpPathMatchProperty.new(**path.transform_keys(&:to_sym)) : path Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLkh0dHBQYXRoTWF0Y2hQcm9wZXJ0eSJ9XX19")), "path") unless @path.nil? @port = port Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil? @prefix = prefix Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil? @query_parameters = query_parameters Jsii::Type.check_type(@query_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5DZm5Sb3V0ZS5RdWVyeVBhcmFtZXRlclByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "queryParameters") unless @query_parameters.nil? @scheme = scheme Jsii::Type.check_type(@scheme, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheme") unless @scheme.nil? end |
Instance Attribute Details
#headers ⇒ AWSCDK::IResolvable, ... (readonly)
The client request headers to match on.
1446 1447 1448 |
# File 'app_mesh/cfn_route.rb', line 1446 def headers @headers end |
#method ⇒ String? (readonly)
The client request method to match on.
Specify only one.
1453 1454 1455 |
# File 'app_mesh/cfn_route.rb', line 1453 def method @method end |
#path ⇒ AWSCDK::IResolvable, ... (readonly)
The client request path to match on.
1458 1459 1460 |
# File 'app_mesh/cfn_route.rb', line 1458 def path @path end |
#port ⇒ Numeric? (readonly)
The port number to match on.
1463 1464 1465 |
# File 'app_mesh/cfn_route.rb', line 1463 def port @port end |
#prefix ⇒ String? (readonly)
Specifies the path to match requests with.
This parameter must always start with / , which by itself matches all requests to the virtual service name. You can also match for path-based routing of requests. For example, if your virtual service name is my-service.local and you want the route to match requests to my-service.local/metrics , your prefix should be /metrics .
1470 1471 1472 |
# File 'app_mesh/cfn_route.rb', line 1470 def prefix @prefix end |
#query_parameters ⇒ AWSCDK::IResolvable, ... (readonly)
The client request query parameters to match on.
1475 1476 1477 |
# File 'app_mesh/cfn_route.rb', line 1475 def query_parameters @query_parameters end |
#scheme ⇒ String? (readonly)
The client request scheme to match on.
Specify only one. Applicable only for HTTP2 routes.
1482 1483 1484 |
# File 'app_mesh/cfn_route.rb', line 1482 def scheme @scheme end |
Class Method Details
.jsii_properties ⇒ Object
1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 |
# File 'app_mesh/cfn_route.rb', line 1484 def self.jsii_properties { :headers => "headers", :method => "method", :path => "path", :port => "port", :prefix => "prefix", :query_parameters => "queryParameters", :scheme => "scheme", } end |
Instance Method Details
#to_jsii ⇒ Object
1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 |
# File 'app_mesh/cfn_route.rb', line 1496 def to_jsii result = {} result.merge!({ "headers" => @headers, "method" => @method, "path" => @path, "port" => @port, "prefix" => @prefix, "queryParameters" => @query_parameters, "scheme" => @scheme, }) result.compact end |