Interface CreateKeyRequest.Builder
- All Superinterfaces:
AwsRequest.Builder
,Buildable
,CopyableBuilder<CreateKeyRequest.Builder,
,CreateKeyRequest> LocationRequest.Builder
,SdkBuilder<CreateKeyRequest.Builder,
,CreateKeyRequest> SdkPojo
,SdkRequest.Builder
- Enclosing class:
CreateKeyRequest
-
Method Summary
Modifier and TypeMethodDescriptiondescription
(String description) An optional description for the API key resource.expireTime
(Instant expireTime) The optional timestamp for when the API key resource will expire in ISO 8601 format:YYYY-MM-DDThh:mm:ss.sssZ
.A custom name for the API key resource.Optionally set totrue
to set no expiration time for the API key.overrideConfiguration
(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration
(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.default CreateKeyRequest.Builder
restrictions
(Consumer<ApiKeyRestrictions.Builder> restrictions) The API key restrictions for the API key resource.restrictions
(ApiKeyRestrictions restrictions) The API key restrictions for the API key resource.Applies one or more tags to the map resource.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfiguration
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.services.location.model.LocationRequest.Builder
build
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
keyName
A custom name for the API key resource.
Requirements:
-
Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).
-
Must be a unique API key name.
-
No spaces allowed. For example,
ExampleAPIKey
.
- Parameters:
keyName
- A custom name for the API key resource.Requirements:
-
Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).
-
Must be a unique API key name.
-
No spaces allowed. For example,
ExampleAPIKey
.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
restrictions
The API key restrictions for the API key resource.
- Parameters:
restrictions
- The API key restrictions for the API key resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
restrictions
The API key restrictions for the API key resource.
This is a convenience method that creates an instance of theApiKeyRestrictions.Builder
avoiding the need to create one manually viaApiKeyRestrictions.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed torestrictions(ApiKeyRestrictions)
.- Parameters:
restrictions
- a consumer that will call methods onApiKeyRestrictions.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
description
An optional description for the API key resource.
- Parameters:
description
- An optional description for the API key resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
expireTime
The optional timestamp for when the API key resource will expire in ISO 8601 format:
YYYY-MM-DDThh:mm:ss.sssZ
. One ofNoExpiry
orExpireTime
must be set.- Parameters:
expireTime
- The optional timestamp for when the API key resource will expire in ISO 8601 format:YYYY-MM-DDThh:mm:ss.sssZ
. One ofNoExpiry
orExpireTime
must be set.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
noExpiry
Optionally set to
true
to set no expiration time for the API key. One ofNoExpiry
orExpireTime
must be set.- Parameters:
noExpiry
- Optionally set totrue
to set no expiration time for the API key. One ofNoExpiry
orExpireTime
must be set.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
Applies one or more tags to the map resource. A tag is a key-value pair that helps manage, identify, search, and filter your resources by labelling them.
Format:
"key" : "value"
Restrictions:
-
Maximum 50 tags per resource
-
Each resource tag must be unique with a maximum of one value.
-
Maximum key length: 128 Unicode characters in UTF-8
-
Maximum value length: 256 Unicode characters in UTF-8
-
Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.
-
Cannot use "aws:" as a prefix for a key.
- Parameters:
tags
- Applies one or more tags to the map resource. A tag is a key-value pair that helps manage, identify, search, and filter your resources by labelling them.Format:
"key" : "value"
Restrictions:
-
Maximum 50 tags per resource
-
Each resource tag must be unique with a maximum of one value.
-
Maximum key length: 128 Unicode characters in UTF-8
-
Maximum value length: 256 Unicode characters in UTF-8
-
Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.
-
Cannot use "aws:" as a prefix for a key.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
overrideConfiguration
CreateKeyRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
overrideConfiguration
- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
CreateKeyRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
builderConsumer
- AConsumer
to which an emptyAwsRequestOverrideConfiguration.Builder
will be given.- Returns:
- This object for method chaining.
-