Cloud AI Platform v1 API - Class EndpointServiceClient (3.2.0)

public abstract class EndpointServiceClient

Reference documentation and code samples for the Cloud AI Platform v1 API class EndpointServiceClient.

EndpointService client wrapper, for convenient use.

Inheritance

object > EndpointServiceClient

Namespace

Google.Cloud.AIPlatform.V1

Assembly

Google.Cloud.AIPlatform.V1.dll

Remarks

A service for managing Vertex AI's Endpoints.

Properties

CreateEndpointOperationsClient

public virtual OperationsClient CreateEndpointOperationsClient { get; }

The long-running operations client for CreateEndpoint.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the EndpointService service, which is a host of "aiplatform.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default EndpointService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default EndpointService scopes are:

DeleteEndpointOperationsClient

public virtual OperationsClient DeleteEndpointOperationsClient { get; }

The long-running operations client for DeleteEndpoint.

Property Value
Type Description
OperationsClient

DeployModelOperationsClient

public virtual OperationsClient DeployModelOperationsClient { get; }

The long-running operations client for DeployModel.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual EndpointService.EndpointServiceClient GrpcClient { get; }

The underlying gRPC EndpointService client

Property Value
Type Description
EndpointServiceEndpointServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

MutateDeployedModelOperationsClient

public virtual OperationsClient MutateDeployedModelOperationsClient { get; }

The long-running operations client for MutateDeployedModel.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

UndeployModelOperationsClient

public virtual OperationsClient UndeployModelOperationsClient { get; }

The long-running operations client for UndeployModel.

Property Value
Type Description
OperationsClient

Methods

Create()

public static EndpointServiceClient Create()

Synchronously creates a EndpointServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EndpointServiceClientBuilder.

Returns
Type Description
EndpointServiceClient

The created EndpointServiceClient.

CreateAsync(CancellationToken)

public static Task<EndpointServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a EndpointServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EndpointServiceClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskEndpointServiceClient

The task representing the created EndpointServiceClient.

CreateEndpoint(LocationName, Endpoint, CallSettings)

public virtual Operation<Endpoint, CreateEndpointOperationMetadata> CreateEndpoint(LocationName parent, Endpoint endpoint, CallSettings callSettings = null)

Creates an Endpoint.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to create the Endpoint in. Format: projects/{project}/locations/{location}

endpoint Endpoint

