-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: use gapic-generator-python 0.63.2 docs: add generated snippets PiperOrigin-RevId: 427792504 Source-Link: googleapis/googleapis@55b9e1e Source-Link: https://github.com/googleapis/googleapis-gen/commit/bf4e86b753f42cb0edb1fd51fbe840d7da0a1cde Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: use gapic-generator-python 0.63.4 chore: fix snippet region tag format chore: fix docstring code block formatting PiperOrigin-RevId: 430730865 Source-Link: googleapis/googleapis@ea58002 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ca893ff8af25fc7fe001de1405a517d80446ecca Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2E4OTNmZjhhZjI1ZmM3ZmUwMDFkZTE0MDVhNTE3ZDgwNDQ2ZWNjYSJ9 * 🦉 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 * chore: delete duplicates * restore async_client.py Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Bu Sun Kim <[email protected]> Co-authored-by: Anthonios Partheniou <[email protected]>
- Loading branch information
1 parent
61d0015
commit 0fa492f
Showing
95 changed files
with
8,359 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
...nerated_samples/monitoring_v3_generated_alert_policy_service_create_alert_policy_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -*- 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 CreateAlertPolicy | ||
# 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-monitoring | ||
|
||
|
||
# [START monitoring_v3_generated_AlertPolicyService_CreateAlertPolicy_async] | ||
from google.cloud import monitoring_v3 | ||
|
||
|
||
async def sample_create_alert_policy(): | ||
# Create a client | ||
client = monitoring_v3.AlertPolicyServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = monitoring_v3.CreateAlertPolicyRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
response = await client.create_alert_policy(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END monitoring_v3_generated_AlertPolicyService_CreateAlertPolicy_async] |
45 changes: 45 additions & 0 deletions
45
...enerated_samples/monitoring_v3_generated_alert_policy_service_create_alert_policy_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -*- 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 CreateAlertPolicy | ||
# 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-monitoring | ||
|
||
|
||
# [START monitoring_v3_generated_AlertPolicyService_CreateAlertPolicy_sync] | ||
from google.cloud import monitoring_v3 | ||
|
||
|
||
def sample_create_alert_policy(): | ||
# Create a client | ||
client = monitoring_v3.AlertPolicyServiceClient() | ||
|
||
# Initialize request argument(s) | ||
request = monitoring_v3.CreateAlertPolicyRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
response = client.create_alert_policy(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END monitoring_v3_generated_AlertPolicyService_CreateAlertPolicy_sync] |
43 changes: 43 additions & 0 deletions
43
...nerated_samples/monitoring_v3_generated_alert_policy_service_delete_alert_policy_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- 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 DeleteAlertPolicy | ||
# 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-monitoring | ||
|
||
|
||
# [START monitoring_v3_generated_AlertPolicyService_DeleteAlertPolicy_async] | ||
from google.cloud import monitoring_v3 | ||
|
||
|
||
async def sample_delete_alert_policy(): | ||
# Create a client | ||
client = monitoring_v3.AlertPolicyServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = monitoring_v3.DeleteAlertPolicyRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
await client.delete_alert_policy(request=request) | ||
|
||
|
||
# [END monitoring_v3_generated_AlertPolicyService_DeleteAlertPolicy_async] |
43 changes: 43 additions & 0 deletions
43
...enerated_samples/monitoring_v3_generated_alert_policy_service_delete_alert_policy_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- 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 DeleteAlertPolicy | ||
# 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-monitoring | ||
|
||
|
||
# [START monitoring_v3_generated_AlertPolicyService_DeleteAlertPolicy_sync] | ||
from google.cloud import monitoring_v3 | ||
|
||
|
||
def sample_delete_alert_policy(): | ||
# Create a client | ||
client = monitoring_v3.AlertPolicyServiceClient() | ||
|
||
# Initialize request argument(s) | ||
request = monitoring_v3.DeleteAlertPolicyRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
client.delete_alert_policy(request=request) | ||
|
||
|
||
# [END monitoring_v3_generated_AlertPolicyService_DeleteAlertPolicy_sync] |
45 changes: 45 additions & 0 deletions
45
.../generated_samples/monitoring_v3_generated_alert_policy_service_get_alert_policy_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -*- 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 GetAlertPolicy | ||
# 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-monitoring | ||
|
||
|
||
# [START monitoring_v3_generated_AlertPolicyService_GetAlertPolicy_async] | ||
from google.cloud import monitoring_v3 | ||
|
||
|
||
async def sample_get_alert_policy(): | ||
# Create a client | ||
client = monitoring_v3.AlertPolicyServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = monitoring_v3.GetAlertPolicyRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
response = await client.get_alert_policy(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END monitoring_v3_generated_AlertPolicyService_GetAlertPolicy_async] |
45 changes: 45 additions & 0 deletions
45
...g/generated_samples/monitoring_v3_generated_alert_policy_service_get_alert_policy_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -*- 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 GetAlertPolicy | ||
# 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-monitoring | ||
|
||
|
||
# [START monitoring_v3_generated_AlertPolicyService_GetAlertPolicy_sync] | ||
from google.cloud import monitoring_v3 | ||
|
||
|
||
def sample_get_alert_policy(): | ||
# Create a client | ||
client = monitoring_v3.AlertPolicyServiceClient() | ||
|
||
# Initialize request argument(s) | ||
request = monitoring_v3.GetAlertPolicyRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
response = client.get_alert_policy(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END monitoring_v3_generated_AlertPolicyService_GetAlertPolicy_sync] |
46 changes: 46 additions & 0 deletions
46
...nerated_samples/monitoring_v3_generated_alert_policy_service_list_alert_policies_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- 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 ListAlertPolicies | ||
# 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-monitoring | ||
|
||
|
||
# [START monitoring_v3_generated_AlertPolicyService_ListAlertPolicies_async] | ||
from google.cloud import monitoring_v3 | ||
|
||
|
||
async def sample_list_alert_policies(): | ||
# Create a client | ||
client = monitoring_v3.AlertPolicyServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = monitoring_v3.ListAlertPoliciesRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
page_result = client.list_alert_policies(request=request) | ||
|
||
# Handle the response | ||
async for response in page_result: | ||
print(response) | ||
|
||
# [END monitoring_v3_generated_AlertPolicyService_ListAlertPolicies_async] |
46 changes: 46 additions & 0 deletions
46
...enerated_samples/monitoring_v3_generated_alert_policy_service_list_alert_policies_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- 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 ListAlertPolicies | ||
# 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-monitoring | ||
|
||
|
||
# [START monitoring_v3_generated_AlertPolicyService_ListAlertPolicies_sync] | ||
from google.cloud import monitoring_v3 | ||
|
||
|
||
def sample_list_alert_policies(): | ||
# Create a client | ||
client = monitoring_v3.AlertPolicyServiceClient() | ||
|
||
# Initialize request argument(s) | ||
request = monitoring_v3.ListAlertPoliciesRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
page_result = client.list_alert_policies(request=request) | ||
|
||
# Handle the response | ||
for response in page_result: | ||
print(response) | ||
|
||
# [END monitoring_v3_generated_AlertPolicyService_ListAlertPolicies_sync] |
Oops, something went wrong.