Table of Contents

Interface IStepFunctionsExecutionIntegrationOptions

Namespace
Amazon.CDK.AWS.APIGateway
Assembly
Amazon.CDK.AWS.APIGateway.dll

Options when configuring Step Functions synchronous integration with Rest API.

public interface IStepFunctionsExecutionIntegrationOptions : IIntegrationOptions
Inherited Members

Examples

// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK.AWS.APIGateway;
            using Amazon.CDK.AWS.IAM;
            using Amazon.CDK;

            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),
                VpcLink = vpcLink
            };

Remarks

ExampleMetadata: fixture=_generated

Properties

Authorizer

If the whole authorizer object, including custom context values should be in the execution input.

bool? Authorizer { get; }

Property Value

bool?

Remarks

The execution input will include a new key authorizer:

{ "body": {}, "authorizer": { "key": "value" } }

Default: false

Headers

Check if header is to be included inside the execution input.

bool? Headers { get; }

Property Value

bool?

Remarks

The execution input will include a new key headers:

{ "body": {}, "headers": { "header1": "value", "header2": "value" } }

Default: false

Path

Check if path is to be included inside the execution input.

bool? Path { get; }

Property Value

bool?

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.

bool? Querystring { get; }

Property Value

bool?

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.

IRequestContext? RequestContext { get; }

Property Value

IRequestContext

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