Resource Manager V3 API - Class Google::Cloud::ResourceManager::V3::TagBindings::Rest::Client (v0.4.0)

Reference documentation and code samples for the Resource Manager V3 API class Google::Cloud::ResourceManager::V3::TagBindings::Rest::Client.

REST client for the TagBindings service.

Allow users to create and manage TagBindings between TagValues and different cloud resources throughout the GCP resource hierarchy.

Inherits

  • Object

Methods

.configure

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

Configure the TagBindings 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 TagBindings clients
::Google::Cloud::ResourceManager::V3::TagBindings::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the TagBindings 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_tag_binding

def create_tag_binding(request, options = nil) -> ::Gapic::Operation
def create_tag_binding(tag_binding: nil, validate_only: nil) -> ::Gapic::Operation

Creates a TagBinding between a TagValue and a cloud resource (currently project, folder, or organization).

Overloads
def create_tag_binding(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_tag_binding via a request object, either of type CreateTagBindingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ResourceManager::V3::CreateTagBindingRequest, ::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_tag_binding(tag_binding: nil, validate_only: nil) -> ::Gapic::Operation
Pass arguments to create_tag_binding 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
  • tag_binding (::Google::Cloud::ResourceManager::V3::TagBinding, ::Hash) — Required. The TagBinding to be created.
  • validate_only (::Boolean) — Optional. Set to true to perform the validations necessary for creating the resource, but not actually perform the action.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#delete_tag_binding

def delete_tag_binding(request, options = nil) -> ::Gapic::Operation
def delete_tag_binding(name: nil) -> ::Gapic::Operation

Deletes a TagBinding.

Overloads
def delete_tag_binding(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_tag_binding via a request object, either of type DeleteTagBindingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ResourceManager::V3::DeleteTagBindingRequest, ::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_tag_binding(name: nil) -> ::Gapic::Operation
Pass arguments to delete_tag_binding 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 TagBinding. This is a String of the form: tagBindings/{id} (e.g. tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456).
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#initialize

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

Create a new TagBindings REST client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::ResourceManager::V3::TagBindings::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_tag_bindings

def list_tag_bindings(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagBinding>
def list_tag_bindings(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagBinding>

Lists the TagBindings for the given cloud resource, as specified with parent.

NOTE: The parent field is expected to be a full resource name: https://cloud.google.com/apis/design/resource_names#full_resource_name

Overloads
def list_tag_bindings(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagBinding>
Pass arguments to list_tag_bindings via a request object, either of type ListTagBindingsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ResourceManager::V3::ListTagBindingsRequest, ::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_tag_bindings(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagBinding>
Pass arguments to list_tag_bindings 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 a resource for which you want to list existing TagBindings. E.g. "//cloudresourcemanager.googleapis.com/projects/123"
  • page_size (::Integer) — Optional. The maximum number of TagBindings to return in the response. The server allows a maximum of 300 TagBindings to return. If unspecified, the server will use 100 as the default.
  • page_token (::String) — Optional. A pagination token returned from a previous call to ListTagBindings that indicates where this listing should continue from.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#operations_client

def operations_client() -> ::Google::Cloud::ResourceManager::V3::TagBindings::Rest::Operations

Get the associated client for long-running operations.