Class CfnRoute
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.apigatewayv2.CfnRoute
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,IRouteRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:39:57.531Z")
@Stability(Stable)
public class CfnRoute
extends CfnResource
implements IInspectable, IRouteRef
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();
- See Also:
-
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.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.apigatewayv2.IRouteRef
IRouteRef.Jsii$Default, IRouteRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnRoute(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnRoute(software.amazon.jsii.JsiiObjectRef objRef) CfnRoute(software.constructs.Construct scope, String id, CfnRouteProps props) -
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.A reference to a Route resource.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.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnRouteProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
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
-
getRouteRef
A reference to a Route resource.- Specified by:
getRouteRefin interfaceIRouteRef
-
getApiId
The API identifier. -
setApiId
The API identifier. -
getRouteKey
The route key for the route. -
setRouteKey
The route key for the route. -
getApiKeyRequired
Specifies whether an API key is required for the route.Returns union: either
BooleanorIResolvable -
setApiKeyRequired
Specifies whether an API key is required for the route. -
setApiKeyRequired
Specifies whether an API key is required for the route. -
getAuthorizationScopes
The authorization scopes supported by this route. -
setAuthorizationScopes
The authorization scopes supported by this route. -
getAuthorizationType
The authorization type for the route. -
setAuthorizationType
The authorization type for the route. -
getAuthorizerId
The identifier of theAuthorizerresource to be associated with this route. -
setAuthorizerId
The identifier of theAuthorizerresource to be associated with this route. -
getModelSelectionExpression
The model selection expression for the route. -
setModelSelectionExpression
The model selection expression for the route. -
getOperationName
The operation name for the route. -
setOperationName
The operation name for the route. -
getRequestModels
The request models for the route. -
setRequestModels
The request models for the route. -
getRequestParameters
The request parameters for the route. -
setRequestParameters
The request parameters for the route. -
getRouteResponseSelectionExpression
The route response selection expression for the route. -
setRouteResponseSelectionExpression
The route response selection expression for the route. -
getTarget
The target for the route. -
setTarget
The target for the route.
-