ApiGatewayV1LambdaRoute
Reference doc for the `sst.aws.ApiGatewayV1LambdaRoute` component.
The ApiGatewayV1LambdaRoute
component is internally used by the ApiGatewayV1
component
to add routes to your API Gateway REST API.
You’ll find this component returned by the route
method of the ApiGatewayV1
component.
Constructor
Parameters
-
name
string
-
args
Args
-
opts?
ComponentResourceOptions
Properties
nodes
Type Object
The underlying resources this component creates.
nodes.integration
Type Integration
The API Gateway REST API integration.
nodes.method
Type Output
<
Method
>
The API Gateway REST API method.
nodes.permission
Type Permission
The Lambda permission.
nodes.function
Type Output
<
Function
>
The Lambda function.
Args
api
Type Input
<
Object
>
The API Gateway to use for the route.
api.executionArn
Type Input
<
string
>
The execution ARN of the API Gateway.
api.id
Type Input
<
string
>
The ID of the API Gateway.
api.name
Type Input
<
string
>
The name of the API Gateway.
auth?
Type Input
<
false
|
Object
>
-
cognito?
Input
<
Object
>
Default false
Enable auth for your REST API. By default, auth is disabled.
auth.cognito?
Type Input
<
Object
>
Enable Cognito User Pool authorization for a given API route.
You can configure JWT auth.
Where myAuthorizer
is:
auth.cognito.authorizer
Type Input
<
string
>
Authorizer ID of the Cognito User Pool authorizer.
auth.cognito.scopes?
Type Input
<
Input
<
string
>
[]
>
Defines the permissions or access levels that the authorization token grants.
auth.custom?
Type Input
<
string
>
Enable custom Lambda authorization for a given API route. Pass in the authorizer ID.
Where myAuthorizer
is:
auth.iam?
Type Input
<
boolean
>
Enable IAM authorization for a given API route.
When IAM auth is enabled, clients need to use Signature Version 4 to sign their requests with their AWS credentials.
handler
Type Input
<
string
|
FunctionArgs
>
The route function.
method
Type string
The route method.
path
Type string
The route path.
resourceId
Type Input
<
string
>
The route resource ID.
transform?
Type Object
Transform how this component creates its underlying resources.
transform.integration?
Type IntegrationArgs
|
(
args
:
IntegrationArgs
,
opts
:
ComponentResourceOptions
,
name
:
string
)
=>
void
Transform the API Gateway REST API integration resource.
transform.method?
Type MethodArgs
|
(
args
:
MethodArgs
,
opts
:
ComponentResourceOptions
,
name
:
string
)
=>
void
Transform the API Gateway REST API method resource.