Class KeyMetadata

    • Constructor Detail

      • KeyMetadata

        public KeyMetadata()
    • Method Detail

      • setAWSAccountId

        public void setAWSAccountId​(String aWSAccountId)

        The twelve-digit account ID of the AWS account that owns the key.

        Parameters:
        aWSAccountId - The twelve-digit account ID of the AWS account that owns the key.
      • getAWSAccountId

        public String getAWSAccountId()

        The twelve-digit account ID of the AWS account that owns the key.

        Returns:
        The twelve-digit account ID of the AWS account that owns the key.
      • withAWSAccountId

        public KeyMetadata withAWSAccountId​(String aWSAccountId)

        The twelve-digit account ID of the AWS account that owns the key.

        Parameters:
        aWSAccountId - The twelve-digit account ID of the AWS account that owns the key.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setKeyId

        public void setKeyId​(String keyId)

        The globally unique identifier for the key.

        Parameters:
        keyId - The globally unique identifier for the key.
      • getKeyId

        public String getKeyId()

        The globally unique identifier for the key.

        Returns:
        The globally unique identifier for the key.
      • withKeyId

        public KeyMetadata withKeyId​(String keyId)

        The globally unique identifier for the key.

        Parameters:
        keyId - The globally unique identifier for the key.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withArn

        public KeyMetadata withArn​(String arn)

        The Amazon Resource Name (ARN) of the key. For examples, see AWS Key Management Service (AWS KMS) in the Example ARNs section of the AWS General Reference.

        Parameters:
        arn - The Amazon Resource Name (ARN) of the key. For examples, see AWS Key Management Service (AWS KMS) in the Example ARNs section of the AWS General Reference.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setCreationDate

        public void setCreationDate​(Date creationDate)

        The date and time when the key was created.

        Parameters:
        creationDate - The date and time when the key was created.
      • getCreationDate

        public Date getCreationDate()

        The date and time when the key was created.

        Returns:
        The date and time when the key was created.
      • withCreationDate

        public KeyMetadata withCreationDate​(Date creationDate)

        The date and time when the key was created.

        Parameters:
        creationDate - The date and time when the key was created.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setEnabled

        public void setEnabled​(Boolean enabled)

        Specifies whether the key is enabled. When KeyState is Enabled this value is true, otherwise it is false.

        Parameters:
        enabled - Specifies whether the key is enabled. When KeyState is Enabled this value is true, otherwise it is false.
      • getEnabled

        public Boolean getEnabled()

        Specifies whether the key is enabled. When KeyState is Enabled this value is true, otherwise it is false.

        Returns:
        Specifies whether the key is enabled. When KeyState is Enabled this value is true, otherwise it is false.
      • withEnabled

        public KeyMetadata withEnabled​(Boolean enabled)

        Specifies whether the key is enabled. When KeyState is Enabled this value is true, otherwise it is false.

        Parameters:
        enabled - Specifies whether the key is enabled. When KeyState is Enabled this value is true, otherwise it is false.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • isEnabled

        public Boolean isEnabled()

        Specifies whether the key is enabled. When KeyState is Enabled this value is true, otherwise it is false.

        Returns:
        Specifies whether the key is enabled. When KeyState is Enabled this value is true, otherwise it is false.
      • setDescription

        public void setDescription​(String description)

        The friendly description of the key.

        Parameters:
        description - The friendly description of the key.
      • getDescription

        public String getDescription()

        The friendly description of the key.

        Returns:
        The friendly description of the key.
      • withDescription

        public KeyMetadata withDescription​(String description)

        The friendly description of the key.

        Parameters:
        description - The friendly description of the key.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setKeyUsage

        public void setKeyUsage​(String keyUsage)

        The cryptographic operations for which you can use the key. Currently the only allowed value is ENCRYPT_DECRYPT, which means you can use the key for the Encrypt and Decrypt operations.

        Parameters:
        keyUsage - The cryptographic operations for which you can use the key. Currently the only allowed value is ENCRYPT_DECRYPT, which means you can use the key for the Encrypt and Decrypt operations.
        See Also:
        KeyUsageType
      • getKeyUsage

        public String getKeyUsage()

        The cryptographic operations for which you can use the key. Currently the only allowed value is ENCRYPT_DECRYPT, which means you can use the key for the Encrypt and Decrypt operations.

        Returns:
        The cryptographic operations for which you can use the key. Currently the only allowed value is ENCRYPT_DECRYPT, which means you can use the key for the Encrypt and Decrypt operations.
        See Also:
        KeyUsageType
      • withKeyUsage

        public KeyMetadata withKeyUsage​(String keyUsage)

        The cryptographic operations for which you can use the key. Currently the only allowed value is ENCRYPT_DECRYPT, which means you can use the key for the Encrypt and Decrypt operations.

        Parameters:
        keyUsage - The cryptographic operations for which you can use the key. Currently the only allowed value is ENCRYPT_DECRYPT, which means you can use the key for the Encrypt and Decrypt operations.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        KeyUsageType
      • setKeyUsage

        public void setKeyUsage​(KeyUsageType keyUsage)

        The cryptographic operations for which you can use the key. Currently the only allowed value is ENCRYPT_DECRYPT, which means you can use the key for the Encrypt and Decrypt operations.

        Parameters:
        keyUsage - The cryptographic operations for which you can use the key. Currently the only allowed value is ENCRYPT_DECRYPT, which means you can use the key for the Encrypt and Decrypt operations.
        See Also:
        KeyUsageType
      • withKeyUsage

        public KeyMetadata withKeyUsage​(KeyUsageType keyUsage)

        The cryptographic operations for which you can use the key. Currently the only allowed value is ENCRYPT_DECRYPT, which means you can use the key for the Encrypt and Decrypt operations.

        Parameters:
        keyUsage - The cryptographic operations for which you can use the key. Currently the only allowed value is ENCRYPT_DECRYPT, which means you can use the key for the Encrypt and Decrypt operations.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        KeyUsageType
      • setDeletionDate

        public void setDeletionDate​(Date deletionDate)

        The date and time after which AWS KMS deletes the customer master key (CMK). This value is present only when KeyState is PendingDeletion, otherwise this value is null.

        Parameters:
        deletionDate - The date and time after which AWS KMS deletes the customer master key (CMK). This value is present only when KeyState is PendingDeletion, otherwise this value is null.
      • getDeletionDate

        public Date getDeletionDate()

        The date and time after which AWS KMS deletes the customer master key (CMK). This value is present only when KeyState is PendingDeletion, otherwise this value is null.

        Returns:
        The date and time after which AWS KMS deletes the customer master key (CMK). This value is present only when KeyState is PendingDeletion, otherwise this value is null.
      • withDeletionDate

        public KeyMetadata withDeletionDate​(Date deletionDate)

        The date and time after which AWS KMS deletes the customer master key (CMK). This value is present only when KeyState is PendingDeletion, otherwise this value is null.

        Parameters:
        deletionDate - The date and time after which AWS KMS deletes the customer master key (CMK). This value is present only when KeyState is PendingDeletion, otherwise this value is null.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • toString

        public String toString()
        Returns a string representation of this object; useful for testing and debugging.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object