Interface RestApiProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable,ResourceOptions,RestApiBaseProps
- All Known Subinterfaces:
LambdaRestApiProps,StepFunctionsRestApiProps
- All Known Implementing Classes:
LambdaRestApiProps.Jsii$Proxy,RestApiProps.Jsii$Proxy,StepFunctionsRestApiProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:30.380Z")
@Stability(Stable)
public interface RestApiProps
extends software.amazon.jsii.JsiiSerializable, ResourceOptions, RestApiBaseProps
Props to create a new instance of RestApi.
Example:
StateMachine stateMachine = StateMachine.Builder.create(this, "MyStateMachine")
.stateMachineType(StateMachineType.EXPRESS)
.definition(Chain.start(new Pass(this, "Pass")))
.build();
RestApi api = RestApi.Builder.create(this, "Api")
.restApiName("MyApi")
.build();
api.root.addMethod("GET", StepFunctionsIntegration.startExecution(stateMachine));
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forRestApiPropsstatic final classAn implementation forRestApiProps -
Method Summary
Modifier and TypeMethodDescriptionstatic RestApiProps.Builderbuilder()default ApiKeySourceTypeThe source of the API key for metering requests according to a usage plan.The list of binary media mime-types that are supported by the RestApi resource, such as "image/png" or "application/octet-stream".default IRestApiThe ID of the API Gateway RestApi resource that you want to clone.default SizeA Size(in bytes, kibibytes, mebibytes etc) that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API.default NumberDeprecated.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.apigateway.ResourceOptions
getDefaultCorsPreflightOptions, getDefaultIntegration, getDefaultMethodOptionsMethods inherited from interface software.amazon.awscdk.services.apigateway.RestApiBaseProps
getCloudWatchRole, getCloudWatchRoleRemovalPolicy, getDeploy, getDeployOptions, getDescription, getDisableExecuteApiEndpoint, getDomainName, getEndpointConfiguration, getEndpointExportName, getEndpointTypes, getFailOnWarnings, getParameters, getPolicy, getRestApiName, getRetainDeployments
-
Method Details
-
getApiKeySourceType
The source of the API key for metering requests according to a usage plan.Default: - Metering is disabled.
-
getBinaryMediaTypes
The list of binary media mime-types that are supported by the RestApi resource, such as "image/png" or "application/octet-stream".Default: - RestApi supports only UTF-8-encoded text payloads.
-
getCloneFrom
The ID of the API Gateway RestApi resource that you want to clone.Default: - None.
-
getMinCompressionSize
A Size(in bytes, kibibytes, mebibytes etc) that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API.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.
-
getMinimumCompressionSize
Deprecated.- superseded by
minCompressionSize
(deprecated) 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.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.
- superseded by
-
builder
- Returns:
- a
RestApiProps.BuilderofRestApiProps
-
minCompressionSize