Required. The Endpoint to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEndpointCreateEndpointOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Endpoint endpoint = new Endpoint();
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = endpointServiceClient.CreateEndpoint(parent, endpoint);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceCreateEndpoint(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpoint(LocationName, Endpoint, string, CallSettings)

public virtual Operation<Endpoint, CreateEndpointOperationMetadata> CreateEndpoint(LocationName parent, Endpoint endpoint, string endpointId, CallSettings callSettings = null)

Creates an Endpoint.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to create the Endpoint in. Format: projects/{project}/locations/{location}

endpoint Endpoint

Required. The Endpoint to create.

endpointId string

Immutable. The ID to use for endpoint, which will become the final component of the endpoint resource name. If not provided, Vertex AI will generate a value for this ID.

If the first character is a letter, this value may be up to 63 characters, and valid characters are [a-z0-9-]. The last character must be a letter or number.

If the first character is a number, this value may be up to 9 characters, and valid characters are [0-9] with no leading zeros.

When using HTTP/JSON, this field is populated based on a query string argument, such as ?endpoint_id=12345. This is the fallback for fields that are not included in either the URI or the body.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEndpointCreateEndpointOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Endpoint endpoint = new Endpoint();
string endpointId = "";
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = endpointServiceClient.CreateEndpoint(parent, endpoint, endpointId);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceCreateEndpoint(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpoint(CreateEndpointRequest, CallSettings)

public virtual Operation<Endpoint, CreateEndpointOperationMetadata> CreateEndpoint(CreateEndpointRequest request, CallSettings callSettings = null)

Creates an Endpoint.

Parameters
Name Description
request CreateEndpointRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEndpointCreateEndpointOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
CreateEndpointRequest request = new CreateEndpointRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Endpoint = new Endpoint(),
    EndpointId = "",
};
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = endpointServiceClient.CreateEndpoint(request);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceCreateEndpoint(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpoint(string, Endpoint, CallSettings)

public virtual Operation<Endpoint, CreateEndpointOperationMetadata> CreateEndpoint(string parent, Endpoint endpoint, CallSettings callSettings = null)

Creates an Endpoint.

Parameters
Name Description
parent string

Required. The resource name of the Location to create the Endpoint in. Format: projects/{project}/locations/{location}

endpoint Endpoint

Required. The Endpoint to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEndpointCreateEndpointOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Endpoint endpoint = new Endpoint();
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = endpointServiceClient.CreateEndpoint(parent, endpoint);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceCreateEndpoint(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpoint(string, Endpoint, string, CallSettings)

public virtual Operation<Endpoint, CreateEndpointOperationMetadata> CreateEndpoint(string parent, Endpoint endpoint, string endpointId, CallSettings callSettings = null)

Creates an Endpoint.

Parameters
Name Description
parent string

Required. The resource name of the Location to create the Endpoint in. Format: projects/{project}/locations/{location}

endpoint Endpoint

Required. The Endpoint to create.

endpointId string

Immutable. The ID to use for endpoint, which will become the final component of the endpoint resource name. If not provided, Vertex AI will generate a value for this ID.

If the first character is a letter, this value may be up to 63 characters, and valid characters are [a-z0-9-]. The last character must be a letter or number.

If the first character is a number, this value may be up to 9 characters, and valid characters are [0-9] with no leading zeros.

When using HTTP/JSON, this field is populated based on a query string argument, such as ?endpoint_id=12345. This is the fallback for fields that are not included in either the URI or the body.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEndpointCreateEndpointOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Endpoint endpoint = new Endpoint();
string endpointId = "";
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = endpointServiceClient.CreateEndpoint(parent, endpoint, endpointId);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceCreateEndpoint(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpointAsync(LocationName, Endpoint, CallSettings)

public virtual Task<Operation<Endpoint, CreateEndpointOperationMetadata>> CreateEndpointAsync(LocationName parent, Endpoint endpoint, CallSettings callSettings = null)

Creates an Endpoint.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to create the Endpoint in. Format: projects/{project}/locations/{location}

endpoint Endpoint

Required. The Endpoint to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEndpointCreateEndpointOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Endpoint endpoint = new Endpoint();
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = await endpointServiceClient.CreateEndpointAsync(parent, endpoint);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceCreateEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpointAsync(LocationName, Endpoint, string, CallSettings)

public virtual Task<Operation<Endpoint, CreateEndpointOperationMetadata>> CreateEndpointAsync(LocationName parent, Endpoint endpoint, string endpointId, CallSettings callSettings = null)

Creates an Endpoint.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to create the Endpoint in. Format: projects/{project}/locations/{location}

endpoint Endpoint

Required. The Endpoint to create.

endpointId string

Immutable. The ID to use for endpoint, which will become the final component of the endpoint resource name. If not provided, Vertex AI will generate a value for this ID.

If the first character is a letter, this value may be up to 63 characters, and valid characters are [a-z0-9-]. The last character must be a letter or number.

If the first character is a number, this value may be up to 9 characters, and valid characters are [0-9] with no leading zeros.

When using HTTP/JSON, this field is populated based on a query string argument, such as ?endpoint_id=12345. This is the fallback for fields that are not included in either the URI or the body.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEndpointCreateEndpointOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Endpoint endpoint = new Endpoint();
string endpointId = "";
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = await endpointServiceClient.CreateEndpointAsync(parent, endpoint, endpointId);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceCreateEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpointAsync(LocationName, Endpoint, string, CancellationToken)

public virtual Task<Operation<Endpoint, CreateEndpointOperationMetadata>> CreateEndpointAsync(LocationName parent, Endpoint endpoint, string endpointId, CancellationToken cancellationToken)

Creates an Endpoint.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to create the Endpoint in. Format: projects/{project}/locations/{location}

endpoint Endpoint

Required. The Endpoint to create.

endpointId string

Immutable. The ID to use for endpoint, which will become the final component of the endpoint resource name. If not provided, Vertex AI will generate a value for this ID.

If the first character is a letter, this value may be up to 63 characters, and valid characters are [a-z0-9-]. The last character must be a letter or number.

If the first character is a number, this value may be up to 9 characters, and valid characters are [0-9] with no leading zeros.

When using HTTP/JSON, this field is populated based on a query string argument, such as ?endpoint_id=12345. This is the fallback for fields that are not included in either the URI or the body.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEndpointCreateEndpointOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Endpoint endpoint = new Endpoint();
string endpointId = "";
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = await endpointServiceClient.CreateEndpointAsync(parent, endpoint, endpointId);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceCreateEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpointAsync(LocationName, Endpoint, CancellationToken)

public virtual Task<Operation<Endpoint, CreateEndpointOperationMetadata>> CreateEndpointAsync(LocationName parent, Endpoint endpoint, CancellationToken cancellationToken)

Creates an Endpoint.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to create the Endpoint in. Format: projects/{project}/locations/{location}

endpoint Endpoint

Required. The Endpoint to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEndpointCreateEndpointOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Endpoint endpoint = new Endpoint();
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = await endpointServiceClient.CreateEndpointAsync(parent, endpoint);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceCreateEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpointAsync(CreateEndpointRequest, CallSettings)

public virtual Task<Operation<Endpoint, CreateEndpointOperationMetadata>> CreateEndpointAsync(CreateEndpointRequest request, CallSettings callSettings = null)

Creates an Endpoint.

Parameters
Name Description
request CreateEndpointRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEndpointCreateEndpointOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
CreateEndpointRequest request = new CreateEndpointRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Endpoint = new Endpoint(),
    EndpointId = "",
};
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = await endpointServiceClient.CreateEndpointAsync(request);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceCreateEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpointAsync(CreateEndpointRequest, CancellationToken)

public virtual Task<Operation<Endpoint, CreateEndpointOperationMetadata>> CreateEndpointAsync(CreateEndpointRequest request, CancellationToken cancellationToken)

Creates an Endpoint.

Parameters
Name Description
request CreateEndpointRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEndpointCreateEndpointOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
CreateEndpointRequest request = new CreateEndpointRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Endpoint = new Endpoint(),
    EndpointId = "",
};
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = await endpointServiceClient.CreateEndpointAsync(request);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceCreateEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpointAsync(string, Endpoint, CallSettings)

public virtual Task<Operation<Endpoint, CreateEndpointOperationMetadata>> CreateEndpointAsync(string parent, Endpoint endpoint, CallSettings callSettings = null)

Creates an Endpoint.

Parameters
Name Description
parent string

Required. The resource name of the Location to create the Endpoint in. Format: projects/{project}/locations/{location}

endpoint Endpoint

Required. The Endpoint to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEndpointCreateEndpointOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Endpoint endpoint = new Endpoint();
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = await endpointServiceClient.CreateEndpointAsync(parent, endpoint);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceCreateEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpointAsync(string, Endpoint, string, CallSettings)

public virtual Task<Operation<Endpoint, CreateEndpointOperationMetadata>> CreateEndpointAsync(string parent, Endpoint endpoint, string endpointId, CallSettings callSettings = null)

Creates an Endpoint.

Parameters
Name Description
parent string

Required. The resource name of the Location to create the Endpoint in. Format: projects/{project}/locations/{location}

endpoint Endpoint

Required. The Endpoint to create.

endpointId string

Immutable. The ID to use for endpoint, which will become the final component of the endpoint resource name. If not provided, Vertex AI will generate a value for this ID.

If the first character is a letter, this value may be up to 63 characters, and valid characters are [a-z0-9-]. The last character must be a letter or number.

If the first character is a number, this value may be up to 9 characters, and valid characters are [0-9] with no leading zeros.

When using HTTP/JSON, this field is populated based on a query string argument, such as ?endpoint_id=12345. This is the fallback for fields that are not included in either the URI or the body.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEndpointCreateEndpointOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Endpoint endpoint = new Endpoint();
string endpointId = "";
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = await endpointServiceClient.CreateEndpointAsync(parent, endpoint, endpointId);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceCreateEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpointAsync(string, Endpoint, string, CancellationToken)

public virtual Task<Operation<Endpoint, CreateEndpointOperationMetadata>> CreateEndpointAsync(string parent, Endpoint endpoint, string endpointId, CancellationToken cancellationToken)

Creates an Endpoint.

Parameters
Name Description
parent string

Required. The resource name of the Location to create the Endpoint in. Format: projects/{project}/locations/{location}

endpoint Endpoint

Required. The Endpoint to create.

endpointId string

Immutable. The ID to use for endpoint, which will become the final component of the endpoint resource name. If not provided, Vertex AI will generate a value for this ID.

If the first character is a letter, this value may be up to 63 characters, and valid characters are [a-z0-9-]. The last character must be a letter or number.

If the first character is a number, this value may be up to 9 characters, and valid characters are [0-9] with no leading zeros.

When using HTTP/JSON, this field is populated based on a query string argument, such as ?endpoint_id=12345. This is the fallback for fields that are not included in either the URI or the body.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEndpointCreateEndpointOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Endpoint endpoint = new Endpoint();
string endpointId = "";
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = await endpointServiceClient.CreateEndpointAsync(parent, endpoint, endpointId);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceCreateEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

CreateEndpointAsync(string, Endpoint, CancellationToken)

public virtual Task<Operation<Endpoint, CreateEndpointOperationMetadata>> CreateEndpointAsync(string parent, Endpoint endpoint, CancellationToken cancellationToken)

Creates an Endpoint.

Parameters
Name Description
parent string

Required. The resource name of the Location to create the Endpoint in. Format: projects/{project}/locations/{location}

endpoint Endpoint

Required. The Endpoint to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEndpointCreateEndpointOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Endpoint endpoint = new Endpoint();
// Make the request
Operation<Endpoint, CreateEndpointOperationMetadata> response = await endpointServiceClient.CreateEndpointAsync(parent, endpoint);

// Poll until the returned long-running operation is complete
Operation<Endpoint, CreateEndpointOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Endpoint result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Endpoint, CreateEndpointOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceCreateEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Endpoint retrievedResult = retrievedResponse.Result;
}

DeleteEndpoint(DeleteEndpointRequest, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteEndpoint(DeleteEndpointRequest request, CallSettings callSettings = null)

Deletes an Endpoint.

Parameters
Name Description
request DeleteEndpointRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
DeleteEndpointRequest request = new DeleteEndpointRequest
{
    EndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = endpointServiceClient.DeleteEndpoint(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceDeleteEndpoint(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteEndpoint(EndpointName, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteEndpoint(EndpointName name, CallSettings callSettings = null)

Deletes an Endpoint.

Parameters
Name Description
name EndpointName

Required. The name of the Endpoint resource to be deleted. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
EndpointName name = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = endpointServiceClient.DeleteEndpoint(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceDeleteEndpoint(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteEndpoint(string, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteEndpoint(string name, CallSettings callSettings = null)

Deletes an Endpoint.

Parameters
Name Description
name string

Required. The name of the Endpoint resource to be deleted. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = endpointServiceClient.DeleteEndpoint(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceDeleteEndpoint(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteEndpointAsync(DeleteEndpointRequest, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteEndpointAsync(DeleteEndpointRequest request, CallSettings callSettings = null)

Deletes an Endpoint.

Parameters
Name Description
request DeleteEndpointRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteEndpointRequest request = new DeleteEndpointRequest
{
    EndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await endpointServiceClient.DeleteEndpointAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceDeleteEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteEndpointAsync(DeleteEndpointRequest, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteEndpointAsync(DeleteEndpointRequest request, CancellationToken cancellationToken)

Deletes an Endpoint.

Parameters
Name Description
request DeleteEndpointRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteEndpointRequest request = new DeleteEndpointRequest
{
    EndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await endpointServiceClient.DeleteEndpointAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceDeleteEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteEndpointAsync(EndpointName, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteEndpointAsync(EndpointName name, CallSettings callSettings = null)

Deletes an Endpoint.

Parameters
Name Description
name EndpointName

Required. The name of the Endpoint resource to be deleted. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
EndpointName name = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await endpointServiceClient.DeleteEndpointAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceDeleteEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteEndpointAsync(EndpointName, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteEndpointAsync(EndpointName name, CancellationToken cancellationToken)

Deletes an Endpoint.

Parameters
Name Description
name EndpointName

Required. The name of the Endpoint resource to be deleted. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
EndpointName name = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await endpointServiceClient.DeleteEndpointAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceDeleteEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteEndpointAsync(string, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteEndpointAsync(string name, CallSettings callSettings = null)

Deletes an Endpoint.

Parameters
Name Description
name string

Required. The name of the Endpoint resource to be deleted. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await endpointServiceClient.DeleteEndpointAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceDeleteEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteEndpointAsync(string, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteEndpointAsync(string name, CancellationToken cancellationToken)

Deletes an Endpoint.

Parameters
Name Description
name string

Required. The name of the Endpoint resource to be deleted. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await endpointServiceClient.DeleteEndpointAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceDeleteEndpointAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeployModel(DeployModelRequest, CallSettings)

public virtual Operation<DeployModelResponse, DeployModelOperationMetadata> DeployModel(DeployModelRequest request, CallSettings callSettings = null)

Deploys a Model into this Endpoint, creating a DeployedModel within it.

Parameters
Name Description
request DeployModelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationDeployModelResponseDeployModelOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
DeployModelRequest request = new DeployModelRequest
{
    EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
    DeployedModel = new DeployedModel(),
    TrafficSplit = { { "", 0 }, },
};
// Make the request
Operation<DeployModelResponse, DeployModelOperationMetadata> response = endpointServiceClient.DeployModel(request);

// Poll until the returned long-running operation is complete
Operation<DeployModelResponse, DeployModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeployModelResponse, DeployModelOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceDeployModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeployModelResponse retrievedResult = retrievedResponse.Result;
}

DeployModel(EndpointName, DeployedModel, IDictionary<string, int>, CallSettings)

public virtual Operation<DeployModelResponse, DeployModelOperationMetadata> DeployModel(EndpointName endpoint, DeployedModel deployedModel, IDictionary<string, int> trafficSplit, CallSettings callSettings = null)

Deploys a Model into this Endpoint, creating a DeployedModel within it.

Parameters
Name Description
endpoint EndpointName

Required. The name of the Endpoint resource into which to deploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModel DeployedModel

Required. The DeployedModel to be created within the Endpoint. Note that [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start receiving traffic, either as part of this call, or via [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].

trafficSplit IDictionarystringint

A map from a DeployedModel's ID to the percentage of this Endpoint's traffic that should be forwarded to that DeployedModel.

If this field is non-empty, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. To refer to the ID of the just being deployed Model, a "0" should be used, and the actual ID of the new DeployedModel will be filled in its place by this method. The traffic percentage values must add up to 100.

If this field is empty, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationDeployModelResponseDeployModelOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
DeployedModel deployedModel = new DeployedModel();
IDictionary<string, int> trafficSplit = new Dictionary<string, int> { { "", 0 }, };
// Make the request
Operation<DeployModelResponse, DeployModelOperationMetadata> response = endpointServiceClient.DeployModel(endpoint, deployedModel, trafficSplit);

// Poll until the returned long-running operation is complete
Operation<DeployModelResponse, DeployModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeployModelResponse, DeployModelOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceDeployModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeployModelResponse retrievedResult = retrievedResponse.Result;
}

DeployModel(string, DeployedModel, IDictionary<string, int>, CallSettings)

public virtual Operation<DeployModelResponse, DeployModelOperationMetadata> DeployModel(string endpoint, DeployedModel deployedModel, IDictionary<string, int> trafficSplit, CallSettings callSettings = null)

Deploys a Model into this Endpoint, creating a DeployedModel within it.

Parameters
Name Description
endpoint string

Required. The name of the Endpoint resource into which to deploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModel DeployedModel

Required. The DeployedModel to be created within the Endpoint. Note that [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start receiving traffic, either as part of this call, or via [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].

trafficSplit IDictionarystringint

A map from a DeployedModel's ID to the percentage of this Endpoint's traffic that should be forwarded to that DeployedModel.

If this field is non-empty, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. To refer to the ID of the just being deployed Model, a "0" should be used, and the actual ID of the new DeployedModel will be filled in its place by this method. The traffic percentage values must add up to 100.

If this field is empty, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationDeployModelResponseDeployModelOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
DeployedModel deployedModel = new DeployedModel();
IDictionary<string, int> trafficSplit = new Dictionary<string, int> { { "", 0 }, };
// Make the request
Operation<DeployModelResponse, DeployModelOperationMetadata> response = endpointServiceClient.DeployModel(endpoint, deployedModel, trafficSplit);

// Poll until the returned long-running operation is complete
Operation<DeployModelResponse, DeployModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeployModelResponse, DeployModelOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceDeployModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeployModelResponse retrievedResult = retrievedResponse.Result;
}

DeployModelAsync(DeployModelRequest, CallSettings)

public virtual Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> DeployModelAsync(DeployModelRequest request, CallSettings callSettings = null)

Deploys a Model into this Endpoint, creating a DeployedModel within it.

Parameters
Name Description
request DeployModelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationDeployModelResponseDeployModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
DeployModelRequest request = new DeployModelRequest
{
    EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
    DeployedModel = new DeployedModel(),
    TrafficSplit = { { "", 0 }, },
};
// Make the request
Operation<DeployModelResponse, DeployModelOperationMetadata> response = await endpointServiceClient.DeployModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<DeployModelResponse, DeployModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeployModelResponse, DeployModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceDeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeployModelResponse retrievedResult = retrievedResponse.Result;
}

DeployModelAsync(DeployModelRequest, CancellationToken)

public virtual Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> DeployModelAsync(DeployModelRequest request, CancellationToken cancellationToken)

Deploys a Model into this Endpoint, creating a DeployedModel within it.

Parameters
Name Description
request DeployModelRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationDeployModelResponseDeployModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
DeployModelRequest request = new DeployModelRequest
{
    EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
    DeployedModel = new DeployedModel(),
    TrafficSplit = { { "", 0 }, },
};
// Make the request
Operation<DeployModelResponse, DeployModelOperationMetadata> response = await endpointServiceClient.DeployModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<DeployModelResponse, DeployModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeployModelResponse, DeployModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceDeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeployModelResponse retrievedResult = retrievedResponse.Result;
}

DeployModelAsync(EndpointName, DeployedModel, IDictionary<string, int>, CallSettings)

public virtual Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> DeployModelAsync(EndpointName endpoint, DeployedModel deployedModel, IDictionary<string, int> trafficSplit, CallSettings callSettings = null)

Deploys a Model into this Endpoint, creating a DeployedModel within it.

Parameters
Name Description
endpoint EndpointName

Required. The name of the Endpoint resource into which to deploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModel DeployedModel

Required. The DeployedModel to be created within the Endpoint. Note that [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start receiving traffic, either as part of this call, or via [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].

trafficSplit IDictionarystringint

A map from a DeployedModel's ID to the percentage of this Endpoint's traffic that should be forwarded to that DeployedModel.

If this field is non-empty, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. To refer to the ID of the just being deployed Model, a "0" should be used, and the actual ID of the new DeployedModel will be filled in its place by this method. The traffic percentage values must add up to 100.

If this field is empty, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationDeployModelResponseDeployModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
DeployedModel deployedModel = new DeployedModel();
IDictionary<string, int> trafficSplit = new Dictionary<string, int> { { "", 0 }, };
// Make the request
Operation<DeployModelResponse, DeployModelOperationMetadata> response = await endpointServiceClient.DeployModelAsync(endpoint, deployedModel, trafficSplit);

// Poll until the returned long-running operation is complete
Operation<DeployModelResponse, DeployModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeployModelResponse, DeployModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceDeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeployModelResponse retrievedResult = retrievedResponse.Result;
}

DeployModelAsync(EndpointName, DeployedModel, IDictionary<string, int>, CancellationToken)

public virtual Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> DeployModelAsync(EndpointName endpoint, DeployedModel deployedModel, IDictionary<string, int> trafficSplit, CancellationToken cancellationToken)

Deploys a Model into this Endpoint, creating a DeployedModel within it.

Parameters
Name Description
endpoint EndpointName

Required. The name of the Endpoint resource into which to deploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModel DeployedModel

Required. The DeployedModel to be created within the Endpoint. Note that [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start receiving traffic, either as part of this call, or via [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].

trafficSplit IDictionarystringint

A map from a DeployedModel's ID to the percentage of this Endpoint's traffic that should be forwarded to that DeployedModel.

If this field is non-empty, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. To refer to the ID of the just being deployed Model, a "0" should be used, and the actual ID of the new DeployedModel will be filled in its place by this method. The traffic percentage values must add up to 100.

If this field is empty, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationDeployModelResponseDeployModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
DeployedModel deployedModel = new DeployedModel();
IDictionary<string, int> trafficSplit = new Dictionary<string, int> { { "", 0 }, };
// Make the request
Operation<DeployModelResponse, DeployModelOperationMetadata> response = await endpointServiceClient.DeployModelAsync(endpoint, deployedModel, trafficSplit);

// Poll until the returned long-running operation is complete
Operation<DeployModelResponse, DeployModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeployModelResponse, DeployModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceDeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeployModelResponse retrievedResult = retrievedResponse.Result;
}

DeployModelAsync(string, DeployedModel, IDictionary<string, int>, CallSettings)

public virtual Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> DeployModelAsync(string endpoint, DeployedModel deployedModel, IDictionary<string, int> trafficSplit, CallSettings callSettings = null)

Deploys a Model into this Endpoint, creating a DeployedModel within it.

Parameters
Name Description
endpoint string

Required. The name of the Endpoint resource into which to deploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModel DeployedModel

Required. The DeployedModel to be created within the Endpoint. Note that [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start receiving traffic, either as part of this call, or via [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].

trafficSplit IDictionarystringint

A map from a DeployedModel's ID to the percentage of this Endpoint's traffic that should be forwarded to that DeployedModel.

If this field is non-empty, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. To refer to the ID of the just being deployed Model, a "0" should be used, and the actual ID of the new DeployedModel will be filled in its place by this method. The traffic percentage values must add up to 100.

If this field is empty, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationDeployModelResponseDeployModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
DeployedModel deployedModel = new DeployedModel();
IDictionary<string, int> trafficSplit = new Dictionary<string, int> { { "", 0 }, };
// Make the request
Operation<DeployModelResponse, DeployModelOperationMetadata> response = await endpointServiceClient.DeployModelAsync(endpoint, deployedModel, trafficSplit);

// Poll until the returned long-running operation is complete
Operation<DeployModelResponse, DeployModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeployModelResponse, DeployModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceDeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeployModelResponse retrievedResult = retrievedResponse.Result;
}

DeployModelAsync(string, DeployedModel, IDictionary<string, int>, CancellationToken)

public virtual Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> DeployModelAsync(string endpoint, DeployedModel deployedModel, IDictionary<string, int> trafficSplit, CancellationToken cancellationToken)

Deploys a Model into this Endpoint, creating a DeployedModel within it.

Parameters
Name Description
endpoint string

Required. The name of the Endpoint resource into which to deploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModel DeployedModel

Required. The DeployedModel to be created within the Endpoint. Note that [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start receiving traffic, either as part of this call, or via [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].

trafficSplit IDictionarystringint

A map from a DeployedModel's ID to the percentage of this Endpoint's traffic that should be forwarded to that DeployedModel.

If this field is non-empty, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. To refer to the ID of the just being deployed Model, a "0" should be used, and the actual ID of the new DeployedModel will be filled in its place by this method. The traffic percentage values must add up to 100.

If this field is empty, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationDeployModelResponseDeployModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
DeployedModel deployedModel = new DeployedModel();
IDictionary<string, int> trafficSplit = new Dictionary<string, int> { { "", 0 }, };
// Make the request
Operation<DeployModelResponse, DeployModelOperationMetadata> response = await endpointServiceClient.DeployModelAsync(endpoint, deployedModel, trafficSplit);

// Poll until the returned long-running operation is complete
Operation<DeployModelResponse, DeployModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DeployModelResponse, DeployModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceDeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DeployModelResponse retrievedResult = retrievedResponse.Result;
}

GetEndpoint(EndpointName, CallSettings)

public virtual Endpoint GetEndpoint(EndpointName name, CallSettings callSettings = null)

Gets an Endpoint.

Parameters
Name Description
name EndpointName

Required. The name of the Endpoint resource. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Endpoint

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
EndpointName name = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
// Make the request
Endpoint response = endpointServiceClient.GetEndpoint(name);

GetEndpoint(GetEndpointRequest, CallSettings)

public virtual Endpoint GetEndpoint(GetEndpointRequest request, CallSettings callSettings = null)

Gets an Endpoint.

Parameters
Name Description
request GetEndpointRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Endpoint

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
GetEndpointRequest request = new GetEndpointRequest
{
    EndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
};
// Make the request
Endpoint response = endpointServiceClient.GetEndpoint(request);

GetEndpoint(string, CallSettings)

public virtual Endpoint GetEndpoint(string name, CallSettings callSettings = null)

Gets an Endpoint.

Parameters
Name Description
name string

Required. The name of the Endpoint resource. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Endpoint

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
// Make the request
Endpoint response = endpointServiceClient.GetEndpoint(name);

GetEndpointAsync(EndpointName, CallSettings)

public virtual Task<Endpoint> GetEndpointAsync(EndpointName name, CallSettings callSettings = null)

Gets an Endpoint.

Parameters
Name Description
name EndpointName

Required. The name of the Endpoint resource. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
EndpointName name = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
// Make the request
Endpoint response = await endpointServiceClient.GetEndpointAsync(name);

GetEndpointAsync(EndpointName, CancellationToken)

public virtual Task<Endpoint> GetEndpointAsync(EndpointName name, CancellationToken cancellationToken)

Gets an Endpoint.

Parameters
Name Description
name EndpointName

Required. The name of the Endpoint resource. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
EndpointName name = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
// Make the request
Endpoint response = await endpointServiceClient.GetEndpointAsync(name);

GetEndpointAsync(GetEndpointRequest, CallSettings)

public virtual Task<Endpoint> GetEndpointAsync(GetEndpointRequest request, CallSettings callSettings = null)

Gets an Endpoint.

Parameters
Name Description
request GetEndpointRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
GetEndpointRequest request = new GetEndpointRequest
{
    EndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
};
// Make the request
Endpoint response = await endpointServiceClient.GetEndpointAsync(request);

GetEndpointAsync(GetEndpointRequest, CancellationToken)

public virtual Task<Endpoint> GetEndpointAsync(GetEndpointRequest request, CancellationToken cancellationToken)

Gets an Endpoint.

Parameters
Name Description
request GetEndpointRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
GetEndpointRequest request = new GetEndpointRequest
{
    EndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
};
// Make the request
Endpoint response = await endpointServiceClient.GetEndpointAsync(request);

GetEndpointAsync(string, CallSettings)

public virtual Task<Endpoint> GetEndpointAsync(string name, CallSettings callSettings = null)

Gets an Endpoint.

Parameters
Name Description
name string

Required. The name of the Endpoint resource. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
// Make the request
Endpoint response = await endpointServiceClient.GetEndpointAsync(name);

GetEndpointAsync(string, CancellationToken)

public virtual Task<Endpoint> GetEndpointAsync(string name, CancellationToken cancellationToken)

Gets an Endpoint.

Parameters
Name Description
name string

Required. The name of the Endpoint resource. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
// Make the request
Endpoint response = await endpointServiceClient.GetEndpointAsync(name);

ListEndpoints(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListEndpointsResponse, Endpoint> ListEndpoints(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Endpoints in a Location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location from which to list the Endpoints. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListEndpointsResponseEndpoint

A pageable sequence of Endpoint resources.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListEndpointsResponse, Endpoint> response = endpointServiceClient.ListEndpoints(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Endpoint item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListEndpointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Endpoint item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Endpoint> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Endpoint item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEndpoints(ListEndpointsRequest, CallSettings)

public virtual PagedEnumerable<ListEndpointsResponse, Endpoint> ListEndpoints(ListEndpointsRequest request, CallSettings callSettings = null)

Lists Endpoints in a Location.

Parameters
Name Description
request ListEndpointsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListEndpointsResponseEndpoint

A pageable sequence of Endpoint resources.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
ListEndpointsRequest request = new ListEndpointsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    ReadMask = new FieldMask(),
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListEndpointsResponse, Endpoint> response = endpointServiceClient.ListEndpoints(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Endpoint item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListEndpointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Endpoint item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Endpoint> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Endpoint item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEndpoints(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListEndpointsResponse, Endpoint> ListEndpoints(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Endpoints in a Location.

Parameters
Name Description
parent string

Required. The resource name of the Location from which to list the Endpoints. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListEndpointsResponseEndpoint

A pageable sequence of Endpoint resources.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListEndpointsResponse, Endpoint> response = endpointServiceClient.ListEndpoints(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Endpoint item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListEndpointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Endpoint item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Endpoint> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Endpoint item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEndpointsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> ListEndpointsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Endpoints in a Location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location from which to list the Endpoints. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListEndpointsResponseEndpoint

A pageable asynchronous sequence of Endpoint resources.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> response = endpointServiceClient.ListEndpointsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Endpoint item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListEndpointsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Endpoint item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Endpoint> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Endpoint item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEndpointsAsync(ListEndpointsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> ListEndpointsAsync(ListEndpointsRequest request, CallSettings callSettings = null)

Lists Endpoints in a Location.

Parameters
Name Description
request ListEndpointsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListEndpointsResponseEndpoint

A pageable asynchronous sequence of Endpoint resources.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
ListEndpointsRequest request = new ListEndpointsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    ReadMask = new FieldMask(),
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> response = endpointServiceClient.ListEndpointsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Endpoint item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListEndpointsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Endpoint item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Endpoint> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Endpoint item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEndpointsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> ListEndpointsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Endpoints in a Location.

Parameters
Name Description
parent string

Required. The resource name of the Location from which to list the Endpoints. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListEndpointsResponseEndpoint

A pageable asynchronous sequence of Endpoint resources.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> response = endpointServiceClient.ListEndpointsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Endpoint item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListEndpointsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Endpoint item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Endpoint> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Endpoint item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

MutateDeployedModel(EndpointName, DeployedModel, FieldMask, CallSettings)

public virtual Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> MutateDeployedModel(EndpointName endpoint, DeployedModel deployedModel, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing deployed model. Updatable fields include min_replica_count, max_replica_count, autoscaling_metric_specs, disable_container_logging (v1 only), and enable_container_logging (v1beta1 only).

Parameters
Name Description
endpoint EndpointName

Required. The name of the Endpoint resource into which to mutate a DeployedModel. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModel DeployedModel

Required. The DeployedModel to be mutated within the Endpoint. Only the following fields can be mutated:

  • min_replica_count in either [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
  • max_replica_count in either [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
  • [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
  • disable_container_logging (v1 only)
  • enable_container_logging (v1beta1 only)
updateMask FieldMask

Required. The update mask applies to the resource. See [google.protobuf.FieldMask][google.protobuf.FieldMask].

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMutateDeployedModelResponseMutateDeployedModelOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
DeployedModel deployedModel = new DeployedModel();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> response = endpointServiceClient.MutateDeployedModel(endpoint, deployedModel, updateMask);

// Poll until the returned long-running operation is complete
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
MutateDeployedModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceMutateDeployedModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MutateDeployedModelResponse retrievedResult = retrievedResponse.Result;
}

MutateDeployedModel(MutateDeployedModelRequest, CallSettings)

public virtual Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> MutateDeployedModel(MutateDeployedModelRequest request, CallSettings callSettings = null)

Updates an existing deployed model. Updatable fields include min_replica_count, max_replica_count, autoscaling_metric_specs, disable_container_logging (v1 only), and enable_container_logging (v1beta1 only).

Parameters
Name Description
request MutateDeployedModelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMutateDeployedModelResponseMutateDeployedModelOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
MutateDeployedModelRequest request = new MutateDeployedModelRequest
{
    EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
    DeployedModel = new DeployedModel(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> response = endpointServiceClient.MutateDeployedModel(request);

// Poll until the returned long-running operation is complete
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
MutateDeployedModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceMutateDeployedModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MutateDeployedModelResponse retrievedResult = retrievedResponse.Result;
}

MutateDeployedModel(string, DeployedModel, FieldMask, CallSettings)

public virtual Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> MutateDeployedModel(string endpoint, DeployedModel deployedModel, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing deployed model. Updatable fields include min_replica_count, max_replica_count, autoscaling_metric_specs, disable_container_logging (v1 only), and enable_container_logging (v1beta1 only).

Parameters
Name Description
endpoint string

Required. The name of the Endpoint resource into which to mutate a DeployedModel. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModel DeployedModel

Required. The DeployedModel to be mutated within the Endpoint. Only the following fields can be mutated:

  • min_replica_count in either [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
  • max_replica_count in either [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
  • [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
  • disable_container_logging (v1 only)
  • enable_container_logging (v1beta1 only)
updateMask FieldMask

Required. The update mask applies to the resource. See [google.protobuf.FieldMask][google.protobuf.FieldMask].

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMutateDeployedModelResponseMutateDeployedModelOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
DeployedModel deployedModel = new DeployedModel();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> response = endpointServiceClient.MutateDeployedModel(endpoint, deployedModel, updateMask);

// Poll until the returned long-running operation is complete
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
MutateDeployedModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceMutateDeployedModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MutateDeployedModelResponse retrievedResult = retrievedResponse.Result;
}

MutateDeployedModelAsync(EndpointName, DeployedModel, FieldMask, CallSettings)

public virtual Task<Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata>> MutateDeployedModelAsync(EndpointName endpoint, DeployedModel deployedModel, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing deployed model. Updatable fields include min_replica_count, max_replica_count, autoscaling_metric_specs, disable_container_logging (v1 only), and enable_container_logging (v1beta1 only).

Parameters
Name Description
endpoint EndpointName

Required. The name of the Endpoint resource into which to mutate a DeployedModel. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModel DeployedModel

Required. The DeployedModel to be mutated within the Endpoint. Only the following fields can be mutated:

  • min_replica_count in either [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
  • max_replica_count in either [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
  • [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
  • disable_container_logging (v1 only)
  • enable_container_logging (v1beta1 only)
updateMask FieldMask

Required. The update mask applies to the resource. See [google.protobuf.FieldMask][google.protobuf.FieldMask].

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMutateDeployedModelResponseMutateDeployedModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
DeployedModel deployedModel = new DeployedModel();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> response = await endpointServiceClient.MutateDeployedModelAsync(endpoint, deployedModel, updateMask);

// Poll until the returned long-running operation is complete
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MutateDeployedModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceMutateDeployedModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MutateDeployedModelResponse retrievedResult = retrievedResponse.Result;
}

MutateDeployedModelAsync(EndpointName, DeployedModel, FieldMask, CancellationToken)

public virtual Task<Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata>> MutateDeployedModelAsync(EndpointName endpoint, DeployedModel deployedModel, FieldMask updateMask, CancellationToken cancellationToken)

Updates an existing deployed model. Updatable fields include min_replica_count, max_replica_count, autoscaling_metric_specs, disable_container_logging (v1 only), and enable_container_logging (v1beta1 only).

Parameters
Name Description
endpoint EndpointName

Required. The name of the Endpoint resource into which to mutate a DeployedModel. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModel DeployedModel

Required. The DeployedModel to be mutated within the Endpoint. Only the following fields can be mutated:

  • min_replica_count in either [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
  • max_replica_count in either [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
  • [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
  • disable_container_logging (v1 only)
  • enable_container_logging (v1beta1 only)
updateMask FieldMask

Required. The update mask applies to the resource. See [google.protobuf.FieldMask][google.protobuf.FieldMask].

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationMutateDeployedModelResponseMutateDeployedModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
DeployedModel deployedModel = new DeployedModel();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> response = await endpointServiceClient.MutateDeployedModelAsync(endpoint, deployedModel, updateMask);

// Poll until the returned long-running operation is complete
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MutateDeployedModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceMutateDeployedModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MutateDeployedModelResponse retrievedResult = retrievedResponse.Result;
}

MutateDeployedModelAsync(MutateDeployedModelRequest, CallSettings)

public virtual Task<Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata>> MutateDeployedModelAsync(MutateDeployedModelRequest request, CallSettings callSettings = null)

Updates an existing deployed model. Updatable fields include min_replica_count, max_replica_count, autoscaling_metric_specs, disable_container_logging (v1 only), and enable_container_logging (v1beta1 only).

Parameters
Name Description
request MutateDeployedModelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMutateDeployedModelResponseMutateDeployedModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
MutateDeployedModelRequest request = new MutateDeployedModelRequest
{
    EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
    DeployedModel = new DeployedModel(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> response = await endpointServiceClient.MutateDeployedModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MutateDeployedModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceMutateDeployedModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MutateDeployedModelResponse retrievedResult = retrievedResponse.Result;
}

MutateDeployedModelAsync(MutateDeployedModelRequest, CancellationToken)

public virtual Task<Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata>> MutateDeployedModelAsync(MutateDeployedModelRequest request, CancellationToken cancellationToken)

Updates an existing deployed model. Updatable fields include min_replica_count, max_replica_count, autoscaling_metric_specs, disable_container_logging (v1 only), and enable_container_logging (v1beta1 only).

Parameters
Name Description
request MutateDeployedModelRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationMutateDeployedModelResponseMutateDeployedModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
MutateDeployedModelRequest request = new MutateDeployedModelRequest
{
    EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
    DeployedModel = new DeployedModel(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> response = await endpointServiceClient.MutateDeployedModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MutateDeployedModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceMutateDeployedModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MutateDeployedModelResponse retrievedResult = retrievedResponse.Result;
}

MutateDeployedModelAsync(string, DeployedModel, FieldMask, CallSettings)

public virtual Task<Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata>> MutateDeployedModelAsync(string endpoint, DeployedModel deployedModel, FieldMask updateMask, CallSettings callSettings = null)

Updates an existing deployed model. Updatable fields include min_replica_count, max_replica_count, autoscaling_metric_specs, disable_container_logging (v1 only), and enable_container_logging (v1beta1 only).

Parameters
Name Description
endpoint string

Required. The name of the Endpoint resource into which to mutate a DeployedModel. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModel DeployedModel

Required. The DeployedModel to be mutated within the Endpoint. Only the following fields can be mutated:

  • min_replica_count in either [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
  • max_replica_count in either [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
  • [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
  • disable_container_logging (v1 only)
  • enable_container_logging (v1beta1 only)
updateMask FieldMask

Required. The update mask applies to the resource. See [google.protobuf.FieldMask][google.protobuf.FieldMask].

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMutateDeployedModelResponseMutateDeployedModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
DeployedModel deployedModel = new DeployedModel();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> response = await endpointServiceClient.MutateDeployedModelAsync(endpoint, deployedModel, updateMask);

// Poll until the returned long-running operation is complete
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MutateDeployedModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceMutateDeployedModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MutateDeployedModelResponse retrievedResult = retrievedResponse.Result;
}

MutateDeployedModelAsync(string, DeployedModel, FieldMask, CancellationToken)

public virtual Task<Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata>> MutateDeployedModelAsync(string endpoint, DeployedModel deployedModel, FieldMask updateMask, CancellationToken cancellationToken)

Updates an existing deployed model. Updatable fields include min_replica_count, max_replica_count, autoscaling_metric_specs, disable_container_logging (v1 only), and enable_container_logging (v1beta1 only).

Parameters
Name Description
endpoint string

Required. The name of the Endpoint resource into which to mutate a DeployedModel. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModel DeployedModel

Required. The DeployedModel to be mutated within the Endpoint. Only the following fields can be mutated:

  • min_replica_count in either [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
  • max_replica_count in either [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
  • [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
  • disable_container_logging (v1 only)
  • enable_container_logging (v1beta1 only)
updateMask FieldMask

Required. The update mask applies to the resource. See [google.protobuf.FieldMask][google.protobuf.FieldMask].

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationMutateDeployedModelResponseMutateDeployedModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
DeployedModel deployedModel = new DeployedModel();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> response = await endpointServiceClient.MutateDeployedModelAsync(endpoint, deployedModel, updateMask);

// Poll until the returned long-running operation is complete
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MutateDeployedModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceMutateDeployedModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MutateDeployedModelResponse retrievedResult = retrievedResponse.Result;
}

PollOnceCreateEndpoint(string, CallSettings)

public virtual Operation<Endpoint, CreateEndpointOperationMetadata> PollOnceCreateEndpoint(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateEndpoint.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEndpointCreateEndpointOperationMetadata

The result of polling the operation.

PollOnceCreateEndpointAsync(string, CallSettings)

public virtual Task<Operation<Endpoint, CreateEndpointOperationMetadata>> PollOnceCreateEndpointAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateEndpoint.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEndpointCreateEndpointOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteEndpoint(string, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> PollOnceDeleteEndpoint(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteEndpoint.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The result of polling the operation.

PollOnceDeleteEndpointAsync(string, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> PollOnceDeleteEndpointAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteEndpoint.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A task representing the result of polling the operation.

PollOnceDeployModel(string, CallSettings)

public virtual Operation<DeployModelResponse, DeployModelOperationMetadata> PollOnceDeployModel(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeployModel.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationDeployModelResponseDeployModelOperationMetadata

The result of polling the operation.

PollOnceDeployModelAsync(string, CallSettings)

public virtual Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> PollOnceDeployModelAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeployModel.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationDeployModelResponseDeployModelOperationMetadata

A task representing the result of polling the operation.

PollOnceMutateDeployedModel(string, CallSettings)

public virtual Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata> PollOnceMutateDeployedModel(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of MutateDeployedModel .

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMutateDeployedModelResponseMutateDeployedModelOperationMetadata

The result of polling the operation.

PollOnceMutateDeployedModelAsync(string, CallSettings)

public virtual Task<Operation<MutateDeployedModelResponse, MutateDeployedModelOperationMetadata>> PollOnceMutateDeployedModelAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of MutateDeployedModel.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMutateDeployedModelResponseMutateDeployedModelOperationMetadata

A task representing the result of polling the operation.

PollOnceUndeployModel(string, CallSettings)

public virtual Operation<UndeployModelResponse, UndeployModelOperationMetadata> PollOnceUndeployModel(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UndeployModel.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationUndeployModelResponseUndeployModelOperationMetadata

The result of polling the operation.

PollOnceUndeployModelAsync(string, CallSettings)

public virtual Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> PollOnceUndeployModelAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UndeployModel.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationUndeployModelResponseUndeployModelOperationMetadata

A task representing the result of polling the operation.

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UndeployModel(EndpointName, string, IDictionary<string, int>, CallSettings)

public virtual Operation<UndeployModelResponse, UndeployModelOperationMetadata> UndeployModel(EndpointName endpoint, string deployedModelId, IDictionary<string, int> trafficSplit, CallSettings callSettings = null)

Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.

Parameters
Name Description
endpoint EndpointName

Required. The name of the Endpoint resource from which to undeploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModelId string

Required. The ID of the DeployedModel to be undeployed from the Endpoint.

trafficSplit IDictionarystringint

If this field is provided, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If last DeployedModel is being undeployed from the Endpoint, the [Endpoint.traffic_split] will always end up empty when this call returns. A DeployedModel will be successfully undeployed only if it doesn't have any traffic assigned to it when this method executes, or if this field unassigns any traffic to it.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationUndeployModelResponseUndeployModelOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
string deployedModelId = "";
IDictionary<string, int> trafficSplit = new Dictionary<string, int> { { "", 0 }, };
// Make the request
Operation<UndeployModelResponse, UndeployModelOperationMetadata> response = endpointServiceClient.UndeployModel(endpoint, deployedModelId, trafficSplit);

// Poll until the returned long-running operation is complete
Operation<UndeployModelResponse, UndeployModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
UndeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<UndeployModelResponse, UndeployModelOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceUndeployModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UndeployModelResponse retrievedResult = retrievedResponse.Result;
}

UndeployModel(UndeployModelRequest, CallSettings)

public virtual Operation<UndeployModelResponse, UndeployModelOperationMetadata> UndeployModel(UndeployModelRequest request, CallSettings callSettings = null)

Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.

Parameters
Name Description
request UndeployModelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationUndeployModelResponseUndeployModelOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
UndeployModelRequest request = new UndeployModelRequest
{
    EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
    DeployedModelId = "",
    TrafficSplit = { { "", 0 }, },
};
// Make the request
Operation<UndeployModelResponse, UndeployModelOperationMetadata> response = endpointServiceClient.UndeployModel(request);

// Poll until the returned long-running operation is complete
Operation<UndeployModelResponse, UndeployModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
UndeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<UndeployModelResponse, UndeployModelOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceUndeployModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UndeployModelResponse retrievedResult = retrievedResponse.Result;
}

UndeployModel(string, string, IDictionary<string, int>, CallSettings)

public virtual Operation<UndeployModelResponse, UndeployModelOperationMetadata> UndeployModel(string endpoint, string deployedModelId, IDictionary<string, int> trafficSplit, CallSettings callSettings = null)

Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.

Parameters
Name Description
endpoint string

Required. The name of the Endpoint resource from which to undeploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModelId string

Required. The ID of the DeployedModel to be undeployed from the Endpoint.

trafficSplit IDictionarystringint

If this field is provided, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If last DeployedModel is being undeployed from the Endpoint, the [Endpoint.traffic_split] will always end up empty when this call returns. A DeployedModel will be successfully undeployed only if it doesn't have any traffic assigned to it when this method executes, or if this field unassigns any traffic to it.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationUndeployModelResponseUndeployModelOperationMetadata

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
string deployedModelId = "";
IDictionary<string, int> trafficSplit = new Dictionary<string, int> { { "", 0 }, };
// Make the request
Operation<UndeployModelResponse, UndeployModelOperationMetadata> response = endpointServiceClient.UndeployModel(endpoint, deployedModelId, trafficSplit);

// Poll until the returned long-running operation is complete
Operation<UndeployModelResponse, UndeployModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
UndeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<UndeployModelResponse, UndeployModelOperationMetadata> retrievedResponse = endpointServiceClient.PollOnceUndeployModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UndeployModelResponse retrievedResult = retrievedResponse.Result;
}

UndeployModelAsync(EndpointName, string, IDictionary<string, int>, CallSettings)

public virtual Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> UndeployModelAsync(EndpointName endpoint, string deployedModelId, IDictionary<string, int> trafficSplit, CallSettings callSettings = null)

Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.

Parameters
Name Description
endpoint EndpointName

Required. The name of the Endpoint resource from which to undeploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModelId string

Required. The ID of the DeployedModel to be undeployed from the Endpoint.

trafficSplit IDictionarystringint

If this field is provided, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If last DeployedModel is being undeployed from the Endpoint, the [Endpoint.traffic_split] will always end up empty when this call returns. A DeployedModel will be successfully undeployed only if it doesn't have any traffic assigned to it when this method executes, or if this field unassigns any traffic to it.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationUndeployModelResponseUndeployModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
string deployedModelId = "";
IDictionary<string, int> trafficSplit = new Dictionary<string, int> { { "", 0 }, };
// Make the request
Operation<UndeployModelResponse, UndeployModelOperationMetadata> response = await endpointServiceClient.UndeployModelAsync(endpoint, deployedModelId, trafficSplit);

// Poll until the returned long-running operation is complete
Operation<UndeployModelResponse, UndeployModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UndeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<UndeployModelResponse, UndeployModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceUndeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UndeployModelResponse retrievedResult = retrievedResponse.Result;
}

UndeployModelAsync(EndpointName, string, IDictionary<string, int>, CancellationToken)

public virtual Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> UndeployModelAsync(EndpointName endpoint, string deployedModelId, IDictionary<string, int> trafficSplit, CancellationToken cancellationToken)

Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.

Parameters
Name Description
endpoint EndpointName

Required. The name of the Endpoint resource from which to undeploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModelId string

Required. The ID of the DeployedModel to be undeployed from the Endpoint.

trafficSplit IDictionarystringint

If this field is provided, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If last DeployedModel is being undeployed from the Endpoint, the [Endpoint.traffic_split] will always end up empty when this call returns. A DeployedModel will be successfully undeployed only if it doesn't have any traffic assigned to it when this method executes, or if this field unassigns any traffic to it.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationUndeployModelResponseUndeployModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
string deployedModelId = "";
IDictionary<string, int> trafficSplit = new Dictionary<string, int> { { "", 0 }, };
// Make the request
Operation<UndeployModelResponse, UndeployModelOperationMetadata> response = await endpointServiceClient.UndeployModelAsync(endpoint, deployedModelId, trafficSplit);

// Poll until the returned long-running operation is complete
Operation<UndeployModelResponse, UndeployModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UndeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<UndeployModelResponse, UndeployModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceUndeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UndeployModelResponse retrievedResult = retrievedResponse.Result;
}

UndeployModelAsync(UndeployModelRequest, CallSettings)

public virtual Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> UndeployModelAsync(UndeployModelRequest request, CallSettings callSettings = null)

Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.

Parameters
Name Description
request UndeployModelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationUndeployModelResponseUndeployModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
UndeployModelRequest request = new UndeployModelRequest
{
    EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
    DeployedModelId = "",
    TrafficSplit = { { "", 0 }, },
};
// Make the request
Operation<UndeployModelResponse, UndeployModelOperationMetadata> response = await endpointServiceClient.UndeployModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<UndeployModelResponse, UndeployModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UndeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<UndeployModelResponse, UndeployModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceUndeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UndeployModelResponse retrievedResult = retrievedResponse.Result;
}

UndeployModelAsync(UndeployModelRequest, CancellationToken)

public virtual Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> UndeployModelAsync(UndeployModelRequest request, CancellationToken cancellationToken)

Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.

Parameters
Name Description
request UndeployModelRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationUndeployModelResponseUndeployModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
UndeployModelRequest request = new UndeployModelRequest
{
    EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
    DeployedModelId = "",
    TrafficSplit = { { "", 0 }, },
};
// Make the request
Operation<UndeployModelResponse, UndeployModelOperationMetadata> response = await endpointServiceClient.UndeployModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<UndeployModelResponse, UndeployModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UndeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<UndeployModelResponse, UndeployModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceUndeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UndeployModelResponse retrievedResult = retrievedResponse.Result;
}

UndeployModelAsync(string, string, IDictionary<string, int>, CallSettings)

public virtual Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> UndeployModelAsync(string endpoint, string deployedModelId, IDictionary<string, int> trafficSplit, CallSettings callSettings = null)

Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.

Parameters
Name Description
endpoint string

Required. The name of the Endpoint resource from which to undeploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModelId string

Required. The ID of the DeployedModel to be undeployed from the Endpoint.

trafficSplit IDictionarystringint

If this field is provided, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If last DeployedModel is being undeployed from the Endpoint, the [Endpoint.traffic_split] will always end up empty when this call returns. A DeployedModel will be successfully undeployed only if it doesn't have any traffic assigned to it when this method executes, or if this field unassigns any traffic to it.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationUndeployModelResponseUndeployModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
string deployedModelId = "";
IDictionary<string, int> trafficSplit = new Dictionary<string, int> { { "", 0 }, };
// Make the request
Operation<UndeployModelResponse, UndeployModelOperationMetadata> response = await endpointServiceClient.UndeployModelAsync(endpoint, deployedModelId, trafficSplit);

// Poll until the returned long-running operation is complete
Operation<UndeployModelResponse, UndeployModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UndeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<UndeployModelResponse, UndeployModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceUndeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UndeployModelResponse retrievedResult = retrievedResponse.Result;
}

UndeployModelAsync(string, string, IDictionary<string, int>, CancellationToken)

public virtual Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> UndeployModelAsync(string endpoint, string deployedModelId, IDictionary<string, int> trafficSplit, CancellationToken cancellationToken)

Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.

Parameters
Name Description
endpoint string

Required. The name of the Endpoint resource from which to undeploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

deployedModelId string

Required. The ID of the DeployedModel to be undeployed from the Endpoint.

trafficSplit IDictionarystringint

If this field is provided, then the Endpoint's [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If last DeployedModel is being undeployed from the Endpoint, the [Endpoint.traffic_split] will always end up empty when this call returns. A DeployedModel will be successfully undeployed only if it doesn't have any traffic assigned to it when this method executes, or if this field unassigns any traffic to it.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationUndeployModelResponseUndeployModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
string deployedModelId = "";
IDictionary<string, int> trafficSplit = new Dictionary<string, int> { { "", 0 }, };
// Make the request
Operation<UndeployModelResponse, UndeployModelOperationMetadata> response = await endpointServiceClient.UndeployModelAsync(endpoint, deployedModelId, trafficSplit);

// Poll until the returned long-running operation is complete
Operation<UndeployModelResponse, UndeployModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UndeployModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<UndeployModelResponse, UndeployModelOperationMetadata> retrievedResponse = await endpointServiceClient.PollOnceUndeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UndeployModelResponse retrievedResult = retrievedResponse.Result;
}

UpdateEndpoint(Endpoint, FieldMask, CallSettings)

public virtual Endpoint UpdateEndpoint(Endpoint endpoint, FieldMask updateMask, CallSettings callSettings = null)

Updates an Endpoint.

Parameters
Name Description
endpoint Endpoint

Required. The Endpoint which replaces the resource on the server.

updateMask FieldMask

Required. The update mask applies to the resource. See [google.protobuf.FieldMask][google.protobuf.FieldMask].

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Endpoint

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
Endpoint endpoint = new Endpoint();
FieldMask updateMask = new FieldMask();
// Make the request
Endpoint response = endpointServiceClient.UpdateEndpoint(endpoint, updateMask);

UpdateEndpoint(UpdateEndpointRequest, CallSettings)

public virtual Endpoint UpdateEndpoint(UpdateEndpointRequest request, CallSettings callSettings = null)

Updates an Endpoint.

Parameters
Name Description
request UpdateEndpointRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Endpoint

The RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = EndpointServiceClient.Create();
// Initialize request argument(s)
UpdateEndpointRequest request = new UpdateEndpointRequest
{
    Endpoint = new Endpoint(),
    UpdateMask = new FieldMask(),
};
// Make the request
Endpoint response = endpointServiceClient.UpdateEndpoint(request);

UpdateEndpointAsync(Endpoint, FieldMask, CallSettings)

public virtual Task<Endpoint> UpdateEndpointAsync(Endpoint endpoint, FieldMask updateMask, CallSettings callSettings = null)

Updates an Endpoint.

Parameters
Name Description
endpoint Endpoint

Required. The Endpoint which replaces the resource on the server.

updateMask FieldMask

Required. The update mask applies to the resource. See [google.protobuf.FieldMask][google.protobuf.FieldMask].

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
Endpoint endpoint = new Endpoint();
FieldMask updateMask = new FieldMask();
// Make the request
Endpoint response = await endpointServiceClient.UpdateEndpointAsync(endpoint, updateMask);

UpdateEndpointAsync(Endpoint, FieldMask, CancellationToken)

public virtual Task<Endpoint> UpdateEndpointAsync(Endpoint endpoint, FieldMask updateMask, CancellationToken cancellationToken)

Updates an Endpoint.

Parameters
Name Description
endpoint Endpoint

Required. The Endpoint which replaces the resource on the server.

updateMask FieldMask

Required. The update mask applies to the resource. See [google.protobuf.FieldMask][google.protobuf.FieldMask].

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
Endpoint endpoint = new Endpoint();
FieldMask updateMask = new FieldMask();
// Make the request
Endpoint response = await endpointServiceClient.UpdateEndpointAsync(endpoint, updateMask);

UpdateEndpointAsync(UpdateEndpointRequest, CallSettings)

public virtual Task<Endpoint> UpdateEndpointAsync(UpdateEndpointRequest request, CallSettings callSettings = null)

Updates an Endpoint.

Parameters
Name Description
request UpdateEndpointRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateEndpointRequest request = new UpdateEndpointRequest
{
    Endpoint = new Endpoint(),
    UpdateMask = new FieldMask(),
};
// Make the request
Endpoint response = await endpointServiceClient.UpdateEndpointAsync(request);

UpdateEndpointAsync(UpdateEndpointRequest, CancellationToken)

public virtual Task<Endpoint> UpdateEndpointAsync(UpdateEndpointRequest request, CancellationToken cancellationToken)

Updates an Endpoint.

Parameters
Name Description
request UpdateEndpointRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
EndpointServiceClient endpointServiceClient = await EndpointServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateEndpointRequest request = new UpdateEndpointRequest
{
    Endpoint = new Endpoint(),
    UpdateMask = new FieldMask(),
};
// Make the request
Endpoint response = await endpointServiceClient.UpdateEndpointAsync(request);