- 0.55.0 (latest)
- 0.54.0
- 0.53.0
- 0.52.0
- 0.51.0
- 0.50.0
- 0.49.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.1
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.
REST client for the EndpointService service.
A service for managing Vertex AI's Endpoints.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the EndpointService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all EndpointService clients ::Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the EndpointService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_endpoint
def create_endpoint(request, options = nil) -> ::Gapic::Operation
def create_endpoint(parent: nil, endpoint: nil, endpoint_id: nil) -> ::Gapic::Operation
Creates an Endpoint.
def create_endpoint(request, options = nil) -> ::Gapic::Operation
create_endpoint
via a request object, either of type
CreateEndpointRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::CreateEndpointRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_endpoint(parent: nil, endpoint: nil, endpoint_id: nil) -> ::Gapic::Operation
create_endpoint
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the Location to create the Endpoint in.
Format:
projects/{project}/locations/{location}
- endpoint (::Google::Cloud::AIPlatform::V1::Endpoint, ::Hash) — Required. The Endpoint to create.
-
endpoint_id (::String) — Immutable. The ID to use for endpoint, which will become the final
component of the endpoint resource name.
If not provided, Vertex AI will generate a value for this ID.
If the first character is a letter, this value may be up to 63 characters, and valid characters are
[a-z0-9-]
. The last character must be a letter or number.If the first character is a number, this value may be up to 9 characters, and valid characters are
[0-9]
with no leading zeros.When using HTTP/JSON, this field is populated based on a query string argument, such as
?endpoint_id=12345
. This is the fallback for fields that are not included in either the URI or the body.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::CreateEndpointRequest.new # Call the create_endpoint method. result = client.create_endpoint request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_endpoint
def delete_endpoint(request, options = nil) -> ::Gapic::Operation
def delete_endpoint(name: nil) -> ::Gapic::Operation
Deletes an Endpoint.
def delete_endpoint(request, options = nil) -> ::Gapic::Operation
delete_endpoint
via a request object, either of type
DeleteEndpointRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::DeleteEndpointRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_endpoint(name: nil) -> ::Gapic::Operation
delete_endpoint
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the Endpoint resource to be deleted.
Format:
projects/{project}/locations/{location}/endpoints/{endpoint}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::DeleteEndpointRequest.new # Call the delete_endpoint method. result = client.delete_endpoint request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#deploy_model
def deploy_model(request, options = nil) -> ::Gapic::Operation
def deploy_model(endpoint: nil, deployed_model: nil, traffic_split: nil) -> ::Gapic::Operation
Deploys a Model into this Endpoint, creating a DeployedModel within it.
def deploy_model(request, options = nil) -> ::Gapic::Operation
deploy_model
via a request object, either of type
DeployModelRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::DeployModelRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def deploy_model(endpoint: nil, deployed_model: nil, traffic_split: nil) -> ::Gapic::Operation
deploy_model
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
endpoint (::String) — 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, ::Hash) — 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 (::Hash{::String => ::Integer}) — 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::DeployModelRequest.new # Call the deploy_model method. result = client.deploy_model request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#get_endpoint
def get_endpoint(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Endpoint
def get_endpoint(name: nil) -> ::Google::Cloud::AIPlatform::V1::Endpoint
Gets an Endpoint.
def get_endpoint(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Endpoint
get_endpoint
via a request object, either of type
GetEndpointRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::GetEndpointRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_endpoint(name: nil) -> ::Google::Cloud::AIPlatform::V1::Endpoint
get_endpoint
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the Endpoint resource.
Format:
projects/{project}/locations/{location}/endpoints/{endpoint}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AIPlatform::V1::Endpoint)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::GetEndpointRequest.new # Call the get_endpoint method. result = client.get_endpoint request # The returned object is of type Google::Cloud::AIPlatform::V1::Endpoint. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Rest::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new EndpointService REST client object.
- (config) — Configure the EndpointService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_endpoints
def list_endpoints(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Endpoint>
def list_endpoints(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Endpoint>
Lists Endpoints in a Location.
def list_endpoints(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Endpoint>
list_endpoints
via a request object, either of type
ListEndpointsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListEndpointsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_endpoints(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Endpoint>
list_endpoints
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the Location from which to list the
Endpoints. Format:
projects/{project}/locations/{location}
-
filter (::String) —
Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported.
endpoint
supports=
and!=
.endpoint
represents the Endpoint ID, i.e. the last segment of the Endpoint's resource name.display_name
supports=
and!=
.labels
supports general map functions that is:labels.key=value
- key:value equalitylabels.key:*
orlabels:key
- key existence- A key including a space must be quoted.
labels."a key"
.
base_model_name
only supports=
.
Some examples:
endpoint=1
displayName="myDisplayName"
labels.myKey="myValue"
baseModelName="text-bison"
- page_size (::Integer) — Optional. The standard list page size.
- page_token (::String) — Optional. The standard list page token. Typically obtained via ListEndpointsResponse.next_page_token of the previous EndpointService.ListEndpoints call.
- read_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Mask specifying which fields to read.
-
order_by (::String) — A comma-separated list of fields to order by, sorted in ascending order.
Use "desc" after a field name for descending.
Supported fields:
display_name
create_time
update_time
Example:
display_name, create_time desc
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Endpoint>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Endpoint>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListEndpointsRequest.new # Call the list_endpoints method. result = client.list_endpoints request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::AIPlatform::V1::Endpoint. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#mutate_deployed_model
def mutate_deployed_model(request, options = nil) -> ::Gapic::Operation
def mutate_deployed_model(endpoint: nil, deployed_model: nil, update_mask: nil) -> ::Gapic::Operation
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).
def mutate_deployed_model(request, options = nil) -> ::Gapic::Operation
mutate_deployed_model
via a request object, either of type
MutateDeployedModelRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::MutateDeployedModelRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def mutate_deployed_model(endpoint: nil, deployed_model: nil, update_mask: nil) -> ::Gapic::Operation
mutate_deployed_model
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
endpoint (::String) — 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, ::Hash) —
Required. The DeployedModel to be mutated within the Endpoint. Only the following fields can be mutated:
min_replica_count
in either DedicatedResources or AutomaticResourcesmax_replica_count
in either DedicatedResources or AutomaticResources- autoscaling_metric_specs
disable_container_logging
(v1 only)enable_container_logging
(v1beta1 only)
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The update mask applies to the resource. See google.protobuf.FieldMask.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::MutateDeployedModelRequest.new # Call the mutate_deployed_model method. result = client.mutate_deployed_model request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#operations_client
def operations_client() -> ::Google::Cloud::AIPlatform::V1::EndpointService::Rest::Operations
Get the associated client for long-running operations.
#undeploy_model
def undeploy_model(request, options = nil) -> ::Gapic::Operation
def undeploy_model(endpoint: nil, deployed_model_id: nil, traffic_split: nil) -> ::Gapic::Operation
Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.
def undeploy_model(request, options = nil) -> ::Gapic::Operation
undeploy_model
via a request object, either of type
UndeployModelRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::UndeployModelRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def undeploy_model(endpoint: nil, deployed_model_id: nil, traffic_split: nil) -> ::Gapic::Operation
undeploy_model
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
endpoint (::String) — Required. The name of the Endpoint resource from which to undeploy a Model.
Format:
projects/{project}/locations/{location}/endpoints/{endpoint}
- deployed_model_id (::String) — Required. The ID of the DeployedModel to be undeployed from the Endpoint.
- traffic_split (::Hash{::String => ::Integer}) — 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::UndeployModelRequest.new # Call the undeploy_model method. result = client.undeploy_model request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_endpoint
def update_endpoint(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Endpoint
def update_endpoint(endpoint: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::Endpoint
Updates an Endpoint.
def update_endpoint(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Endpoint
update_endpoint
via a request object, either of type
UpdateEndpointRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::UpdateEndpointRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_endpoint(endpoint: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::Endpoint
update_endpoint
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- endpoint (::Google::Cloud::AIPlatform::V1::Endpoint, ::Hash) — Required. The Endpoint which replaces the resource on the server.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The update mask applies to the resource. See google.protobuf.FieldMask.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::AIPlatform::V1::Endpoint)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ai_platform/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::UpdateEndpointRequest.new # Call the update_endpoint method. result = client.update_endpoint request # The returned object is of type Google::Cloud::AIPlatform::V1::Endpoint. p result