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 Details

    • Builder

      public Builder()
  • Method Details

    • keyName

      @Stability(Stable) public CfnAPIKeyProps.Builder keyName(String keyName)
      Sets the value of CfnAPIKeyProps.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

      @Stability(Stable) public CfnAPIKeyProps.Builder restrictions(IResolvable restrictions)
      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)
      Parameters:
      restrictions - The API key restrictions for the API key resource. This parameter is required.
      Returns:
      this
    • description

      @Stability(Stable) public CfnAPIKeyProps.Builder description(String description)
      Parameters:
      description - Updates the description for the API key resource.
      Returns:
      this
    • expireTime

      @Stability(Stable) public CfnAPIKeyProps.Builder expireTime(String expireTime)
      Parameters:
      expireTime - The optional timestamp for when the API key resource will expire in ISO 8601 format .
      Returns:
      this
    • forceDelete

      @Stability(Stable) public CfnAPIKeyProps.Builder forceDelete(Boolean forceDelete)
      Parameters:
      forceDelete - ForceDelete bypasses an API key's expiry conditions and deletes the key. Set the parameter true to delete the key or to false to not preemptively delete the API key.

      Valid values: true , or false .

      This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.

      Returns:
      this
    • forceDelete

      @Stability(Stable) public CfnAPIKeyProps.Builder forceDelete(IResolvable forceDelete)
      Parameters:
      forceDelete - ForceDelete bypasses an API key's expiry conditions and deletes the key. Set the parameter true to delete the key or to false to not preemptively delete the API key.

      Valid values: true , or false .

      This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.

      Returns:
      this
    • forceUpdate

      @Stability(Stable) public CfnAPIKeyProps.Builder forceUpdate(Boolean forceUpdate)
      Parameters:
      forceUpdate - The boolean flag to be included for updating ExpireTime or Restrictions details. Must be set to true 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

      @Stability(Stable) public CfnAPIKeyProps.Builder forceUpdate(IResolvable forceUpdate)
      Parameters:
      forceUpdate - The boolean flag to be included for updating ExpireTime or Restrictions details. Must be set to true 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

      @Stability(Stable) public CfnAPIKeyProps.Builder noExpiry(Boolean noExpiry)
      Parameters:
      noExpiry - Whether the API key should expire. Set to true to set the API key to have no expiration time.
      Returns:
      this
    • noExpiry

      @Stability(Stable) public CfnAPIKeyProps.Builder noExpiry(IResolvable noExpiry)
      Parameters:
      noExpiry - Whether the API key should expire. Set to true to set the API key to have no expiration time.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnAPIKeyProps.Builder tags(List<? extends CfnTag> tags)
      Sets the value of CfnAPIKeyProps.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

      @Stability(Stable) public CfnAPIKeyProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnAPIKeyProps>
      Returns:
      a new instance of CfnAPIKeyProps
      Throws:
      NullPointerException - if any required attribute was not provided