Class: AWSCDK::AppMesh::HttpGatewayRoutePathMatch

Inherits:
Jsii::Object
  • Object
show all
Defined in:
app_mesh/http_gateway_route_path_match.rb

Overview

Defines HTTP gateway route matching based on the URL path of the request.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHttpGatewayRoutePathMatch

Returns a new instance of HttpGatewayRoutePathMatch.



8
9
10
# File 'app_mesh/http_gateway_route_path_match.rb', line 8

def initialize
  Jsii::Object.instance_method(:initialize).bind(self).call
end

Class Method Details

.exactly(path, rewrite_to = nil) ⇒ AWSCDK::AppMesh::HttpGatewayRoutePathMatch

The value of the path must match the specified value exactly.

The provided path must start with the '/' character.

Parameters:

  • path (String)

    the exact path to match on.

  • rewrite_to (String, nil) (defaults to: nil)

    the value to substitute for the matched part of the path of the gateway request URL As a default, retains original request's URL path.

Returns:

  • (AWSCDK::AppMesh::HttpGatewayRoutePathMatch)


25
26
27
28
29
# File 'app_mesh/http_gateway_route_path_match.rb', line 25

def self.exactly(path, rewrite_to = nil)
  Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path")
  Jsii::Type.check_type(rewrite_to, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "rewriteTo") unless rewrite_to.nil?
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_appmesh.HttpGatewayRoutePathMatch", "exactly", [path, rewrite_to])
end

.jsii_overridable_methodsObject



12
13
14
15
16
# File 'app_mesh/http_gateway_route_path_match.rb', line 12

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

.regex(regex, rewrite_to = nil) ⇒ AWSCDK::AppMesh::HttpGatewayRoutePathMatch

The value of the path must match the specified regex.

Parameters:

  • regex (String)

    the regex used to match the path.

  • rewrite_to (String, nil) (defaults to: nil)

    the value to substitute for the matched part of the path of the gateway request URL As a default, retains original request's URL path.

Returns:

  • (AWSCDK::AppMesh::HttpGatewayRoutePathMatch)


36
37
38
39
40
# File 'app_mesh/http_gateway_route_path_match.rb', line 36

def self.regex(regex, rewrite_to = nil)
  Jsii::Type.check_type(regex, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "regex")
  Jsii::Type.check_type(rewrite_to, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "rewriteTo") unless rewrite_to.nil?
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_appmesh.HttpGatewayRoutePathMatch", "regex", [regex, rewrite_to])
end

.starts_with(prefix, rewrite_to = nil) ⇒ AWSCDK::AppMesh::HttpGatewayRoutePathMatch

The value of the path must match the specified prefix.

Parameters:

  • prefix (String)

    the value to use to match the beginning of the path part of the URL of the request.

  • rewrite_to (String, nil) (defaults to: nil)

    Specify either disabling automatic rewrite or rewriting to specified prefix path.

Returns:

  • (AWSCDK::AppMesh::HttpGatewayRoutePathMatch)


47
48
49
50
51
# File 'app_mesh/http_gateway_route_path_match.rb', line 47

def self.starts_with(prefix, rewrite_to = nil)
  Jsii::Type.check_type(prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix")
  Jsii::Type.check_type(rewrite_to, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "rewriteTo") unless rewrite_to.nil?
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_appmesh.HttpGatewayRoutePathMatch", "startsWith", [prefix, rewrite_to])
end

Instance Method Details

#bind(scope) ⇒ AWSCDK::AppMesh::HttpGatewayRoutePathMatchConfig

Returns the gateway route path match configuration.

Parameters:

  • scope (Constructs::Construct)

Returns:



57
58
59
60
# File 'app_mesh/http_gateway_route_path_match.rb', line 57

def bind(scope)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  jsii_call_method("bind", [scope])
end