- 3.10.0 (latest)
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
public abstract class EndpointServiceClient
EndpointService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.AIPlatform.V1Assembly
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 |
IReadOnlyList<String> |
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 |
EndpointService.EndpointServiceClient |
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(CancellationToken))
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 |
Task<EndpointServiceClient> | 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: |
endpoint | Endpoint Required. The Endpoint to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Endpoint, CreateEndpointOperationMetadata> | The RPC response. |
// 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: |
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. This value should be 1-10 characters, and valid characters are /[0-9]/.
When using HTTP/JSON, this field is populated based on a query string
argument, such as |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Endpoint, CreateEndpointOperationMetadata> | The RPC response. |
// 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 |
Operation<Endpoint, CreateEndpointOperationMetadata> | The RPC response. |
// 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: |
endpoint | Endpoint Required. The Endpoint to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Endpoint, CreateEndpointOperationMetadata> | The RPC response. |
// 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: |
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. This value should be 1-10 characters, and valid characters are /[0-9]/.
When using HTTP/JSON, this field is populated based on a query string
argument, such as |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Endpoint, CreateEndpointOperationMetadata> | The RPC response. |
// 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: |
endpoint | Endpoint Required. The Endpoint to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Endpoint, CreateEndpointOperationMetadata>> | A Task containing the RPC response. |
// 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: |
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. This value should be 1-10 characters, and valid characters are /[0-9]/.
When using HTTP/JSON, this field is populated based on a query string
argument, such as |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Endpoint, CreateEndpointOperationMetadata>> | A Task containing the RPC response. |
// 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: |
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. This value should be 1-10 characters, and valid characters are /[0-9]/.
When using HTTP/JSON, this field is populated based on a query string
argument, such as |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Endpoint, CreateEndpointOperationMetadata>> | A Task containing the RPC response. |
// 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: |
endpoint | Endpoint Required. The Endpoint to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Endpoint, CreateEndpointOperationMetadata>> | A Task containing the RPC response. |
// 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 |
Task<Operation<Endpoint, CreateEndpointOperationMetadata>> | A Task containing the RPC response. |
// 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 |
Task<Operation<Endpoint, CreateEndpointOperationMetadata>> | A Task containing the RPC response. |
// 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: |
endpoint | Endpoint Required. The Endpoint to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Endpoint, CreateEndpointOperationMetadata>> | A Task containing the RPC response. |
// 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: |
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. This value should be 1-10 characters, and valid characters are /[0-9]/.
When using HTTP/JSON, this field is populated based on a query string
argument, such as |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Endpoint, CreateEndpointOperationMetadata>> | A Task containing the RPC response. |
// 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: |
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. This value should be 1-10 characters, and valid characters are /[0-9]/.
When using HTTP/JSON, this field is populated based on a query string
argument, such as |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Endpoint, CreateEndpointOperationMetadata>> | A Task containing the RPC response. |
// 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: |
endpoint | Endpoint Required. The Endpoint to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Endpoint, CreateEndpointOperationMetadata>> | A Task containing the RPC response. |
// 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 |
Operation<Empty, DeleteOperationMetadata> | The RPC response. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, DeleteOperationMetadata> | The RPC response. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, DeleteOperationMetadata> | The RPC response. |
// 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 |
Task<Operation<Empty, DeleteOperationMetadata>> | A Task containing the RPC response. |
// 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 |
Task<Operation<Empty, DeleteOperationMetadata>> | A Task containing the RPC response. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, DeleteOperationMetadata>> | A Task containing the RPC response. |
// 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:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, DeleteOperationMetadata>> | A Task containing the RPC response. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, DeleteOperationMetadata>> | A Task containing the RPC response. |
// 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:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, DeleteOperationMetadata>> | A Task containing the RPC response. |
// 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 |
Operation<DeployModelResponse, DeployModelOperationMetadata> | The RPC response. |
// 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, Int32>, 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:
|
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 | IDictionary<String, Int32> 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 |
Operation<DeployModelResponse, DeployModelOperationMetadata> | The RPC response. |
// 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, Int32>, 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:
|
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 | IDictionary<String, Int32> 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 |
Operation<DeployModelResponse, DeployModelOperationMetadata> | The RPC response. |
// 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 |
Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> | A Task containing the RPC response. |
// 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 |
Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> | A Task containing the RPC response. |
// 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, Int32>, 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:
|
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 | IDictionary<String, Int32> 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 |
Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> | A Task containing the RPC response. |
// 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, Int32>, 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:
|
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 | IDictionary<String, Int32> 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 |
Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> | A Task containing the RPC response. |
// 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, Int32>, 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:
|
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 | IDictionary<String, Int32> 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 |
Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> | A Task containing the RPC response. |
// 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, Int32>, 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:
|
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 | IDictionary<String, Int32> 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 |
Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> | A Task containing the RPC response. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Endpoint | The RPC response. |
// 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. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Endpoint | The RPC response. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Endpoint> | A Task containing the RPC response. |
// 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:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Endpoint> | A Task containing the RPC response. |
// 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 |
Task<Endpoint> | A Task containing the RPC response. |
// 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 |
Task<Endpoint> | A Task containing the RPC response. |
// 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:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Endpoint> | A Task containing the RPC response. |
// 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:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Endpoint> | A Task containing the RPC response. |
// 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, Nullable<Int32>, 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: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListEndpointsResponse, Endpoint> | A pageable sequence of Endpoint resources. |
// 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 |
PagedEnumerable<ListEndpointsResponse, Endpoint> | A pageable sequence of Endpoint resources. |
// 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, Nullable<Int32>, 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: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListEndpointsResponse, Endpoint> | A pageable sequence of Endpoint resources. |
// 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, Nullable<Int32>, 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: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> | A pageable asynchronous sequence of Endpoint resources. |
// 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 |
PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> | A pageable asynchronous sequence of Endpoint resources. |
// 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, Nullable<Int32>, 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: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> | A pageable asynchronous sequence of Endpoint resources. |
// 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;
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 |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Endpoint, CreateEndpointOperationMetadata> | 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 |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Endpoint, CreateEndpointOperationMetadata>> | 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 |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, DeleteOperationMetadata> | 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 |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, DeleteOperationMetadata>> | 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 |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<DeployModelResponse, DeployModelOperationMetadata> | 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 |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<DeployModelResponse, DeployModelOperationMetadata>> | 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 |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<UndeployModelResponse, UndeployModelOperationMetadata> | 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 |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> | 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. |
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, Int32>, 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:
|
deployedModelId | String Required. The ID of the DeployedModel to be undeployed from the Endpoint. |
trafficSplit | IDictionary<String, Int32> 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 |
Operation<UndeployModelResponse, UndeployModelOperationMetadata> | The RPC response. |
// 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 |
Operation<UndeployModelResponse, UndeployModelOperationMetadata> | The RPC response. |
// 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, Int32>, 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:
|
deployedModelId | String Required. The ID of the DeployedModel to be undeployed from the Endpoint. |
trafficSplit | IDictionary<String, Int32> 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 |
Operation<UndeployModelResponse, UndeployModelOperationMetadata> | The RPC response. |
// 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, Int32>, 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:
|
deployedModelId | String Required. The ID of the DeployedModel to be undeployed from the Endpoint. |
trafficSplit | IDictionary<String, Int32> 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 |
Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> | A Task containing the RPC response. |
// 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, Int32>, 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:
|
deployedModelId | String Required. The ID of the DeployedModel to be undeployed from the Endpoint. |
trafficSplit | IDictionary<String, Int32> 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 |
Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> | A Task containing the RPC response. |
// 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 |
Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> | A Task containing the RPC response. |
// 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 |
Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> | A Task containing the RPC response. |
// 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, Int32>, 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:
|
deployedModelId | String Required. The ID of the DeployedModel to be undeployed from the Endpoint. |
trafficSplit | IDictionary<String, Int32> 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 |
Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> | A Task containing the RPC response. |
// 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, Int32>, 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:
|
deployedModelId | String Required. The ID of the DeployedModel to be undeployed from the Endpoint. |
trafficSplit | IDictionary<String, Int32> 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 |
Task<Operation<UndeployModelResponse, UndeployModelOperationMetadata>> | A Task containing the RPC response. |
// 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. |
// 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. |
// 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 |
Task<Endpoint> | A Task containing the RPC response. |
// 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 |
Task<Endpoint> | A Task containing the RPC response. |
// 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 |
Task<Endpoint> | A Task containing the RPC response. |
// 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 |
Task<Endpoint> | A Task containing the RPC response. |
// 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);