- 1.37.0 (latest)
- 1.36.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.1
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.1
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.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
- 0.64.0
- 0.63.0
- 0.62.0
- 0.61.0
- 0.60.0
- 0.59.0
- 0.58.0
- 0.57.0
- 0.56.0
- 0.55.0
- 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::SessionService::Client.
Client for the SessionService service.
The service that manages Vertex Session related resources.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the SessionService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all SessionService clients ::Google::Cloud::AIPlatform::V1::SessionService::Client.configure do |config| config.timeout = 10.0 end
#append_event
def append_event(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::AppendEventResponse
def append_event(name: nil, event: nil) -> ::Google::Cloud::AIPlatform::V1::AppendEventResponseAppends an event to a given session.
def append_event(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::AppendEventResponseappend_event via a request object, either of type
AppendEventRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::AppendEventRequest, ::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 append_event(name: nil, event: nil) -> ::Google::Cloud::AIPlatform::V1::AppendEventResponseappend_event 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 resource name of the session to append event to.
Format:
projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session} - event (::Google::Cloud::AIPlatform::V1::SessionEvent, ::Hash) — Required. The event to append to the session.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::AppendEventResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::SessionService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::AppendEventRequest.new # Call the append_event method. result = client.append_event request # The returned object is of type Google::Cloud::AIPlatform::V1::AppendEventResponse. p result
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the SessionService 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_session
def create_session(request, options = nil) -> ::Gapic::Operation
def create_session(parent: nil, session: nil) -> ::Gapic::OperationCreates a new Session.
def create_session(request, options = nil) -> ::Gapic::Operationcreate_session via a request object, either of type
CreateSessionRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::CreateSessionRequest, ::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_session(parent: nil, session: nil) -> ::Gapic::Operationcreate_session 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 session in.
Format:
projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine} - session (::Google::Cloud::AIPlatform::V1::Session, ::Hash) — Required. The session to create.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::SessionService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::CreateSessionRequest.new # Call the create_session method. result = client.create_session 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_session
def delete_session(request, options = nil) -> ::Gapic::Operation
def delete_session(name: nil) -> ::Gapic::OperationDeletes details of the specific Session.
def delete_session(request, options = nil) -> ::Gapic::Operationdelete_session via a request object, either of type
DeleteSessionRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::DeleteSessionRequest, ::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_session(name: nil) -> ::Gapic::Operationdelete_session 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 resource name of the session.
Format:
projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::SessionService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::DeleteSessionRequest.new # Call the delete_session method. result = client.delete_session 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_session
def get_session(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Session
def get_session(name: nil) -> ::Google::Cloud::AIPlatform::V1::SessionGets details of the specific Session.
def get_session(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Sessionget_session via a request object, either of type
GetSessionRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::GetSessionRequest, ::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_session(name: nil) -> ::Google::Cloud::AIPlatform::V1::Sessionget_session 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 resource name of the session.
Format:
projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::Session)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::SessionService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::GetSessionRequest.new # Call the get_session method. result = client.get_session request # The returned object is of type Google::Cloud::AIPlatform::V1::Session. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::ClientGet the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> ClientCreate a new SessionService client object.
- (config) — Configure the SessionService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::AIPlatform::V1::SessionService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::AIPlatform::V1::SessionService::Client.new do |config| config.timeout = 10.0 end
#list_events
def list_events(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SessionEvent>
def list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SessionEvent>Lists Events in a given session.
def list_events(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SessionEvent>list_events via a request object, either of type
ListEventsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListEventsRequest, ::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_events(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SessionEvent>list_events 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 session to list events from.
Format:
projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session} - page_size (::Integer) — Optional. The maximum number of events to return. The service may return fewer than this value. If unspecified, at most 100 events will be returned. These events are ordered by timestamp in ascending order.
- page_token (::String) — Optional. The next_page_token value returned from a previous list SessionService.ListEvents call.
-
filter (::String) — Optional. The standard list filter.
Supported fields:
timestamprange (i.e.timestamp>="2025-01-31T11:30:00-04:00"where the timestamp is in RFC 3339 format)
More detail in AIP-160.
-
order_by (::String) — Optional. A comma-separated list of fields to order by, sorted in ascending
order. Use "desc" after a field name for descending. Supported fields:
timestamp
Example:
timestamp desc.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SessionEvent>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SessionEvent>)
- (::Google::Cloud::Error) — if the RPC 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::SessionService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListEventsRequest.new # Call the list_events method. result = client.list_events 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::SessionEvent. p item end
#list_sessions
def list_sessions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Session>
def list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Session>Lists Sessions in a given reasoning engine.
def list_sessions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Session>list_sessions via a request object, either of type
ListSessionsRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::ListSessionsRequest, ::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_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Session>list_sessions 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 list sessions from.
Format:
projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine} - page_size (::Integer) — Optional. The maximum number of sessions to return. The service may return fewer than this value. If unspecified, at most 100 sessions will be returned.
- page_token (::String) — Optional. The next_page_token value returned from a previous list SessionService.ListSessions call.
-
filter (::String) — Optional. The standard list filter.
Supported fields:
display_nameuser_idlabels
Example:
display_name="abc",user_id="123",labels.key="value". -
order_by (::String) — Optional. A comma-separated list of fields to order by, sorted in ascending
order. Use "desc" after a field name for descending. Supported fields:
create_timeupdate_time
Example:
create_time desc.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Session>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Session>)
- (::Google::Cloud::Error) — if the RPC 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::SessionService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::ListSessionsRequest.new # Call the list_sessions method. result = client.list_sessions 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::Session. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::AIPlatform::V1::SessionService::OperationsGet the associated client for long-running operations.
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)
#update_session
def update_session(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Session
def update_session(session: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::SessionUpdates the specific Session.
def update_session(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Sessionupdate_session via a request object, either of type
UpdateSessionRequest or an equivalent Hash.
- request (::Google::Cloud::AIPlatform::V1::UpdateSessionRequest, ::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_session(session: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::Sessionupdate_session 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).
-
session (::Google::Cloud::AIPlatform::V1::Session, ::Hash) — Required. The session to update.
Format:
projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session} - update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::AIPlatform::V1::Session)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::SessionService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::AIPlatform::V1::UpdateSessionRequest.new # Call the update_session method. result = client.update_session request # The returned object is of type Google::Cloud::AIPlatform::V1::Session. p result