@Generated(value="software.amazon.awssdk:codegen") public final class AccessKey extends Object implements SdkPojo, Serializable, ToCopyableBuilder<AccessKey.Builder,AccessKey>
Describes an access key for an Amazon Lightsail bucket.
Access keys grant full programmatic access to the specified bucket and its objects. You can have a maximum of two access keys per bucket. Use the CreateBucketAccessKey action to create an access key for a specific bucket. For more information about access keys, see Creating access keys for a bucket in Amazon Lightsail in the Amazon Lightsail Developer Guide.
The secretAccessKey value is returned only in response to the CreateBucketAccessKey action.
You can get a secret access key only when you first create an access key; you cannot get the secret access key later.
If you lose the secret access key, you must create a new access key.
| Modifier and Type | Class and Description |
|---|---|
static interface |
AccessKey.Builder |
| Modifier and Type | Method and Description |
|---|---|
String |
accessKeyId()
The ID of the access key.
|
static AccessKey.Builder |
builder() |
Instant |
createdAt()
The timestamp when the access key was created.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
AccessKeyLastUsed |
lastUsed()
An object that describes the last time the access key was used.
|
List<SdkField<?>> |
sdkFields() |
String |
secretAccessKey()
The secret access key used to sign requests.
|
static Class<? extends AccessKey.Builder> |
serializableBuilderClass() |
StatusType |
status()
The status of the access key.
|
String |
statusAsString()
The status of the access key.
|
AccessKey.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String accessKeyId()
The ID of the access key.
public final String secretAccessKey()
The secret access key used to sign requests.
You should store the secret access key in a safe location. We recommend that you delete the access key if the secret access key is compromised.
You should store the secret access key in a safe location. We recommend that you delete the access key if the secret access key is compromised.
public final StatusType status()
The status of the access key.
A status of Active means that the key is valid, while Inactive means it is not.
If the service returns an enum value that is not available in the current SDK version, status will
return StatusType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
statusAsString().
A status of Active means that the key is valid, while Inactive means it is not.
StatusTypepublic final String statusAsString()
The status of the access key.
A status of Active means that the key is valid, while Inactive means it is not.
If the service returns an enum value that is not available in the current SDK version, status will
return StatusType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
statusAsString().
A status of Active means that the key is valid, while Inactive means it is not.
StatusTypepublic final Instant createdAt()
The timestamp when the access key was created.
public final AccessKeyLastUsed lastUsed()
An object that describes the last time the access key was used.
This object does not include data in the response of a CreateBucketAccessKey action. If the access key has not been used, the region and
serviceName values are N/A, and the lastUsedDate value is null.
This object does not include data in the response of a CreateBucketAccessKey action. If the access key has not been used, the region and
serviceName values are N/A, and the lastUsedDate value is null.
public AccessKey.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<AccessKey.Builder,AccessKey>public static AccessKey.Builder builder()
public static Class<? extends AccessKey.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.