Record Class SecretDescription

java.lang.Object
java.lang.Record
codes.grow.packages.awssecretsmanager.SecretDescription
Record Components:
arn - full ARN
name - secret name
description - description
kmsKeyId - KMS key
rotationEnabled - whether rotation is on
rotationLambdaArn - rotation Lambda
rotationRules - rotation schedule
lastRotatedDate - last rotation
lastChangedDate - last change
lastAccessedDate - last access (day precision)
deletedDate - set when the secret is scheduled for deletion
nextRotationDate - next scheduled rotation
createdDate - creation time
primaryRegion - primary region of a replicated secret
owningService - service that manages the secret
tags - tags as a map
versionIdsToStages - version id to stage labels
replicationStatus - replica regions

public record SecretDescription(String arn, String name, String description, String kmsKeyId, boolean rotationEnabled, String rotationLambdaArn, RotationRules rotationRules, Instant lastRotatedDate, Instant lastChangedDate, Instant lastAccessedDate, Instant deletedDate, Instant nextRotationDate, Instant createdDate, String primaryRegion, String owningService, Map<String,String> tags, Map<String,List<String>> versionIdsToStages, List<ReplicationStatus> replicationStatus) extends Record
Secret metadata (DescribeSecret, ListSecrets entries). Never contains the value. Optional components are null when AWS omits them.
  • Constructor Details

  • Method Details

    • versionWithStage

      public Optional<String> versionWithStage(String stage)
      Returns the version id that carries a stage label.
      Parameters:
      stage - stage label such as AWSCURRENT
      Returns:
      the version id, or empty
    • currentVersionId

      public Optional<String> currentVersionId()
      Returns the id of the AWSCURRENT version.
      Returns:
      the version id, or empty for a secret without a value
    • pendingDeletion

      public boolean pendingDeletion()
      Returns whether the secret is scheduled for deletion.
      Returns:
      true when deletedDate() is set
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • arn

      public String arn()
      Returns the value of the arn record component.
      Returns:
      the value of the arn record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • kmsKeyId

      public String kmsKeyId()
      Returns the value of the kmsKeyId record component.
      Returns:
      the value of the kmsKeyId record component
    • rotationEnabled

      public boolean rotationEnabled()
      Returns the value of the rotationEnabled record component.
      Returns:
      the value of the rotationEnabled record component
    • rotationLambdaArn

      public String rotationLambdaArn()
      Returns the value of the rotationLambdaArn record component.
      Returns:
      the value of the rotationLambdaArn record component
    • rotationRules

      public RotationRules rotationRules()
      Returns the value of the rotationRules record component.
      Returns:
      the value of the rotationRules record component
    • lastRotatedDate

      public Instant lastRotatedDate()
      Returns the value of the lastRotatedDate record component.
      Returns:
      the value of the lastRotatedDate record component
    • lastChangedDate

      public Instant lastChangedDate()
      Returns the value of the lastChangedDate record component.
      Returns:
      the value of the lastChangedDate record component
    • lastAccessedDate

      public Instant lastAccessedDate()
      Returns the value of the lastAccessedDate record component.
      Returns:
      the value of the lastAccessedDate record component
    • deletedDate

      public Instant deletedDate()
      Returns the value of the deletedDate record component.
      Returns:
      the value of the deletedDate record component
    • nextRotationDate

      public Instant nextRotationDate()
      Returns the value of the nextRotationDate record component.
      Returns:
      the value of the nextRotationDate record component
    • createdDate

      public Instant createdDate()
      Returns the value of the createdDate record component.
      Returns:
      the value of the createdDate record component
    • primaryRegion

      public String primaryRegion()
      Returns the value of the primaryRegion record component.
      Returns:
      the value of the primaryRegion record component
    • owningService

      public String owningService()
      Returns the value of the owningService record component.
      Returns:
      the value of the owningService record component
    • tags

      public Map<String,String> tags()
      Returns the value of the tags record component.
      Returns:
      the value of the tags record component
    • versionIdsToStages

      public Map<String,List<String>> versionIdsToStages()
      Returns the value of the versionIdsToStages record component.
      Returns:
      the value of the versionIdsToStages record component
    • replicationStatus

      public List<ReplicationStatus> replicationStatus()
      Returns the value of the replicationStatus record component.
      Returns:
      the value of the replicationStatus record component