async def sample_analyze_iam_policy_longrunning():
    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    analysis_query = asset_v1.IamPolicyAnalysisQuery()
    analysis_query.scope = "scope_value"

    output_config = asset_v1.IamPolicyAnalysisOutputConfig()
    output_config.gcs_destination.uri = "uri_value"

    request = asset_v1.AnalyzeIamPolicyLongrunningRequest(
        analysis_query=analysis_query,
        output_config=output_config,
    )

    # Make the request
    operation = client.analyze_iam_policy_longrunning(request=request)

    print("Waiting for operation to complete...")

    response = await operation.result()

    # Handle the response
    print(response)
async def sample_delete_feed():
    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.DeleteFeedRequest(name="name_value", )

    # Make the request
    await client.delete_feed(request=request)
async def sample_delete_feed():
    """Snippet for delete_feed"""

    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.DeleteFeedRequest()

    # Make the request
    response = await client.delete_feed(request=request)
예제 #4
0
async def sample_batch_get_assets_history():
    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.BatchGetAssetsHistoryRequest(parent="parent_value", )

    # Make the request
    response = await client.batch_get_assets_history(request=request)

    # Handle the response
    print(response)
예제 #5
0
async def sample_list_feeds():
    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.ListFeedsRequest(parent="parent_value", )

    # Make the request
    response = await client.list_feeds(request=request)

    # Handle the response
    print(response)
async def sample_get_saved_query():
    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.GetSavedQueryRequest(name="name_value", )

    # Make the request
    response = await client.get_saved_query(request=request)

    # Handle the response
    print(response)
예제 #7
0
async def sample_search_all_resources():
    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.SearchAllResourcesRequest(scope="scope_value", )

    # Make the request
    page_result = client.search_all_resources(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
예제 #8
0
async def sample_search_all_iam_policies():
    """Snippet for search_all_iam_policies"""

    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.SearchAllIamPoliciesRequest()

    # Make the request
    page_result = client.search_all_iam_policies(request=request)
    async for response in page_result:
        print("{}".format(response))
async def sample_list_saved_queries():
    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.ListSavedQueriesRequest(parent="parent_value", )

    # Make the request
    page_result = client.list_saved_queries(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
예제 #10
0
async def sample_list_assets():
    """Snippet for list_assets"""

    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.ListAssetsRequest(
    )

    # Make the request
    page_result = client.list_assets(request=request)
    async for response in page_result:
        print("{}".format(response))
async def sample_list_feeds():
    """Snippet for list_feeds"""

    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.ListFeedsRequest()

    # Make the request
    response = await client.list_feeds(request=request)

    # Handle response
    print("{}".format(response))
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))
async def sample_update_feed():
    """Snippet for update_feed"""

    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.UpdateFeedRequest()

    # Make the request
    response = await client.update_feed(request=request)

    # Handle response
    print("{}".format(response))
예제 #14
0
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))
async def sample_analyze_iam_policy():
    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    analysis_query = asset_v1.IamPolicyAnalysisQuery()
    analysis_query.scope = "scope_value"

    request = asset_v1.AnalyzeIamPolicyRequest(analysis_query=analysis_query, )

    # Make the request
    response = await client.analyze_iam_policy(request=request)

    # Handle the response
    print(response)
예제 #16
0
async def sample_analyze_move():
    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.AnalyzeMoveRequest(
        resource="resource_value",
        destination_parent="destination_parent_value",
    )

    # Make the request
    response = await client.analyze_move(request=request)

    # Handle the response
    print(response)
async def sample_create_saved_query():
    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.CreateSavedQueryRequest(
        parent="parent_value",
        saved_query_id="saved_query_id_value",
    )

    # Make the request
    response = await client.create_saved_query(request=request)

    # Handle the response
    print(response)
예제 #18
0
async def sample_batch_get_effective_iam_policies():
    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.BatchGetEffectiveIamPoliciesRequest(
        scope="scope_value",
        names=['names_value_1', 'names_value_2'],
    )

    # Make the request
    response = await client.batch_get_effective_iam_policies(request=request)

    # Handle the response
    print(response)
예제 #19
0
async def sample_update_feed():
    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    feed = asset_v1.Feed()
    feed.name = "name_value"

    request = asset_v1.UpdateFeedRequest(feed=feed, )

    # Make the request
    response = await client.update_feed(request=request)

    # Handle the response
    print(response)
예제 #20
0
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))
예제 #21
0
async def sample_export_assets():
    """Snippet for export_assets"""

    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    request = asset_v1.ExportAssetsRequest(
    )

    # Make the request
    operation = client.export_assets(request=request)

    print("Waiting for operation to complete...")

    response = await operation.result()
    print("{}".format(response))
async def sample_export_assets():
    # Create a client
    client = asset_v1.AssetServiceAsyncClient()

    # Initialize request argument(s)
    output_config = asset_v1.OutputConfig()
    output_config.gcs_destination.uri = "uri_value"

    request = asset_v1.ExportAssetsRequest(
        parent="parent_value",
        output_config=output_config,
    )

    # Make the request
    operation = client.export_assets(request=request)

    print("Waiting for operation to complete...")

    response = await operation.result()

    # Handle the response
    print(response)