Class SecretListEntry
- java.lang.Object
-
- software.amazon.awssdk.services.secretsmanager.model.SecretListEntry
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<SecretListEntry.Builder,SecretListEntry>
@Generated("software.amazon.awssdk:codegen") public final class SecretListEntry extends Object implements SdkPojo, Serializable, ToCopyableBuilder<SecretListEntry.Builder,SecretListEntry>
A structure that contains the details about a secret. It does not include the encrypted
SecretStringandSecretBinaryvalues. To get those values, use GetSecretValue .- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSecretListEntry.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringarn()The Amazon Resource Name (ARN) of the secret.static SecretListEntry.Builderbuilder()InstantcreatedDate()The date and time when a secret was created.InstantdeletedDate()The date and time the deletion of the secret occurred.Stringdescription()The user-provided description of the secret.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)List<ExternalSecretRotationMetadataItem>externalSecretRotationMetadata()The metadata needed to successfully rotate a managed external secret.StringexternalSecretRotationRoleArn()The role that Secrets Manager assumes to call APIs required to perform the rotation.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasExternalSecretRotationMetadata()For responses, this returns true if the service returned a value for the ExternalSecretRotationMetadata property.inthashCode()booleanhasSecretVersionsToStages()For responses, this returns true if the service returned a value for the SecretVersionsToStages property.booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.StringkmsKeyId()The ARN of the KMS key that Secrets Manager uses to encrypt the secret value.InstantlastAccessedDate()The date that the secret was last accessed in the Region.InstantlastChangedDate()The last date and time that this secret was modified in any way.InstantlastRotatedDate()The most recent date and time that the Secrets Manager rotation process was successfully completed.Stringname()The friendly name of the secret.InstantnextRotationDate()The next rotation is scheduled to occur on or before this date.StringowningService()Returns the name of the service that created the secret.StringprimaryRegion()The Region where Secrets Manager originated the secret.BooleanrotationEnabled()Indicates whether automatic, scheduled rotation is enabled for this secret.StringrotationLambdaARN()The ARN of an Amazon Web Services Lambda function invoked by Secrets Manager to rotate and expire the secret either automatically per the schedule or manually by a call toRotateSecret.RotationRulesTyperotationRules()A structure that defines the rotation configuration for the secret.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()Map<String,List<String>>secretVersionsToStages()A list of all of the currently assignedSecretVersionStagestaging labels and theSecretVersionIdattached to each one.static Class<? extends SecretListEntry.Builder>serializableBuilderClass()List<Tag>tags()The list of user-defined tags associated with the secret.SecretListEntry.BuildertoBuilder()StringtoString()Returns a string representation of this object.Stringtype()The exact string that identifies the third-party partner that holds the external secret.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
arn
public final String arn()
The Amazon Resource Name (ARN) of the secret.
- Returns:
- The Amazon Resource Name (ARN) of the secret.
-
name
public final String name()
The friendly name of the secret.
- Returns:
- The friendly name of the secret.
-
type
public final String type()
The exact string that identifies the third-party partner that holds the external secret. For more information, see Managed external secret partners.
- Returns:
- The exact string that identifies the third-party partner that holds the external secret. For more information, see Managed external secret partners.
-
description
public final String description()
The user-provided description of the secret.
- Returns:
- The user-provided description of the secret.
-
kmsKeyId
public final String kmsKeyId()
The ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If the secret is encrypted with the Amazon Web Services managed key
aws/secretsmanager, this field is omitted.- Returns:
- The ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If the secret is encrypted
with the Amazon Web Services managed key
aws/secretsmanager, this field is omitted.
-
rotationEnabled
public final Boolean rotationEnabled()
Indicates whether automatic, scheduled rotation is enabled for this secret.
- Returns:
- Indicates whether automatic, scheduled rotation is enabled for this secret.
-
rotationLambdaARN
public final String rotationLambdaARN()
The ARN of an Amazon Web Services Lambda function invoked by Secrets Manager to rotate and expire the secret either automatically per the schedule or manually by a call to
RotateSecret.- Returns:
- The ARN of an Amazon Web Services Lambda function invoked by Secrets Manager to rotate and expire the
secret either automatically per the schedule or manually by a call to
RotateSecret.
-
rotationRules
public final RotationRulesType rotationRules()
A structure that defines the rotation configuration for the secret.
- Returns:
- A structure that defines the rotation configuration for the secret.
-
hasExternalSecretRotationMetadata
public final boolean hasExternalSecretRotationMetadata()
For responses, this returns true if the service returned a value for the ExternalSecretRotationMetadata property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
externalSecretRotationMetadata
public final List<ExternalSecretRotationMetadataItem> externalSecretRotationMetadata()
The metadata needed to successfully rotate a managed external secret. A list of key value pairs in JSON format specified by the partner. For more information about the required information, see Managed external secrets partners.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasExternalSecretRotationMetadata()method.- Returns:
- The metadata needed to successfully rotate a managed external secret. A list of key value pairs in JSON format specified by the partner. For more information about the required information, see Managed external secrets partners.
-
externalSecretRotationRoleArn
public final String externalSecretRotationRoleArn()
The role that Secrets Manager assumes to call APIs required to perform the rotation. For more information about the required information, see Managed external secrets partners.
- Returns:
- The role that Secrets Manager assumes to call APIs required to perform the rotation. For more information about the required information, see Managed external secrets partners.
-
lastRotatedDate
public final Instant lastRotatedDate()
The most recent date and time that the Secrets Manager rotation process was successfully completed. This value is null if the secret hasn't ever rotated.
- Returns:
- The most recent date and time that the Secrets Manager rotation process was successfully completed. This value is null if the secret hasn't ever rotated.
-
lastChangedDate
public final Instant lastChangedDate()
The last date and time that this secret was modified in any way.
- Returns:
- The last date and time that this secret was modified in any way.
-
lastAccessedDate
public final Instant lastAccessedDate()
The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.
- Returns:
- The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.
-
deletedDate
public final Instant deletedDate()
The date and time the deletion of the secret occurred. Not present on active secrets. The secret can be recovered until the number of days in the recovery window has passed, as specified in the
RecoveryWindowInDaysparameter of theDeleteSecretoperation.- Returns:
- The date and time the deletion of the secret occurred. Not present on active secrets. The secret can be
recovered until the number of days in the recovery window has passed, as specified in the
RecoveryWindowInDaysparameter of theDeleteSecretoperation.
-
nextRotationDate
public final Instant nextRotationDate()
The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.
- Returns:
- The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.
-
hasTags
public final boolean hasTags()
For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
tags
public final List<Tag> tags()
The list of user-defined tags associated with the secret. To add tags to a secret, use
TagResource. To remove tags, useUntagResource.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()method.- Returns:
- The list of user-defined tags associated with the secret. To add tags to a secret, use
TagResource. To remove tags, useUntagResource.
-
hasSecretVersionsToStages
public final boolean hasSecretVersionsToStages()
For responses, this returns true if the service returned a value for the SecretVersionsToStages property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
secretVersionsToStages
public final Map<String,List<String>> secretVersionsToStages()
A list of all of the currently assigned
SecretVersionStagestaging labels and theSecretVersionIdattached to each one. Staging labels are used to keep track of the different versions during the rotation process.A version that does not have any
SecretVersionStageis considered deprecated and subject to deletion. Such versions are not included in this list.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSecretVersionsToStages()method.- Returns:
- A list of all of the currently assigned
SecretVersionStagestaging labels and theSecretVersionIdattached to each one. Staging labels are used to keep track of the different versions during the rotation process.A version that does not have any
SecretVersionStageis considered deprecated and subject to deletion. Such versions are not included in this list.
-
owningService
public final String owningService()
Returns the name of the service that created the secret.
- Returns:
- Returns the name of the service that created the secret.
-
createdDate
public final Instant createdDate()
The date and time when a secret was created.
- Returns:
- The date and time when a secret was created.
-
primaryRegion
public final String primaryRegion()
The Region where Secrets Manager originated the secret.
- Returns:
- The Region where Secrets Manager originated the secret.
-
toBuilder
public SecretListEntry.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<SecretListEntry.Builder,SecretListEntry>
-
builder
public static SecretListEntry.Builder builder()
-
serializableBuilderClass
public static Class<? extends SecretListEntry.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-