HttpMethod Enum
Http Methods that API Gateway supports.
| Source | aws-stepfunctions-tasks/lib/apigateway/base-types.ts |
|---|
Example
ts
import * as apigateway from 'aws-cdk-lib/aws-apigateway';
declare const api: apigateway.RestApi;
tasks.CallApiGatewayRestApiEndpoint.jsonata(this, 'Endpoint', {
api,
stageName: 'Stage',
method: tasks.HttpMethod.PUT,
integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
headers: sfn.TaskInput.fromObject({
TaskToken: '{% States.Array($states.context.taskToken) %}',
}),
});
python
import aws_cdk.aws_apigateway as apigateway
# api: apigateway.RestApi
tasks.CallApiGatewayRestApiEndpoint.jsonata(self, "Endpoint",
api=api,
stage_name="Stage",
method=tasks.HttpMethod.PUT,
integration_pattern=sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
headers=sfn.TaskInput.from_object({
"TaskToken": "{% States.Array($states.context.taskToken) %}"
})
)
java
import software.amazon.awscdk.services.apigateway.*;
RestApi api;
CallApiGatewayRestApiEndpoint.jsonata(this, "Endpoint", CallApiGatewayRestApiEndpointJsonataProps.builder()
.api(api)
.stageName("Stage")
.method(HttpMethod.PUT)
.integrationPattern(IntegrationPattern.WAIT_FOR_TASK_TOKEN)
.headers(TaskInput.fromObject(Map.of(
"TaskToken", "{% States.Array($states.context.taskToken) %}")))
.build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.AWS.APIGateway;
RestApi api;
CallApiGatewayRestApiEndpoint.Jsonata(this, "Endpoint", new CallApiGatewayRestApiEndpointJsonataProps {
Api = api,
StageName = "Stage",
Method = HttpMethod.PUT,
IntegrationPattern = IntegrationPattern.WAIT_FOR_TASK_TOKEN,
Headers = TaskInput.FromObject(new Dictionary<string, object> {
{ "TaskToken", "{% States.Array($states.context.taskToken) %}" }
})
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import apigateway "github.com/aws/aws-cdk-go/awscdk"
var api RestApi
tasks.CallApiGatewayRestApiEndpoint_Jsonata(this, jsii.String("Endpoint"), &CallApiGatewayRestApiEndpointJsonataProps{
Api: Api,
StageName: jsii.String("Stage"),
Method: tasks.HttpMethod_PUT,
IntegrationPattern: sfn.IntegrationPattern_WAIT_FOR_TASK_TOKEN,
Headers: sfn.TaskInput_FromObject(map[string]interface{}{
"TaskToken": jsii.String("{% States.Array($states.context.taskToken) %}"),
}),
})
Members
| Member | Description |
|---|---|
GET | Retrieve data from a server at the specified resource. |
POST | Send data to the API endpoint to create or udpate a resource. |
PUT | Send data to the API endpoint to update or create a resource. |
DELETE | Delete the resource at the specified endpoint. |
PATCH | Apply partial modifications to the resource. |
HEAD | Retrieve data from a server at the specified resource without the response body. |
OPTIONS | Return data describing what other methods and operations the server supports. |
Referenced by
CallApiGatewayEndpointBaseOptions.methodmethodmethodMethodMethod