Class CfnRestApiMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRestApiMixinProps>
- Enclosing interface:
CfnRestApiMixinProps
CfnRestApiMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapiKeySourceType(String apiKeySourceType) Sets the value ofCfnRestApiMixinProps.getApiKeySourceType()binaryMediaTypes(List<String> binaryMediaTypes) Sets the value ofCfnRestApiMixinProps.getBinaryMediaTypes()Sets the value ofCfnRestApiMixinProps.getBody()bodyS3Location(CfnRestApiPropsMixin.S3LocationProperty bodyS3Location) Sets the value ofCfnRestApiMixinProps.getBodyS3Location()bodyS3Location(IResolvable bodyS3Location) Sets the value ofCfnRestApiMixinProps.getBodyS3Location()build()Builds the configured instance.Sets the value ofCfnRestApiMixinProps.getCloneFrom()cloneFrom(IRestApiRef cloneFrom) Sets the value ofCfnRestApiMixinProps.getCloneFrom()description(String description) Sets the value ofCfnRestApiMixinProps.getDescription()disableExecuteApiEndpoint(Boolean disableExecuteApiEndpoint) Sets the value ofCfnRestApiMixinProps.getDisableExecuteApiEndpoint()disableExecuteApiEndpoint(IResolvable disableExecuteApiEndpoint) Sets the value ofCfnRestApiMixinProps.getDisableExecuteApiEndpoint()endpointAccessMode(String endpointAccessMode) Sets the value ofCfnRestApiMixinProps.getEndpointAccessMode()endpointConfiguration(CfnRestApiPropsMixin.EndpointConfigurationProperty endpointConfiguration) Sets the value ofCfnRestApiMixinProps.getEndpointConfiguration()endpointConfiguration(IResolvable endpointConfiguration) Sets the value ofCfnRestApiMixinProps.getEndpointConfiguration()failOnWarnings(Boolean failOnWarnings) Sets the value ofCfnRestApiMixinProps.getFailOnWarnings()failOnWarnings(IResolvable failOnWarnings) Sets the value ofCfnRestApiMixinProps.getFailOnWarnings()minimumCompressionSize(Number minimumCompressionSize) Sets the value ofCfnRestApiMixinProps.getMinimumCompressionSize()Sets the value ofCfnRestApiMixinProps.getMode()Sets the value ofCfnRestApiMixinProps.getName()parameters(Map<String, String> parameters) Sets the value ofCfnRestApiMixinProps.getParameters()parameters(IResolvable parameters) Sets the value ofCfnRestApiMixinProps.getParameters()Sets the value ofCfnRestApiMixinProps.getPolicy()securityPolicy(String securityPolicy) Sets the value ofCfnRestApiMixinProps.getSecurityPolicy()Sets the value ofCfnRestApiMixinProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiKeySourceType
Sets the value ofCfnRestApiMixinProps.getApiKeySourceType()- Parameters:
apiKeySourceType- The source of the API key for metering requests according to a usage plan. Valid values are:HEADERto read the API key from theX-API-Keyheader of a request.AUTHORIZERto read the API key from theUsageIdentifierKeyfrom a custom authorizer.- Returns:
this
-
binaryMediaTypes
@Stability(Stable) public CfnRestApiMixinProps.Builder binaryMediaTypes(List<String> binaryMediaTypes) Sets the value ofCfnRestApiMixinProps.getBinaryMediaTypes()- Parameters:
binaryMediaTypes- The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.- Returns:
this
-
body
Sets the value ofCfnRestApiMixinProps.getBody()- Parameters:
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.- Returns:
this
-
bodyS3Location
Sets the value ofCfnRestApiMixinProps.getBodyS3Location()- Parameters:
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.- Returns:
this
-
bodyS3Location
@Stability(Stable) public CfnRestApiMixinProps.Builder bodyS3Location(CfnRestApiPropsMixin.S3LocationProperty bodyS3Location) Sets the value ofCfnRestApiMixinProps.getBodyS3Location()- Parameters:
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.- Returns:
this
-
cloneFrom
Sets the value ofCfnRestApiMixinProps.getCloneFrom()- Parameters:
cloneFrom- The ID of the RestApi that you want to clone from.- Returns:
this
-
cloneFrom
Sets the value ofCfnRestApiMixinProps.getCloneFrom()- Parameters:
cloneFrom- The ID of the RestApi that you want to clone from.- Returns:
this
-
description
Sets the value ofCfnRestApiMixinProps.getDescription()- Parameters:
description- The description of the RestApi.- Returns:
this
-
disableExecuteApiEndpoint
@Stability(Stable) public CfnRestApiMixinProps.Builder disableExecuteApiEndpoint(Boolean disableExecuteApiEndpoint) Sets the value ofCfnRestApiMixinProps.getDisableExecuteApiEndpoint()- Parameters:
disableExecuteApiEndpoint- Specifies whether clients can invoke your API by using the defaultexecute-apiendpoint. By default, clients can invoke your API with the defaulthttps://{api_id}.execute-api.{region}.amazonaws.com.rproxy.govskope.caendpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint- Returns:
this
-
disableExecuteApiEndpoint
@Stability(Stable) public CfnRestApiMixinProps.Builder disableExecuteApiEndpoint(IResolvable disableExecuteApiEndpoint) Sets the value ofCfnRestApiMixinProps.getDisableExecuteApiEndpoint()- Parameters:
disableExecuteApiEndpoint- Specifies whether clients can invoke your API by using the defaultexecute-apiendpoint. By default, clients can invoke your API with the defaulthttps://{api_id}.execute-api.{region}.amazonaws.com.rproxy.govskope.caendpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint- Returns:
this
-
endpointAccessMode
@Stability(Stable) public CfnRestApiMixinProps.Builder endpointAccessMode(String endpointAccessMode) Sets the value ofCfnRestApiMixinProps.getEndpointAccessMode()- Parameters:
endpointAccessMode- The endpoint access mode for your RestApi.- Returns:
this
-
endpointConfiguration
@Stability(Stable) public CfnRestApiMixinProps.Builder endpointConfiguration(IResolvable endpointConfiguration) Sets the value ofCfnRestApiMixinProps.getEndpointConfiguration()- Parameters:
endpointConfiguration- A list of the endpoint types and IP address types of the API. Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using theParametersproperty.- Returns:
this
-
endpointConfiguration
@Stability(Stable) public CfnRestApiMixinProps.Builder endpointConfiguration(CfnRestApiPropsMixin.EndpointConfigurationProperty endpointConfiguration) Sets the value ofCfnRestApiMixinProps.getEndpointConfiguration()- Parameters:
endpointConfiguration- A list of the endpoint types and IP address types of the API. Use this property when creating an API. When importing an existing API, specify the endpoint configuration types using theParametersproperty.- Returns:
this
-
failOnWarnings
Sets the value ofCfnRestApiMixinProps.getFailOnWarnings()- Parameters:
failOnWarnings- A query parameter to indicate whether to rollback the API update (true) or not (false) when a warning is encountered. The default value isfalse.- Returns:
this
-
failOnWarnings
Sets the value ofCfnRestApiMixinProps.getFailOnWarnings()- Parameters:
failOnWarnings- A query parameter to indicate whether to rollback the API update (true) or not (false) when a warning is encountered. The default value isfalse.- Returns:
this
-
minimumCompressionSize
@Stability(Stable) public CfnRestApiMixinProps.Builder minimumCompressionSize(Number minimumCompressionSize) Sets the value ofCfnRestApiMixinProps.getMinimumCompressionSize()- Parameters:
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.- Returns:
this
-
mode
Sets the value ofCfnRestApiMixinProps.getMode()- Parameters:
mode- This property applies only when you use OpenAPI to define your REST API. TheModedetermines how API Gateway handles resource updates.Valid values are
overwriteormerge.For
overwrite, the new API definition replaces the existing one. The existing API identifier remains unchanged.For
merge, the new API definition is merged with the existing API.If you don't specify this property, a default value is chosen. For REST APIs created before March 29, 2021, the default is
overwrite. For REST APIs created after March 29, 2021, 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 the default mode to define top-level
RestApiproperties in addition to using OpenAPI. Generally, it's preferred to use API Gateway's OpenAPI extensions to model these properties.- Returns:
this
-
name
Sets the value ofCfnRestApiMixinProps.getName()- Parameters:
name- The name of the RestApi. A name is required if the REST API is not based on an OpenAPI specification.- Returns:
this
-
parameters
Sets the value ofCfnRestApiMixinProps.getParameters()- Parameters:
parameters- Custom header parameters as part of the request. For example, to exclude DocumentationParts from an imported API, setignore=documentationas aparametersvalue, as in the AWS CLI command ofaws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'.- Returns:
this
-
parameters
Sets the value ofCfnRestApiMixinProps.getParameters()- Parameters:
parameters- Custom header parameters as part of the request. For example, to exclude DocumentationParts from an imported API, setignore=documentationas aparametersvalue, as in the AWS CLI command ofaws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'.- Returns:
this
-
policy
Sets the value ofCfnRestApiMixinProps.getPolicy()- Parameters:
policy- A policy document that contains the permissions for theRestApiresource. To set the ARN for the policy, use the!Joinintrinsic function with""as delimiter and values of"execute-api:/"and"*".- Returns:
this
-
securityPolicy
Sets the value ofCfnRestApiMixinProps.getSecurityPolicy()- Parameters:
securityPolicy- The Transport Layer Security (TLS) version + cipher suite for this RestApi.- Returns:
this
-
tags
Sets the value ofCfnRestApiMixinProps.getTags()- Parameters:
tags- The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start withaws:. The tag value can be up to 256 characters.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnRestApiMixinProps>- Returns:
- a new instance of
CfnRestApiMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-