@Stability(value=Stable) public static final class CfnRestApiProps.Builder extends Object implements software.amazon.jsii.Builder<CfnRestApiProps>
CfnRestApiProps| Constructor and Description |
|---|
Builder() |
@Stability(value=Stable) public CfnRestApiProps.Builder apiKeySourceType(String apiKeySourceType)
CfnRestApiProps.getApiKeySourceType()apiKeySourceType - The source of the API key for metering requests according to a usage plan. Valid values are:.
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.this@Stability(value=Stable) public CfnRestApiProps.Builder binaryMediaTypes(List<String> binaryMediaTypes)
CfnRestApiProps.getBinaryMediaTypes()binaryMediaTypes - The list of binary media types that are supported by the `RestApi` resource.
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 .this@Stability(value=Stable) public CfnRestApiProps.Builder body(Object body)
CfnRestApiProps.getBody()body - An OpenAPI specification that defines a set of RESTful APIs in JSON format.
For YAML templates, you can also provide the specification in YAML format.this@Stability(value=Stable) public CfnRestApiProps.Builder bodyS3Location(CfnRestApi.S3LocationProperty bodyS3Location)
CfnRestApiProps.getBodyS3Location()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@Stability(value=Stable) public CfnRestApiProps.Builder bodyS3Location(IResolvable bodyS3Location)
CfnRestApiProps.getBodyS3Location()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@Stability(value=Stable) public CfnRestApiProps.Builder cloneFrom(String cloneFrom)
CfnRestApiProps.getCloneFrom()cloneFrom - The ID of the `RestApi` resource that you want to clone.this@Stability(value=Stable) public CfnRestApiProps.Builder description(String description)
CfnRestApiProps.getDescription()description - A description of the `RestApi` resource.this@Stability(value=Stable) public CfnRestApiProps.Builder disableExecuteApiEndpoint(Boolean disableExecuteApiEndpoint)
CfnRestApiProps.getDisableExecuteApiEndpoint()disableExecuteApiEndpoint - Specifies whether clients can invoke your API by using the default `execute-api` endpoint.
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.this@Stability(value=Stable) public CfnRestApiProps.Builder disableExecuteApiEndpoint(IResolvable disableExecuteApiEndpoint)
CfnRestApiProps.getDisableExecuteApiEndpoint()disableExecuteApiEndpoint - Specifies whether clients can invoke your API by using the default `execute-api` endpoint.
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.this@Stability(value=Stable) public CfnRestApiProps.Builder endpointConfiguration(CfnRestApi.EndpointConfigurationProperty endpointConfiguration)
CfnRestApiProps.getEndpointConfiguration()endpointConfiguration - A list of the endpoint types of the API.
Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using the Parameters property.this@Stability(value=Stable) public CfnRestApiProps.Builder endpointConfiguration(IResolvable endpointConfiguration)
CfnRestApiProps.getEndpointConfiguration()endpointConfiguration - A list of the endpoint types of the API.
Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using the Parameters property.this@Stability(value=Stable) public CfnRestApiProps.Builder failOnWarnings(Boolean failOnWarnings)
CfnRestApiProps.getFailOnWarnings()failOnWarnings - Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the `RestApi` resource.this@Stability(value=Stable) public CfnRestApiProps.Builder failOnWarnings(IResolvable failOnWarnings)
CfnRestApiProps.getFailOnWarnings()failOnWarnings - Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the `RestApi` resource.this@Stability(value=Stable) public CfnRestApiProps.Builder minimumCompressionSize(Number minimumCompressionSize)
CfnRestApiProps.getMinimumCompressionSize()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.
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.this@Stability(value=Stable) public CfnRestApiProps.Builder mode(String mode)
CfnRestApiProps.getMode()mode - This property applies only when you use OpenAPI to define your REST API.
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 .
this@Stability(value=Stable) public CfnRestApiProps.Builder name(String name)
CfnRestApiProps.getName()name - A name for the `RestApi` resource.this@Stability(value=Stable) public CfnRestApiProps.Builder parameters(IResolvable parameters)
CfnRestApiProps.getParameters()parameters - Custom header parameters for the request.this@Stability(value=Stable) public CfnRestApiProps.Builder parameters(Map<String,String> parameters)
CfnRestApiProps.getParameters()parameters - Custom header parameters for the request.this@Stability(value=Stable) public CfnRestApiProps.Builder policy(Object policy)
CfnRestApiProps.getPolicy()policy - A policy document that contains the permissions for the `RestApi` resource.
To set the ARN for the policy, use the !Join intrinsic function with "" as delimiter and values of "execute-api:/" and "*" .this@Stability(value=Stable) public CfnRestApiProps.Builder tags(List<? extends CfnTag> tags)
CfnRestApiProps.getTags()tags - An array of arbitrary tags (key-value pairs) to associate with the API.this@Stability(value=Stable) public CfnRestApiProps build()
build in interface software.amazon.jsii.Builder<CfnRestApiProps>CfnRestApiPropsNullPointerException - if any required attribute was not providedCopyright © 2022. All rights reserved.