Class: AWSCDK::AppMesh::CfnRoute::HttpRouteMatchProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:



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

#headersAWSCDK::IResolvable, ... (readonly)

The client request headers to match on.



1446
1447
1448
# File 'app_mesh/cfn_route.rb', line 1446

def headers
  @headers
end

#methodString? (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

#pathAWSCDK::IResolvable, ... (readonly)

The client request path to match on.



1458
1459
1460
# File 'app_mesh/cfn_route.rb', line 1458

def path
  @path
end

#portNumeric? (readonly)

The port number to match on.



1463
1464
1465
# File 'app_mesh/cfn_route.rb', line 1463

def port
  @port
end

#prefixString? (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_parametersAWSCDK::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

#schemeString? (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_propertiesObject



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_jsiiObject



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