async def sample_get_index():
    # Create a client
    client = aiplatform_v1beta1.IndexServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1beta1.GetIndexRequest(name="name_value", )

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

    # Handle the response
    print(response)
Пример #2
0
async def sample_list_indexes():
    # Create a client
    client = aiplatform_v1beta1.IndexServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1beta1.ListIndexesRequest(parent="parent_value", )

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

    # Handle the response
    async for response in page_result:
        print(response)
Пример #3
0
async def sample_delete_index():
    # Create a client
    client = aiplatform_v1beta1.IndexServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1beta1.DeleteIndexRequest(name="name_value", )

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

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

    response = await operation.result()

    # Handle the response
    print(response)
Пример #4
0
async def sample_create_index():
    # Create a client
    client = aiplatform_v1beta1.IndexServiceAsyncClient()

    # Initialize request argument(s)
    index = aiplatform_v1beta1.Index()
    index.display_name = "display_name_value"

    request = aiplatform_v1beta1.CreateIndexRequest(
        parent="parent_value",
        index=index,
    )

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

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

    response = await operation.result()

    # Handle the response
    print(response)