Observability V1 API - Class Google::Cloud::Observability::V1::Observability::Client (v0.1.0)

Reference documentation and code samples for the Observability V1 API class Google::Cloud::Observability::V1::Observability::Client.

Client for the Observability service.

Service describing handlers for resources

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the Observability Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all Observability clients
::Google::Cloud::Observability::V1::Observability::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the Observability 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_bucket

def create_bucket(request, options = nil) -> ::Gapic::Operation
def create_bucket(parent: nil, bucket_id: nil, bucket: nil) -> ::Gapic::Operation

Create a new bucket.

Overloads
def create_bucket(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_bucket via a request object, either of type CreateBucketRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::CreateBucketRequest, ::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_bucket(parent: nil, bucket_id: nil, bucket: nil) -> ::Gapic::Operation
Pass arguments to create_bucket 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).
Parameters
  • parent (::String) —

    Required. Name of the project and location for the bucket. The format is:

    projects/[PROJECT_ID]/locations/[LOCATION]
    
  • bucket_id (::String) — Required. Id of the bucket to create.
  • bucket (::Google::Cloud::Observability::V1::Bucket, ::Hash) — Required. Bucket to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::CreateBucketRequest.new

# Call the create_bucket method.
result = client.create_bucket 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
def create_link(request, options = nil) -> ::Gapic::Operation
def create_link(parent: nil, link_id: nil, link: nil) -> ::Gapic::Operation

Create a new link.

Overloads
def create_link(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_link via a request object, either of type CreateLinkRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::CreateLinkRequest, ::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_link(parent: nil, link_id: nil, link: nil) -> ::Gapic::Operation
Pass arguments to create_link 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).
Parameters
  • parent (::String) —

    Required. Name of the containing dataset for this link. The format is:

    projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
    
  • link_id (::String) — Required. Id of the link to create.
  • link (::Google::Cloud::Observability::V1::Link, ::Hash) — Required. Link to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::CreateLinkRequest.new

# Call the create_link method.
result = client.create_link 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_trace_scope

def create_trace_scope(request, options = nil) -> ::Google::Cloud::Observability::V1::TraceScope
def create_trace_scope(parent: nil, trace_scope_id: nil, trace_scope: nil) -> ::Google::Cloud::Observability::V1::TraceScope

Create a new TraceScope.

Overloads
def create_trace_scope(request, options = nil) -> ::Google::Cloud::Observability::V1::TraceScope
Pass arguments to create_trace_scope via a request object, either of type CreateTraceScopeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::CreateTraceScopeRequest, ::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_trace_scope(parent: nil, trace_scope_id: nil, trace_scope: nil) -> ::Google::Cloud::Observability::V1::TraceScope
Pass arguments to create_trace_scope 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).
Parameters
  • parent (::String) —

    Required. The full resource name of the location where the trace scope should be created

    projects/[PROJECT_ID]/locations/[LOCATION_ID]
    

    For example:

    projects/my-project/locations/global
    
  • trace_scope_id (::String) — Required. A client-assigned identifier for the trace scope.
  • trace_scope (::Google::Cloud::Observability::V1::TraceScope, ::Hash) — Required. The new trace scope.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::CreateTraceScopeRequest.new

# Call the create_trace_scope method.
result = client.create_trace_scope request

# The returned object is of type Google::Cloud::Observability::V1::TraceScope.
p result
def delete_link(request, options = nil) -> ::Gapic::Operation
def delete_link(name: nil) -> ::Gapic::Operation

Delete a link.

Overloads
def delete_link(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_link via a request object, either of type DeleteLinkRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::DeleteLinkRequest, ::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_link(name: nil) -> ::Gapic::Operation
Pass arguments to delete_link 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).
Parameter
  • name (::String) —

    Required. Name of the link to delete. The format is:

    projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
    
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::DeleteLinkRequest.new

# Call the delete_link method.
result = client.delete_link 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_trace_scope

def delete_trace_scope(request, options = nil) -> ::Google::Protobuf::Empty
def delete_trace_scope(name: nil) -> ::Google::Protobuf::Empty

Delete a TraceScope.

Overloads
def delete_trace_scope(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_trace_scope via a request object, either of type DeleteTraceScopeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::DeleteTraceScopeRequest, ::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_trace_scope(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_trace_scope 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).
Parameter
  • name (::String) —

    Required. The full resource name of the trace scope to delete:

    projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
    

    For example:

    projects/my-project/locations/global/traceScopes/my-trace-scope
    
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::DeleteTraceScopeRequest.new

# Call the delete_trace_scope method.
result = client.delete_trace_scope request

# The returned object is of type Google::Protobuf::Empty.
p result

#get_bucket

def get_bucket(request, options = nil) -> ::Google::Cloud::Observability::V1::Bucket
def get_bucket(name: nil) -> ::Google::Cloud::Observability::V1::Bucket

Get bucket resource.

Overloads
def get_bucket(request, options = nil) -> ::Google::Cloud::Observability::V1::Bucket
Pass arguments to get_bucket via a request object, either of type GetBucketRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::GetBucketRequest, ::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_bucket(name: nil) -> ::Google::Cloud::Observability::V1::Bucket
Pass arguments to get_bucket 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).
Parameter
  • name (::String) —

    Required. Name of the bucket to retrieve. The format is:

    projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
    
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::GetBucketRequest.new

