GrantInvokeOptions
Struct Stable
Options for granting invoke access.
| Source | aws-apigatewayv2/lib/http/route.ts |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigatewayv2 as apigatewayv2 } from 'aws-cdk-lib';
const grantInvokeOptions: apigatewayv2.GrantInvokeOptions = {
httpMethods: [apigatewayv2.HttpMethod.ANY],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigatewayv2 as apigatewayv2
grant_invoke_options = apigatewayv2.GrantInvokeOptions(
http_methods=[apigatewayv2.HttpMethod.ANY]
)
java
// 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.*;
GrantInvokeOptions grantInvokeOptions = GrantInvokeOptions.builder()
.httpMethods(List.of(HttpMethod.ANY))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Apigatewayv2;
var grantInvokeOptions = new GrantInvokeOptions {
HttpMethods = new [] { HttpMethod.ANY }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
grantInvokeOptions := &GrantInvokeOptions{
HttpMethods: []HttpMethod{
awscdk.Aws_apigatewayv2.HttpMethod_ANY,
},
}
Properties
httpMethodsoptionalHttpMethod[]http_methodsoptionaltyping.List[HttpMethod]httpMethodsoptionalList<HttpMethod>HttpMethodsoptionalHttpMethod[]HttpMethodsoptional*[]HttpMethod #The HTTP methods to allow.
Default: the HttpMethod of the route