GrpcTimeout

class aws_cdk.aws_appmesh.GrpcTimeout(*, idle=None, per_request=None)

Bases: object

Represents timeouts for GRPC protocols.

Parameters
  • idle (Optional[Duration]) – Represents an idle timeout. The amount of time that a connection may be idle. Default: - none

  • per_request (Optional[Duration]) – Represents per request timeout. Default: - 15 s

Example:

# router is of type VirtualRouter
# node is of type VirtualNode


router.add_route("route-http",
    route_spec=appmesh.RouteSpec.grpc(
        weighted_targets=[appmesh.WeightedTarget(
            virtual_node=node
        )
        ],
        match=appmesh.GrpcRouteMatch(
            service_name="my-service.default.svc.cluster.local"
        ),
        timeout=appmesh.GrpcTimeout(
            idle=cdk.Duration.seconds(2),
            per_request=cdk.Duration.seconds(1)
        )
    )
)

Attributes

idle

Represents an idle timeout.

The amount of time that a connection may be idle.

Default
  • none

Return type

Optional[Duration]

per_request

Represents per request timeout.

Default
  • 15 s

Return type

Optional[Duration]