def sample_get_index_endpoint():
    # Create a client
    client = aiplatform_v1beta1.IndexEndpointServiceClient()

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

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

    # Handle the response
    print(response)
def sample_list_index_endpoints():
    # Create a client
    client = aiplatform_v1beta1.IndexEndpointServiceClient()

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

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

    # Handle the response
    for response in page_result:
        print(response)
Esempio n. 3
0
def sample_update_index_endpoint():
    # Create a client
    client = aiplatform_v1beta1.IndexEndpointServiceClient()

    # Initialize request argument(s)
    index_endpoint = aiplatform_v1beta1.IndexEndpoint()
    index_endpoint.display_name = "display_name_value"

    request = aiplatform_v1beta1.UpdateIndexEndpointRequest(
        index_endpoint=index_endpoint, )

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

    # Handle the response
    print(response)
Esempio n. 4
0
def sample_delete_index_endpoint():
    # Create a client
    client = aiplatform_v1beta1.IndexEndpointServiceClient()

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

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

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

    response = operation.result()

    # Handle the response
    print(response)
def sample_undeploy_index():
    # Create a client
    client = aiplatform_v1beta1.IndexEndpointServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1beta1.UndeployIndexRequest(
        index_endpoint="index_endpoint_value",
        deployed_index_id="deployed_index_id_value",
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)
def sample_create_index_endpoint():
    # Create a client
    client = aiplatform_v1beta1.IndexEndpointServiceClient()

    # Initialize request argument(s)
    index_endpoint = aiplatform_v1beta1.IndexEndpoint()
    index_endpoint.display_name = "display_name_value"

    request = aiplatform_v1beta1.CreateIndexEndpointRequest(
        parent="parent_value",
        index_endpoint=index_endpoint,
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)
Esempio n. 7
0
def sample_mutate_deployed_index():
    # Create a client
    client = aiplatform_v1beta1.IndexEndpointServiceClient()

    # Initialize request argument(s)
    deployed_index = aiplatform_v1beta1.DeployedIndex()
    deployed_index.id = "id_value"
    deployed_index.index = "index_value"

    request = aiplatform_v1beta1.MutateDeployedIndexRequest(
        index_endpoint="index_endpoint_value",
        deployed_index=deployed_index,
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)