# 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 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # 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' module Google module Cloud module Kms module V1 module KeyManagementService # Google Cloud Key Management Service # # Manages cryptographic keys and operations using those keys. Implements a REST # 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 self.unmarshal_class_method = :decode self.service_name = 'google.cloud.kms.v1.KeyManagementService' # Lists [KeyRings][google.cloud.kms.v1.KeyRing]. rpc :ListKeyRings, ListKeyRingsRequest, ListKeyRingsResponse # Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey]. rpc :ListCryptoKeys, ListCryptoKeysRequest, ListCryptoKeysResponse # Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. rpc :ListCryptoKeyVersions, ListCryptoKeyVersionsRequest, ListCryptoKeyVersionsResponse # Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing]. rpc :GetKeyRing, GetKeyRingRequest, KeyRing # 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] 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 # [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]. rpc :CreateCryptoKeyVersion, CreateCryptoKeyVersionRequest, CryptoKeyVersion # Update a [CryptoKey][google.cloud.kms.v1.CryptoKey]. rpc :UpdateCryptoKey, UpdateCryptoKeyRequest, CryptoKey # Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s # metadata. # # [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between # [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] # and # [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]. 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 # 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] # and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will # be set to a time 24 hours in the future, at which point the # [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be changed to # [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], # and the key material will be irrevocably destroyed. # # 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] # 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. rpc :RestoreCryptoKeyVersion, RestoreCryptoKeyVersionRequest, CryptoKeyVersion end Stub = Service.rpc_stub_class end end end end end