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.
- (config) — Configure the Client client.
- config (Client::Configuration)
# 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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).
def create_tag_binding(request, options = nil) -> ::Gapic::Operation
create_tag_binding
via a request object, either of type
CreateTagBindingRequest or an equivalent Hash.
- 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
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).
- 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.
- (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.
#delete_tag_binding
def delete_tag_binding(request, options = nil) -> ::Gapic::Operation
def delete_tag_binding(name: nil) -> ::Gapic::Operation
Deletes a TagBinding.
def delete_tag_binding(request, options = nil) -> ::Gapic::Operation
delete_tag_binding
via a request object, either of type
DeleteTagBindingRequest or an equivalent Hash.
- 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
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).
-
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
).
- (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.
#initialize
def initialize() { |config| ... } -> Client
Create a new TagBindings REST client object.
- (config) — Configure the TagBindings client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# 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
def list_tag_bindings(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagBinding>
list_tag_bindings
via a request object, either of type
ListTagBindingsRequest or an equivalent Hash.
- 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>
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagBinding>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagBinding>)
- (::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.