@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:48.541Z") public class CfnVirtualRouter extends CfnResource implements IInspectable
Creates a virtual router within a service mesh.
Specify a listener
for any inbound traffic that your virtual router receives. Create a virtual router for each protocol and port that you need to route. Virtual routers handle traffic for one or more virtual services within your mesh. After you create your virtual router, create and associate routes for your virtual router that direct incoming requests to different virtual nodes.
For more information about virtual routers, see Virtual routers .
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.*; CfnVirtualRouter cfnVirtualRouter = CfnVirtualRouter.Builder.create(this, "MyCfnVirtualRouter") .meshName("meshName") .spec(VirtualRouterSpecProperty.builder() .listeners(List.of(VirtualRouterListenerProperty.builder() .portMapping(PortMappingProperty.builder() .port(123) .protocol("protocol") .build()) .build())) .build()) // the properties below are optional .meshOwner("meshOwner") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .virtualRouterName("virtualRouterName") .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnVirtualRouter.Builder
A fluent builder for
CfnVirtualRouter . |
static interface |
CfnVirtualRouter.PortMappingProperty
An object representing a virtual router listener port mapping.
|
static interface |
CfnVirtualRouter.VirtualRouterListenerProperty
An object that represents a virtual router listener.
|
static interface |
CfnVirtualRouter.VirtualRouterSpecProperty
An object that represents the specification of a virtual router.
|
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 |
---|---|
|
CfnVirtualRouter(Construct scope,
java.lang.String id,
CfnVirtualRouterProps props)
Create a new `AWS::AppMesh::VirtualRouter`.
|
protected |
CfnVirtualRouter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnVirtualRouter(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
The full Amazon Resource Name (ARN) for the virtual router.
|
java.lang.String |
getAttrMeshName()
The name of the service mesh that the virtual router resides in.
|
java.lang.String |
getAttrMeshOwner()
The AWS IAM account ID of the service mesh owner.
|
java.lang.String |
getAttrResourceOwner()
The AWS IAM account ID of the resource owner.
|
java.lang.String |
getAttrUid()
The unique identifier for the virtual router.
|
java.lang.String |
getAttrVirtualRouterName()
The name of the virtual router.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getMeshName()
The name of the service mesh to create the virtual router in.
|
java.lang.String |
getMeshOwner()
The AWS IAM account ID of the service mesh owner.
|
java.lang.Object |
getSpec()
The virtual router specification to apply.
|
TagManager |
getTags()
Optional metadata that you can apply to the virtual router to assist with categorization and organization.
|
java.lang.String |
getVirtualRouterName()
The name to use for the virtual router.
|
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 |
setMeshName(java.lang.String value)
The name of the service mesh to create the virtual router in.
|
void |
setMeshOwner(java.lang.String value)
The AWS IAM account ID of the service mesh owner.
|
void |
setSpec(CfnVirtualRouter.VirtualRouterSpecProperty value)
The virtual router specification to apply.
|
void |
setSpec(IResolvable value)
The virtual router specification to apply.
|
void |
setVirtualRouterName(java.lang.String value)
The name to use for the virtual router.
|
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 CfnVirtualRouter(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnVirtualRouter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnVirtualRouter(Construct scope, java.lang.String id, CfnVirtualRouterProps 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 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 getAttrVirtualRouterName()
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(IResolvable value)
public void setSpec(CfnVirtualRouter.VirtualRouterSpecProperty value)
public java.lang.String getMeshOwner()
If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. 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 the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes .
public java.lang.String getVirtualRouterName()
public void setVirtualRouterName(java.lang.String value)