Class: Aws::AppMesh::Types::RouteSpec

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-appmesh/lib/aws-sdk-appmesh/types.rb

Overview

Note:

When making an API call, you may pass RouteSpec data as a hash:

{
  grpc_route: {
    action: { # required
      weighted_targets: [ # required
        {
          virtual_node: "ResourceName", # required
          weight: 1, # required
        },
      ],
    },
    match: { # required
      metadata: [
        {
          invert: false,
          match: {
            exact: "HeaderMatch",
            prefix: "HeaderMatch",
            range: {
              end: 1, # required
              start: 1, # required
            },
            regex: "HeaderMatch",
            suffix: "HeaderMatch",
          },
          name: "HeaderName", # required
        },
      ],
      method_name: "MethodName",
      service_name: "ServiceName",
    },
    retry_policy: {
      grpc_retry_events: ["cancelled"], # accepts cancelled, deadline-exceeded, internal, resource-exhausted, unavailable
      http_retry_events: ["HttpRetryPolicyEvent"],
      max_retries: 1, # required
      per_retry_timeout: { # required
        unit: "s", # accepts s, ms
        value: 1,
      },
      tcp_retry_events: ["connection-error"], # accepts connection-error
    },
    timeout: {
      idle: {
        unit: "s", # accepts s, ms
        value: 1,
      },
      per_request: {
        unit: "s", # accepts s, ms
        value: 1,
      },
    },
  },
  http2_route: {
    action: { # required
      weighted_targets: [ # required
        {
          virtual_node: "ResourceName", # required
          weight: 1, # required
        },
      ],
    },
    match: { # required
      headers: [
        {
          invert: false,
          match: {
            exact: "HeaderMatch",
            prefix: "HeaderMatch",
            range: {
              end: 1, # required
              start: 1, # required
            },
            regex: "HeaderMatch",
            suffix: "HeaderMatch",
          },
          name: "HeaderName", # required
        },
      ],
      method: "GET", # accepts GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH
      prefix: "String", # required
      scheme: "http", # accepts http, https
    },
    retry_policy: {
      http_retry_events: ["HttpRetryPolicyEvent"],
      max_retries: 1, # required
      per_retry_timeout: { # required
        unit: "s", # accepts s, ms
        value: 1,
      },
      tcp_retry_events: ["connection-error"], # accepts connection-error
    },
    timeout: {
      idle: {
        unit: "s", # accepts s, ms
        value: 1,
      },
      per_request: {
        unit: "s", # accepts s, ms
        value: 1,
      },
    },
  },
  http_route: {
    action: { # required
      weighted_targets: [ # required
        {
          virtual_node: "ResourceName", # required
          weight: 1, # required
        },
      ],
    },
    match: { # required
      headers: [
        {
          invert: false,
          match: {
            exact: "HeaderMatch",
            prefix: "HeaderMatch",
            range: {
              end: 1, # required
              start: 1, # required
            },
            regex: "HeaderMatch",
            suffix: "HeaderMatch",
          },
          name: "HeaderName", # required
        },
      ],
      method: "GET", # accepts GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH
      prefix: "String", # required
      scheme: "http", # accepts http, https
    },
    retry_policy: {
      http_retry_events: ["HttpRetryPolicyEvent"],
      max_retries: 1, # required
      per_retry_timeout: { # required
        unit: "s", # accepts s, ms
        value: 1,
      },
      tcp_retry_events: ["connection-error"], # accepts connection-error
    },
    timeout: {
      idle: {
        unit: "s", # accepts s, ms
        value: 1,
      },
      per_request: {
        unit: "s", # accepts s, ms
        value: 1,
      },
    },
  },
  priority: 1,
  tcp_route: {
    action: { # required
      weighted_targets: [ # required
        {
          virtual_node: "ResourceName", # required
          weight: 1, # required
        },
      ],
    },
    timeout: {
      idle: {
        unit: "s", # accepts s, ms
        value: 1,
      },
    },
  },
}

An object that represents a route specification. Specify one route type.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#grpc_routeTypes::GrpcRoute

An object that represents the specification of a gRPC route.

Returns:



5513
5514
5515
5516
5517
5518
5519
5520
5521
# File 'gems/aws-sdk-appmesh/lib/aws-sdk-appmesh/types.rb', line 5513

class RouteSpec < Struct.new(
  :grpc_route,
  :http2_route,
  :http_route,
  :priority,
  :tcp_route)
  SENSITIVE = []
  include Aws::Structure
end

#http2_routeTypes::HttpRoute

An object that represents the specification of an HTTP/2 route.

Returns:



5513
5514
5515
5516
5517
5518
5519
5520
5521
# File 'gems/aws-sdk-appmesh/lib/aws-sdk-appmesh/types.rb', line 5513

class RouteSpec < Struct.new(
  :grpc_route,
  :http2_route,
  :http_route,
  :priority,
  :tcp_route)
  SENSITIVE = []
  include Aws::Structure
end

#http_routeTypes::HttpRoute

An object that represents the specification of an HTTP route.

Returns:



5513
5514
5515
5516
5517
5518
5519
5520
5521
# File 'gems/aws-sdk-appmesh/lib/aws-sdk-appmesh/types.rb', line 5513

class RouteSpec < Struct.new(
  :grpc_route,
  :http2_route,
  :http_route,
  :priority,
  :tcp_route)
  SENSITIVE = []
  include Aws::Structure
end

#priorityInteger

The priority for the route. Routes are matched based on the specified value, where 0 is the highest priority.

Returns:

  • (Integer)


5513
5514
5515
5516
5517
5518
5519
5520
5521
# File 'gems/aws-sdk-appmesh/lib/aws-sdk-appmesh/types.rb', line 5513

class RouteSpec < Struct.new(
  :grpc_route,
  :http2_route,
  :http_route,
  :priority,
  :tcp_route)
  SENSITIVE = []
  include Aws::Structure
end

#tcp_routeTypes::TcpRoute

An object that represents the specification of a TCP route.

Returns:



5513
5514
5515
5516
5517
5518
5519
5520
5521
# File 'gems/aws-sdk-appmesh/lib/aws-sdk-appmesh/types.rb', line 5513

class RouteSpec < Struct.new(
  :grpc_route,
  :http2_route,
  :http_route,
  :priority,
  :tcp_route)
  SENSITIVE = []
  include Aws::Structure
end