# Call the get_bucket method.
result = client.get_bucket request

# The returned object is of type Google::Cloud::Observability::V1::Bucket.
p result

#get_dataset

def get_dataset(request, options = nil) -> ::Google::Cloud::Observability::V1::Dataset
def get_dataset(name: nil) -> ::Google::Cloud::Observability::V1::Dataset

Get a dataset.

Overloads
def get_dataset(request, options = nil) -> ::Google::Cloud::Observability::V1::Dataset
Pass arguments to get_dataset via a request object, either of type GetDatasetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::GetDatasetRequest, ::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_dataset(name: nil) -> ::Google::Cloud::Observability::V1::Dataset
Pass arguments to get_dataset 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).
Parameter
  • name (::String) —

    Required. Name of the dataset to retrieve. The format is:

    projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
    
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::GetDatasetRequest.new

# Call the get_dataset method.
result = client.get_dataset request

# The returned object is of type Google::Cloud::Observability::V1::Dataset.
p result
def get_link(request, options = nil) -> ::Google::Cloud::Observability::V1::Link
def get_link(name: nil) -> ::Google::Cloud::Observability::V1::Link

Get a link.

Overloads
def get_link(request, options = nil) -> ::Google::Cloud::Observability::V1::Link
Pass arguments to get_link via a request object, either of type GetLinkRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::GetLinkRequest, ::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_link(name: nil) -> ::Google::Cloud::Observability::V1::Link
Pass arguments to get_link 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).
Parameter
  • name (::String) —

    Required. Name of the link to retrieve. The format is:

    projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
    
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::GetLinkRequest.new

# Call the get_link method.
result = client.get_link request

# The returned object is of type Google::Cloud::Observability::V1::Link.
p result

#get_scope

def get_scope(request, options = nil) -> ::Google::Cloud::Observability::V1::Scope
def get_scope(name: nil) -> ::Google::Cloud::Observability::V1::Scope

Gets details of a single Scope.

Overloads
def get_scope(request, options = nil) -> ::Google::Cloud::Observability::V1::Scope
Pass arguments to get_scope via a request object, either of type GetScopeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::GetScopeRequest, ::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_scope(name: nil) -> ::Google::Cloud::Observability::V1::Scope
Pass arguments to get_scope 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).
Parameter
  • name (::String) — Required. Name of the resource. The format is:

    projects/\\{project}/locations/\\{location}/scopes/\\{scope}
    

    The {location} field must be set to global. The {scope} field must be set to _Default.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::GetScopeRequest.new

# Call the get_scope method.
result = client.get_scope request

# The returned object is of type Google::Cloud::Observability::V1::Scope.
p result

#get_settings

def get_settings(request, options = nil) -> ::Google::Cloud::Observability::V1::Settings
def get_settings(name: nil) -> ::Google::Cloud::Observability::V1::Settings

Get Settings

Overloads
def get_settings(request, options = nil) -> ::Google::Cloud::Observability::V1::Settings
Pass arguments to get_settings via a request object, either of type GetSettingsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::GetSettingsRequest, ::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_settings(name: nil) -> ::Google::Cloud::Observability::V1::Settings
Pass arguments to get_settings 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).
Parameter
  • name (::String) —

    Required. Name of the settings to retrieve.

    Name format:

    "projects/[PROJECT_ID]/locations/[LOCATION]/settings"
    "folders/[FOLDER_ID]/locations/[LOCATION]/settings"
    "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings"
    
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::GetSettingsRequest.new

# Call the get_settings method.
result = client.get_settings request

# The returned object is of type Google::Cloud::Observability::V1::Settings.
p result

#get_trace_scope

def get_trace_scope(request, options = nil) -> ::Google::Cloud::Observability::V1::TraceScope
def get_trace_scope(name: nil) -> ::Google::Cloud::Observability::V1::TraceScope

Get TraceScope resource.

Overloads
def get_trace_scope(request, options = nil) -> ::Google::Cloud::Observability::V1::TraceScope
Pass arguments to get_trace_scope via a request object, either of type GetTraceScopeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::GetTraceScopeRequest, ::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_trace_scope(name: nil) -> ::Google::Cloud::Observability::V1::TraceScope
Pass arguments to get_trace_scope 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).
Parameter
  • name (::String) —

    Required. The resource name of the trace scope:

    projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
    

    For example:

    projects/my-project/locations/global/traceScopes/my-trace-scope
    
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::GetTraceScopeRequest.new

