From 6c5cd296c888d1839ffdac1a8d09ca568c99d36d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 14:22:30 -0400 Subject: [PATCH] feat: Added support for accessing secret versions by alias (#281) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Added support for accessing secret versions by alias Clients can now associate custom strings with specified secret versions for later access. chore: remove obsolete samples PiperOrigin-RevId: 439320490 Source-Link: https://github.com/googleapis/googleapis/commit/bbe5618e37535aa9b773acd9de1eb4aecb5a3f99 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6bdfcfd879740c62bbe11b2ebc6b8371f0d420af Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmJkZmNmZDg3OTc0MGM2MmJiZTExYjJlYmM2YjgzNzFmMGQ0MjBhZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../cloud/secretmanager_v1/types/resources.py | 19 ++++++++ ...ger_service_access_secret_version_async.py | 45 ------------------ ...ager_service_access_secret_version_sync.py | 45 ------------------ ...anager_service_add_secret_version_async.py | 45 ------------------ ...manager_service_add_secret_version_sync.py | 45 ------------------ ...ret_manager_service_create_secret_async.py | 46 ------------------- ...cret_manager_service_create_secret_sync.py | 46 ------------------- ...ret_manager_service_delete_secret_async.py | 43 ----------------- ...cret_manager_service_delete_secret_sync.py | 43 ----------------- ...er_service_destroy_secret_version_async.py | 45 ------------------ ...ger_service_destroy_secret_version_sync.py | 45 ------------------ ...er_service_disable_secret_version_async.py | 45 ------------------ ...ger_service_disable_secret_version_sync.py | 45 ------------------ ...ger_service_enable_secret_version_async.py | 45 ------------------ ...ager_service_enable_secret_version_sync.py | 45 ------------------ ...et_manager_service_get_iam_policy_async.py | 45 ------------------ ...ret_manager_service_get_iam_policy_sync.py | 45 ------------------ ...secret_manager_service_get_secret_async.py | 45 ------------------ ..._secret_manager_service_get_secret_sync.py | 45 ------------------ ...anager_service_get_secret_version_async.py | 45 ------------------ ...manager_service_get_secret_version_sync.py | 45 ------------------ ...ager_service_list_secret_versions_async.py | 46 ------------------- ...nager_service_list_secret_versions_sync.py | 46 ------------------- ...cret_manager_service_list_secrets_async.py | 46 ------------------- ...ecret_manager_service_list_secrets_sync.py | 46 ------------------- ...et_manager_service_set_iam_policy_async.py | 45 ------------------ ...ret_manager_service_set_iam_policy_sync.py | 45 ------------------ ...ager_service_test_iam_permissions_async.py | 46 ------------------- ...nager_service_test_iam_permissions_sync.py | 46 ------------------- ...ret_manager_service_update_secret_async.py | 44 ------------------ ...cret_manager_service_update_secret_sync.py | 44 ------------------ 31 files changed, 19 insertions(+), 1352 deletions(-) delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_access_secret_version_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_access_secret_version_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_add_secret_version_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_add_secret_version_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_create_secret_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_create_secret_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_delete_secret_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_delete_secret_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_destroy_secret_version_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_destroy_secret_version_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_disable_secret_version_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_disable_secret_version_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_enable_secret_version_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_enable_secret_version_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_iam_policy_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_iam_policy_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_version_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_version_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secret_versions_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secret_versions_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secrets_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secrets_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_set_iam_policy_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_set_iam_policy_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_test_iam_permissions_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_test_iam_permissions_sync.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_update_secret_async.py delete mode 100644 samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_update_secret_sync.py diff --git a/google/cloud/secretmanager_v1/types/resources.py b/google/cloud/secretmanager_v1/types/resources.py index 9858e12..e34781f 100644 --- a/google/cloud/secretmanager_v1/types/resources.py +++ b/google/cloud/secretmanager_v1/types/resources.py @@ -104,6 +104,20 @@ class Secret(proto.Message): Optional. Rotation policy attached to the [Secret][google.cloud.secretmanager.v1.Secret]. May be excluded if there is no rotation policy. + version_aliases (Sequence[google.cloud.secretmanager_v1.types.Secret.VersionAliasesEntry]): + Optional. Mapping from version alias to version name. + + A version alias is a string with a maximum length of 63 + characters and can contain uppercase and lowercase letters, + numerals, and the hyphen (``-``) and underscore ('_') + characters. An alias string must start with a letter and + cannot be the string 'latest' or 'NEW'. No more than 50 + aliases can be assigned to a given secret. + + Version-Alias pairs will be viewable via GetSecret and + modifiable via UpdateSecret. At launch access by alias will + only be supported on GetSecretVersion and + AccessSecretVersion. """ name = proto.Field( @@ -151,6 +165,11 @@ class Secret(proto.Message): number=9, message="Rotation", ) + version_aliases = proto.MapField( + proto.STRING, + proto.INT64, + number=11, + ) class SecretVersion(proto.Message): diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_access_secret_version_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_access_secret_version_async.py deleted file mode 100644 index 5b31dfd..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_access_secret_version_async.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for AccessSecretVersion -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_AccessSecretVersion_async] -from google.cloud import secretmanager_v1 - - -async def sample_access_secret_version(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.AccessSecretVersionRequest( - name="name_value", - ) - - # Make the request - response = await client.access_secret_version(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_AccessSecretVersion_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_access_secret_version_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_access_secret_version_sync.py deleted file mode 100644 index e8591a8..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_access_secret_version_sync.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for AccessSecretVersion -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_AccessSecretVersion_sync] -from google.cloud import secretmanager_v1 - - -def sample_access_secret_version(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.AccessSecretVersionRequest( - name="name_value", - ) - - # Make the request - response = client.access_secret_version(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_AccessSecretVersion_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_add_secret_version_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_add_secret_version_async.py deleted file mode 100644 index aeb3791..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_add_secret_version_async.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for AddSecretVersion -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_AddSecretVersion_async] -from google.cloud import secretmanager_v1 - - -async def sample_add_secret_version(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.AddSecretVersionRequest( - parent="parent_value", - ) - - # Make the request - response = await client.add_secret_version(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_AddSecretVersion_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_add_secret_version_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_add_secret_version_sync.py deleted file mode 100644 index 0805424..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_add_secret_version_sync.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for AddSecretVersion -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_AddSecretVersion_sync] -from google.cloud import secretmanager_v1 - - -def sample_add_secret_version(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.AddSecretVersionRequest( - parent="parent_value", - ) - - # Make the request - response = client.add_secret_version(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_AddSecretVersion_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_create_secret_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_create_secret_async.py deleted file mode 100644 index 7b5eca6..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_create_secret_async.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateSecret -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_CreateSecret_async] -from google.cloud import secretmanager_v1 - - -async def sample_create_secret(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.CreateSecretRequest( - parent="parent_value", - secret_id="secret_id_value", - ) - - # Make the request - response = await client.create_secret(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_CreateSecret_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_create_secret_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_create_secret_sync.py deleted file mode 100644 index 1efec92..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_create_secret_sync.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateSecret -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_CreateSecret_sync] -from google.cloud import secretmanager_v1 - - -def sample_create_secret(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.CreateSecretRequest( - parent="parent_value", - secret_id="secret_id_value", - ) - - # Make the request - response = client.create_secret(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_CreateSecret_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_delete_secret_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_delete_secret_async.py deleted file mode 100644 index e1b4df7..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_delete_secret_async.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteSecret -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_DeleteSecret_async] -from google.cloud import secretmanager_v1 - - -async def sample_delete_secret(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.DeleteSecretRequest( - name="name_value", - ) - - # Make the request - await client.delete_secret(request=request) - - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_DeleteSecret_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_delete_secret_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_delete_secret_sync.py deleted file mode 100644 index 760a11e..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_delete_secret_sync.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteSecret -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_DeleteSecret_sync] -from google.cloud import secretmanager_v1 - - -def sample_delete_secret(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.DeleteSecretRequest( - name="name_value", - ) - - # Make the request - client.delete_secret(request=request) - - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_DeleteSecret_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_destroy_secret_version_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_destroy_secret_version_async.py deleted file mode 100644 index ec64846..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_destroy_secret_version_async.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DestroySecretVersion -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_DestroySecretVersion_async] -from google.cloud import secretmanager_v1 - - -async def sample_destroy_secret_version(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.DestroySecretVersionRequest( - name="name_value", - ) - - # Make the request - response = await client.destroy_secret_version(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_DestroySecretVersion_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_destroy_secret_version_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_destroy_secret_version_sync.py deleted file mode 100644 index 6f9ebe5..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_destroy_secret_version_sync.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DestroySecretVersion -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_DestroySecretVersion_sync] -from google.cloud import secretmanager_v1 - - -def sample_destroy_secret_version(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.DestroySecretVersionRequest( - name="name_value", - ) - - # Make the request - response = client.destroy_secret_version(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_DestroySecretVersion_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_disable_secret_version_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_disable_secret_version_async.py deleted file mode 100644 index ea7fcc2..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_disable_secret_version_async.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DisableSecretVersion -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_DisableSecretVersion_async] -from google.cloud import secretmanager_v1 - - -async def sample_disable_secret_version(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.DisableSecretVersionRequest( - name="name_value", - ) - - # Make the request - response = await client.disable_secret_version(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_DisableSecretVersion_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_disable_secret_version_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_disable_secret_version_sync.py deleted file mode 100644 index a42e5dc..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_disable_secret_version_sync.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DisableSecretVersion -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_DisableSecretVersion_sync] -from google.cloud import secretmanager_v1 - - -def sample_disable_secret_version(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.DisableSecretVersionRequest( - name="name_value", - ) - - # Make the request - response = client.disable_secret_version(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_DisableSecretVersion_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_enable_secret_version_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_enable_secret_version_async.py deleted file mode 100644 index 41fc62c..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_enable_secret_version_async.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for EnableSecretVersion -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_EnableSecretVersion_async] -from google.cloud import secretmanager_v1 - - -async def sample_enable_secret_version(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.EnableSecretVersionRequest( - name="name_value", - ) - - # Make the request - response = await client.enable_secret_version(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_EnableSecretVersion_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_enable_secret_version_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_enable_secret_version_sync.py deleted file mode 100644 index 0a2bafa..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_enable_secret_version_sync.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for EnableSecretVersion -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_EnableSecretVersion_sync] -from google.cloud import secretmanager_v1 - - -def sample_enable_secret_version(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.EnableSecretVersionRequest( - name="name_value", - ) - - # Make the request - response = client.enable_secret_version(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_EnableSecretVersion_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_iam_policy_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_iam_policy_async.py deleted file mode 100644 index 68543fe..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_iam_policy_async.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetIamPolicy -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_GetIamPolicy_async] -from google.cloud import secretmanager_v1 - - -async def sample_get_iam_policy(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.GetIamPolicyRequest( - resource="resource_value", - ) - - # Make the request - response = await client.get_iam_policy(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_GetIamPolicy_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_iam_policy_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_iam_policy_sync.py deleted file mode 100644 index d6f8484..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_iam_policy_sync.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetIamPolicy -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_GetIamPolicy_sync] -from google.cloud import secretmanager_v1 - - -def sample_get_iam_policy(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.GetIamPolicyRequest( - resource="resource_value", - ) - - # Make the request - response = client.get_iam_policy(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_GetIamPolicy_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_async.py deleted file mode 100644 index a9bfecd..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_async.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetSecret -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_GetSecret_async] -from google.cloud import secretmanager_v1 - - -async def sample_get_secret(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.GetSecretRequest( - name="name_value", - ) - - # Make the request - response = await client.get_secret(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_GetSecret_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_sync.py deleted file mode 100644 index d717ade..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_sync.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetSecret -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_GetSecret_sync] -from google.cloud import secretmanager_v1 - - -def sample_get_secret(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.GetSecretRequest( - name="name_value", - ) - - # Make the request - response = client.get_secret(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_GetSecret_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_version_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_version_async.py deleted file mode 100644 index a209df1..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_version_async.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetSecretVersion -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_GetSecretVersion_async] -from google.cloud import secretmanager_v1 - - -async def sample_get_secret_version(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.GetSecretVersionRequest( - name="name_value", - ) - - # Make the request - response = await client.get_secret_version(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_GetSecretVersion_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_version_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_version_sync.py deleted file mode 100644 index 3eb146c..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_get_secret_version_sync.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetSecretVersion -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_GetSecretVersion_sync] -from google.cloud import secretmanager_v1 - - -def sample_get_secret_version(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.GetSecretVersionRequest( - name="name_value", - ) - - # Make the request - response = client.get_secret_version(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_GetSecretVersion_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secret_versions_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secret_versions_async.py deleted file mode 100644 index a937d43..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secret_versions_async.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListSecretVersions -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_ListSecretVersions_async] -from google.cloud import secretmanager_v1 - - -async def sample_list_secret_versions(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.ListSecretVersionsRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_secret_versions(request=request) - - # Handle the response - async for response in page_result: - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_ListSecretVersions_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secret_versions_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secret_versions_sync.py deleted file mode 100644 index 7e5dd32..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secret_versions_sync.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListSecretVersions -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_ListSecretVersions_sync] -from google.cloud import secretmanager_v1 - - -def sample_list_secret_versions(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.ListSecretVersionsRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_secret_versions(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_ListSecretVersions_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secrets_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secrets_async.py deleted file mode 100644 index 07f67c4..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secrets_async.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListSecrets -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_ListSecrets_async] -from google.cloud import secretmanager_v1 - - -async def sample_list_secrets(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.ListSecretsRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_secrets(request=request) - - # Handle the response - async for response in page_result: - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_ListSecrets_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secrets_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secrets_sync.py deleted file mode 100644 index 444a915..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_list_secrets_sync.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListSecrets -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_ListSecrets_sync] -from google.cloud import secretmanager_v1 - - -def sample_list_secrets(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.ListSecretsRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_secrets(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_ListSecrets_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_set_iam_policy_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_set_iam_policy_async.py deleted file mode 100644 index 81c96b7..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_set_iam_policy_async.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for SetIamPolicy -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_SetIamPolicy_async] -from google.cloud import secretmanager_v1 - - -async def sample_set_iam_policy(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.SetIamPolicyRequest( - resource="resource_value", - ) - - # Make the request - response = await client.set_iam_policy(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_SetIamPolicy_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_set_iam_policy_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_set_iam_policy_sync.py deleted file mode 100644 index df9bc75..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_set_iam_policy_sync.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for SetIamPolicy -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_SetIamPolicy_sync] -from google.cloud import secretmanager_v1 - - -def sample_set_iam_policy(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.SetIamPolicyRequest( - resource="resource_value", - ) - - # Make the request - response = client.set_iam_policy(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_SetIamPolicy_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_test_iam_permissions_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_test_iam_permissions_async.py deleted file mode 100644 index 66085e8..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_test_iam_permissions_async.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for TestIamPermissions -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_TestIamPermissions_async] -from google.cloud import secretmanager_v1 - - -async def sample_test_iam_permissions(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.TestIamPermissionsRequest( - resource="resource_value", - permissions=['permissions_value_1', 'permissions_value_2'], - ) - - # Make the request - response = await client.test_iam_permissions(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_TestIamPermissions_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_test_iam_permissions_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_test_iam_permissions_sync.py deleted file mode 100644 index ad4bbad..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_test_iam_permissions_sync.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for TestIamPermissions -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_TestIamPermissions_sync] -from google.cloud import secretmanager_v1 - - -def sample_test_iam_permissions(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.TestIamPermissionsRequest( - resource="resource_value", - permissions=['permissions_value_1', 'permissions_value_2'], - ) - - # Make the request - response = client.test_iam_permissions(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_TestIamPermissions_sync] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_update_secret_async.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_update_secret_async.py deleted file mode 100644 index c34e93a..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_update_secret_async.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateSecret -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_UpdateSecret_async] -from google.cloud import secretmanager_v1 - - -async def sample_update_secret(): - # Create a client - client = secretmanager_v1.SecretManagerServiceAsyncClient() - - # Initialize request argument(s) - request = secretmanager_v1.UpdateSecretRequest( - ) - - # Make the request - response = await client.update_secret(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_UpdateSecret_async] diff --git a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_update_secret_sync.py b/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_update_secret_sync.py deleted file mode 100644 index afb4a5c..0000000 --- a/samples/generated_samples/secretmanager_generated_secretmanager_v1_secret_manager_service_update_secret_sync.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateSecret -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-secretmanager - - -# [START secretmanager_generated_secretmanager_v1_SecretManagerService_UpdateSecret_sync] -from google.cloud import secretmanager_v1 - - -def sample_update_secret(): - # Create a client - client = secretmanager_v1.SecretManagerServiceClient() - - # Initialize request argument(s) - request = secretmanager_v1.UpdateSecretRequest( - ) - - # Make the request - response = client.update_secret(request=request) - - # Handle the response - print(response) - -# [END secretmanager_generated_secretmanager_v1_SecretManagerService_UpdateSecret_sync]