Class CfnRoute
A CloudFormation AWS::AppMesh::Route
.
Inherited Members
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.AWS.AppMesh.dll
Syntax (csharp)
public class CfnRoute : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnRoute
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
Creates a route that is associated with a virtual router.
You can route several different protocols and define a retry policy for a route. Traffic can be routed to one or more virtual nodes.
For more information about routes, see Routes .
CloudformationResource: AWS::AppMesh::Route
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-route.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppMesh;
var cfnRoute = new CfnRoute(this, "MyCfnRoute", new CfnRouteProps {
MeshName = "meshName",
Spec = new RouteSpecProperty {
GrpcRoute = new GrpcRouteProperty {
Action = new GrpcRouteActionProperty {
WeightedTargets = new [] { new WeightedTargetProperty {
VirtualNode = "virtualNode",
Weight = 123,
// the properties below are optional
Port = 123
} }
},
Match = new GrpcRouteMatchProperty {
Metadata = new [] { new GrpcRouteMetadataProperty {
Name = "name",
// the properties below are optional
Invert = false,
Match = new GrpcRouteMetadataMatchMethodProperty {
Exact = "exact",
Prefix = "prefix",
Range = new MatchRangeProperty {
End = 123,
Start = 123
},
Regex = "regex",
Suffix = "suffix"
}
} },
MethodName = "methodName",
Port = 123,
ServiceName = "serviceName"
},
// the properties below are optional
RetryPolicy = new GrpcRetryPolicyProperty {
MaxRetries = 123,
PerRetryTimeout = new DurationProperty {
Unit = "unit",
Value = 123
},
// the properties below are optional
GrpcRetryEvents = new [] { "grpcRetryEvents" },
HttpRetryEvents = new [] { "httpRetryEvents" },
TcpRetryEvents = new [] { "tcpRetryEvents" }
},
Timeout = new GrpcTimeoutProperty {
Idle = new DurationProperty {
Unit = "unit",
Value = 123
},
PerRequest = new DurationProperty {
Unit = "unit",
Value = 123
}
}
},
Http2Route = new HttpRouteProperty {
Action = new HttpRouteActionProperty {
WeightedTargets = new [] { new WeightedTargetProperty {
VirtualNode = "virtualNode",
Weight = 123,
// the properties below are optional
Port = 123
} }
},
Match = new HttpRouteMatchProperty {
Headers = new [] { new HttpRouteHeaderProperty {
Name = "name",
// the properties below are optional
Invert = false,
Match = new HeaderMatchMethodProperty {
Exact = "exact",
Prefix = "prefix",
Range = new MatchRangeProperty {
End = 123,
Start = 123
},
Regex = "regex",
Suffix = "suffix"
}
} },
Method = "method",
Path = new HttpPathMatchProperty {
Exact = "exact",
Regex = "regex"
},
Port = 123,
Prefix = "prefix",
QueryParameters = new [] { new QueryParameterProperty {
Name = "name",
// the properties below are optional
Match = new HttpQueryParameterMatchProperty {
Exact = "exact"
}
} },
Scheme = "scheme"
},
// the properties below are optional
RetryPolicy = new HttpRetryPolicyProperty {
MaxRetries = 123,
PerRetryTimeout = new DurationProperty {
Unit = "unit",
Value = 123
},
// the properties below are optional
HttpRetryEvents = new [] { "httpRetryEvents" },
TcpRetryEvents = new [] { "tcpRetryEvents" }
},
Timeout = new HttpTimeoutProperty {
Idle = new DurationProperty {
Unit = "unit",
Value = 123
},
PerRequest = new DurationProperty {
Unit = "unit",
Value = 123
}
}
},
HttpRoute = new HttpRouteProperty {
Action = new HttpRouteActionProperty {
WeightedTargets = new [] { new WeightedTargetProperty {
VirtualNode = "virtualNode",
Weight = 123,
// the properties below are optional
Port = 123
} }
},
Match = new HttpRouteMatchProperty {
Headers = new [] { new HttpRouteHeaderProperty {
Name = "name",
// the properties below are optional
Invert = false,
Match = new HeaderMatchMethodProperty {
Exact = "exact",
Prefix = "prefix",
Range = new MatchRangeProperty {
End = 123,
Start = 123
},
Regex = "regex",
Suffix = "suffix"
}
} },
Method = "method",
Path = new HttpPathMatchProperty {
Exact = "exact",
Regex = "regex"
},
Port = 123,
Prefix = "prefix",
QueryParameters = new [] { new QueryParameterProperty {
Name = "name",
// the properties below are optional
Match = new HttpQueryParameterMatchProperty {
Exact = "exact"
}
} },
Scheme = "scheme"
},
// the properties below are optional
RetryPolicy = new HttpRetryPolicyProperty {
MaxRetries = 123,
PerRetryTimeout = new DurationProperty {
Unit = "unit",
Value = 123
},
// the properties below are optional
HttpRetryEvents = new [] { "httpRetryEvents" },
TcpRetryEvents = new [] { "tcpRetryEvents" }
},
Timeout = new HttpTimeoutProperty {
Idle = new DurationProperty {
Unit = "unit",
Value = 123
},
PerRequest = new DurationProperty {
Unit = "unit",
Value = 123
}
}
},
Priority = 123,
TcpRoute = new TcpRouteProperty {
Action = new TcpRouteActionProperty {
WeightedTargets = new [] { new WeightedTargetProperty {
VirtualNode = "virtualNode",
Weight = 123,
// the properties below are optional
Port = 123
} }
},
// the properties below are optional
Match = new TcpRouteMatchProperty {
Port = 123
},
Timeout = new TcpTimeoutProperty {
Idle = new DurationProperty {
Unit = "unit",
Value = 123
}
}
}
},
VirtualRouterName = "virtualRouterName",
// the properties below are optional
MeshOwner = "meshOwner",
RouteName = "routeName",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnRoute(Construct, String, ICfnRouteProps) | Create a new |
CfnRoute(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnRoute(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrArn | The full Amazon Resource Name (ARN) for the route. |
AttrMeshName | The name of the service mesh that the route resides in. |
AttrMeshOwner | The AWS IAM account ID of the service mesh owner. |
AttrResourceOwner | The AWS IAM account ID of the resource owner. |
AttrRouteName | The name of the route. |
AttrUid | The unique identifier for the route. |
AttrVirtualRouterName | The name of the virtual router that the route is associated with. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
MeshName | The name of the service mesh to create the route in. |
MeshOwner | The AWS IAM account ID of the service mesh owner. |
RouteName | The name to use for the route. |
Spec | The route specification to apply. |
Tags | Optional metadata that you can apply to the route to assist with categorization and organization. |
VirtualRouterName | The name of the virtual router in which to create the route. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnRoute(Construct, String, ICfnRouteProps)
Create a new AWS::AppMesh::Route
.
public CfnRoute(Construct scope, string id, ICfnRouteProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnRouteProps
- resource properties.
CfnRoute(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnRoute(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnRoute(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnRoute(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrArn
The full Amazon Resource Name (ARN) for the route.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrMeshName
The name of the service mesh that the route resides in.
public virtual string AttrMeshName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: MeshName
AttrMeshOwner
The AWS IAM account ID of the service mesh owner.
public virtual string AttrMeshOwner { get; }
Property Value
System.String
Remarks
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 .
CloudformationAttribute: MeshOwner
AttrResourceOwner
The AWS IAM account ID of the resource owner.
public virtual string AttrResourceOwner { get; }
Property Value
System.String
Remarks
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 .
CloudformationAttribute: ResourceOwner
AttrRouteName
The name of the route.
public virtual string AttrRouteName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: RouteName
AttrUid
The unique identifier for the route.
public virtual string AttrUid { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Uid
AttrVirtualRouterName
The name of the virtual router that the route is associated with.
public virtual string AttrVirtualRouterName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: VirtualRouterName
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
MeshName
The name of the service mesh to create the route in.
public virtual string MeshName { get; set; }
Property Value
System.String
Remarks
MeshOwner
The AWS IAM account ID of the service mesh owner.
public virtual string MeshOwner { get; set; }
Property Value
System.String
Remarks
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 .
RouteName
The name to use for the route.
public virtual string RouteName { get; set; }
Property Value
System.String
Remarks
Spec
The route specification to apply.
public virtual object Spec { get; set; }
Property Value
System.Object
Remarks
Tags
Optional metadata that you can apply to the route to assist with categorization and organization.
public virtual TagManager Tags { get; }
Property Value
Remarks
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.
VirtualRouterName
The name of the virtual router in which to create the route.
public virtual string VirtualRouterName { get; set; }
Property Value
System.String
Remarks
If the virtual router is in a shared mesh, then you must be the owner of the virtual router resource.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>