Interface RestApiProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, ResourceOptions, RestApiBaseProps, RestApiOptions
All Known Subinterfaces:
LambdaRestApiProps, StepFunctionsRestApiProps
All Known Implementing Classes:
LambdaRestApiProps.Jsii$Proxy, RestApiProps.Jsii$Proxy, StepFunctionsRestApiProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:45.085Z") @Stability(Stable) public interface RestApiProps extends software.amazon.jsii.JsiiSerializable, RestApiOptions
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));
 
  • Method Details

    • getApiKeySourceType

      @Stability(Stable) @Nullable default ApiKeySourceType getApiKeySourceType()
      The source of the API key for metering requests according to a usage plan.

      Default: - Metering is disabled.

    • getBinaryMediaTypes

      @Stability(Stable) @Nullable default List<String> 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

      @Stability(Stable) @Nullable default IRestApi getCloneFrom()
      The ID of the API Gateway RestApi resource that you want to clone.

      Default: - None.

    • getDescription

      @Stability(Stable) @Nullable default String getDescription()
      A description of the purpose of this API Gateway RestApi resource.

      Default: - No description.

    • getEndpointConfiguration

      @Stability(Stable) @Nullable default EndpointConfiguration getEndpointConfiguration()
      The EndpointConfiguration property type specifies the endpoint types of a REST API.

      Default: EndpointType.EDGE

      See Also:
    • getMinimumCompressionSize

      @Stability(Stable) @Nullable default Number getMinimumCompressionSize()
      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.

    • builder

      @Stability(Stable) static RestApiProps.Builder builder()
      Returns:
      a RestApiProps.Builder of RestApiProps