async def sample_get_index_endpoint(): # Create a client client = aiplatform_v1.IndexEndpointServiceAsyncClient() # Initialize request argument(s) request = aiplatform_v1.GetIndexEndpointRequest(name="name_value", ) # Make the request response = await client.get_index_endpoint(request=request) # Handle the response print(response)
async def sample_list_index_endpoints(): # Create a client client = aiplatform_v1.IndexEndpointServiceAsyncClient() # Initialize request argument(s) request = aiplatform_v1.ListIndexEndpointsRequest(parent="parent_value", ) # Make the request page_result = client.list_index_endpoints(request=request) # Handle the response async for response in page_result: print(response)
async def sample_delete_index_endpoint(): # Create a client client = aiplatform_v1.IndexEndpointServiceAsyncClient() # Initialize request argument(s) request = aiplatform_v1.DeleteIndexEndpointRequest(name="name_value", ) # Make the request operation = client.delete_index_endpoint(request=request) print("Waiting for operation to complete...") response = await operation.result() # Handle the response print(response)
async def sample_update_index_endpoint(): # Create a client client = aiplatform_v1.IndexEndpointServiceAsyncClient() # Initialize request argument(s) index_endpoint = aiplatform_v1.IndexEndpoint() index_endpoint.display_name = "display_name_value" request = aiplatform_v1.UpdateIndexEndpointRequest( index_endpoint=index_endpoint, ) # Make the request response = await client.update_index_endpoint(request=request) # Handle the response print(response)
async def sample_undeploy_index(): # Create a client client = aiplatform_v1.IndexEndpointServiceAsyncClient() # Initialize request argument(s) request = aiplatform_v1.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 = await operation.result() # Handle the response print(response)