Пример #1
0
def sample_create_sink():
    # Create a client
    client = logging_v2.ConfigServiceV2Client()

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

    request = logging_v2.CreateSinkRequest(
        parent="parent_value",
        sink=sink,
    )

    # Make the request
    response = client.create_sink(request=request)

    # Handle the response
    print(response)
Пример #2
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)