def sample_get_index(): # Create a client client = aiplatform_v1.IndexServiceClient() # Initialize request argument(s) request = aiplatform_v1.GetIndexRequest(name="name_value", ) # Make the request response = client.get_index(request=request) # Handle the response print(response)
def sample_list_indexes(): # Create a client client = aiplatform_v1.IndexServiceClient() # Initialize request argument(s) request = aiplatform_v1.ListIndexesRequest(parent="parent_value", ) # Make the request page_result = client.list_indexes(request=request) # Handle the response for response in page_result: print(response)
def sample_delete_index(): # Create a client client = aiplatform_v1.IndexServiceClient() # Initialize request argument(s) request = aiplatform_v1.DeleteIndexRequest(name="name_value", ) # Make the request operation = client.delete_index(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
def sample_update_index(): # Create a client client = aiplatform_v1.IndexServiceClient() # Initialize request argument(s) index = aiplatform_v1.Index() index.display_name = "display_name_value" request = aiplatform_v1.UpdateIndexRequest(index=index, ) # Make the request operation = client.update_index(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)