Class RateLimitedApiKeyProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.RateLimitedApiKeyProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<RateLimitedApiKeyProps>
- Enclosing interface:
RateLimitedApiKeyProps
@Stability(Stable)
public static final class RateLimitedApiKeyProps.Builder
extends Object
implements software.amazon.jsii.Builder<RateLimitedApiKeyProps>
A builder for
RateLimitedApiKeyProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapiKeyName
(String apiKeyName) Sets the value ofApiKeyOptions.getApiKeyName()
apiStages
(List<? extends UsagePlanPerApiStage> apiStages) Sets the value ofRateLimitedApiKeyProps.getApiStages()
build()
Builds the configured instance.customerId
(String customerId) Sets the value ofApiKeyProps.getCustomerId()
defaultCorsPreflightOptions
(CorsOptions defaultCorsPreflightOptions) Sets the value ofResourceOptions.getDefaultCorsPreflightOptions()
defaultIntegration
(Integration defaultIntegration) Sets the value ofResourceOptions.getDefaultIntegration()
defaultMethodOptions
(MethodOptions defaultMethodOptions) Sets the value ofResourceOptions.getDefaultMethodOptions()
description
(String description) Sets the value ofApiKeyOptions.getDescription()
Sets the value ofApiKeyProps.getEnabled()
generateDistinctId
(Boolean generateDistinctId) Sets the value ofApiKeyProps.getGenerateDistinctId()
quota
(QuotaSettings quota) Sets the value ofRateLimitedApiKeyProps.getQuota()
Sets the value ofApiKeyProps.getResources()
throttle
(ThrottleSettings throttle) Sets the value ofRateLimitedApiKeyProps.getThrottle()
Sets the value ofApiKeyOptions.getValue()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiStages
@Stability(Stable) public RateLimitedApiKeyProps.Builder apiStages(List<? extends UsagePlanPerApiStage> apiStages) Sets the value ofRateLimitedApiKeyProps.getApiStages()
- Parameters:
apiStages
- API Stages to be associated with the RateLimitedApiKey.- Returns:
this
-
quota
Sets the value ofRateLimitedApiKeyProps.getQuota()
- Parameters:
quota
- Number of requests clients can make in a given time period.- Returns:
this
-
throttle
Sets the value ofRateLimitedApiKeyProps.getThrottle()
- Parameters:
throttle
- Overall throttle settings for the API.- Returns:
this
-
customerId
Sets the value ofApiKeyProps.getCustomerId()
- Parameters:
customerId
- An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.- Returns:
this
-
enabled
Sets the value ofApiKeyProps.getEnabled()
- Parameters:
enabled
- Indicates whether the API key can be used by clients.- Returns:
this
-
generateDistinctId
@Stability(Stable) public RateLimitedApiKeyProps.Builder generateDistinctId(Boolean generateDistinctId) Sets the value ofApiKeyProps.getGenerateDistinctId()
- Parameters:
generateDistinctId
- Specifies whether the key identifier is distinct from the created API key value.- Returns:
this
-
resources
@Stability(Stable) public RateLimitedApiKeyProps.Builder resources(List<? extends IRestApi> resources) Sets the value ofApiKeyProps.getResources()
- Parameters:
resources
- A list of resources this api key is associated with.- Returns:
this
-
apiKeyName
Sets the value ofApiKeyOptions.getApiKeyName()
- Parameters:
apiKeyName
- A name for the API key. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.- Returns:
this
-
description
Sets the value ofApiKeyOptions.getDescription()
- Parameters:
description
- A description of the purpose of the API key.- Returns:
this
-
value
Sets the value ofApiKeyOptions.getValue()
- Parameters:
value
- The value of the API key. Must be at least 20 characters long.- Returns:
this
-
defaultCorsPreflightOptions
@Stability(Stable) public RateLimitedApiKeyProps.Builder defaultCorsPreflightOptions(CorsOptions defaultCorsPreflightOptions) Sets the value ofResourceOptions.getDefaultCorsPreflightOptions()
- Parameters:
defaultCorsPreflightOptions
- Adds a CORS preflight OPTIONS method to this resource and all child resources. You can add CORS at the resource-level usingaddCorsPreflight
.- Returns:
this
-
defaultIntegration
@Stability(Stable) public RateLimitedApiKeyProps.Builder defaultIntegration(Integration defaultIntegration) Sets the value ofResourceOptions.getDefaultIntegration()
- Parameters:
defaultIntegration
- An integration to use as a default for all methods created within this API unless an integration is specified.- Returns:
this
-
defaultMethodOptions
@Stability(Stable) public RateLimitedApiKeyProps.Builder defaultMethodOptions(MethodOptions defaultMethodOptions) Sets the value ofResourceOptions.getDefaultMethodOptions()
- Parameters:
defaultMethodOptions
- Method options to use as a default for all methods created within this API unless custom options are specified.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<RateLimitedApiKeyProps>
- Returns:
- a new instance of
RateLimitedApiKeyProps
- Throws:
NullPointerException
- if any required attribute was not provided
-