Secrets Manager¶
-
class
secretsmanager.
secret
¶ Example:
resources = storage_connector.read_resources( service="secretsmanager", resource_type="secret") for resource in resources: resource.load() print(resource.urn) print(resource.arn) print(resource.created_date) print(resource.deleted_date) print(resource.description) print(resource.kms_key_id) print(resource.last_accessed_date) print(resource.last_changed_date) print(resource.last_rotated_date) print(resource.owning_service) print(resource.primary_region) print(resource.replication_status) print(resource.rotation_enabled) print(resource.rotation_lambda_arn) print(resource.rotation_rules) print(resource.tags) print(resource.version_ids_to_stages)
-
arn
¶ The ARN of the secret.
-
created_date
¶ The date you created the secret.
-
deleted_date
¶ This value exists if the secret is scheduled for deletion. Some time after the specified date and time, Secrets Manager deletes the secret and all of its versions. If a secret is scheduled for deletion, then its details, including the encrypted secret information, is not accessible. To cancel a scheduled deletion and restore access, use RestoreSecret .
-
description
¶ The user-provided description of the secret.
-
kms_key_id
¶ The ARN or alias of the AWS KMS customer master key (CMK) that’s used to encrypt the
SecretString
orSecretBinary
fields in each version of the secret. If you don’t provide a key, then Secrets Manager defaults to encrypting the secret fields with the default AWS KMS CMK (the one namedawssecretsmanager
) for this account.
-
last_accessed_date
¶ The last date that this secret was accessed. This value is truncated to midnight of the date and therefore shows only the date, not the time.
-
last_changed_date
¶ The last date and time that this secret was modified in any way.
-
last_rotated_date
¶ The last date and time that the rotation process for this secret was invoked. The most recent date and time that the Secrets Manager rotation process successfully completed. If the secret doesn’t rotate, Secrets Manager returns a null value.
-
owning_service
¶ Returns the name of the service that created this secret.
-
primary_region
¶ Specifies the primary region for secret replication.
-
replication_status
¶ Describes a list of replication status objects as
InProgress
,Failed
orInSync
.``P``
-
rotation_enabled
¶ Specifies whether automatic rotation is enabled for this secret. To enable rotation, use RotateSecret with
AutomaticallyRotateAfterDays
set to a value greater than 0. To disable rotation, use CancelRotateSecret .
-
rotation_lambda_arn
¶ The ARN of a Lambda function that’s invoked by Secrets Manager to rotate the secret either automatically per the schedule or manually by a call to
RotateSecret
.
-
rotation_rules
¶ A structure with the rotation configuration for this secret.
The list of user-defined tags that are associated with the secret. To add tags to a secret, use TagResource . To remove tags, use UntagResource .
-
version_ids_to_stages
¶ A list of all of the currently assigned
VersionStage
staging labels and theVersionId
that each is attached to. Staging labels are used to keep track of the different versions during the rotation process. .. note:: A version that does not have any staging labels attached is considered deprecated and subject to deletion. Such versions are not included in this list.
-