# Call the get_trace_scope method.
result = client.get_trace_scope request

# The returned object is of type Google::Cloud::Observability::V1::TraceScope.
p result

#get_view

def get_view(request, options = nil) -> ::Google::Cloud::Observability::V1::View
def get_view(name: nil) -> ::Google::Cloud::Observability::V1::View

Get a view.

Overloads
def get_view(request, options = nil) -> ::Google::Cloud::Observability::V1::View
Pass arguments to get_view via a request object, either of type GetViewRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::GetViewRequest, ::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_view(name: nil) -> ::Google::Cloud::Observability::V1::View
Pass arguments to get_view 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).
Parameter
  • name (::String) —

    Required. Name of the view to retrieve. The format is:

    projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID]
    
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::GetViewRequest.new

# Call the get_view method.
result = client.get_view request

# The returned object is of type Google::Cloud::Observability::V1::View.
p result

#initialize

def initialize() { |config| ... } -> Client

Create a new Observability client object.

Yields
  • (config) — Configure the Observability client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Observability::V1::Observability::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Observability::V1::Observability::Client.new do |config|
  config.timeout = 10.0
end

#list_buckets

def list_buckets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::Bucket>
def list_buckets(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::Bucket>

List buckets of a project in a particular location.

Overloads
def list_buckets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::Bucket>
Pass arguments to list_buckets via a request object, either of type ListBucketsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::ListBucketsRequest, ::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_buckets(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::Bucket>
Pass arguments to list_buckets 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).
Parameters
  • parent (::String) —

    Required. The parent, which owns this collection of buckets. The format is:

    projects/[PROJECT_ID]/locations/[LOCATION]
    
  • page_size (::Integer) — Optional. The maximum number of buckets to return. If unspecified, then at most 100 buckets are returned. The maximum value is 1000; values above 1000 are coerced to 1000.
  • page_token (::String) — Optional. A page token, received from a previous ListBuckets call. Provide this to retrieve the subsequent page.
  • show_deleted (::Boolean) — Optional. If true, then the response will include deleted buckets.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::ListBucketsRequest.new

# Call the list_buckets method.
result = client.list_buckets 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::Observability::V1::Bucket.
  p item
end

#list_datasets

def list_datasets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::Dataset>
def list_datasets(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::Dataset>

List datasets of a bucket.

Overloads
def list_datasets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::Dataset>
Pass arguments to list_datasets via a request object, either of type ListDatasetsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::ListDatasetsRequest, ::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_datasets(parent: nil, page_size: nil, page_token: nil, show_deleted: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::Dataset>
Pass arguments to list_datasets 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).
Parameters
  • parent (::String) —

    Required. The parent bucket that owns this collection of datasets. The format is:

    projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
    
  • page_size (::Integer) — Optional. The maximum number of datasets to return. If unspecified, then at most 100 datasets are returned. The maximum value is 1000; values above 1000 are coerced to 1000.
  • page_token (::String) — Optional. A page token, received from a previous ListDatasets call. Provide this to retrieve the subsequent page.
  • show_deleted (::Boolean) — Optional. If true, then the response will include deleted datasets.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::ListDatasetsRequest.new

# Call the list_datasets method.
result = client.list_datasets 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::Observability::V1::Dataset.
  p item
end
def list_links(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::Link>
def list_links(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::Link>

List links of a dataset.

Overloads
def list_links(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::Link>
Pass arguments to list_links via a request object, either of type ListLinksRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::ListLinksRequest, ::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_links(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::Link>
Pass arguments to list_links 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).
Parameters
  • parent (::String) —

    Required. The parent dataset that owns this collection of links. The format is:

    projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
    
  • page_size (::Integer) — Optional. The maximum number of links to return. If unspecified, then at most 100 links are returned. The maximum value is 1000; values above 1000 are coerced to 1000.
  • page_token (::String) — Optional. A page token, received from a previous ListLinks call. Provide this to retrieve the subsequent page.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::ListLinksRequest.new

# Call the list_links method.
result = client.list_links 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::Observability::V1::Link.
  p item
end

#list_trace_scopes

def list_trace_scopes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::TraceScope>
def list_trace_scopes(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::TraceScope>

List TraceScopes of a project in a particular location.

Overloads
def list_trace_scopes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::TraceScope>
Pass arguments to list_trace_scopes via a request object, either of type ListTraceScopesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::ListTraceScopesRequest, ::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_trace_scopes(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::TraceScope>
Pass arguments to list_trace_scopes 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).
Parameters
  • parent (::String) —

    Required. The full resource name of the location to look for trace scopes:

    projects/[PROJECT_ID]/locations/[LOCATION_ID]
    

    For example:

    projects/my-project/locations/global
    
  • page_size (::Integer) — Optional. The maximum number of results to return from this request.

    Non-positive values are ignored. The presence of next_page_token in the response indicates that more results might be available.

  • page_token (::String) — Optional. If present, then retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of other method parameters should be identical to those in the previous call.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::ListTraceScopesRequest.new

# Call the list_trace_scopes method.
result = client.list_trace_scopes 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::Observability::V1::TraceScope.
  p item
end

#list_views

def list_views(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::View>
def list_views(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::View>

List views of a dataset.

Overloads
def list_views(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::View>
Pass arguments to list_views via a request object, either of type ListViewsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::ListViewsRequest, ::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_views(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Observability::V1::View>
Pass arguments to list_views 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).
Parameters
  • parent (::String) —

    Required. Dataset whose views are to be listed. The format is:

    projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
    
  • page_size (::Integer) — Optional. The maximum number of views to return. If unspecified, then at most 100 views are returned. The maximum value is 1000; values above 1000 are coerced to 1000.
  • page_token (::String) — Optional. A page token, received from a previous ListViews call. Provide this to retrieve the subsequent page.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::ListViewsRequest.new

# Call the list_views method.
result = client.list_views 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::Observability::V1::View.
  p item
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Client)

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#operations_client

def operations_client() -> ::Google::Cloud::Observability::V1::Observability::Operations

Get the associated client for long-running operations.

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_bucket

def update_bucket(request, options = nil) -> ::Gapic::Operation
def update_bucket(bucket: nil, update_mask: nil) -> ::Gapic::Operation

Update a bucket.

Overloads
def update_bucket(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_bucket via a request object, either of type UpdateBucketRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::UpdateBucketRequest, ::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_bucket(bucket: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_bucket 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).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::UpdateBucketRequest.new

# Call the update_bucket method.
result = client.update_bucket 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
def update_link(request, options = nil) -> ::Gapic::Operation
def update_link(link: nil, update_mask: nil) -> ::Gapic::Operation

Update a link.

Overloads
def update_link(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_link via a request object, either of type UpdateLinkRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::UpdateLinkRequest, ::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_link(link: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_link 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).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::UpdateLinkRequest.new

# Call the update_link method.
result = client.update_link 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_scope

def update_scope(request, options = nil) -> ::Google::Cloud::Observability::V1::Scope
def update_scope(update_mask: nil, scope: nil) -> ::Google::Cloud::Observability::V1::Scope

Updates the parameters of a single Scope.

Overloads
def update_scope(request, options = nil) -> ::Google::Cloud::Observability::V1::Scope
Pass arguments to update_scope via a request object, either of type UpdateScopeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::UpdateScopeRequest, ::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_scope(update_mask: nil, scope: nil) -> ::Google::Cloud::Observability::V1::Scope
Pass arguments to update_scope 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).
Parameters
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask is used to specify the fields to be overwritten in the Scope resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten when it is in the mask. If the user does not provide a mask, then all fields present in the request are overwritten.
  • scope (::Google::Cloud::Observability::V1::Scope, ::Hash) — Required. The resource being updated.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::UpdateScopeRequest.new

# Call the update_scope method.
result = client.update_scope request

# The returned object is of type Google::Cloud::Observability::V1::Scope.
p result

#update_settings

def update_settings(request, options = nil) -> ::Gapic::Operation
def update_settings(settings: nil, update_mask: nil) -> ::Gapic::Operation

Update Settings

Overloads
def update_settings(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_settings via a request object, either of type UpdateSettingsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::UpdateSettingsRequest, ::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_settings(settings: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_settings 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).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::UpdateSettingsRequest.new

# Call the update_settings method.
result = client.update_settings 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_trace_scope

def update_trace_scope(request, options = nil) -> ::Google::Cloud::Observability::V1::TraceScope
def update_trace_scope(trace_scope: nil, update_mask: nil) -> ::Google::Cloud::Observability::V1::TraceScope

Update a TraceScope.

Overloads
def update_trace_scope(request, options = nil) -> ::Google::Cloud::Observability::V1::TraceScope
Pass arguments to update_trace_scope via a request object, either of type UpdateTraceScopeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Observability::V1::UpdateTraceScopeRequest, ::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_trace_scope(trace_scope: nil, update_mask: nil) -> ::Google::Cloud::Observability::V1::TraceScope
Pass arguments to update_trace_scope 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).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/observability/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Observability::V1::Observability::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Observability::V1::UpdateTraceScopeRequest.new

# Call the update_trace_scope method.
result = client.update_trace_scope request

# The returned object is of type Google::Cloud::Observability::V1::TraceScope.
p result