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

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/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 zero or more versions, which represent the actual key material used in cryptographic operations.

Defined Under Namespace

Modules: CryptoKeyPurpose Classes: LabelsEntry

Instance Attribute Summary collapse

Instance Attribute Details

#create_time::Google::Protobuf::Timestamp (readonly)

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

Returns:



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 110

class CryptoKey
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the cryptographic capabilities of a
  # {::Google::Cloud::Kms::V1::CryptoKey CryptoKey}. A given key can only be used for the operations allowed by
  # its purpose. For more information, see
  # [Key purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
  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::Client#encrypt Encrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_sign AsymmetricSign} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_SIGN = 5

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_decrypt AsymmetricDecrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_DECRYPT = 6

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#mac_sign MacSign}.
    MAC = 9
  end
end

#destroy_scheduled_duration::Google::Protobuf::Duration

Returns Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.

Returns:



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 110

class CryptoKey
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the cryptographic capabilities of a
  # {::Google::Cloud::Kms::V1::CryptoKey CryptoKey}. A given key can only be used for the operations allowed by
  # its purpose. For more information, see
  # [Key purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
  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::Client#encrypt Encrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_sign AsymmetricSign} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_SIGN = 5

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_decrypt AsymmetricDecrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_DECRYPT = 6

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#mac_sign MacSign}.
    MAC = 9
  end
end

#import_only::Boolean

Returns Immutable. Whether this key may contain imported versions only.

Returns:

  • (::Boolean)

    Immutable. Whether this key may contain imported versions only.



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 110

class CryptoKey
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the cryptographic capabilities of a
  # {::Google::Cloud::Kms::V1::CryptoKey CryptoKey}. A given key can only be used for the operations allowed by
  # its purpose. For more information, see
  # [Key purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
  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::Client#encrypt Encrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_sign AsymmetricSign} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_SIGN = 5

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_decrypt AsymmetricDecrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_DECRYPT = 6

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#mac_sign MacSign}.
    MAC = 9
  end
end

#labels::Google::Protobuf::Map{::String => ::String}

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

Returns:

  • (::Google::Protobuf::Map{::String => ::String})

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



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 110

class CryptoKey
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the cryptographic capabilities of a
  # {::Google::Cloud::Kms::V1::CryptoKey CryptoKey}. A given key can only be used for the operations allowed by
  # its purpose. For more information, see
  # [Key purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
  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::Client#encrypt Encrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_sign AsymmetricSign} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_SIGN = 5

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_decrypt AsymmetricDecrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_DECRYPT = 6

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#mac_sign MacSign}.
    MAC = 9
  end
end

#name::String (readonly)

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/*.



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 110

class CryptoKey
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the cryptographic capabilities of a
  # {::Google::Cloud::Kms::V1::CryptoKey CryptoKey}. A given key can only be used for the operations allowed by
  # its purpose. For more information, see
  # [Key purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
  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::Client#encrypt Encrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_sign AsymmetricSign} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_SIGN = 5

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_decrypt AsymmetricDecrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_DECRYPT = 6

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#mac_sign MacSign}.
    MAC = 9
  end
end

#next_rotation_time::Google::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.

Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.

Returns:



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 110

class CryptoKey
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the cryptographic capabilities of a
  # {::Google::Cloud::Kms::V1::CryptoKey CryptoKey}. A given key can only be used for the operations allowed by
  # its purpose. For more information, see
  # [Key purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
  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::Client#encrypt Encrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_sign AsymmetricSign} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_SIGN = 5

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_decrypt AsymmetricDecrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_DECRYPT = 6

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#mac_sign MacSign}.
    MAC = 9
  end
end

#primary::Google::Cloud::Kms::V1::CryptoKeyVersion (readonly)

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.

Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted.

Returns:



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 110

class CryptoKey
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the cryptographic capabilities of a
  # {::Google::Cloud::Kms::V1::CryptoKey CryptoKey}. A given key can only be used for the operations allowed by
  # its purpose. For more information, see
  # [Key purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
  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::Client#encrypt Encrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_sign AsymmetricSign} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_SIGN = 5

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_decrypt AsymmetricDecrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_DECRYPT = 6

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#mac_sign MacSign}.
    MAC = 9
  end
end

#purpose::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose

Returns Immutable. The immutable purpose of this CryptoKey.

Returns:



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 110

class CryptoKey
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the cryptographic capabilities of a
  # {::Google::Cloud::Kms::V1::CryptoKey CryptoKey}. A given key can only be used for the operations allowed by
  # its purpose. For more information, see
  # [Key purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
  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::Client#encrypt Encrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_sign AsymmetricSign} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_SIGN = 5

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_decrypt AsymmetricDecrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_DECRYPT = 6

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#mac_sign MacSign}.
    MAC = 9
  end
end

#rotation_period::Google::Protobuf::Duration

Returns next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours.

If rotation_period is set, next_rotation_time must also be set.

Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.

Returns:



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 110

class CryptoKey
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the cryptographic capabilities of a
  # {::Google::Cloud::Kms::V1::CryptoKey CryptoKey}. A given key can only be used for the operations allowed by
  # its purpose. For more information, see
  # [Key purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
  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::Client#encrypt Encrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_sign AsymmetricSign} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_SIGN = 5

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_decrypt AsymmetricDecrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_DECRYPT = 6

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#mac_sign MacSign}.
    MAC = 9
  end
end

#version_template::Google::Cloud::Kms::V1::CryptoKeyVersionTemplate

Returns A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.

Returns:



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'proto_docs/google/cloud/kms/v1/resources.rb', line 110

class CryptoKey
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the cryptographic capabilities of a
  # {::Google::Cloud::Kms::V1::CryptoKey CryptoKey}. A given key can only be used for the operations allowed by
  # its purpose. For more information, see
  # [Key purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
  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::Client#encrypt Encrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#decrypt Decrypt}.
    ENCRYPT_DECRYPT = 1

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_sign AsymmetricSign} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_SIGN = 5

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#asymmetric_decrypt AsymmetricDecrypt} and
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#get_public_key GetPublicKey}.
    ASYMMETRIC_DECRYPT = 6

    # {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
    # {::Google::Cloud::Kms::V1::KeyManagementService::Client#mac_sign MacSign}.
    MAC = 9
  end
end