Struct aws_sdk_lightsail::types::AccessKey
source · #[non_exhaustive]pub struct AccessKey {
pub access_key_id: Option<String>,
pub secret_access_key: Option<String>,
pub status: Option<StatusType>,
pub created_at: Option<DateTime>,
pub last_used: Option<AccessKeyLastUsed>,
}
Expand description
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.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.access_key_id: Option<String>
The ID of the access key.
secret_access_key: Option<String>
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.
status: Option<StatusType>
The status of the access key.
A status of Active
means that the key is valid, while Inactive
means it is not.
created_at: Option<DateTime>
The timestamp when the access key was created.
last_used: Option<AccessKeyLastUsed>
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.
Implementations§
source§impl AccessKey
impl AccessKey
sourcepub fn access_key_id(&self) -> Option<&str>
pub fn access_key_id(&self) -> Option<&str>
The ID of the access key.
sourcepub fn secret_access_key(&self) -> Option<&str>
pub fn secret_access_key(&self) -> Option<&str>
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.
sourcepub fn status(&self) -> Option<&StatusType>
pub fn status(&self) -> Option<&StatusType>
The status of the access key.
A status of Active
means that the key is valid, while Inactive
means it is not.
sourcepub fn created_at(&self) -> Option<&DateTime>
pub fn created_at(&self) -> Option<&DateTime>
The timestamp when the access key was created.
sourcepub fn last_used(&self) -> Option<&AccessKeyLastUsed>
pub fn last_used(&self) -> Option<&AccessKeyLastUsed>
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.
Trait Implementations§
source§impl PartialEq for AccessKey
impl PartialEq for AccessKey
impl StructuralPartialEq for AccessKey
Auto Trait Implementations§
impl Freeze for AccessKey
impl RefUnwindSafe for AccessKey
impl Send for AccessKey
impl Sync for AccessKey
impl Unpin for AccessKey
impl UnwindSafe for AccessKey
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more