Class EndpointServiceClient (2.23.0-rc)

A service for managing Vertex AI's Endpoints.

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Constructors

EndpointServiceClient(EndpointServiceClient const &)

Copy and move support

Parameter
NameDescription
EndpointServiceClient const &

EndpointServiceClient(EndpointServiceClient &&)

Copy and move support

Parameter
NameDescription
EndpointServiceClient &&

EndpointServiceClient(std::shared_ptr< EndpointServiceConnection >, Options)

Parameters
NameDescription
connection std::shared_ptr< EndpointServiceConnection >
opts Options

Operators

operator=(EndpointServiceClient const &)

Copy and move support

Parameter
NameDescription
EndpointServiceClient const &
Returns
TypeDescription
EndpointServiceClient &

operator=(EndpointServiceClient &&)

Copy and move support

Parameter
NameDescription
EndpointServiceClient &&
Returns
TypeDescription
EndpointServiceClient &

Functions

CreateEndpoint(std::string const &, google::cloud::aiplatform::v1::Endpoint const &, Options)

Creates an Endpoint.

Parameters
NameDescription
parent std::string const &

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

endpoint google::cloud::aiplatform::v1::Endpoint const &

Required. The Endpoint to create.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::aiplatform::v1::Endpoint > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.aiplatform.v1.Endpoint proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateEndpoint(std::string const &, google::cloud::aiplatform::v1::Endpoint const &, std::string const &, Options)

Creates an Endpoint.

Parameters
NameDescription
parent std::string const &

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

endpoint google::cloud::aiplatform::v1::Endpoint const &

Required. The Endpoint to create.

endpoint_id std::string const &

Immutable. The ID to use for endpoint, which will become the final component of the endpoint resource name. If not provided, Vertex AI will generate a value for this ID.
If the first character is a letter, this value may be up to 63 characters, and valid characters are [a-z0-9-]. The last character must be a letter or number.
If the first character is a number, this value may be up to 9 characters, and valid characters are [0-9] with no leading zeros.
When using HTTP/JSON, this field is populated based on a query string argument, such as ?endpoint_id=12345. This is the fallback for fields that are not included in either the URI or the body.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::aiplatform::v1::Endpoint > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.aiplatform.v1.Endpoint proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateEndpoint(google::cloud::aiplatform::v1::CreateEndpointRequest const &, Options)

Creates an Endpoint.

Parameters
NameDescription
request google::cloud::aiplatform::v1::CreateEndpointRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.CreateEndpointRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::aiplatform::v1::Endpoint > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.aiplatform.v1.Endpoint proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

GetEndpoint(std::string const &, Options)

Gets an Endpoint.

Parameters
NameDescription
name std::string const &

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

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Endpoint >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Endpoint) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetEndpoint(google::cloud::aiplatform::v1::GetEndpointRequest const &, Options)

Gets an Endpoint.

Parameters
NameDescription
request google::cloud::aiplatform::v1::GetEndpointRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.GetEndpointRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Endpoint >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Endpoint) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListEndpoints(std::string const &, Options)

Lists Endpoints in a Location.

Parameters
NameDescription
parent std::string const &

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

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::aiplatform::v1::Endpoint >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.aiplatform.v1.Endpoint, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListEndpoints(google::cloud::aiplatform::v1::ListEndpointsRequest, Options)

Lists Endpoints in a Location.

Parameters
NameDescription
request google::cloud::aiplatform::v1::ListEndpointsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.ListEndpointsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::aiplatform::v1::Endpoint >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.aiplatform.v1.Endpoint, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

UpdateEndpoint(google::cloud::aiplatform::v1::Endpoint const &, google::protobuf::FieldMask const &, Options)

Updates an Endpoint.

Parameters
NameDescription
endpoint google::cloud::aiplatform::v1::Endpoint const &

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

update_mask google::protobuf::FieldMask const &

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

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Endpoint >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Endpoint) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateEndpoint(google::cloud::aiplatform::v1::UpdateEndpointRequest const &, Options)

Updates an Endpoint.

Parameters
NameDescription
request google::cloud::aiplatform::v1::UpdateEndpointRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.UpdateEndpointRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::aiplatform::v1::Endpoint >

the result of the RPC. The response message type (google.cloud.aiplatform.v1.Endpoint) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteEndpoint(std::string const &, Options)

Deletes an Endpoint.

Parameters
NameDescription
name std::string const &

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

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::aiplatform::v1::DeleteOperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.aiplatform.v1.DeleteOperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteEndpoint(google::cloud::aiplatform::v1::DeleteEndpointRequest const &, Options)

Deletes an Endpoint.

Parameters
NameDescription
request google::cloud::aiplatform::v1::DeleteEndpointRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.DeleteEndpointRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::aiplatform::v1::DeleteOperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.aiplatform.v1.DeleteOperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeployModel(std::string const &, google::cloud::aiplatform::v1::DeployedModel const &, std::map< std::string, std::int32_t > const &, Options)

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

Parameters
NameDescription
endpoint std::string const &

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

deployed_model google::cloud::aiplatform::v1::DeployedModel const &

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

traffic_split std::map< std::string, std::int32_t > const &

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 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 is not updated.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::aiplatform::v1::DeployModelResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.aiplatform.v1.DeployModelResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeployModel(google::cloud::aiplatform::v1::DeployModelRequest const &, Options)

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

Parameters
NameDescription
request google::cloud::aiplatform::v1::DeployModelRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.DeployModelRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::aiplatform::v1::DeployModelResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.aiplatform.v1.DeployModelResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UndeployModel(std::string const &, std::string const &, std::map< std::string, std::int32_t > const &, Options)

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

Parameters
NameDescription
endpoint std::string const &

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

deployed_model_id std::string const &

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

traffic_split std::map< std::string, std::int32_t > const &

If this field is provided, then the Endpoint's 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.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::aiplatform::v1::UndeployModelResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.aiplatform.v1.UndeployModelResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UndeployModel(google::cloud::aiplatform::v1::UndeployModelRequest const &, Options)

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

Parameters
NameDescription
request google::cloud::aiplatform::v1::UndeployModelRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.UndeployModelRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::aiplatform::v1::UndeployModelResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.aiplatform.v1.UndeployModelResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

MutateDeployedModel(std::string const &, google::cloud::aiplatform::v1::DeployedModel const &, google::protobuf::FieldMask const &, Options)

Updates an existing deployed model.

Updatable fields include min_replica_count, max_replica_count, autoscaling_metric_specs, disable_container_logging (v1 only), and enable_container_logging (v1beta1 only).

Parameters
NameDescription
endpoint std::string const &

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

deployed_model google::cloud::aiplatform::v1::DeployedModel const &

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

update_mask google::protobuf::FieldMask const &

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

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::aiplatform::v1::MutateDeployedModelResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.aiplatform.v1.MutateDeployedModelResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

MutateDeployedModel(google::cloud::aiplatform::v1::MutateDeployedModelRequest const &, Options)

Updates an existing deployed model.

Updatable fields include min_replica_count, max_replica_count, autoscaling_metric_specs, disable_container_logging (v1 only), and enable_container_logging (v1beta1 only).

Parameters
NameDescription
request google::cloud::aiplatform::v1::MutateDeployedModelRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.aiplatform.v1.MutateDeployedModelRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::aiplatform::v1::MutateDeployedModelResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.aiplatform.v1.MutateDeployedModelResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.