@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.453Z") @Stability(value=Stable) 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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnGatewayRoute(software.constructs.Construct scope,
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 |
|---|---|
String |
getAttrArn()
The full Amazon Resource Name (ARN) for the gateway route.
|
String |
getAttrGatewayRouteName()
The name of the gateway route.
|
String |
getAttrMeshName()
The name of the service mesh that the gateway route resides in.
|
String |
getAttrMeshOwner()
The AWS IAM account ID of the service mesh owner.
|
String |
getAttrResourceOwner()
The IAM account ID of the resource owner.
|
String |
getAttrUid()
The unique identifier for the gateway route.
|
String |
getAttrVirtualGatewayName()
The name of the virtual gateway that the gateway route is associated with.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getGatewayRouteName()
The name of the gateway route.
|
String |
getMeshName()
The name of the service mesh that the resource resides in.
|
String |
getMeshOwner()
The AWS IAM account ID of the service mesh owner.
|
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.
|
String |
getVirtualGatewayName()
The virtual gateway that the gateway route is associated with.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setGatewayRouteName(String value)
The name of the gateway route.
|
void |
setMeshName(String value)
The name of the service mesh that the resource resides in.
|
void |
setMeshOwner(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(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, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnGatewayRoute(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnGatewayRoute(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnGatewayRoute(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull public String getAttrGatewayRouteName()
@Stability(value=Stable) @NotNull public String getAttrMeshName()
@Stability(value=Stable) @NotNull public 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 .
@Stability(value=Stable) @NotNull public 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 .
@Stability(value=Stable) @NotNull public String getAttrUid()
@Stability(value=Stable) @NotNull public String getAttrVirtualGatewayName()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull 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.
@Stability(value=Stable) @NotNull public String getMeshName()
@Stability(value=Stable)
public void setMeshName(@NotNull
String value)
@Stability(value=Stable) @NotNull public Object getSpec()
@Stability(value=Stable)
public void setSpec(@NotNull
CfnGatewayRoute.GatewayRouteSpecProperty value)
@Stability(value=Stable)
public void setSpec(@NotNull
IResolvable value)
@Stability(value=Stable) @NotNull public String getVirtualGatewayName()
@Stability(value=Stable)
public void setVirtualGatewayName(@NotNull
String value)
@Stability(value=Stable) @Nullable public String getGatewayRouteName()
@Stability(value=Stable)
public void setGatewayRouteName(@Nullable
String value)
@Stability(value=Stable) @Nullable public 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 .
@Stability(value=Stable)
public void setMeshOwner(@Nullable
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 .
Copyright © 2022. All rights reserved.