@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.557Z") @Stability(value=Stable) public class CfnRoute extends CfnResource implements IInspectable
Creates an AWS Migration Hub Refactor Spaces route. The account owner of the service resource is always the environment owner, regardless of the account creating the route. Routes target a service in the application. If an application does not have any routes, then the first route must be created as a DEFAULT RouteType .
In the
AWS::RefactorSpaces::Routeresource, you can only update theSourcePathandMethodsproperties, which reside under theUriPathRouteproperty. All other properties associated with theAWS::RefactorSpaces::Routecannot be updated, even though the property description might indicate otherwise.
When you create a route, Refactor Spaces configures the Amazon API Gateway to send traffic to the target service.
A health check is performed on the service when the route is created. If the health check fails, the route transitions to FAILED , and no traffic is sent to the service. For Lambda functions, the Lambda function state is checked. If the function is not active, the function configuration is updated so Lambda resources are provisioned. If the Lambda state is Failed , then the route creation fails. For more information, see the GetFunctionConfiguration's State response parameter in the AWS Lambda Developer Guide . For public URLs, a connection is opened to the public endpoint. If the URL is not reachable, the health check fails. For private URLs, a target groups is created and the target group health check is run. The HealthCheckProtocol , HealthCheckPort , and HealthCheckPath are the same protocol, port, and path specified in the URL or Health URL if used. All other settings use the default values, as described in Health checks for your target groups . The health check is considered successful if at least one target within the target group transitions to healthy state.
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.refactorspaces.*;
CfnRoute cfnRoute = CfnRoute.Builder.create(this, "MyCfnRoute")
.applicationIdentifier("applicationIdentifier")
.environmentIdentifier("environmentIdentifier")
.serviceIdentifier("serviceIdentifier")
// the properties below are optional
.defaultRoute(DefaultRouteInputProperty.builder()
.activationState("activationState")
.build())
.routeType("routeType")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.uriPathRoute(UriPathRouteInputProperty.builder()
.activationState("activationState")
// the properties below are optional
.includeChildPaths(false)
.methods(List.of("methods"))
.sourcePath("sourcePath")
.build())
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnRoute.Builder
A fluent builder for
CfnRoute. |
static interface |
CfnRoute.DefaultRouteInputProperty
Example:
|
static interface |
CfnRoute.UriPathRouteInputProperty
The configuration for the URI path route type.
|
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 |
|---|---|
|
CfnRoute(software.constructs.Construct scope,
String id,
CfnRouteProps props)
Create a new `AWS::RefactorSpaces::Route`.
|
protected |
CfnRoute(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnRoute(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getApplicationIdentifier()
The unique identifier of the application.
|
String |
getAttrArn()
The Amazon Resource Name (ARN) of the route.
|
String |
getAttrPathResourceToId()
A mapping of Amazon API Gateway path resources to resource IDs.
|
String |
getAttrRouteIdentifier()
The unique identifier of the route.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getDefaultRoute()
`AWS::RefactorSpaces::Route.DefaultRoute`.
|
String |
getEnvironmentIdentifier()
The unique identifier of the environment.
|
String |
getRouteType()
The route type of the route.
|
String |
getServiceIdentifier()
The unique identifier of the service.
|
TagManager |
getTags()
The tags assigned to the route.
|
Object |
getUriPathRoute()
The configuration for the URI path route type.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setApplicationIdentifier(String value)
The unique identifier of the application.
|
void |
setDefaultRoute(CfnRoute.DefaultRouteInputProperty value)
`AWS::RefactorSpaces::Route.DefaultRoute`.
|
void |
setDefaultRoute(IResolvable value)
`AWS::RefactorSpaces::Route.DefaultRoute`.
|
void |
setEnvironmentIdentifier(String value)
The unique identifier of the environment.
|
void |
setRouteType(String value)
The route type of the route.
|
void |
setServiceIdentifier(String value)
The unique identifier of the service.
|
void |
setUriPathRoute(CfnRoute.UriPathRouteInputProperty value)
The configuration for the URI path route type.
|
void |
setUriPathRoute(IResolvable value)
The configuration for the URI path route type.
|
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 CfnRoute(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnRoute(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnRoute(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnRouteProps 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 getAttrPathResourceToId()
@Stability(value=Stable) @NotNull public String getAttrRouteIdentifier()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public String getApplicationIdentifier()
@Stability(value=Stable)
public void setApplicationIdentifier(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getEnvironmentIdentifier()
@Stability(value=Stable)
public void setEnvironmentIdentifier(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getServiceIdentifier()
@Stability(value=Stable)
public void setServiceIdentifier(@NotNull
String value)
@Stability(value=Stable) @Nullable public Object getDefaultRoute()
@Stability(value=Stable)
public void setDefaultRoute(@Nullable
CfnRoute.DefaultRouteInputProperty value)
@Stability(value=Stable)
public void setDefaultRoute(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getRouteType()
@Stability(value=Stable)
public void setRouteType(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getUriPathRoute()
@Stability(value=Stable)
public void setUriPathRoute(@Nullable
CfnRoute.UriPathRouteInputProperty value)
@Stability(value=Stable)
public void setUriPathRoute(@Nullable
IResolvable value)
Copyright © 2022. All rights reserved.