java.lang.Object
com.amazonaws.services.apigateway.model.ApiKey
All Implemented Interfaces:
Serializable, Cloneable

public class ApiKey extends Object implements Serializable, Cloneable

A resource that can be distributed to callers for executing Method resources that require an API key. API keys can be mapped to any Stage on any RestApi, which indicates that the callers with the API key can make requests to that stage.

See Also:
  • Constructor Details

    • ApiKey

      public ApiKey()
  • Method Details

    • setId

      public void setId(String id)

      The identifier of the API Key.

      Parameters:
      id - The identifier of the API Key.
    • getId

      public String getId()

      The identifier of the API Key.

      Returns:
      The identifier of the API Key.
    • withId

      public ApiKey withId(String id)

      The identifier of the API Key.

      Parameters:
      id - The identifier of the API Key.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setName

      public void setName(String name)

      The name of the API Key.

      Parameters:
      name - The name of the API Key.
    • getName

      public String getName()

      The name of the API Key.

      Returns:
      The name of the API Key.
    • withName

      public ApiKey withName(String name)

      The name of the API Key.

      Parameters:
      name - The name of the API Key.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setDescription

      public void setDescription(String description)

      The description of the API Key.

      Parameters:
      description - The description of the API Key.
    • getDescription

      public String getDescription()

      The description of the API Key.

      Returns:
      The description of the API Key.
    • withDescription

      public ApiKey withDescription(String description)

      The description of the API Key.

      Parameters:
      description - The description of the API Key.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setEnabled

      public void setEnabled(Boolean enabled)

      Specifies whether the API Key can be used by callers.

      Parameters:
      enabled - Specifies whether the API Key can be used by callers.
    • getEnabled

      public Boolean getEnabled()

      Specifies whether the API Key can be used by callers.

      Returns:
      Specifies whether the API Key can be used by callers.
    • withEnabled

      public ApiKey withEnabled(Boolean enabled)

      Specifies whether the API Key can be used by callers.

      Parameters:
      enabled - Specifies whether the API Key can be used by callers.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • isEnabled

      public Boolean isEnabled()

      Specifies whether the API Key can be used by callers.

      Returns:
      Specifies whether the API Key can be used by callers.
    • getStageKeys

      public List<String> getStageKeys()

      A list of Stage resources that are associated with the ApiKey resource.

      Returns:
      A list of Stage resources that are associated with the ApiKey resource.
    • setStageKeys

      public void setStageKeys(Collection<String> stageKeys)

      A list of Stage resources that are associated with the ApiKey resource.

      Parameters:
      stageKeys - A list of Stage resources that are associated with the ApiKey resource.
    • withStageKeys

      public ApiKey withStageKeys(String... stageKeys)

      A list of Stage resources that are associated with the ApiKey resource.

      NOTE: This method appends the values to the existing list (if any). Use setStageKeys(java.util.Collection) or withStageKeys(java.util.Collection) if you want to override the existing values.

      Parameters:
      stageKeys - A list of Stage resources that are associated with the ApiKey resource.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withStageKeys

      public ApiKey withStageKeys(Collection<String> stageKeys)

      A list of Stage resources that are associated with the ApiKey resource.

      Parameters:
      stageKeys - A list of Stage resources that are associated with the ApiKey resource.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setCreatedDate

      public void setCreatedDate(Date createdDate)

      The date when the API Key was created, in ISO 8601 format.

      Parameters:
      createdDate - The date when the API Key was created, in ISO 8601 format.
    • getCreatedDate

      public Date getCreatedDate()

      The date when the API Key was created, in ISO 8601 format.

      Returns:
      The date when the API Key was created, in ISO 8601 format.
    • withCreatedDate

      public ApiKey withCreatedDate(Date createdDate)

      The date when the API Key was created, in ISO 8601 format.

      Parameters:
      createdDate - The date when the API Key was created, in ISO 8601 format.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setLastUpdatedDate

      public void setLastUpdatedDate(Date lastUpdatedDate)

      When the API Key was last updated, in ISO 8601 format.

      Parameters:
      lastUpdatedDate - When the API Key was last updated, in ISO 8601 format.
    • getLastUpdatedDate

      public Date getLastUpdatedDate()

      When the API Key was last updated, in ISO 8601 format.

      Returns:
      When the API Key was last updated, in ISO 8601 format.
    • withLastUpdatedDate

      public ApiKey withLastUpdatedDate(Date lastUpdatedDate)

      When the API Key was last updated, in ISO 8601 format.

      Parameters:
      lastUpdatedDate - When the API Key was last updated, in ISO 8601 format.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public ApiKey clone()
      Overrides:
      clone in class Object