Class CfnAPIKeyProps.Builder
java.lang.Object
software.amazon.awscdk.services.location.CfnAPIKeyProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAPIKeyProps>
- Enclosing interface:
CfnAPIKeyProps
@Stability(Stable)
public static final class CfnAPIKeyProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAPIKeyProps>
A builder for
CfnAPIKeyProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.description
(String description) Sets the value ofCfnAPIKeyProps.getDescription()
expireTime
(String expireTime) Sets the value ofCfnAPIKeyProps.getExpireTime()
forceDelete
(Boolean forceDelete) Sets the value ofCfnAPIKeyProps.getForceDelete()
forceDelete
(IResolvable forceDelete) Sets the value ofCfnAPIKeyProps.getForceDelete()
forceUpdate
(Boolean forceUpdate) Sets the value ofCfnAPIKeyProps.getForceUpdate()
forceUpdate
(IResolvable forceUpdate) Sets the value ofCfnAPIKeyProps.getForceUpdate()
Sets the value ofCfnAPIKeyProps.getKeyName()
Sets the value ofCfnAPIKeyProps.getNoExpiry()
noExpiry
(IResolvable noExpiry) Sets the value ofCfnAPIKeyProps.getNoExpiry()
restrictions
(IResolvable restrictions) Sets the value ofCfnAPIKeyProps.getRestrictions()
restrictions
(CfnAPIKey.ApiKeyRestrictionsProperty restrictions) Sets the value ofCfnAPIKeyProps.getRestrictions()
Sets the value ofCfnAPIKeyProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
keyName
Sets the value ofCfnAPIKeyProps.getKeyName()
- Parameters:
keyName
- A custom name for the API key resource. This parameter is required. 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:
this
-
restrictions
Sets the value ofCfnAPIKeyProps.getRestrictions()
- Parameters:
restrictions
- The API key restrictions for the API key resource. This parameter is required.- Returns:
this
-
restrictions
@Stability(Stable) public CfnAPIKeyProps.Builder restrictions(CfnAPIKey.ApiKeyRestrictionsProperty restrictions) Sets the value ofCfnAPIKeyProps.getRestrictions()
- Parameters:
restrictions
- The API key restrictions for the API key resource. This parameter is required.- Returns:
this
-
description
Sets the value ofCfnAPIKeyProps.getDescription()
- Parameters:
description
- Updates the description for the API key resource.- Returns:
this
-
expireTime
Sets the value ofCfnAPIKeyProps.getExpireTime()
- Parameters:
expireTime
- The optional timestamp for when the API key resource will expire in ISO 8601 format .- Returns:
this
-
forceDelete
Sets the value ofCfnAPIKeyProps.getForceDelete()
- Parameters:
forceDelete
- ForceDelete bypasses an API key's expiry conditions and deletes the key. Set the parametertrue
to delete the key or tofalse
to 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.
- Returns:
this
-
forceDelete
Sets the value ofCfnAPIKeyProps.getForceDelete()
- Parameters:
forceDelete
- ForceDelete bypasses an API key's expiry conditions and deletes the key. Set the parametertrue
to delete the key or tofalse
to 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.
- Returns:
this
-
forceUpdate
Sets the value ofCfnAPIKeyProps.getForceUpdate()
- Parameters:
forceUpdate
- The boolean flag to be included for updatingExpireTime
or Restrictions details. Must be set totrue
to update an API key resource that has been used in the past 7 days.False
if force update is not preferred.- Returns:
this
-
forceUpdate
Sets the value ofCfnAPIKeyProps.getForceUpdate()
- Parameters:
forceUpdate
- The boolean flag to be included for updatingExpireTime
or Restrictions details. Must be set totrue
to update an API key resource that has been used in the past 7 days.False
if force update is not preferred.- Returns:
this
-
noExpiry
Sets the value ofCfnAPIKeyProps.getNoExpiry()
- Parameters:
noExpiry
- Whether the API key should expire. Set totrue
to set the API key to have no expiration time.- Returns:
this
-
noExpiry
Sets the value ofCfnAPIKeyProps.getNoExpiry()
- Parameters:
noExpiry
- Whether the API key should expire. Set totrue
to set the API key to have no expiration time.- Returns:
this
-
tags
Sets the value ofCfnAPIKeyProps.getTags()
- 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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnAPIKeyProps>
- Returns:
- a new instance of
CfnAPIKeyProps
- Throws:
NullPointerException
- if any required attribute was not provided
-