@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:48.328Z") public class CfnGatewayRoute extends CfnResource implements IInspectable
Creates a gateway route.
A gateway route is attached to a virtual gateway and routes traffic to an existing virtual service. If a route matches a request, it can distribute traffic to a target virtual service.
For more information about gateway routes, see Gateway routes .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.appmesh.*; CfnGatewayRoute cfnGatewayRoute = CfnGatewayRoute.Builder.create(this, "MyCfnGatewayRoute") .meshName("meshName") .spec(GatewayRouteSpecProperty.builder() .grpcRoute(GrpcGatewayRouteProperty.builder() .action(GrpcGatewayRouteActionProperty.builder() .target(GatewayRouteTargetProperty.builder() .virtualService(GatewayRouteVirtualServiceProperty.builder() .virtualServiceName("virtualServiceName") .build()) // the properties below are optional .port(123) .build()) // the properties below are optional .rewrite(GrpcGatewayRouteRewriteProperty.builder() .hostname(GatewayRouteHostnameRewriteProperty.builder() .defaultTargetHostname("defaultTargetHostname") .build()) .build()) .build()) .match(GrpcGatewayRouteMatchProperty.builder() .hostname(GatewayRouteHostnameMatchProperty.builder() .exact("exact") .suffix("suffix") .build()) .metadata(List.of(GrpcGatewayRouteMetadataProperty.builder() .name("name") // the properties below are optional .invert(false) .match(GatewayRouteMetadataMatchProperty.builder() .exact("exact") .prefix("prefix") .range(GatewayRouteRangeMatchProperty.builder() .end(123) .start(123) .build()) .regex("regex") .suffix("suffix") .build()) .build())) .port(123) .serviceName("serviceName") .build()) .build()) .http2Route(HttpGatewayRouteProperty.builder() .action(HttpGatewayRouteActionProperty.builder() .target(GatewayRouteTargetProperty.builder() .virtualService(GatewayRouteVirtualServiceProperty.builder() .virtualServiceName("virtualServiceName") .build()) // the properties below are optional .port(123) .build()) // the properties below are optional .rewrite(HttpGatewayRouteRewriteProperty.builder() .hostname(GatewayRouteHostnameRewriteProperty.builder() .defaultTargetHostname("defaultTargetHostname") .build()) .path(HttpGatewayRoutePathRewriteProperty.builder() .exact("exact") .build()) .prefix(HttpGatewayRoutePrefixRewriteProperty.builder() .defaultPrefix("defaultPrefix") .value("value") .build()) .build()) .build()) .match(HttpGatewayRouteMatchProperty.builder() .headers(List.of(HttpGatewayRouteHeaderProperty.builder() .name("name") // the properties below are optional .invert(false) .match(HttpGatewayRouteHeaderMatchProperty.builder() .exact("exact") .prefix("prefix") .range(GatewayRouteRangeMatchProperty.builder() .end(123) .start(123) .build()) .regex("regex") .suffix("suffix") .build()) .build())) .hostname(GatewayRouteHostnameMatchProperty.builder() .exact("exact") .suffix("suffix") .build()) .method("method") .path(HttpPathMatchProperty.builder() .exact("exact") .regex("regex") .build()) .port(123) .prefix("prefix") .queryParameters(List.of(QueryParameterProperty.builder() .name("name") // the properties below are optional .match(HttpQueryParameterMatchProperty.builder() .exact("exact") .build()) .build())) .build()) .build()) .httpRoute(HttpGatewayRouteProperty.builder() .action(HttpGatewayRouteActionProperty.builder() .target(GatewayRouteTargetProperty.builder() .virtualService(GatewayRouteVirtualServiceProperty.builder() .virtualServiceName("virtualServiceName") .build()) // the properties below are optional .port(123) .build()) // the properties below are optional .rewrite(HttpGatewayRouteRewriteProperty.builder() .hostname(GatewayRouteHostnameRewriteProperty.builder() .defaultTargetHostname("defaultTargetHostname") .build()) .path(HttpGatewayRoutePathRewriteProperty.builder() .exact("exact") .build()) .prefix(HttpGatewayRoutePrefixRewriteProperty.builder() .defaultPrefix("defaultPrefix") .value("value") .build()) .build()) .build()) .match(HttpGatewayRouteMatchProperty.builder() .headers(List.of(HttpGatewayRouteHeaderProperty.builder() .name("name") // the properties below are optional .invert(false) .match(HttpGatewayRouteHeaderMatchProperty.builder() .exact("exact") .prefix("prefix") .range(GatewayRouteRangeMatchProperty.builder() .end(123) .start(123) .build()) .regex("regex") .suffix("suffix") .build()) .build())) .hostname(GatewayRouteHostnameMatchProperty.builder() .exact("exact") .suffix("suffix") .build()) .method("method") .path(HttpPathMatchProperty.builder() .exact("exact") .regex("regex") .build()) .port(123) .prefix("prefix") .queryParameters(List.of(QueryParameterProperty.builder() .name("name") // the properties below are optional .match(HttpQueryParameterMatchProperty.builder() .exact("exact") .build()) .build())) .build()) .build()) .priority(123) .build()) .virtualGatewayName("virtualGatewayName") // the properties below are optional .gatewayRouteName("gatewayRouteName") .meshOwner("meshOwner") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnGatewayRoute.Builder
A fluent builder for
CfnGatewayRoute . |
static interface |
CfnGatewayRoute.GatewayRouteHostnameMatchProperty
An object representing the gateway route host name to match.
|
static interface |
CfnGatewayRoute.GatewayRouteHostnameRewriteProperty
An object representing the gateway route host name to rewrite.
|
static interface |
CfnGatewayRoute.GatewayRouteMetadataMatchProperty
An object representing the method header to be matched.
|
static interface |
CfnGatewayRoute.GatewayRouteRangeMatchProperty
An object that represents the range of values to match on.
|
static interface |
CfnGatewayRoute.GatewayRouteSpecProperty
An object that represents a gateway route specification.
|
static interface |
CfnGatewayRoute.GatewayRouteTargetProperty
An object that represents a gateway route target.
|
static interface |
CfnGatewayRoute.GatewayRouteVirtualServiceProperty
An object that represents the virtual service that traffic is routed to.
|
static interface |
CfnGatewayRoute.GrpcGatewayRouteActionProperty
An object that represents the action to take if a match is determined.
|
static interface |
CfnGatewayRoute.GrpcGatewayRouteMatchProperty
An object that represents the criteria for determining a request match.
|
static interface |
CfnGatewayRoute.GrpcGatewayRouteMetadataProperty
An object representing the metadata of the gateway route.
|
static interface |
CfnGatewayRoute.GrpcGatewayRouteProperty
An object that represents a gRPC gateway route.
|
static interface |
CfnGatewayRoute.GrpcGatewayRouteRewriteProperty
An object that represents the gateway route to rewrite.
|
static interface |
CfnGatewayRoute.HttpGatewayRouteActionProperty
An object that represents the action to take if a match is determined.
|
static interface |
CfnGatewayRoute.HttpGatewayRouteHeaderMatchProperty
An object that represents the method and value to match with the header value sent in a request.
|
static interface |
CfnGatewayRoute.HttpGatewayRouteHeaderProperty
An object that represents the HTTP header in the gateway route.
|
static interface |
CfnGatewayRoute.HttpGatewayRouteMatchProperty
An object that represents the criteria for determining a request match.
|
static interface |
CfnGatewayRoute.HttpGatewayRoutePathRewriteProperty
An object that represents the path to rewrite.
|
static interface |
CfnGatewayRoute.HttpGatewayRoutePrefixRewriteProperty
An object representing the beginning characters of the route to rewrite.
|
static interface |
CfnGatewayRoute.HttpGatewayRouteProperty
An object that represents an HTTP gateway route.
|
static interface |
CfnGatewayRoute.HttpGatewayRouteRewriteProperty
An object representing the gateway route to rewrite.
|
static interface |
CfnGatewayRoute.HttpPathMatchProperty
An object representing the path to match in the request.
|
static interface |
CfnGatewayRoute.HttpQueryParameterMatchProperty
An object representing the query parameter to match.
|
static interface |
CfnGatewayRoute.QueryParameterProperty
An object that represents the query parameter in the request.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnGatewayRoute(Construct scope,
java.lang.String id,
CfnGatewayRouteProps props)
Create a new `AWS::AppMesh::GatewayRoute`.
|
protected |
CfnGatewayRoute(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnGatewayRoute(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
The full Amazon Resource Name (ARN) for the gateway route.
|
java.lang.String |
getAttrGatewayRouteName()
The name of the gateway route.
|
java.lang.String |
getAttrMeshName()
The name of the service mesh that the gateway route resides in.
|
java.lang.String |
getAttrMeshOwner()
The AWS IAM account ID of the service mesh owner.
|
java.lang.String |
getAttrResourceOwner()
The IAM account ID of the resource owner.
|
java.lang.String |
getAttrUid()
The unique identifier for the gateway route.
|
java.lang.String |
getAttrVirtualGatewayName()
The name of the virtual gateway that the gateway route is associated with.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getGatewayRouteName()
The name of the gateway route.
|
java.lang.String |
getMeshName()
The name of the service mesh that the resource resides in.
|
java.lang.String |
getMeshOwner()
The AWS IAM account ID of the service mesh owner.
|
java.lang.Object |
getSpec()
The specifications of the gateway route.
|
TagManager |
getTags()
Optional metadata that you can apply to the gateway route to assist with categorization and organization.
|
java.lang.String |
getVirtualGatewayName()
The virtual gateway that the gateway route is associated with.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setGatewayRouteName(java.lang.String value)
The name of the gateway route.
|
void |
setMeshName(java.lang.String value)
The name of the service mesh that the resource resides in.
|
void |
setMeshOwner(java.lang.String value)
The AWS IAM account ID of the service mesh owner.
|
void |
setSpec(CfnGatewayRoute.GatewayRouteSpecProperty value)
The specifications of the gateway route.
|
void |
setSpec(IResolvable value)
The specifications of the gateway route.
|
void |
setVirtualGatewayName(java.lang.String value)
The virtual gateway that the gateway route is associated with.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnGatewayRoute(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnGatewayRoute(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnGatewayRoute(Construct scope, java.lang.String id, CfnGatewayRouteProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrGatewayRouteName()
public java.lang.String getAttrMeshName()
public java.lang.String getAttrMeshOwner()
If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with Shared Meshes .
public java.lang.String getAttrResourceOwner()
If the account ID is not your own, then it's the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with Shared Meshes .
public java.lang.String getAttrUid()
public java.lang.String getAttrVirtualGatewayName()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
public java.lang.String getMeshName()
public void setMeshName(java.lang.String value)
public java.lang.Object getSpec()
public void setSpec(CfnGatewayRoute.GatewayRouteSpecProperty value)
public void setSpec(IResolvable value)
public java.lang.String getVirtualGatewayName()
public void setVirtualGatewayName(java.lang.String value)
public java.lang.String getGatewayRouteName()
public void setGatewayRouteName(java.lang.String value)
public java.lang.String getMeshOwner()
If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes .
public void setMeshOwner(java.lang.String value)
If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes .