Google Cloud Support V2BETA API - Class Google::Cloud::Support::V2beta::SupportEventSubscriptionService::Client (v0.7.0)

Reference documentation and code samples for the Google Cloud Support V2BETA API class Google::Cloud::Support::V2beta::SupportEventSubscriptionService::Client.

Client for the SupportEventSubscriptionService service.

Service for managing customer support event subscriptions.

Inherits

  • Object

Methods

.configure

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

Configure the SupportEventSubscriptionService 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 SupportEventSubscriptionService clients
::Google::Cloud::Support::V2beta::SupportEventSubscriptionService::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the SupportEventSubscriptionService 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_support_event_subscription

def create_support_event_subscription(request, options = nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
def create_support_event_subscription(parent: nil, support_event_subscription: nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription

Creates a support event subscription for an organization.

Overloads
def create_support_event_subscription(request, options = nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
Pass arguments to create_support_event_subscription via a request object, either of type CreateSupportEventSubscriptionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Support::V2beta::CreateSupportEventSubscriptionRequest, ::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_support_event_subscription(parent: nil, support_event_subscription: nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
Pass arguments to create_support_event_subscription 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 resource name where the support event subscription will be created. Format: organizations/{organization_id}
  • support_event_subscription (::Google::Cloud::Support::V2beta::SupportEventSubscription, ::Hash) — Required. The Pub/Sub configuration to create.
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/support/v2beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Support::V2beta::SupportEventSubscriptionService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Support::V2beta::CreateSupportEventSubscriptionRequest.new

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

# The returned object is of type Google::Cloud::Support::V2beta::SupportEventSubscription.
p result

#delete_support_event_subscription

def delete_support_event_subscription(request, options = nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
def delete_support_event_subscription(name: nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription

Soft deletes a support event subscription.

Overloads
def delete_support_event_subscription(request, options = nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
Pass arguments to delete_support_event_subscription via a request object, either of type DeleteSupportEventSubscriptionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Support::V2beta::DeleteSupportEventSubscriptionRequest, ::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_support_event_subscription(name: nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
Pass arguments to delete_support_event_subscription 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 name of the support event subscription to delete. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_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/support/v2beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Support::V2beta::SupportEventSubscriptionService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Support::V2beta::DeleteSupportEventSubscriptionRequest.new

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

# The returned object is of type Google::Cloud::Support::V2beta::SupportEventSubscription.
p result

#get_support_event_subscription

def get_support_event_subscription(request, options = nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
def get_support_event_subscription(name: nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription

Gets a support event subscription.

Overloads
def get_support_event_subscription(request, options = nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
Pass arguments to get_support_event_subscription via a request object, either of type GetSupportEventSubscriptionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Support::V2beta::GetSupportEventSubscriptionRequest, ::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_support_event_subscription(name: nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
Pass arguments to get_support_event_subscription 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 name of the support event subscription to retrieve. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_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/support/v2beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Support::V2beta::SupportEventSubscriptionService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Support::V2beta::GetSupportEventSubscriptionRequest.new

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

# The returned object is of type Google::Cloud::Support::V2beta::SupportEventSubscription.
p result

#initialize

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

Create a new SupportEventSubscriptionService client object.

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

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

#list_support_event_subscriptions

def list_support_event_subscriptions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::SupportEventSubscription>
def list_support_event_subscriptions(parent: nil, filter: nil, show_deleted: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::SupportEventSubscription>

Lists support event subscriptions.

Overloads
def list_support_event_subscriptions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::SupportEventSubscription>
Pass arguments to list_support_event_subscriptions via a request object, either of type ListSupportEventSubscriptionsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Support::V2beta::ListSupportEventSubscriptionsRequest, ::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_support_event_subscriptions(parent: nil, filter: nil, show_deleted: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Support::V2beta::SupportEventSubscription>
Pass arguments to list_support_event_subscriptions 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 fully qualified name of the Cloud resource to list support event subscriptions under. Format: organizations/{organization_id}
  • filter (::String) —

    Optional. Filter expression based on AIP-160. Supported fields:

    • pub_sub_topic
    • state

    Examples:

    • pub_sub_topic="projects/example-project/topics/example-topic"
    • state=WORKING
    • pub_sub_topic="projects/example-project/topics/example-topic" AND state=WORKING
  • show_deleted (::Boolean) — Optional. Whether to show deleted subscriptions. By default, deleted subscriptions are not returned.
  • page_size (::Integer) — Optional. The maximum number of support event subscriptions to return.
  • page_token (::String) — Optional. A token identifying the page of results to return. If unspecified, the first page is retrieved.

    When paginating, all other parameters provided to ListSupportEventSubscriptions must match the call that provided the page token.

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/support/v2beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Support::V2beta::SupportEventSubscriptionService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Support::V2beta::ListSupportEventSubscriptionsRequest.new

# Call the list_support_event_subscriptions method.
result = client.list_support_event_subscriptions 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::Support::V2beta::SupportEventSubscription.
  p item
end

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#undelete_support_event_subscription

def undelete_support_event_subscription(request, options = nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
def undelete_support_event_subscription(name: nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription

Undeletes a support event subscription.

Overloads
def undelete_support_event_subscription(request, options = nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
Pass arguments to undelete_support_event_subscription via a request object, either of type UndeleteSupportEventSubscriptionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Support::V2beta::UndeleteSupportEventSubscriptionRequest, ::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 undelete_support_event_subscription(name: nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
Pass arguments to undelete_support_event_subscription 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 name of the support event subscription to undelete. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_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/support/v2beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Support::V2beta::SupportEventSubscriptionService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Support::V2beta::UndeleteSupportEventSubscriptionRequest.new

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

# The returned object is of type Google::Cloud::Support::V2beta::SupportEventSubscription.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_support_event_subscription

def update_support_event_subscription(request, options = nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
def update_support_event_subscription(support_event_subscription: nil, update_mask: nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription

Updates a support event subscription.

Overloads
def update_support_event_subscription(request, options = nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
Pass arguments to update_support_event_subscription via a request object, either of type UpdateSupportEventSubscriptionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Support::V2beta::UpdateSupportEventSubscriptionRequest, ::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_support_event_subscription(support_event_subscription: nil, update_mask: nil) -> ::Google::Cloud::Support::V2beta::SupportEventSubscription
Pass arguments to update_support_event_subscription 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/support/v2beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Support::V2beta::SupportEventSubscriptionService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Support::V2beta::UpdateSupportEventSubscriptionRequest.new

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

# The returned object is of type Google::Cloud::Support::V2beta::SupportEventSubscription.
p result