Skip to content
v2.278.0

HttpMethod Enum ​

Http Methods that API Gateway supports.

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 ​

MemberDescription
GETRetrieve data from a server at the specified resource.
POSTSend data to the API endpoint to create or udpate a resource.
PUTSend data to the API endpoint to update or create a resource.
DELETEDelete the resource at the specified endpoint.
PATCHApply partial modifications to the resource.
HEADRetrieve data from a server at the specified resource without the response body.
OPTIONSReturn data describing what other methods and operations the server supports.

Referenced by ​