Modifier and Type | Method and Description |
---|---|
ApiKey.Builder |
apiKeyName(java.lang.String apiKeyName)
A name for the API key.
|
ApiKey |
build() |
static ApiKey.Builder |
create(software.constructs.Construct scope,
java.lang.String id) |
ApiKey.Builder |
customerId(java.lang.String customerId)
An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
|
ApiKey.Builder |
defaultCorsPreflightOptions(CorsOptions defaultCorsPreflightOptions)
Adds a CORS preflight OPTIONS method to this resource and all child resources.
|
ApiKey.Builder |
defaultIntegration(Integration defaultIntegration)
An integration to use as a default for all methods created within this API unless an integration is specified.
|
ApiKey.Builder |
defaultMethodOptions(MethodOptions defaultMethodOptions)
Method options to use as a default for all methods created within this API unless custom options are specified.
|
ApiKey.Builder |
description(java.lang.String description)
A description of the purpose of the API key.
|
ApiKey.Builder |
enabled(java.lang.Boolean enabled)
Indicates whether the API key can be used by clients.
|
ApiKey.Builder |
generateDistinctId(java.lang.Boolean generateDistinctId)
Specifies whether the key identifier is distinct from the created API key value.
|
ApiKey.Builder |
resources(java.util.List<? extends IRestApi> resources)
A list of resources this api key is associated with.
|
ApiKey.Builder |
value(java.lang.String value)
The value of the API key.
|
public static ApiKey.Builder create(software.constructs.Construct scope, java.lang.String id)
scope
- This parameter is required.id
- This parameter is required.ApiKey.Builder
.public ApiKey.Builder defaultCorsPreflightOptions(CorsOptions defaultCorsPreflightOptions)
You can add CORS at the resource-level using addCorsPreflight
.
Default: - CORS is disabled
defaultCorsPreflightOptions
- Adds a CORS preflight OPTIONS method to this resource and all child resources. This parameter is required.this
public ApiKey.Builder defaultIntegration(Integration defaultIntegration)
Default: - Inherited from parent.
defaultIntegration
- An integration to use as a default for all methods created within this API unless an integration is specified. This parameter is required.this
public ApiKey.Builder defaultMethodOptions(MethodOptions defaultMethodOptions)
Default: - Inherited from parent.
defaultMethodOptions
- Method options to use as a default for all methods created within this API unless custom options are specified. This parameter is required.this
public ApiKey.Builder apiKeyName(java.lang.String apiKeyName)
If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.
Default: automically generated name
apiKeyName
- A name for the API key. This parameter is required.this
public ApiKey.Builder description(java.lang.String description)
Default: none
description
- A description of the purpose of the API key. This parameter is required.this
public ApiKey.Builder value(java.lang.String value)
Must be at least 20 characters long.
Default: none
value
- The value of the API key. This parameter is required.this
public ApiKey.Builder customerId(java.lang.String customerId)
Default: none
customerId
- An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace. This parameter is required.this
public ApiKey.Builder enabled(java.lang.Boolean enabled)
Default: true
enabled
- Indicates whether the API key can be used by clients. This parameter is required.this
public ApiKey.Builder generateDistinctId(java.lang.Boolean generateDistinctId)
Default: false
generateDistinctId
- Specifies whether the key identifier is distinct from the created API key value. This parameter is required.this
public ApiKey.Builder resources(java.util.List<? extends IRestApi> resources)
Default: none
resources
- A list of resources this api key is associated with. This parameter is required.this
public ApiKey build()