@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:49.842Z") @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 which account creates 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 .
When created, the default route defaults to an active state so state is not a required input. However, like all other state values the state of the default route can be updated after creation, but only when all other routes are also inactive. Conversely, no route can be active without the default route also being active.
In the
AWS::RefactorSpaces::Routeresource, you can only update theActivationStateproperty, which resides under theUriPathRouteandDefaultRouteproperties. All other properties associated with theAWS::RefactorSpaces::Routecannot be updated, even though the property description might indicate otherwise. Updating all other properties will result in the replacement of Route.
When you create a route, Refactor Spaces configures the Amazon API Gateway to send traffic to the target service as follows:
A one-time health check is performed on the service when either the route is updated from inactive to active, or when it is created with an active state. If the health check fails, the route transitions the route state to FAILED , an error code of SERVICE_ENDPOINT_HEALTH_CHECK_FAILURE is provided, 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 that 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 Lambda endpoints, a check is performed to determine that a Lambda function with the specified ARN exists. If it does not exist, the health check fails. 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 group is created on the Elastic Load Balancing 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 a healthy state.
Services can have HTTP or HTTPS URL endpoints. For HTTPS URLs, publicly-signed certificates are supported. Private Certificate Authorities (CAs) are permitted only if the CA's domain is also publicly resolvable.
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
The configuration for the default route type.
|
static interface |
CfnRoute.UriPathRouteInputProperty
The configuration for the URI path route type.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| 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(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()
Configuration for the default route type.
|
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)
Configuration for the default route type.
|
void |
setDefaultRoute(IResolvable value)
Configuration for the default route type.
|
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, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, 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
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
IResolvable value)
@Stability(value=Stable)
public void setDefaultRoute(@Nullable
CfnRoute.DefaultRouteInputProperty 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
IResolvable value)
@Stability(value=Stable)
public void setUriPathRoute(@Nullable
CfnRoute.UriPathRouteInputProperty value)
Copyright © 2023. All rights reserved.