示例#1
0
async def sample_delete_sink():
    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.DeleteSinkRequest(sink_name="sink_name_value", )

    # Make the request
    await client.delete_sink(request=request)
async def sample_undelete_bucket():
    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.UndeleteBucketRequest(name="name_value", )

    # Make the request
    await client.undelete_bucket(request=request)
示例#3
0
async def sample_delete_exclusion():
    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.DeleteExclusionRequest(name="name_value", )

    # Make the request
    await client.delete_exclusion(request=request)
async def sample_delete_sink():
    """Snippet for delete_sink"""

    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.DeleteSinkRequest()

    # Make the request
    response = await client.delete_sink(request=request)
示例#5
0
async def sample_undelete_bucket():
    """Snippet for undelete_bucket"""

    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.UndeleteBucketRequest()

    # Make the request
    response = await client.undelete_bucket(request=request)
示例#6
0
async def sample_get_view():
    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.GetViewRequest(name="name_value", )

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

    # Handle the response
    print(response)
async def sample_update_settings():
    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.UpdateSettingsRequest(name="name_value", )

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

    # Handle the response
    print(response)
示例#8
0
async def sample_list_exclusions():
    """Snippet for list_exclusions"""

    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.ListExclusionsRequest()

    # Make the request
    page_result = client.list_exclusions(request=request)
    async for response in page_result:
        print("{}".format(response))
示例#9
0
async def sample_list_views():
    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.ListViewsRequest(parent="parent_value", )

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

    # Handle the response
    async for response in page_result:
        print(response)
async def sample_update_sink():
    """Snippet for update_sink"""

    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.UpdateSinkRequest()

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

    # Handle response
    print("{}".format(response))
async def sample_create_exclusion():
    """Snippet for create_exclusion"""

    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.CreateExclusionRequest()

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

    # Handle response
    print("{}".format(response))
示例#12
0
async def sample_get_cmek_settings():
    """Snippet for get_cmek_settings"""

    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.GetCmekSettingsRequest()

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

    # Handle response
    print("{}".format(response))
async def sample_create_bucket():
    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.CreateBucketRequest(
        parent="parent_value",
        bucket_id="bucket_id_value",
    )

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

    # Handle the response
    print(response)
示例#14
0
async def sample_update_exclusion():
    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    exclusion = logging_v2.LogExclusion()
    exclusion.name = "name_value"
    exclusion.filter = "filter_value"

    request = logging_v2.UpdateExclusionRequest(
        name="name_value",
        exclusion=exclusion,
    )

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

    # Handle the response
    print(response)
示例#15
0
async def sample_update_sink():
    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    sink = logging_v2.LogSink()
    sink.name = "name_value"
    sink.destination = "destination_value"

    request = logging_v2.UpdateSinkRequest(
        sink_name="sink_name_value",
        sink=sink,
    )

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

    # Handle the response
    print(response)
async def sample_copy_log_entries():
    # Create a client
    client = logging_v2.ConfigServiceV2AsyncClient()

    # Initialize request argument(s)
    request = logging_v2.CopyLogEntriesRequest(
        name="name_value",
        destination="destination_value",
    )

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

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

    response = await operation.result()

    # Handle the response
    print(response)