@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.286Z") @Stability(value=Stable) public class CfnRoute extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnRoute.Builder
A fluent builder for
CfnRoute. |
static interface |
CfnRoute.ParameterConstraintsProperty
Specifies whether the parameter is required.
|
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::ApiGatewayV2::Route`.
|
protected |
CfnRoute(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnRoute(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getApiId()
The API identifier.
|
Object |
getApiKeyRequired()
Specifies whether an API key is required for the route.
|
List<String> |
getAuthorizationScopes()
The authorization scopes supported by this route.
|
String |
getAuthorizationType()
The authorization type for the route.
|
String |
getAuthorizerId()
The identifier of the `Authorizer` resource to be associated with this route.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getModelSelectionExpression()
The model selection expression for the route.
|
String |
getOperationName()
The operation name for the route.
|
Object |
getRequestModels()
The request models for the route.
|
Object |
getRequestParameters()
The request parameters for the route.
|
String |
getRouteKey()
The route key for the route.
|
String |
getRouteResponseSelectionExpression()
The route response selection expression for the route.
|
String |
getTarget()
The target for the route.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setApiId(String value)
The API identifier.
|
void |
setApiKeyRequired(Boolean value)
Specifies whether an API key is required for the route.
|
void |
setApiKeyRequired(IResolvable value)
Specifies whether an API key is required for the route.
|
void |
setAuthorizationScopes(List<String> value)
The authorization scopes supported by this route.
|
void |
setAuthorizationType(String value)
The authorization type for the route.
|
void |
setAuthorizerId(String value)
The identifier of the `Authorizer` resource to be associated with this route.
|
void |
setModelSelectionExpression(String value)
The model selection expression for the route.
|
void |
setOperationName(String value)
The operation name for the route.
|
void |
setRequestModels(Object value)
The request models for the route.
|
void |
setRequestParameters(Object value)
The request parameters for the route.
|
void |
setRouteKey(String value)
The route key for the route.
|
void |
setRouteResponseSelectionExpression(String value)
The route response selection expression for the route.
|
void |
setTarget(String value)
The target for the route.
|
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 protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getApiId()
@Stability(value=Stable)
public void setApiId(@NotNull
String value)
@Stability(value=Stable) @NotNull public Object getRequestModels()
Supported only for WebSocket APIs.
@Stability(value=Stable)
public void setRequestModels(@NotNull
Object value)
Supported only for WebSocket APIs.
@Stability(value=Stable) @NotNull public Object getRequestParameters()
Supported only for WebSocket APIs.
@Stability(value=Stable)
public void setRequestParameters(@NotNull
Object value)
Supported only for WebSocket APIs.
@Stability(value=Stable) @NotNull public String getRouteKey()
For HTTP APIs, the route key can be either $default , or a combination of an HTTP method and resource path, for example, GET /pets .
@Stability(value=Stable)
public void setRouteKey(@NotNull
String value)
For HTTP APIs, the route key can be either $default , or a combination of an HTTP method and resource path, for example, GET /pets .
@Stability(value=Stable) @Nullable public Object getApiKeyRequired()
Supported only for WebSocket APIs.
@Stability(value=Stable)
public void setApiKeyRequired(@Nullable
Boolean value)
Supported only for WebSocket APIs.
@Stability(value=Stable)
public void setApiKeyRequired(@Nullable
IResolvable value)
Supported only for WebSocket APIs.
@Stability(value=Stable) @Nullable public List<String> getAuthorizationScopes()
@Stability(value=Stable)
public void setAuthorizationScopes(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public String getAuthorizationType()
For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
@Stability(value=Stable)
public void setAuthorizationType(@Nullable
String value)
For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
@Stability(value=Stable) @Nullable public String getAuthorizerId()
The authorizer identifier is generated by API Gateway when you created the authorizer.
@Stability(value=Stable)
public void setAuthorizerId(@Nullable
String value)
The authorizer identifier is generated by API Gateway when you created the authorizer.
@Stability(value=Stable) @Nullable public String getModelSelectionExpression()
Supported only for WebSocket APIs.
@Stability(value=Stable)
public void setModelSelectionExpression(@Nullable
String value)
Supported only for WebSocket APIs.
@Stability(value=Stable) @Nullable public String getOperationName()
@Stability(value=Stable)
public void setOperationName(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getRouteResponseSelectionExpression()
Supported only for WebSocket APIs.
@Stability(value=Stable)
public void setRouteResponseSelectionExpression(@Nullable
String value)
Supported only for WebSocket APIs.
@Stability(value=Stable) @Nullable public String getTarget()
@Stability(value=Stable)
public void setTarget(@Nullable
String value)
Copyright © 2022. All rights reserved.