Table of Contents

Interface IRestApiProps

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

Props to create a new instance of RestApi.

public interface IRestApiProps : IRestApiOptions, IRestApiBaseProps, IResourceOptions
Inherited Members

Examples

var stateMachine = new StateMachine(this, "MyStateMachine", new StateMachineProps {
                StateMachineType = StateMachineType.EXPRESS,
                Definition = Chain.Start(new Pass(this, "Pass"))
            });

            var api = new RestApi(this, "Api", new RestApiProps {
                RestApiName = "MyApi"
            });
            api.Root.AddMethod("GET", StepFunctionsIntegration.StartExecution(stateMachine));

Remarks

ExampleMetadata: infused

Properties

ApiKeySourceType

The source of the API key for metering requests according to a usage plan.

ApiKeySourceType? ApiKeySourceType { get; }

Property Value

ApiKeySourceType?

Remarks

Default: - Metering is disabled.

BinaryMediaTypes

The list of binary media mime-types that are supported by the RestApi resource, such as "image/png" or "application/octet-stream".

string[]? BinaryMediaTypes { get; }

Property Value

string[]

Remarks

Default: - RestApi supports only UTF-8-encoded text payloads.

CloneFrom

The ID of the API Gateway RestApi resource that you want to clone.

IRestApi? CloneFrom { get; }

Property Value

IRestApi

Remarks

Default: - None.

Description

A description of the purpose of this API Gateway RestApi resource.

string? Description { get; }

Property Value

string

Remarks

Default: - No description.

EndpointConfiguration

The EndpointConfiguration property type specifies the endpoint types of a REST API.

IEndpointConfiguration? EndpointConfiguration { get; }

Property Value

IEndpointConfiguration

Remarks

MinimumCompressionSize

A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API.

double? MinimumCompressionSize { get; }

Property Value

double?

Remarks

When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

Default: - Compression is disabled.