Class: Google::Cloud::Kms::V1::CryptoKey

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb

Overview

A CryptoKey represents a logical key that can be used for cryptographic operations.

A CryptoKey is made up of one or more versions, which represent the actual key material used in cryptographic operations.

Defined Under Namespace

Modules: CryptoKeyPurpose

Instance Attribute Summary collapse

Instance Attribute Details

#create_timeGoogle::Protobuf::Timestamp

Returns Output only. The time at which this CryptoKey was created.

Returns:



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 74

class CryptoKey
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the capabilities of a {Google::Cloud::Kms::V1::CryptoKey CryptoKey}. Two
  # keys with the same purpose may use different underlying algorithms, but
  # must support the same set of operations.
  module CryptoKeyPurpose
    # Not specified.
    CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0

    # {Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {Google::Cloud::Kms::V1::KeyManagementService::Encrypt Encrypt} and
    # {Google::Cloud::Kms::V1::KeyManagementService::Decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1
  end
end

#labelsHash{String => String}

Returns Labels with user-defined metadata. For more information, see Labeling Keys.

Returns:

  • (Hash{String => String})

    Labels with user-defined metadata. For more information, see Labeling Keys.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 74

class CryptoKey
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the capabilities of a {Google::Cloud::Kms::V1::CryptoKey CryptoKey}. Two
  # keys with the same purpose may use different underlying algorithms, but
  # must support the same set of operations.
  module CryptoKeyPurpose
    # Not specified.
    CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0

    # {Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {Google::Cloud::Kms::V1::KeyManagementService::Encrypt Encrypt} and
    # {Google::Cloud::Kms::V1::KeyManagementService::Decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1
  end
end

#nameString

Returns Output only. The resource name for this CryptoKey in the format +projects//locations//keyRings//cryptoKeys/+.

Returns:

  • (String)

    Output only. The resource name for this CryptoKey in the format +projects//locations//keyRings//cryptoKeys/+.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 74

class CryptoKey
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the capabilities of a {Google::Cloud::Kms::V1::CryptoKey CryptoKey}. Two
  # keys with the same purpose may use different underlying algorithms, but
  # must support the same set of operations.
  module CryptoKeyPurpose
    # Not specified.
    CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0

    # {Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {Google::Cloud::Kms::V1::KeyManagementService::Encrypt Encrypt} and
    # {Google::Cloud::Kms::V1::KeyManagementService::Decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1
  end
end

#next_rotation_timeGoogle::Protobuf::Timestamp

Returns At next_rotation_time, the Key Management Service will automatically:

  1. Create a new version of this CryptoKey.
  2. Mark the new version as primary.

Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time.

Returns:



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 74

class CryptoKey
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the capabilities of a {Google::Cloud::Kms::V1::CryptoKey CryptoKey}. Two
  # keys with the same purpose may use different underlying algorithms, but
  # must support the same set of operations.
  module CryptoKeyPurpose
    # Not specified.
    CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0

    # {Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {Google::Cloud::Kms::V1::KeyManagementService::Encrypt Encrypt} and
    # {Google::Cloud::Kms::V1::KeyManagementService::Decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1
  end
end

#primaryGoogle::Cloud::Kms::V1::CryptoKeyVersion

Returns Output only. A copy of the "primary" CryptoKeyVersion that will be used by Encrypt when this CryptoKey is given in EncryptRequest#name.

The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion.

Returns:



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 74

class CryptoKey
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the capabilities of a {Google::Cloud::Kms::V1::CryptoKey CryptoKey}. Two
  # keys with the same purpose may use different underlying algorithms, but
  # must support the same set of operations.
  module CryptoKeyPurpose
    # Not specified.
    CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0

    # {Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {Google::Cloud::Kms::V1::KeyManagementService::Encrypt Encrypt} and
    # {Google::Cloud::Kms::V1::KeyManagementService::Decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1
  end
end

#purposeGoogle::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose

Returns The immutable purpose of this CryptoKey. Currently, the only acceptable purpose is ENCRYPT_DECRYPT.

Returns:



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 74

class CryptoKey
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the capabilities of a {Google::Cloud::Kms::V1::CryptoKey CryptoKey}. Two
  # keys with the same purpose may use different underlying algorithms, but
  # must support the same set of operations.
  module CryptoKeyPurpose
    # Not specified.
    CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0

    # {Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {Google::Cloud::Kms::V1::KeyManagementService::Encrypt Encrypt} and
    # {Google::Cloud::Kms::V1::KeyManagementService::Decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1
  end
end

#rotation_periodGoogle::Protobuf::Duration

Returns next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least one day.

If rotation_period is set, next_rotation_time must also be set.

Returns:



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb', line 74

class CryptoKey
  # {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the capabilities of a {Google::Cloud::Kms::V1::CryptoKey CryptoKey}. Two
  # keys with the same purpose may use different underlying algorithms, but
  # must support the same set of operations.
  module CryptoKeyPurpose
    # Not specified.
    CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0

    # {Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {Google::Cloud::Kms::V1::KeyManagementService::Encrypt Encrypt} and
    # {Google::Cloud::Kms::V1::KeyManagementService::Decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1
  end
end