Class CfnRoute
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::ApiGatewayV2::Route.
The AWS::ApiGatewayV2::Route resource creates a route for an API.
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.apigatewayv2.*;
Object requestModels;
Object requestParameters;
CfnRoute cfnRoute = CfnRoute.Builder.create(this, "MyCfnRoute")
.apiId("apiId")
.routeKey("routeKey")
// the properties below are optional
.apiKeyRequired(false)
.authorizationScopes(List.of("authorizationScopes"))
.authorizationType("authorizationType")
.authorizerId("authorizerId")
.modelSelectionExpression("modelSelectionExpression")
.operationName("operationName")
.requestModels(requestModels)
.requestParameters(requestParameters)
.routeResponseSelectionExpression("routeResponseSelectionExpression")
.target("target")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnRoute.static interfaceExample:Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetApiId()The API identifier.Specifies whether an API key is required for the route.The route ID.The authorization scopes supported by this route.The authorization type for the route.The identifier of theAuthorizerresource to be associated with this route.The model selection expression for the route.The operation name for the route.The request models for the route.The request parameters for the route.The route key for the route.The route response selection expression for the route.The target for the route.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidThe API identifier.voidsetApiKeyRequired(Boolean value) Specifies whether an API key is required for the route.voidsetApiKeyRequired(IResolvable value) Specifies whether an API key is required for the route.voidsetAuthorizationScopes(List<String> value) The authorization scopes supported by this route.voidsetAuthorizationType(String value) The authorization type for the route.voidsetAuthorizerId(String value) The identifier of theAuthorizerresource to be associated with this route.voidThe model selection expression for the route.voidsetOperationName(String value) The operation name for the route.voidsetRequestModels(Object value) The request models for the route.voidsetRequestParameters(Object value) The request parameters for the route.voidsetRouteKey(String value) The route key for the route.voidThe route response selection expression for the route.voidThe target for the route.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnRoute
protected CfnRoute(software.amazon.jsii.JsiiObjectRef objRef) -
CfnRoute
protected CfnRoute(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnRoute
@Stability(Stable) public CfnRoute(@NotNull Construct scope, @NotNull String id, @NotNull CfnRouteProps props) Create a newAWS::ApiGatewayV2::Route.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrRouteId
The route ID. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getApiId
The API identifier. -
setApiId
The API identifier. -
getRequestModels
The request models for the route.Supported only for WebSocket APIs.
-
setRequestModels
The request models for the route.Supported only for WebSocket APIs.
-
getRequestParameters
The request parameters for the route.Supported only for WebSocket APIs.
-
setRequestParameters
The request parameters for the route.Supported only for WebSocket APIs.
-
getRouteKey
The route key for the route.For HTTP APIs, the route key can be either
$default, or a combination of an HTTP method and resource path, for example,GET /pets. -
setRouteKey
The route key for the route.For HTTP APIs, the route key can be either
$default, or a combination of an HTTP method and resource path, for example,GET /pets. -
getApiKeyRequired
Specifies whether an API key is required for the route.Supported only for WebSocket APIs.
-
setApiKeyRequired
Specifies whether an API key is required for the route.Supported only for WebSocket APIs.
-
setApiKeyRequired
Specifies whether an API key is required for the route.Supported only for WebSocket APIs.
-
getAuthorizationScopes
The authorization scopes supported by this route. -
setAuthorizationScopes
The authorization scopes supported by this route. -
getAuthorizationType
The authorization type for the route.For WebSocket APIs, valid values are
NONEfor open access,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer. For HTTP APIs, valid values areNONEfor open access,JWTfor using JSON Web Tokens,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer. -
setAuthorizationType
The authorization type for the route.For WebSocket APIs, valid values are
NONEfor open access,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer. For HTTP APIs, valid values areNONEfor open access,JWTfor using JSON Web Tokens,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer. -
getAuthorizerId
The identifier of theAuthorizerresource to be associated with this route.The authorizer identifier is generated by API Gateway when you created the authorizer.
-
setAuthorizerId
The identifier of theAuthorizerresource to be associated with this route.The authorizer identifier is generated by API Gateway when you created the authorizer.
-
getModelSelectionExpression
The model selection expression for the route.Supported only for WebSocket APIs.
-
setModelSelectionExpression
The model selection expression for the route.Supported only for WebSocket APIs.
-
getOperationName
The operation name for the route. -
setOperationName
The operation name for the route. -
getRouteResponseSelectionExpression
The route response selection expression for the route.Supported only for WebSocket APIs.
-
setRouteResponseSelectionExpression
The route response selection expression for the route.Supported only for WebSocket APIs.
-
getTarget
The target for the route. -
setTarget
The target for the route.
-