Class CallApiGatewayRestApiEndpoint
Call REST API endpoint as a Task.
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CallApiGatewayRestApiEndpoint : TaskStateBase, IChainable, INextable
Syntax (vb)
Public Class CallApiGatewayRestApiEndpoint Inherits TaskStateBase Implements IChainable, INextable
Remarks
Be aware that the header values must be arrays. When passing the Task Token
in the headers field WAIT_FOR_TASK_TOKEN integration, use
JsonPath.array() to wrap the token in an array:
using Amazon.CDK.AWS.APIGateway;
RestApi api;
new CallApiGatewayRestApiEndpoint(this, "Endpoint", new CallApiGatewayRestApiEndpointProps {
Api = api,
StageName = "Stage",
Method = HttpMethod.PUT,
IntegrationPattern = IntegrationPattern.WAIT_FOR_TASK_TOKEN,
Headers = TaskInput.FromObject(new Dictionary<string, object> {
{ "TaskToken", JsonPath.Array(JsonPath.TaskToken) }
})
});
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
ExampleMetadata: infused
Examples
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) %}" }
})
});
Synopsis
Constructors
| CallApiGatewayRestApiEndpoint(Construct, string, ICallApiGatewayRestApiEndpointProps) | Call REST API endpoint as a Task. |
Properties
| ApiEndpoint | Call REST API endpoint as a Task. |
| ArnForExecuteApi | Call REST API endpoint as a Task. |
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
| StageName | Call REST API endpoint as a Task. |
| TaskMetrics | Call REST API endpoint as a Task. |
| TaskPolicies | Call REST API endpoint as a Task. |
Methods
| CreatePolicyStatements() | Call REST API endpoint as a Task. |
| JsonPath(Construct, string, ICallApiGatewayRestApiEndpointJsonPathProps) | Call REST API endpoint as a Task using JSONPath. |
| Jsonata(Construct, string, ICallApiGatewayRestApiEndpointJsonataProps) | Call REST API endpoint as a Task using JSONata. |
Constructors
CallApiGatewayRestApiEndpoint(Construct, string, ICallApiGatewayRestApiEndpointProps)
Call REST API endpoint as a Task.
public CallApiGatewayRestApiEndpoint(Construct scope, string id, ICallApiGatewayRestApiEndpointProps props)
Parameters
- scope Construct
- id string
Descriptive identifier for this chainable.
- props ICallApiGatewayRestApiEndpointProps
Remarks
Be aware that the header values must be arrays. When passing the Task Token
in the headers field WAIT_FOR_TASK_TOKEN integration, use
JsonPath.array() to wrap the token in an array:
using Amazon.CDK.AWS.APIGateway;
RestApi api;
new CallApiGatewayRestApiEndpoint(this, "Endpoint", new CallApiGatewayRestApiEndpointProps {
Api = api,
StageName = "Stage",
Method = HttpMethod.PUT,
IntegrationPattern = IntegrationPattern.WAIT_FOR_TASK_TOKEN,
Headers = TaskInput.FromObject(new Dictionary<string, object> {
{ "TaskToken", JsonPath.Array(JsonPath.TaskToken) }
})
});
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
ExampleMetadata: infused
Properties
ApiEndpoint
Call REST API endpoint as a Task.
protected virtual string ApiEndpoint { get; }
Property Value
Remarks
Be aware that the header values must be arrays. When passing the Task Token
in the headers field WAIT_FOR_TASK_TOKEN integration, use
JsonPath.array() to wrap the token in an array:
using Amazon.CDK.AWS.APIGateway;
RestApi api;
new CallApiGatewayRestApiEndpoint(this, "Endpoint", new CallApiGatewayRestApiEndpointProps {
Api = api,
StageName = "Stage",
Method = HttpMethod.PUT,
IntegrationPattern = IntegrationPattern.WAIT_FOR_TASK_TOKEN,
Headers = TaskInput.FromObject(new Dictionary<string, object> {
{ "TaskToken", JsonPath.Array(JsonPath.TaskToken) }
})
});
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
ExampleMetadata: infused
Examples
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) %}" }
})
});
ArnForExecuteApi
Call REST API endpoint as a Task.
protected virtual string ArnForExecuteApi { get; }
Property Value
Remarks
Be aware that the header values must be arrays. When passing the Task Token
in the headers field WAIT_FOR_TASK_TOKEN integration, use
JsonPath.array() to wrap the token in an array:
using Amazon.CDK.AWS.APIGateway;
RestApi api;
new CallApiGatewayRestApiEndpoint(this, "Endpoint", new CallApiGatewayRestApiEndpointProps {
Api = api,
StageName = "Stage",
Method = HttpMethod.PUT,
IntegrationPattern = IntegrationPattern.WAIT_FOR_TASK_TOKEN,
Headers = TaskInput.FromObject(new Dictionary<string, object> {
{ "TaskToken", JsonPath.Array(JsonPath.TaskToken) }
})
});
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
ExampleMetadata: infused
Examples
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) %}" }
})
});
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Be aware that the header values must be arrays. When passing the Task Token
in the headers field WAIT_FOR_TASK_TOKEN integration, use
JsonPath.array() to wrap the token in an array:
using Amazon.CDK.AWS.APIGateway;
RestApi api;
new CallApiGatewayRestApiEndpoint(this, "Endpoint", new CallApiGatewayRestApiEndpointProps {
Api = api,
StageName = "Stage",
Method = HttpMethod.PUT,
IntegrationPattern = IntegrationPattern.WAIT_FOR_TASK_TOKEN,
Headers = TaskInput.FromObject(new Dictionary<string, object> {
{ "TaskToken", JsonPath.Array(JsonPath.TaskToken) }
})
});
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
ExampleMetadata: infused
StageName
Call REST API endpoint as a Task.
protected virtual string? StageName { get; }
Property Value
Remarks
Be aware that the header values must be arrays. When passing the Task Token
in the headers field WAIT_FOR_TASK_TOKEN integration, use
JsonPath.array() to wrap the token in an array:
using Amazon.CDK.AWS.APIGateway;
RestApi api;
new CallApiGatewayRestApiEndpoint(this, "Endpoint", new CallApiGatewayRestApiEndpointProps {
Api = api,
StageName = "Stage",
Method = HttpMethod.PUT,
IntegrationPattern = IntegrationPattern.WAIT_FOR_TASK_TOKEN,
Headers = TaskInput.FromObject(new Dictionary<string, object> {
{ "TaskToken", JsonPath.Array(JsonPath.TaskToken) }
})
});
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
ExampleMetadata: infused
Examples
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) %}" }
})
});
TaskMetrics
Call REST API endpoint as a Task.
protected override ITaskMetricsConfig? TaskMetrics { get; }
Property Value
Overrides
Remarks
Be aware that the header values must be arrays. When passing the Task Token
in the headers field WAIT_FOR_TASK_TOKEN integration, use
JsonPath.array() to wrap the token in an array:
using Amazon.CDK.AWS.APIGateway;
RestApi api;
new CallApiGatewayRestApiEndpoint(this, "Endpoint", new CallApiGatewayRestApiEndpointProps {
Api = api,
StageName = "Stage",
Method = HttpMethod.PUT,
IntegrationPattern = IntegrationPattern.WAIT_FOR_TASK_TOKEN,
Headers = TaskInput.FromObject(new Dictionary<string, object> {
{ "TaskToken", JsonPath.Array(JsonPath.TaskToken) }
})
});
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
ExampleMetadata: infused
TaskPolicies
Call REST API endpoint as a Task.
protected override PolicyStatement[]? TaskPolicies { get; }
Property Value
Overrides
Remarks
Be aware that the header values must be arrays. When passing the Task Token
in the headers field WAIT_FOR_TASK_TOKEN integration, use
JsonPath.array() to wrap the token in an array:
using Amazon.CDK.AWS.APIGateway;
RestApi api;
new CallApiGatewayRestApiEndpoint(this, "Endpoint", new CallApiGatewayRestApiEndpointProps {
Api = api,
StageName = "Stage",
Method = HttpMethod.PUT,
IntegrationPattern = IntegrationPattern.WAIT_FOR_TASK_TOKEN,
Headers = TaskInput.FromObject(new Dictionary<string, object> {
{ "TaskToken", JsonPath.Array(JsonPath.TaskToken) }
})
});
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
ExampleMetadata: infused
Methods
CreatePolicyStatements()
Call REST API endpoint as a Task.
protected virtual PolicyStatement[] CreatePolicyStatements()
Returns
Remarks
Be aware that the header values must be arrays. When passing the Task Token
in the headers field WAIT_FOR_TASK_TOKEN integration, use
JsonPath.array() to wrap the token in an array:
using Amazon.CDK.AWS.APIGateway;
RestApi api;
new CallApiGatewayRestApiEndpoint(this, "Endpoint", new CallApiGatewayRestApiEndpointProps {
Api = api,
StageName = "Stage",
Method = HttpMethod.PUT,
IntegrationPattern = IntegrationPattern.WAIT_FOR_TASK_TOKEN,
Headers = TaskInput.FromObject(new Dictionary<string, object> {
{ "TaskToken", JsonPath.Array(JsonPath.TaskToken) }
})
});
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
ExampleMetadata: infused
Examples
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) %}" }
})
});
JsonPath(Construct, string, ICallApiGatewayRestApiEndpointJsonPathProps)
Call REST API endpoint as a Task using JSONPath.
public static CallApiGatewayRestApiEndpoint JsonPath(Construct scope, string id, ICallApiGatewayRestApiEndpointJsonPathProps props)
Parameters
- scope Construct
- id string
- props ICallApiGatewayRestApiEndpointJsonPathProps
Returns
Remarks
Be aware that the header values must be arrays. When passing the Task Token
in the headers field WAIT_FOR_TASK_TOKEN integration, use
JsonPath.array() to wrap the token in an array:
using Amazon.CDK.AWS.APIGateway;
RestApi api;
CallApiGatewayRestApiEndpoint.JsonPath(this, "Endpoint", new CallApiGatewayRestApiEndpointJsonPathProps {
Api = api,
StageName = "Stage",
Method = HttpMethod.PUT,
IntegrationPattern = IntegrationPattern.WAIT_FOR_TASK_TOKEN,
Headers = TaskInput.FromObject(new Dictionary<string, object> {
{ "TaskToken", JsonPath.Array(JsonPath.TaskToken) }
})
});
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
Jsonata(Construct, string, ICallApiGatewayRestApiEndpointJsonataProps)
Call REST API endpoint as a Task using JSONata.
public static CallApiGatewayRestApiEndpoint Jsonata(Construct scope, string id, ICallApiGatewayRestApiEndpointJsonataProps props)
Parameters
- scope Construct
- id string
- props ICallApiGatewayRestApiEndpointJsonataProps
Returns
Remarks
Be aware that the header values must be arrays. When passing the Task Token
in the headers field WAIT_FOR_TASK_TOKEN integration, use
JsonPath.array() to wrap the token in an array:
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) %}" }
})
});
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html