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.97.0 (build 729de35)", date="2024-04-18T17:54:11.935Z") @Stability(Stable) public interface RestApiProps extends software.amazon.jsii.JsiiSerializable, ResourceOptions, RestApiBaseProps
Props to create a new instance of RestApi.

Example:

 Bucket destinationBucket = new Bucket(this, "Bucket");
 Role deliveryStreamRole = Role.Builder.create(this, "Role")
         .assumedBy(new ServicePrincipal("firehose.amazonaws.com"))
         .build();
 CfnDeliveryStream stream = CfnDeliveryStream.Builder.create(this, "MyStream")
         .deliveryStreamName("amazon-apigateway-delivery-stream")
         .s3DestinationConfiguration(S3DestinationConfigurationProperty.builder()
                 .bucketArn(destinationBucket.getBucketArn())
                 .roleArn(deliveryStreamRole.getRoleArn())
                 .build())
         .build();
 RestApi api = RestApi.Builder.create(this, "books")
         .deployOptions(StageOptions.builder()
                 .accessLogDestination(new FirehoseLogDestination(stream))
                 .accessLogFormat(AccessLogFormat.jsonWithStandardFields())
                 .build())
         .build();
 
  • 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.

    • getEndpointConfiguration

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

      Default: EndpointType.EDGE

      See Also:
    • getMinCompressionSize

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

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

    • builder

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