@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ApiKey extends Object implements Serializable, Cloneable, StructuredPojo
Describes an API key.
Customers invoke AWS AppSync GraphQL APIs with API keys as an identity mechanism. There are two key versions:
da1: This version was introduced at launch in November 2017. These keys always expire after 7 days. Key expiration is managed by DynamoDB TTL. The keys will cease to be valid after Feb 21, 2018 and should not be used after that date.
ListApiKeys returns the expiration time in milliseconds.
CreateApiKey returns the expiration time in milliseconds.
UpdateApiKey is not available for this key version.
DeleteApiKey deletes the item from the table.
Expiration is stored in DynamoDB as milliseconds. This results in a bug where keys are not automatically deleted because DynamoDB expects the TTL to be stored in seconds. As a one-time action, we will delete these keys from the table after Feb 21, 2018.
da2: This version was introduced in February 2018 when AppSync added support to extend key expiration.
ListApiKeys returns the expiration time in seconds.
CreateApiKey returns the expiration time in seconds and accepts a user-provided expiration time in
seconds.
UpdateApiKey returns the expiration time in seconds and accepts a user-provided expiration time in
seconds. Key expiration can only be updated while the key has not expired.
DeleteApiKey deletes the item from the table.
Expiration is stored in DynamoDB as seconds.
| Constructor and Description |
|---|
ApiKey() |
| Modifier and Type | Method and Description |
|---|---|
ApiKey |
clone() |
boolean |
equals(Object obj) |
String |
getDescription()
A description of the purpose of the API key.
|
Long |
getExpires()
The time after which the API key expires.
|
String |
getId()
The API key ID.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller) |
void |
setDescription(String description)
A description of the purpose of the API key.
|
void |
setExpires(Long expires)
The time after which the API key expires.
|
void |
setId(String id)
The API key ID.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
ApiKey |
withDescription(String description)
A description of the purpose of the API key.
|
ApiKey |
withExpires(Long expires)
The time after which the API key expires.
|
ApiKey |
withId(String id)
The API key ID.
|
public void setId(String id)
The API key ID.
id - The API key ID.public String getId()
The API key ID.
public ApiKey withId(String id)
The API key ID.
id - The API key ID.public void setDescription(String description)
A description of the purpose of the API key.
description - A description of the purpose of the API key.public String getDescription()
A description of the purpose of the API key.
public ApiKey withDescription(String description)
A description of the purpose of the API key.
description - A description of the purpose of the API key.public void setExpires(Long expires)
The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.
expires - The time after which the API key expires. The date is represented as seconds since the epoch, rounded down
to the nearest hour.public Long getExpires()
The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.
public ApiKey withExpires(Long expires)
The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.
expires - The time after which the API key expires. The date is represented as seconds since the epoch, rounded down
to the nearest hour.public String toString()
toString in class ObjectObject.toString()public void marshall(ProtocolMarshaller protocolMarshaller)
marshall in interface StructuredPojoCopyright © 2018. All rights reserved.