-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25aa8c9
commit e385ffd
Showing
134 changed files
with
3,365 additions
and
161 deletions.
There are no files selected for viewing
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
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
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
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
46 changes: 46 additions & 0 deletions
46
...generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_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,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 AnalyzeIamPolicy | ||
# 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-asset | ||
|
||
|
||
# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async] | ||
from google.cloud import asset_v1 | ||
|
||
|
||
async def sample_analyze_iam_policy(): | ||
"""Snippet for analyze_iam_policy""" | ||
|
||
# Create a client | ||
client = asset_v1.AssetServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = asset_v1.AnalyzeIamPolicyRequest( | ||
) | ||
|
||
# Make the request | ||
response = await client.analyze_iam_policy(request=request) | ||
|
||
# Handle response | ||
print("{}".format(response)) | ||
|
||
# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async] |
48 changes: 48 additions & 0 deletions
48
...mples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_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,48 @@ | ||
# -*- 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 AnalyzeIamPolicyLongrunning | ||
# 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-asset | ||
|
||
|
||
# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async] | ||
from google.cloud import asset_v1 | ||
|
||
|
||
async def sample_analyze_iam_policy_longrunning(): | ||
"""Snippet for analyze_iam_policy_longrunning""" | ||
|
||
# Create a client | ||
client = asset_v1.AssetServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = asset_v1.AnalyzeIamPolicyLongrunningRequest( | ||
) | ||
|
||
# Make the request | ||
operation = client.analyze_iam_policy_longrunning(request=request) | ||
|
||
print("Waiting for operation to complete...") | ||
|
||
response = await operation.result() | ||
print("{}".format(response)) | ||
|
||
# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async] |
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
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
46 changes: 46 additions & 0 deletions
46
...ted_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_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 BatchGetAssetsHistory | ||
# 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-asset | ||
|
||
|
||
# [START cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async] | ||
from google.cloud import asset_v1 | ||
|
||
|
||
async def sample_batch_get_assets_history(): | ||
"""Snippet for batch_get_assets_history""" | ||
|
||
# Create a client | ||
client = asset_v1.AssetServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = asset_v1.BatchGetAssetsHistoryRequest( | ||
) | ||
|
||
# Make the request | ||
response = await client.batch_get_assets_history(request=request) | ||
|
||
# Handle response | ||
print("{}".format(response)) | ||
|
||
# [END cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async] |
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
46 changes: 46 additions & 0 deletions
46
...amples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_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 CreateFeed | ||
# 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-asset | ||
|
||
|
||
# [START cloudasset_generated_asset_v1_AssetService_CreateFeed_async] | ||
from google.cloud import asset_v1 | ||
|
||
|
||
async def sample_create_feed(): | ||
"""Snippet for create_feed""" | ||
|
||
# Create a client | ||
client = asset_v1.AssetServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = asset_v1.CreateFeedRequest( | ||
) | ||
|
||
# Make the request | ||
response = await client.create_feed(request=request) | ||
|
||
# Handle response | ||
print("{}".format(response)) | ||
|
||
# [END cloudasset_generated_asset_v1_AssetService_CreateFeed_async] |
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
Oops, something went wrong.