Class StepFunctionsExecutionIntegrationOptions
Options when configuring Step Functions synchronous integration with Rest API.
Inheritance
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class StepFunctionsExecutionIntegrationOptions : Object, IStepFunctionsExecutionIntegrationOptions, IIntegrationOptions
Syntax (vb)
Public Class StepFunctionsExecutionIntegrationOptions
Inherits Object
Implements IStepFunctionsExecutionIntegrationOptions, IIntegrationOptions
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.APIGateway;
using Amazon.CDK.AWS.IAM;
Role role;
VpcLink vpcLink;
var stepFunctionsExecutionIntegrationOptions = new StepFunctionsExecutionIntegrationOptions {
Authorizer = false,
CacheKeyParameters = new [] { "cacheKeyParameters" },
CacheNamespace = "cacheNamespace",
ConnectionType = ConnectionType.INTERNET,
ContentHandling = ContentHandling.CONVERT_TO_BINARY,
CredentialsPassthrough = false,
CredentialsRole = role,
Headers = false,
IntegrationResponses = new [] { new IntegrationResponse {
StatusCode = "statusCode",
// the properties below are optional
ContentHandling = ContentHandling.CONVERT_TO_BINARY,
ResponseParameters = new Dictionary<string, string> {
{ "responseParametersKey", "responseParameters" }
},
ResponseTemplates = new Dictionary<string, string> {
{ "responseTemplatesKey", "responseTemplates" }
},
SelectionPattern = "selectionPattern"
} },
PassthroughBehavior = PassthroughBehavior.WHEN_NO_MATCH,
Path = false,
Querystring = false,
RequestContext = new RequestContext {
AccountId = false,
ApiId = false,
ApiKey = false,
AuthorizerPrincipalId = false,
Caller = false,
CognitoAuthenticationProvider = false,
CognitoAuthenticationType = false,
CognitoIdentityId = false,
CognitoIdentityPoolId = false,
HttpMethod = false,
RequestId = false,
ResourceId = false,
ResourcePath = false,
SourceIp = false,
Stage = false,
User = false,
UserAgent = false,
UserArn = false
},
RequestParameters = new Dictionary<string, string> {
{ "requestParametersKey", "requestParameters" }
},
RequestTemplates = new Dictionary<string, string> {
{ "requestTemplatesKey", "requestTemplates" }
},
Timeout = Duration.Minutes(30),
UseDefaultMethodResponses = false,
VpcLink = vpcLink
};
Synopsis
Constructors
StepFunctionsExecutionIntegrationOptions() |
Properties
Authorizer | If the whole authorizer object, including custom context values should be in the execution input. |
CacheKeyParameters | A list of request parameters whose values are to be cached. |
CacheNamespace | An API-specific tag group of related cached parameters. |
ConnectionType | The type of network connection to the integration endpoint. |
ContentHandling | Specifies how to handle request payload content type conversions. |
CredentialsPassthrough | Requires that the caller's identity be passed through from the request. |
CredentialsRole | An IAM role that API Gateway assumes. |
Headers | Check if header is to be included inside the execution input. |
IntegrationResponses | The response that API Gateway provides after a method's backend completes processing a request. |
PassthroughBehavior | Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. |
Path | Check if path is to be included inside the execution input. |
Querystring | Check if querystring is to be included inside the execution input. |
RequestContext | Which details of the incoming request must be passed onto the underlying state machine, such as, account id, user identity, request id, etc. |
RequestParameters | The request parameters that API Gateway sends with the backend request. |
RequestTemplates | A map of Apache Velocity templates that are applied on the request payload. |
Timeout | The maximum amount of time an integration will run before it returns without a response. |
UseDefaultMethodResponses | Whether to add default response models with 200, 400, and 500 status codes to the method. |
VpcLink | The VpcLink used for the integration. |
Constructors
StepFunctionsExecutionIntegrationOptions()
public StepFunctionsExecutionIntegrationOptions()
Properties
Authorizer
If the whole authorizer object, including custom context values should be in the execution input.
public Nullable<bool> Authorizer { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
The execution input will include a new key authorizer
:
{ "body": {}, "authorizer": { "key": "value" } }
Default: false
CacheKeyParameters
A list of request parameters whose values are to be cached.
public string[] CacheKeyParameters { get; set; }
Property Value
System.String[]
Remarks
It determines request parameters that will make it into the cache key.
CacheNamespace
An API-specific tag group of related cached parameters.
public string CacheNamespace { get; set; }
Property Value
System.String
ConnectionType
The type of network connection to the integration endpoint.
public Nullable<ConnectionType> ConnectionType { get; set; }
Property Value
System.Nullable<ConnectionType>
Remarks
Default: - ConnectionType.VPC_LINK if vpcLink
property is configured; ConnectionType.Internet otherwise.
ContentHandling
Specifies how to handle request payload content type conversions.
public Nullable<ContentHandling> ContentHandling { get; set; }
Property Value
System.Nullable<ContentHandling>
Remarks
Default: none if this property isn't defined, the request payload is passed
through from the method request to the integration request without
modification, provided that the passthroughBehaviors
property is
configured to support payload pass-through.
CredentialsPassthrough
Requires that the caller's identity be passed through from the request.
public Nullable<bool> CredentialsPassthrough { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: Caller identity is not passed through
CredentialsRole
An IAM role that API Gateway assumes.
public IRole CredentialsRole { get; set; }
Property Value
Remarks
Mutually exclusive with credentialsPassThrough
.
Default: A role is not assumed
Headers
Check if header is to be included inside the execution input.
public Nullable<bool> Headers { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
The execution input will include a new key headers
:
{ "body": {}, "headers": { "header1": "value", "header2": "value" } }
Default: false
IntegrationResponses
The response that API Gateway provides after a method's backend completes processing a request.
public IIntegrationResponse[] IntegrationResponses { get; set; }
Property Value
Remarks
API Gateway intercepts the response from the backend so that you can control how API Gateway surfaces backend responses. For example, you can map the backend status codes to codes that you define.
PassthroughBehavior
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource.
public Nullable<PassthroughBehavior> PassthroughBehavior { get; set; }
Property Value
System.Nullable<PassthroughBehavior>
Remarks
There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.
Path
Check if path is to be included inside the execution input.
public Nullable<bool> Path { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
The execution input will include a new key path
:
{ "body": {}, "path": { "resourceName": "resourceValue" } }
Default: true
Querystring
Check if querystring is to be included inside the execution input.
public Nullable<bool> Querystring { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
The execution input will include a new key queryString
:
{ "body": {}, "querystring": { "key": "value" } }
Default: true
RequestContext
Which details of the incoming request must be passed onto the underlying state machine, such as, account id, user identity, request id, etc.
public IRequestContext RequestContext { get; set; }
Property Value
Remarks
The execution input will include a new key requestContext
:
{ "body": {}, "requestContext": { "key": "value" } }
Default: - all parameters within request context will be set as false
RequestParameters
The request parameters that API Gateway sends with the backend request.
public IDictionary<string, string> RequestParameters { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Specify request parameters as key-value pairs (string-to-string mappings), with a destination as the key and a source as the value.
Specify the destination by using the following pattern integration.request.location.name, where location is querystring, path, or header, and name is a valid, unique parameter name.
The source must be an existing method request parameter or a static value. You must enclose static values in single quotation marks and pre-encode these values based on their destination in the request.
RequestTemplates
A map of Apache Velocity templates that are applied on the request payload.
public IDictionary<string, string> RequestTemplates { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
The template that API Gateway uses is based on the value of the Content-Type header that's sent by the client. The content type value is the key, and the template is the value (specified as a string), such as the following snippet:
{ "application/json": "{ \"statusCode\": 200 }" }
Timeout
The maximum amount of time an integration will run before it returns without a response.
public Duration Timeout { get; set; }
Property Value
Remarks
Must be between 50 milliseconds and 29 seconds.
Default: Duration.seconds(29)
UseDefaultMethodResponses
Whether to add default response models with 200, 400, and 500 status codes to the method.
public Nullable<bool> UseDefaultMethodResponses { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
VpcLink
The VpcLink used for the integration.
public IVpcLink VpcLink { get; set; }
Property Value
Remarks
Required if connectionType is VPC_LINK