From 0c0f37d415a844d29d97a5dba59258d181c8bcc3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:23:49 +0000 Subject: [PATCH] docs: [google-cloud-kms] code documentation improvements (#13366) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 706891520 Source-Link: https://github.com/googleapis/googleapis/commit/edbf799d8a0c77a7a7316fc1db062e0edbebcd98 Source-Link: https://github.com/googleapis/googleapis-gen/commit/dfaa23804906a3cdb63208e654a378c3d9a1d586 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWttcy8uT3dsQm90LnlhbWwiLCJoIjoiZGZhYTIzODA0OTA2YTNjZGI2MzIwOGU2NTRhMzc4YzNkOWExZDU4NiJ9 --------- Co-authored-by: Owl Bot Co-authored-by: Victor Chudnovsky --- .../google-cloud-kms/google/cloud/kms/gapic_version.py | 2 +- .../google/cloud/kms_v1/gapic_version.py | 2 +- .../cloud/kms_v1/services/autokey/async_client.py | 9 +++++---- .../google/cloud/kms_v1/services/autokey/client.py | 9 +++++---- .../cloud/kms_v1/services/autokey/transports/grpc.py | 9 +++++---- .../kms_v1/services/autokey/transports/grpc_asyncio.py | 9 +++++---- .../cloud/kms_v1/services/ekm_service/async_client.py | 10 +++++----- .../google/cloud/kms_v1/services/ekm_service/client.py | 10 +++++----- .../kms_v1/services/ekm_service/transports/rest.py | 10 +++++----- .../google/cloud/kms_v1/types/ekm_service.py | 8 ++++---- .../google/cloud/kms_v1/types/resources.py | 2 +- .../google/cloud/kms_v1/types/service.py | 6 ++++-- .../snippet_metadata_google.cloud.kms.v1.json | 2 +- 13 files changed, 47 insertions(+), 41 deletions(-) diff --git a/packages/google-cloud-kms/google/cloud/kms/gapic_version.py b/packages/google-cloud-kms/google/cloud/kms/gapic_version.py index 349033e81d71..558c8aab67c5 100644 --- a/packages/google-cloud-kms/google/cloud/kms/gapic_version.py +++ b/packages/google-cloud-kms/google/cloud/kms/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.2.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-kms/google/cloud/kms_v1/gapic_version.py b/packages/google-cloud-kms/google/cloud/kms_v1/gapic_version.py index 349033e81d71..558c8aab67c5 100644 --- a/packages/google-cloud-kms/google/cloud/kms_v1/gapic_version.py +++ b/packages/google-cloud-kms/google/cloud/kms_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.2.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/async_client.py b/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/async_client.py index eae39a711229..db34c2aabfef 100644 --- a/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/async_client.py +++ b/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/async_client.py @@ -321,10 +321,11 @@ async def create_key_handle( triggering the provisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK use with the given resource type in the configured key project and the same - location. [GetOperation][Operations.GetOperation] should be used - to resolve the resulting long-running operation and get the - resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] and - [CryptoKey][google.cloud.kms.v1.CryptoKey]. + location. + [GetOperation][google.longrunning.Operations.GetOperation] + should be used to resolve the resulting long-running operation + and get the resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] + and [CryptoKey][google.cloud.kms.v1.CryptoKey]. .. code-block:: python diff --git a/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/client.py b/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/client.py index 3bd717e10c60..adf922708b4d 100644 --- a/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/client.py +++ b/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/client.py @@ -740,10 +740,11 @@ def create_key_handle( triggering the provisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK use with the given resource type in the configured key project and the same - location. [GetOperation][Operations.GetOperation] should be used - to resolve the resulting long-running operation and get the - resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] and - [CryptoKey][google.cloud.kms.v1.CryptoKey]. + location. + [GetOperation][google.longrunning.Operations.GetOperation] + should be used to resolve the resulting long-running operation + and get the resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] + and [CryptoKey][google.cloud.kms.v1.CryptoKey]. .. code-block:: python diff --git a/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/transports/grpc.py b/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/transports/grpc.py index d63dcd61a920..1f68fb308aa5 100644 --- a/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/transports/grpc.py +++ b/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/transports/grpc.py @@ -369,10 +369,11 @@ def create_key_handle( triggering the provisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK use with the given resource type in the configured key project and the same - location. [GetOperation][Operations.GetOperation] should be used - to resolve the resulting long-running operation and get the - resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] and - [CryptoKey][google.cloud.kms.v1.CryptoKey]. + location. + [GetOperation][google.longrunning.Operations.GetOperation] + should be used to resolve the resulting long-running operation + and get the resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] + and [CryptoKey][google.cloud.kms.v1.CryptoKey]. Returns: Callable[[~.CreateKeyHandleRequest], diff --git a/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/transports/grpc_asyncio.py b/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/transports/grpc_asyncio.py index 34bd7a85963c..41243db7a99c 100644 --- a/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/transports/grpc_asyncio.py +++ b/packages/google-cloud-kms/google/cloud/kms_v1/services/autokey/transports/grpc_asyncio.py @@ -378,10 +378,11 @@ def create_key_handle( triggering the provisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK use with the given resource type in the configured key project and the same - location. [GetOperation][Operations.GetOperation] should be used - to resolve the resulting long-running operation and get the - resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] and - [CryptoKey][google.cloud.kms.v1.CryptoKey]. + location. + [GetOperation][google.longrunning.Operations.GetOperation] + should be used to resolve the resulting long-running operation + and get the resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] + and [CryptoKey][google.cloud.kms.v1.CryptoKey]. Returns: Callable[[~.CreateKeyHandleRequest], diff --git a/packages/google-cloud-kms/google/cloud/kms_v1/services/ekm_service/async_client.py b/packages/google-cloud-kms/google/cloud/kms_v1/services/ekm_service/async_client.py index c6ad17cb2c9a..05e74b5822e2 100644 --- a/packages/google-cloud-kms/google/cloud/kms_v1/services/ekm_service/async_client.py +++ b/packages/google-cloud-kms/google/cloud/kms_v1/services/ekm_service/async_client.py @@ -491,7 +491,7 @@ async def sample_get_ekm_connection(): with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], as well as performing cryptographic operations using keys created within the [EkmConnection][google.cloud.kms.v1.EkmConnection]. @@ -630,7 +630,7 @@ async def sample_create_ekm_connection(): with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], as well as performing cryptographic operations using keys created within the [EkmConnection][google.cloud.kms.v1.EkmConnection]. @@ -761,7 +761,7 @@ async def sample_update_ekm_connection(): with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], as well as performing cryptographic operations using keys created within the [EkmConnection][google.cloud.kms.v1.EkmConnection]. @@ -884,7 +884,7 @@ async def sample_get_ekm_config(): with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC] + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] in a given project and location. """ @@ -1007,7 +1007,7 @@ async def sample_update_ekm_config(): with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC] + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] in a given project and location. """ diff --git a/packages/google-cloud-kms/google/cloud/kms_v1/services/ekm_service/client.py b/packages/google-cloud-kms/google/cloud/kms_v1/services/ekm_service/client.py index b6b539f536d0..57e58c7e65db 100644 --- a/packages/google-cloud-kms/google/cloud/kms_v1/services/ekm_service/client.py +++ b/packages/google-cloud-kms/google/cloud/kms_v1/services/ekm_service/client.py @@ -922,7 +922,7 @@ def sample_get_ekm_connection(): with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], as well as performing cryptographic operations using keys created within the [EkmConnection][google.cloud.kms.v1.EkmConnection]. @@ -1058,7 +1058,7 @@ def sample_create_ekm_connection(): with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], as well as performing cryptographic operations using keys created within the [EkmConnection][google.cloud.kms.v1.EkmConnection]. @@ -1186,7 +1186,7 @@ def sample_update_ekm_connection(): with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], as well as performing cryptographic operations using keys created within the [EkmConnection][google.cloud.kms.v1.EkmConnection]. @@ -1306,7 +1306,7 @@ def sample_get_ekm_config(): with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC] + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] in a given project and location. """ @@ -1426,7 +1426,7 @@ def sample_update_ekm_config(): with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC] + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] in a given project and location. """ diff --git a/packages/google-cloud-kms/google/cloud/kms_v1/services/ekm_service/transports/rest.py b/packages/google-cloud-kms/google/cloud/kms_v1/services/ekm_service/transports/rest.py index 996e36202328..8d7032077a06 100644 --- a/packages/google-cloud-kms/google/cloud/kms_v1/services/ekm_service/transports/rest.py +++ b/packages/google-cloud-kms/google/cloud/kms_v1/services/ekm_service/transports/rest.py @@ -609,7 +609,7 @@ def __call__( with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], as well as performing cryptographic operations using keys created within the [EkmConnection][google.cloud.kms.v1.EkmConnection]. @@ -769,7 +769,7 @@ def __call__( with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC] + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] in a given project and location. """ @@ -924,7 +924,7 @@ def __call__( with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], as well as performing cryptographic operations using keys created within the [EkmConnection][google.cloud.kms.v1.EkmConnection]. @@ -1227,7 +1227,7 @@ def __call__( with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC] + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] in a given project and location. """ @@ -1386,7 +1386,7 @@ def __call__( with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], as well as performing cryptographic operations using keys created within the [EkmConnection][google.cloud.kms.v1.EkmConnection]. diff --git a/packages/google-cloud-kms/google/cloud/kms_v1/types/ekm_service.py b/packages/google-cloud-kms/google/cloud/kms_v1/types/ekm_service.py index 8fda5560ca60..c25cf04da1eb 100644 --- a/packages/google-cloud-kms/google/cloud/kms_v1/types/ekm_service.py +++ b/packages/google-cloud-kms/google/cloud/kms_v1/types/ekm_service.py @@ -334,7 +334,7 @@ class EkmConnection(proto.Message): [CryptoKeys][google.cloud.kms.v1.CryptoKey] and [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], as + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], as well as performing cryptographic operations using keys created within the [EkmConnection][google.cloud.kms.v1.EkmConnection]. @@ -412,7 +412,7 @@ class KeyManagementMode(proto.Enum): - Destruction of external key material associated with this [EkmConnection][google.cloud.kms.v1.EkmConnection] can be requested by calling - [DestroyCryptoKeyVersion][EkmService.DestroyCryptoKeyVersion]. + [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion]. - Automatic rotation of key material is supported. """ KEY_MANAGEMENT_MODE_UNSPECIFIED = 0 @@ -502,8 +502,8 @@ class EkmConfig(proto.Message): [CryptoKeys][google.cloud.kms.v1.CryptoKey] and [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] with a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC] in a - given project and location. + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] in + a given project and location. Attributes: name (str): diff --git a/packages/google-cloud-kms/google/cloud/kms_v1/types/resources.py b/packages/google-cloud-kms/google/cloud/kms_v1/types/resources.py index b30a8ca4ed64..9c19bf2f81de 100644 --- a/packages/google-cloud-kms/google/cloud/kms_v1/types/resources.py +++ b/packages/google-cloud-kms/google/cloud/kms_v1/types/resources.py @@ -288,7 +288,7 @@ class CryptoKey(proto.Message): [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], + [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the resource name in the format ``projects/*/locations/*/ekmConnections/*``. Note, this list is non-exhaustive and may apply to additional diff --git a/packages/google-cloud-kms/google/cloud/kms_v1/types/service.py b/packages/google-cloud-kms/google/cloud/kms_v1/types/service.py index eb0280ea01c5..c7b959dbf498 100644 --- a/packages/google-cloud-kms/google/cloud/kms_v1/types/service.py +++ b/packages/google-cloud-kms/google/cloud/kms_v1/types/service.py @@ -676,7 +676,8 @@ class ImportCryptoKeyVersionRequest(proto.Message): the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], - have been previously created via [ImportCryptoKeyVersion][], + have been previously created via + [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion], and be in [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] or @@ -1614,7 +1615,8 @@ class MacVerifyRequest(proto.Message): [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that - CRC32C([MacVerifyRequest.tag][]) is equal to + CRC32C([MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]) + is equal to [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the diff --git a/packages/google-cloud-kms/samples/generated_samples/snippet_metadata_google.cloud.kms.v1.json b/packages/google-cloud-kms/samples/generated_samples/snippet_metadata_google.cloud.kms.v1.json index 64091c5630ff..31292c269f5b 100644 --- a/packages/google-cloud-kms/samples/generated_samples/snippet_metadata_google.cloud.kms.v1.json +++ b/packages/google-cloud-kms/samples/generated_samples/snippet_metadata_google.cloud.kms.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-kms", - "version": "3.2.0" + "version": "0.1.0" }, "snippets": [ {