Reference documentation and code samples for the Cloud Workstations V1 API class Google::Cloud::Workstations::V1::Workstations::Rest::Client.
REST client for the Workstations service.
Service for interacting with Cloud Workstations.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the Workstations Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all Workstations clients ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the Workstations 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_workstation
def create_workstation(request, options = nil) -> ::Gapic::Operation
def create_workstation(parent: nil, workstation_id: nil, workstation: nil, validate_only: nil) -> ::Gapic::Operation
Creates a new workstation.
def create_workstation(request, options = nil) -> ::Gapic::Operation
create_workstation
via a request object, either of type
CreateWorkstationRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::CreateWorkstationRequest, ::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_workstation(parent: nil, workstation_id: nil, workstation: nil, validate_only: nil) -> ::Gapic::Operation
create_workstation
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. Parent resource name.
- workstation_id (::String) — Required. ID to use for the workstation.
- workstation (::Google::Cloud::Workstations::V1::Workstation, ::Hash) — Required. Workstation to create.
- validate_only (::Boolean) — Optional. If set, validate the request and preview the review, but do not actually apply 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/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::CreateWorkstationRequest.new # Call the create_workstation method. result = client.create_workstation 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
#create_workstation_cluster
def create_workstation_cluster(request, options = nil) -> ::Gapic::Operation
def create_workstation_cluster(parent: nil, workstation_cluster_id: nil, workstation_cluster: nil, validate_only: nil) -> ::Gapic::Operation
Creates a new workstation cluster.
def create_workstation_cluster(request, options = nil) -> ::Gapic::Operation
create_workstation_cluster
via a request object, either of type
CreateWorkstationClusterRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest, ::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_workstation_cluster(parent: nil, workstation_cluster_id: nil, workstation_cluster: nil, validate_only: nil) -> ::Gapic::Operation
create_workstation_cluster
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. Parent resource name.
- workstation_cluster_id (::String) — Required. ID to use for the workstation cluster.
- workstation_cluster (::Google::Cloud::Workstations::V1::WorkstationCluster, ::Hash) — Required. Workstation cluster to create.
- validate_only (::Boolean) — Optional. If set, validate the request and preview the review, but do not actually apply 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/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new # Call the create_workstation_cluster method. result = client.create_workstation_cluster 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
#create_workstation_config
def create_workstation_config(request, options = nil) -> ::Gapic::Operation
def create_workstation_config(parent: nil, workstation_config_id: nil, workstation_config: nil, validate_only: nil) -> ::Gapic::Operation
Creates a new workstation configuration.
def create_workstation_config(request, options = nil) -> ::Gapic::Operation
create_workstation_config
via a request object, either of type
CreateWorkstationConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest, ::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_workstation_config(parent: nil, workstation_config_id: nil, workstation_config: nil, validate_only: nil) -> ::Gapic::Operation
create_workstation_config
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. Parent resource name.
- workstation_config_id (::String) — Required. ID to use for the workstation configuration.
- workstation_config (::Google::Cloud::Workstations::V1::WorkstationConfig, ::Hash) — Required. Config to create.
- validate_only (::Boolean) — Optional. If set, validate the request and preview the review, but do not actually apply 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/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new # Call the create_workstation_config method. result = client.create_workstation_config 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_workstation
def delete_workstation(request, options = nil) -> ::Gapic::Operation
def delete_workstation(name: nil, validate_only: nil, etag: nil) -> ::Gapic::Operation
Deletes the specified workstation.
def delete_workstation(request, options = nil) -> ::Gapic::Operation
delete_workstation
via a request object, either of type
DeleteWorkstationRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::DeleteWorkstationRequest, ::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_workstation(name: nil, validate_only: nil, etag: nil) -> ::Gapic::Operation
delete_workstation
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. Name of the workstation to delete.
- validate_only (::Boolean) — Optional. If set, validate the request and preview the review, but do not actually apply it.
- etag (::String) — Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.
- (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/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new # Call the delete_workstation method. result = client.delete_workstation 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_workstation_cluster
def delete_workstation_cluster(request, options = nil) -> ::Gapic::Operation
def delete_workstation_cluster(name: nil, validate_only: nil, etag: nil, force: nil) -> ::Gapic::Operation
Deletes the specified workstation cluster.
def delete_workstation_cluster(request, options = nil) -> ::Gapic::Operation
delete_workstation_cluster
via a request object, either of type
DeleteWorkstationClusterRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest, ::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_workstation_cluster(name: nil, validate_only: nil, etag: nil, force: nil) -> ::Gapic::Operation
delete_workstation_cluster
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. Name of the workstation cluster to delete.
- validate_only (::Boolean) — Optional. If set, validate the request and preview the review, but do not apply it.
- etag (::String) — Optional. If set, the request will be rejected if the latest version of the workstation cluster on the server does not have this ETag.
- force (::Boolean) — Optional. If set, any workstation configurations and workstations in the workstation cluster are also deleted. Otherwise, the request only works if the workstation cluster has no configurations or workstations.
- (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/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new # Call the delete_workstation_cluster method. result = client.delete_workstation_cluster 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_workstation_config
def delete_workstation_config(request, options = nil) -> ::Gapic::Operation
def delete_workstation_config(name: nil, validate_only: nil, etag: nil, force: nil) -> ::Gapic::Operation
Deletes the specified workstation configuration.
def delete_workstation_config(request, options = nil) -> ::Gapic::Operation
delete_workstation_config
via a request object, either of type
DeleteWorkstationConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest, ::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_workstation_config(name: nil, validate_only: nil, etag: nil, force: nil) -> ::Gapic::Operation
delete_workstation_config
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. Name of the workstation configuration to delete.
- validate_only (::Boolean) — Optional. If set, validate the request and preview the review, but do not actually apply it.
- etag (::String) — Optional. If set, the request is rejected if the latest version of the workstation configuration on the server does not have this ETag.
- force (::Boolean) — Optional. If set, any workstations in the workstation configuration are also deleted. Otherwise, the request works only if the workstation configuration has no workstations.
- (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/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new # Call the delete_workstation_config method. result = client.delete_workstation_config 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
#generate_access_token
def generate_access_token(request, options = nil) -> ::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse
def generate_access_token(expire_time: nil, ttl: nil, workstation: nil) -> ::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse
Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.
def generate_access_token(request, options = nil) -> ::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse
generate_access_token
via a request object, either of type
GenerateAccessTokenRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest, ::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 generate_access_token(expire_time: nil, ttl: nil, workstation: nil) -> ::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse
generate_access_token
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).
- expire_time (::Google::Protobuf::Timestamp, ::Hash) — Desired expiration time of the access token. This value must be at most 24 hours in the future. If a value is not specified, the token's expiration time will be set to a default value of 1 hour in the future.
- ttl (::Google::Protobuf::Duration, ::Hash) — Desired lifetime duration of the access token. This value must be at most 24 hours. If a value is not specified, the token's lifetime will be set to a default value of 1 hour.
- workstation (::String) — Required. Name of the workstation for which the access token should be generated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new # Call the generate_access_token method. result = client.generate_access_token request # The returned object is of type Google::Cloud::Workstations::V1::GenerateAccessTokenResponse. p result
#get_workstation
def get_workstation(request, options = nil) -> ::Google::Cloud::Workstations::V1::Workstation
def get_workstation(name: nil) -> ::Google::Cloud::Workstations::V1::Workstation
Returns the requested workstation.
def get_workstation(request, options = nil) -> ::Google::Cloud::Workstations::V1::Workstation
get_workstation
via a request object, either of type
GetWorkstationRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::GetWorkstationRequest, ::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_workstation(name: nil) -> ::Google::Cloud::Workstations::V1::Workstation
get_workstation
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. Name of the requested resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Workstations::V1::Workstation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::GetWorkstationRequest.new # Call the get_workstation method. result = client.get_workstation request # The returned object is of type Google::Cloud::Workstations::V1::Workstation. p result
#get_workstation_cluster
def get_workstation_cluster(request, options = nil) -> ::Google::Cloud::Workstations::V1::WorkstationCluster
def get_workstation_cluster(name: nil) -> ::Google::Cloud::Workstations::V1::WorkstationCluster
Returns the requested workstation cluster.
def get_workstation_cluster(request, options = nil) -> ::Google::Cloud::Workstations::V1::WorkstationCluster
get_workstation_cluster
via a request object, either of type
GetWorkstationClusterRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest, ::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_workstation_cluster(name: nil) -> ::Google::Cloud::Workstations::V1::WorkstationCluster
get_workstation_cluster
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. Name of the requested resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Workstations::V1::WorkstationCluster)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new # Call the get_workstation_cluster method. result = client.get_workstation_cluster request # The returned object is of type Google::Cloud::Workstations::V1::WorkstationCluster. p result
#get_workstation_config
def get_workstation_config(request, options = nil) -> ::Google::Cloud::Workstations::V1::WorkstationConfig
def get_workstation_config(name: nil) -> ::Google::Cloud::Workstations::V1::WorkstationConfig
Returns the requested workstation configuration.
def get_workstation_config(request, options = nil) -> ::Google::Cloud::Workstations::V1::WorkstationConfig
get_workstation_config
via a request object, either of type
GetWorkstationConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest, ::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_workstation_config(name: nil) -> ::Google::Cloud::Workstations::V1::WorkstationConfig
get_workstation_config
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. Name of the requested resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Workstations::V1::WorkstationConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new # Call the get_workstation_config method. result = client.get_workstation_config request # The returned object is of type Google::Cloud::Workstations::V1::WorkstationConfig. 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 Workstations REST client object.
- (config) — Configure the Workstations client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| config.timeout = 10.0 end
#list_usable_workstation_configs
def list_usable_workstation_configs(request, options = nil) -> ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse
def list_usable_workstation_configs(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse
Returns all workstation configurations in the specified cluster on which the caller has the "workstations.workstation.create" permission.
def list_usable_workstation_configs(request, options = nil) -> ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse
list_usable_workstation_configs
via a request object, either of type
ListUsableWorkstationConfigsRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest, ::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_usable_workstation_configs(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse
list_usable_workstation_configs
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. Parent resource name.
- page_size (::Integer) — Optional. Maximum number of items to return.
- page_token (::String) — Optional. next_page_token value returned from a previous List request, if any.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.new # Call the list_usable_workstation_configs method. result = client.list_usable_workstation_configs 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::Workstations::V1::WorkstationConfig. p item end
#list_usable_workstations
def list_usable_workstations(request, options = nil) -> ::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse
def list_usable_workstations(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse
Returns all workstations using the specified workstation configuration on which the caller has the "workstations.workstations.use" permission.
def list_usable_workstations(request, options = nil) -> ::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse
list_usable_workstations
via a request object, either of type
ListUsableWorkstationsRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest, ::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_usable_workstations(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse
list_usable_workstations
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. Parent resource name.
- page_size (::Integer) — Optional. Maximum number of items to return.
- page_token (::String) — Optional. next_page_token value returned from a previous List request, if any.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.new # Call the list_usable_workstations method. result = client.list_usable_workstations 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::Workstations::V1::Workstation. p item end
#list_workstation_clusters
def list_workstation_clusters(request, options = nil) -> ::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse
def list_workstation_clusters(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse
Returns all workstation clusters in the specified location.
def list_workstation_clusters(request, options = nil) -> ::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse
list_workstation_clusters
via a request object, either of type
ListWorkstationClustersRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest, ::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_workstation_clusters(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse
list_workstation_clusters
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. Parent resource name.
- page_size (::Integer) — Optional. Maximum number of items to return.
- page_token (::String) — Optional. next_page_token value returned from a previous List request, if any.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new # Call the list_workstation_clusters method. result = client.list_workstation_clusters 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::Workstations::V1::WorkstationCluster. p item end
#list_workstation_configs
def list_workstation_configs(request, options = nil) -> ::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse
def list_workstation_configs(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse
Returns all workstation configurations in the specified cluster.
def list_workstation_configs(request, options = nil) -> ::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse
list_workstation_configs
via a request object, either of type
ListWorkstationConfigsRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest, ::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_workstation_configs(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse
list_workstation_configs
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. Parent resource name.
- page_size (::Integer) — Optional. Maximum number of items to return.
- page_token (::String) — Optional. next_page_token value returned from a previous List request, if any.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new # Call the list_workstation_configs method. result = client.list_workstation_configs 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::Workstations::V1::WorkstationConfig. p item end
#list_workstations
def list_workstations(request, options = nil) -> ::Google::Cloud::Workstations::V1::ListWorkstationsResponse
def list_workstations(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::Workstations::V1::ListWorkstationsResponse
Returns all Workstations using the specified workstation configuration.
def list_workstations(request, options = nil) -> ::Google::Cloud::Workstations::V1::ListWorkstationsResponse
list_workstations
via a request object, either of type
ListWorkstationsRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::ListWorkstationsRequest, ::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_workstations(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::Workstations::V1::ListWorkstationsResponse
list_workstations
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. Parent resource name.
- page_size (::Integer) — Optional. Maximum number of items to return.
- page_token (::String) — Optional. next_page_token value returned from a previous List request, if any.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Workstations::V1::ListWorkstationsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::ListWorkstationsRequest.new # Call the list_workstations method. result = client.list_workstations 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::Workstations::V1::Workstation. 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)
#operations_client
def operations_client() -> ::Google::Cloud::Workstations::V1::Workstations::Rest::Operations
Get the associated client for long-running operations.
#start_workstation
def start_workstation(request, options = nil) -> ::Gapic::Operation
def start_workstation(name: nil, validate_only: nil, etag: nil) -> ::Gapic::Operation
Starts running a workstation so that users can connect to it.
def start_workstation(request, options = nil) -> ::Gapic::Operation
start_workstation
via a request object, either of type
StartWorkstationRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::StartWorkstationRequest, ::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 start_workstation(name: nil, validate_only: nil, etag: nil) -> ::Gapic::Operation
start_workstation
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. Name of the workstation to start.
- validate_only (::Boolean) — Optional. If set, validate the request and preview the review, but do not actually apply it.
- etag (::String) — Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.
- (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/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::StartWorkstationRequest.new # Call the start_workstation method. result = client.start_workstation 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
#stop_workstation
def stop_workstation(request, options = nil) -> ::Gapic::Operation
def stop_workstation(name: nil, validate_only: nil, etag: nil) -> ::Gapic::Operation
Stops running a workstation, reducing costs.
def stop_workstation(request, options = nil) -> ::Gapic::Operation
stop_workstation
via a request object, either of type
StopWorkstationRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::StopWorkstationRequest, ::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 stop_workstation(name: nil, validate_only: nil, etag: nil) -> ::Gapic::Operation
stop_workstation
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. Name of the workstation to stop.
- validate_only (::Boolean) — Optional. If set, validate the request and preview the review, but do not actually apply it.
- etag (::String) — Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.
- (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/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::StopWorkstationRequest.new # Call the stop_workstation method. result = client.stop_workstation 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_workstation
def update_workstation(request, options = nil) -> ::Gapic::Operation
def update_workstation(workstation: nil, update_mask: nil, validate_only: nil, allow_missing: nil) -> ::Gapic::Operation
Updates an existing workstation.
def update_workstation(request, options = nil) -> ::Gapic::Operation
update_workstation
via a request object, either of type
UpdateWorkstationRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::UpdateWorkstationRequest, ::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_workstation(workstation: nil, update_mask: nil, validate_only: nil, allow_missing: nil) -> ::Gapic::Operation
update_workstation
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).
- workstation (::Google::Cloud::Workstations::V1::Workstation, ::Hash) — Required. Workstation to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Mask specifying which fields in the workstation configuration should be updated.
- validate_only (::Boolean) — Optional. If set, validate the request and preview the review, but do not actually apply it.
- allow_missing (::Boolean) — Optional. If set and the workstation configuration is not found, a new workstation configuration is created. In this situation, update_mask is ignored.
- (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/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new # Call the update_workstation method. result = client.update_workstation 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
#update_workstation_cluster
def update_workstation_cluster(request, options = nil) -> ::Gapic::Operation
def update_workstation_cluster(workstation_cluster: nil, update_mask: nil, validate_only: nil, allow_missing: nil) -> ::Gapic::Operation
Updates an existing workstation cluster.
def update_workstation_cluster(request, options = nil) -> ::Gapic::Operation
update_workstation_cluster
via a request object, either of type
UpdateWorkstationClusterRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest, ::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_workstation_cluster(workstation_cluster: nil, update_mask: nil, validate_only: nil, allow_missing: nil) -> ::Gapic::Operation
update_workstation_cluster
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).
- workstation_cluster (::Google::Cloud::Workstations::V1::WorkstationCluster, ::Hash) — Required. Workstation cluster to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Mask that specifies which fields in the workstation cluster should be updated.
- validate_only (::Boolean) — Optional. If set, validate the request and preview the review, but do not actually apply it.
- allow_missing (::Boolean) — Optional. If set, and the workstation cluster is not found, a new workstation cluster will be created. In this situation, update_mask is ignored.
- (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/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new # Call the update_workstation_cluster method. result = client.update_workstation_cluster 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
#update_workstation_config
def update_workstation_config(request, options = nil) -> ::Gapic::Operation
def update_workstation_config(workstation_config: nil, update_mask: nil, validate_only: nil, allow_missing: nil) -> ::Gapic::Operation
Updates an existing workstation configuration.
def update_workstation_config(request, options = nil) -> ::Gapic::Operation
update_workstation_config
via a request object, either of type
UpdateWorkstationConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest, ::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_workstation_config(workstation_config: nil, update_mask: nil, validate_only: nil, allow_missing: nil) -> ::Gapic::Operation
update_workstation_config
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).
- workstation_config (::Google::Cloud::Workstations::V1::WorkstationConfig, ::Hash) — Required. Config to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Mask specifying which fields in the workstation configuration should be updated.
- validate_only (::Boolean) — Optional. If set, validate the request and preview the review, but do not actually apply it.
- allow_missing (::Boolean) — Optional. If set and the workstation configuration is not found, a new workstation configuration will be created. In this situation, update_mask is ignored.
- (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/workstations/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new # Call the update_workstation_config method. result = client.update_workstation_config 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