lib/google/cloud/kms/v1/service_services_pb.rb in google-cloud-kms-0.2.2 vs lib/google/cloud/kms/v1/service_services_pb.rb in google-cloud-kms-0.2.3
- old
+ new
@@ -1,9 +1,9 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: google/cloud/kms/v1/service.proto for package 'google.cloud.kms.v1'
# Original file comments:
-# Copyright 2017 Google Inc.
+# Copyright 2018 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@@ -13,10 +13,11 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
+#
require 'grpc'
require 'google/cloud/kms/v1/service_pb'
@@ -31,10 +32,13 @@
# model with the following objects:
#
# * [KeyRing][google.cloud.kms.v1.KeyRing]
# * [CryptoKey][google.cloud.kms.v1.CryptoKey]
# * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
+ #
+ # If you are using manual gRPC libraries, see
+ # [Using gRPC with Cloud KMS](https://cloud.google.com/kms/docs/grpc).
class Service
include GRPC::GenericService
self.marshal_class_method = :encode
@@ -52,15 +56,22 @@
# Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as well as its
# [primary][google.cloud.kms.v1.CryptoKey.primary] [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
rpc :GetCryptoKey, GetCryptoKeyRequest, CryptoKey
# Returns metadata for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
rpc :GetCryptoKeyVersion, GetCryptoKeyVersionRequest, CryptoKeyVersion
+ # Returns the public key for the given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The
+ # [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be
+ # [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] or
+ # [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].
+ rpc :GetPublicKey, GetPublicKeyRequest, PublicKey
# Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location.
rpc :CreateKeyRing, CreateKeyRingRequest, KeyRing
# Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a [KeyRing][google.cloud.kms.v1.KeyRing].
#
- # [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is required.
+ # [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and
+ # [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm]
+ # are required.
rpc :CreateCryptoKey, CreateCryptoKeyRequest, CryptoKey
# Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a [CryptoKey][google.cloud.kms.v1.CryptoKey].
#
# The server will assign the next sequential id. If unset,
# [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to
@@ -75,14 +86,27 @@
# [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] using this
# method. See [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] and [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] to
# move between other states.
rpc :UpdateCryptoKeyVersion, UpdateCryptoKeyVersionRequest, CryptoKeyVersion
# Encrypts data, so that it can only be recovered by a call to [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
+ # The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be
+ # [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
rpc :Encrypt, EncryptRequest, EncryptResponse
- # Decrypts data that was protected by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
+ # Decrypts data that was protected by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ # must be [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
rpc :Decrypt, DecryptRequest, DecryptResponse
- # Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that will be used in [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]
+ # Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ # ASYMMETRIC_SIGN, producing a signature that can be verified with the public
+ # key retrieved from [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
+ rpc :AsymmetricSign, AsymmetricSignRequest, AsymmetricSignResponse
+ # Decrypts data that was encrypted with a public key retrieved from
+ # [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with
+ # [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] ASYMMETRIC_DECRYPT.
+ rpc :AsymmetricDecrypt, AsymmetricDecryptRequest, AsymmetricDecryptResponse
+ # Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that will be used in [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
+ #
+ # Returns an error if called on an asymmetric key.
rpc :UpdateCryptoKeyPrimaryVersion, UpdateCryptoKeyPrimaryVersionRequest, CryptoKey
# Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for destruction.
#
# Upon calling this method, [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to
# [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
@@ -94,10 +118,10 @@
#
# Before the [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is reached,
# [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] may be called to reverse the process.
rpc :DestroyCryptoKeyVersion, DestroyCryptoKeyVersionRequest, CryptoKeyVersion
# Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the
- # [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED],
+ # [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
# state.
#
# Upon restoration of the CryptoKeyVersion, [state][google.cloud.kms.v1.CryptoKeyVersion.state]
# will be set to [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED],
# and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will be cleared.