Class CfnAPIKey.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAPIKey>
- Enclosing class:
CfnAPIKey
CfnAPIKey.-
Method Summary
Modifier and TypeMethodDescriptionbuild()static CfnAPIKey.Builderdescription(String description) Updates the description for the API key resource.expireTime(String expireTime) The optional timestamp for when the API key resource will expire in ISO 8601 format .forceDelete(Boolean forceDelete) ForceDelete bypasses an API key's expiry conditions and deletes the key.forceDelete(IResolvable forceDelete) ForceDelete bypasses an API key's expiry conditions and deletes the key.forceUpdate(Boolean forceUpdate) The boolean flag to be included for updatingExpireTimeor Restrictions details.forceUpdate(IResolvable forceUpdate) The boolean flag to be included for updatingExpireTimeor Restrictions details.A custom name for the API key resource.Whether the API key should expire.noExpiry(IResolvable noExpiry) Whether the API key should expire.restrictions(IResolvable restrictions) The API key restrictions for the API key resource.restrictions(CfnAPIKey.ApiKeyRestrictionsProperty restrictions) The API key restrictions for the API key resource.Applies one or more tags to the map resource.
-
Method Details
-
create
@Stability(Stable) public static CfnAPIKey.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnAPIKey.Builder.
-
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. This parameter is required.- Returns:
this- See Also:
-
restrictions
The API key restrictions for the API key resource.- Parameters:
restrictions- The API key restrictions for the API key resource. This parameter is required.- Returns:
this- See Also:
-
restrictions
@Stability(Stable) public CfnAPIKey.Builder restrictions(CfnAPIKey.ApiKeyRestrictionsProperty restrictions) The API key restrictions for the API key resource.- Parameters:
restrictions- The API key restrictions for the API key resource. This parameter is required.- Returns:
this- See Also:
-
description
Updates the description for the API key resource.- Parameters:
description- Updates the description for the API key resource. This parameter is required.- Returns:
this- See Also:
-
expireTime
The optional timestamp for when the API key resource will expire in ISO 8601 format .- Parameters:
expireTime- The optional timestamp for when the API key resource will expire in ISO 8601 format . This parameter is required.- Returns:
this- See Also:
-
forceDelete
ForceDelete bypasses an API key's expiry conditions and deletes the key.Set the parameter
trueto delete the key or tofalseto not preemptively delete the API key.Valid values:
true, orfalse.This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.
- Parameters:
forceDelete- ForceDelete bypasses an API key's expiry conditions and deletes the key. This parameter is required.- Returns:
this- See Also:
-
forceDelete
ForceDelete bypasses an API key's expiry conditions and deletes the key.Set the parameter
trueto delete the key or tofalseto not preemptively delete the API key.Valid values:
true, orfalse.This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.
- Parameters:
forceDelete- ForceDelete bypasses an API key's expiry conditions and deletes the key. This parameter is required.- Returns:
this- See Also:
-
forceUpdate
The boolean flag to be included for updatingExpireTimeor Restrictions details.Must be set to
trueto update an API key resource that has been used in the past 7 days.Falseif force update is not preferred.- Parameters:
forceUpdate- The boolean flag to be included for updatingExpireTimeor Restrictions details. This parameter is required.- Returns:
this- See Also:
-
forceUpdate
The boolean flag to be included for updatingExpireTimeor Restrictions details.Must be set to
trueto update an API key resource that has been used in the past 7 days.Falseif force update is not preferred.- Parameters:
forceUpdate- The boolean flag to be included for updatingExpireTimeor Restrictions details. This parameter is required.- Returns:
this- See Also:
-
noExpiry
Whether the API key should expire.Set to
trueto set the API key to have no expiration time.- Parameters:
noExpiry- Whether the API key should expire. This parameter is required.- Returns:
this- See Also:
-
noExpiry
Whether the API key should expire.Set to
trueto set the API key to have no expiration time.- Parameters:
noExpiry- Whether the API key should expire. This parameter is required.- Returns:
this- See Also:
-
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.
- Parameters:
tags- Applies one or more tags to the map resource. This parameter is required.- Returns:
this- See Also:
-
build
-