@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-06-22T23:27:58.248Z") 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.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnRoute(Construct scope,
java.lang.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 |
---|---|
java.lang.String |
getApiId()
The API identifier.
|
java.lang.Object |
getApiKeyRequired()
Specifies whether an API key is required for the route.
|
java.util.List<java.lang.String> |
getAuthorizationScopes()
The authorization scopes supported by this route.
|
java.lang.String |
getAuthorizationType()
The authorization type for the route.
|
java.lang.String |
getAuthorizerId()
The identifier of the `Authorizer` resource to be associated with this route.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getModelSelectionExpression()
The model selection expression for the route.
|
java.lang.String |
getOperationName()
The operation name for the route.
|
java.lang.Object |
getRequestModels()
The request models for the route.
|
java.lang.Object |
getRequestParameters()
The request parameters for the route.
|
java.lang.String |
getRouteKey()
The route key for the route.
|
java.lang.String |
getRouteResponseSelectionExpression()
The route response selection expression for the route.
|
java.lang.String |
getTarget()
The target for the route.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setApiId(java.lang.String value)
The API identifier.
|
void |
setApiKeyRequired(java.lang.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(java.util.List<java.lang.String> value)
The authorization scopes supported by this route.
|
void |
setAuthorizationType(java.lang.String value)
The authorization type for the route.
|
void |
setAuthorizerId(java.lang.String value)
The identifier of the `Authorizer` resource to be associated with this route.
|
void |
setModelSelectionExpression(java.lang.String value)
The model selection expression for the route.
|
void |
setOperationName(java.lang.String value)
The operation name for the route.
|
void |
setRequestModels(java.lang.Object value)
The request models for the route.
|
void |
setRequestParameters(java.lang.Object value)
The request parameters for the route.
|
void |
setRouteKey(java.lang.String value)
The route key for the route.
|
void |
setRouteResponseSelectionExpression(java.lang.String value)
The route response selection expression for the route.
|
void |
setTarget(java.lang.String value)
The target for the route.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnRoute(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnRoute(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnRoute(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getApiId()
public void setApiId(java.lang.String value)
public java.lang.Object getRequestModels()
Supported only for WebSocket APIs.
public void setRequestModels(java.lang.Object value)
Supported only for WebSocket APIs.
public java.lang.Object getRequestParameters()
Supported only for WebSocket APIs.
public void setRequestParameters(java.lang.Object value)
Supported only for WebSocket APIs.
public java.lang.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
.
public void setRouteKey(java.lang.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
.
public java.lang.Object getApiKeyRequired()
Supported only for WebSocket APIs.
public void setApiKeyRequired(java.lang.Boolean value)
Supported only for WebSocket APIs.
public void setApiKeyRequired(IResolvable value)
Supported only for WebSocket APIs.
public java.util.List<java.lang.String> getAuthorizationScopes()
public void setAuthorizationScopes(java.util.List<java.lang.String> value)
public java.lang.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.
public void setAuthorizationType(java.lang.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.
public java.lang.String getAuthorizerId()
The authorizer identifier is generated by API Gateway when you created the authorizer.
public void setAuthorizerId(java.lang.String value)
The authorizer identifier is generated by API Gateway when you created the authorizer.
public java.lang.String getModelSelectionExpression()
Supported only for WebSocket APIs.
public void setModelSelectionExpression(java.lang.String value)
Supported only for WebSocket APIs.
public java.lang.String getOperationName()
public void setOperationName(java.lang.String value)
public java.lang.String getRouteResponseSelectionExpression()
Supported only for WebSocket APIs.
public void setRouteResponseSelectionExpression(java.lang.String value)
Supported only for WebSocket APIs.
public java.lang.String getTarget()
public void setTarget(java.lang.String value)