@Stability(value=Stable) public static final class CfnRestApi.Builder extends Object implements software.amazon.jsii.Builder<CfnRestApi>
CfnRestApi.| Modifier and Type | Method and Description |
|---|---|
CfnRestApi.Builder |
apiKeySourceType(String apiKeySourceType)
The source of the API key for metering requests according to a usage plan.
|
CfnRestApi.Builder |
binaryMediaTypes(List<String> binaryMediaTypes)
The list of binary media types that are supported by the `RestApi` resource.
|
CfnRestApi.Builder |
body(Object body)
An OpenAPI specification that defines a set of RESTful APIs in JSON format.
|
CfnRestApi.Builder |
bodyS3Location(CfnRestApi.S3LocationProperty bodyS3Location)
The Amazon Simple Storage Service (Amazon S3) location that points to an OpenAPI file, which defines a set of RESTful APIs in JSON or YAML format.
|
CfnRestApi.Builder |
bodyS3Location(IResolvable bodyS3Location)
The Amazon Simple Storage Service (Amazon S3) location that points to an OpenAPI file, which defines a set of RESTful APIs in JSON or YAML format.
|
CfnRestApi |
build() |
CfnRestApi.Builder |
cloneFrom(String cloneFrom)
The ID of the `RestApi` resource that you want to clone.
|
static CfnRestApi.Builder |
create(software.constructs.Construct scope,
String id) |
CfnRestApi.Builder |
description(String description)
A description of the `RestApi` resource.
|
CfnRestApi.Builder |
disableExecuteApiEndpoint(Boolean disableExecuteApiEndpoint)
Specifies whether clients can invoke your API by using the default `execute-api` endpoint.
|
CfnRestApi.Builder |
disableExecuteApiEndpoint(IResolvable disableExecuteApiEndpoint)
Specifies whether clients can invoke your API by using the default `execute-api` endpoint.
|
CfnRestApi.Builder |
endpointConfiguration(CfnRestApi.EndpointConfigurationProperty endpointConfiguration)
A list of the endpoint types of the API.
|
CfnRestApi.Builder |
endpointConfiguration(IResolvable endpointConfiguration)
A list of the endpoint types of the API.
|
CfnRestApi.Builder |
failOnWarnings(Boolean failOnWarnings)
Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the `RestApi` resource.
|
CfnRestApi.Builder |
failOnWarnings(IResolvable failOnWarnings)
Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the `RestApi` resource.
|
CfnRestApi.Builder |
minimumCompressionSize(Number minimumCompressionSize)
A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API.
|
CfnRestApi.Builder |
mode(String mode)
This property applies only when you use OpenAPI to define your REST API.
|
CfnRestApi.Builder |
name(String name)
A name for the `RestApi` resource.
|
CfnRestApi.Builder |
parameters(IResolvable parameters)
Custom header parameters for the request.
|
CfnRestApi.Builder |
parameters(Map<String,String> parameters)
Custom header parameters for the request.
|
CfnRestApi.Builder |
policy(Object policy)
A policy document that contains the permissions for the `RestApi` resource.
|
CfnRestApi.Builder |
tags(List<? extends CfnTag> tags)
An array of arbitrary tags (key-value pairs) to associate with the API.
|
@Stability(value=Stable) public static CfnRestApi.Builder create(software.constructs.Construct scope, String id)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.CfnRestApi.EndpointConfigurationProperty.Builder.@Stability(value=Stable) public CfnRestApi.Builder apiKeySourceType(String apiKeySourceType)
HEADER to read the API key from the X-API-Key header of a request.AUTHORIZER to read the API key from the UsageIdentifierKey from a Lambda authorizer.apiKeySourceType - The source of the API key for metering requests according to a usage plan. Valid values are:. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder binaryMediaTypes(List<String> binaryMediaTypes)
Use ~1 instead of / in the media types, for example image~1png or application~1octet-stream . By default, RestApi supports only UTF-8-encoded text payloads. Duplicates are not allowed. For more information, see Enable Support for Binary Payloads in API Gateway in the API Gateway Developer Guide .
binaryMediaTypes - The list of binary media types that are supported by the `RestApi` resource. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder body(Object body)
For YAML templates, you can also provide the specification in YAML format.
body - An OpenAPI specification that defines a set of RESTful APIs in JSON format. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder bodyS3Location(CfnRestApi.S3LocationProperty bodyS3Location)
bodyS3Location - The Amazon Simple Storage Service (Amazon S3) location that points to an OpenAPI file, which defines a set of RESTful APIs in JSON or YAML format. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder bodyS3Location(IResolvable bodyS3Location)
bodyS3Location - The Amazon Simple Storage Service (Amazon S3) location that points to an OpenAPI file, which defines a set of RESTful APIs in JSON or YAML format. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder cloneFrom(String cloneFrom)
cloneFrom - The ID of the `RestApi` resource that you want to clone. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder description(String description)
description - A description of the `RestApi` resource. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder disableExecuteApiEndpoint(Boolean disableExecuteApiEndpoint)
By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.
disableExecuteApiEndpoint - Specifies whether clients can invoke your API by using the default `execute-api` endpoint. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder disableExecuteApiEndpoint(IResolvable disableExecuteApiEndpoint)
By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.
disableExecuteApiEndpoint - Specifies whether clients can invoke your API by using the default `execute-api` endpoint. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder endpointConfiguration(CfnRestApi.EndpointConfigurationProperty endpointConfiguration)
Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using the Parameters property.
endpointConfiguration - A list of the endpoint types of the API. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder endpointConfiguration(IResolvable endpointConfiguration)
Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using the Parameters property.
endpointConfiguration - A list of the endpoint types of the API. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder failOnWarnings(Boolean failOnWarnings)
failOnWarnings - Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the `RestApi` resource. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder failOnWarnings(IResolvable failOnWarnings)
failOnWarnings - Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the `RestApi` resource. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder minimumCompressionSize(Number minimumCompressionSize)
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.
minimumCompressionSize - A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder mode(String mode)
The Mode determines how API Gateway handles resource updates.
Valid values are overwrite or merge .
For overwrite , the new API definition replaces the existing one. The existing API identifier remains unchanged.
For merge , the new API definition takes precedence, but any container types such as endpoint configurations and binary media types are merged with the existing API. Use merge to define top-level RestApi properties in addition to using OpenAPI. Generally, it's preferred to use API Gateway's OpenAPI extensions to model these properties.
If you don't specify this property, a default value is chosen. For REST APIs created before March 29, 2021, the default is overwrite . Otherwise, the default value is merge .
mode - This property applies only when you use OpenAPI to define your REST API. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder name(String name)
name - A name for the `RestApi` resource. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder parameters(IResolvable parameters)
parameters - Custom header parameters for the request. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder parameters(Map<String,String> parameters)
parameters - Custom header parameters for the request. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder policy(Object policy)
To set the ARN for the policy, use the !Join intrinsic function with "" as delimiter and values of "execute-api:/" and "*" .
policy - A policy document that contains the permissions for the `RestApi` resource. This parameter is required.this@Stability(value=Stable) public CfnRestApi.Builder tags(List<? extends CfnTag> tags)
tags - An array of arbitrary tags (key-value pairs) to associate with the API. This parameter is required.this@Stability(value=Stable) public CfnRestApi build()
build in interface software.amazon.jsii.Builder<CfnRestApi>Copyright © 2022. All rights reserved.