Class: Aws::ResourceGroupsTaggingAPI::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::ResourceGroupsTaggingAPI::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-resourcegroupstaggingapi/client.rb
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#get_resources(params = {}) ⇒ Types::GetResourcesOutput
Returns all the tagged resources that are associated with the specified tags (keys and values) located in the specified region for the AWS account.
-
#get_tag_keys(params = {}) ⇒ Types::GetTagKeysOutput
Returns all tag keys in the specified region for the AWS account.
-
#get_tag_values(params = {}) ⇒ Types::GetTagValuesOutput
Returns all tag values for the specified key in the specified region for the AWS account.
-
#tag_resources(params = {}) ⇒ Types::TagResourcesOutput
Applies one or more tags to the specified resources.
-
#untag_resources(params = {}) ⇒ Types::UntagResourcesOutput
Removes the specified tags from the specified resources.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(*args) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(*args) ⇒ Client
Returns a new instance of Client.
152 153 154 |
# File 'lib/aws-sdk-resourcegroupstaggingapi/client.rb', line 152 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
501 502 503 |
# File 'lib/aws-sdk-resourcegroupstaggingapi/client.rb', line 501 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
504 505 506 |
# File 'lib/aws-sdk-resourcegroupstaggingapi/client.rb', line 504 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
479 480 481 482 483 484 485 486 487 488 489 490 |
# File 'lib/aws-sdk-resourcegroupstaggingapi/client.rb', line 479 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-resourcegroupstaggingapi' context[:gem_version] = '1.0.0' Seahorse::Client::Request.new(handlers, context) end |
#get_resources(params = {}) ⇒ Types::GetResourcesOutput
Returns all the tagged resources that are associated with the specified tags (keys and values) located in the specified region for the AWS account. The tags and the resource types that you specify in the request are known as filters. The response includes all tags that are associated with the requested resources. If no filter is provided, this action returns a paginated resource list with the associated tags.
268 269 270 271 |
# File 'lib/aws-sdk-resourcegroupstaggingapi/client.rb', line 268 def get_resources(params = {}, = {}) req = build_request(:get_resources, params) req.send_request() end |
#get_tag_keys(params = {}) ⇒ Types::GetTagKeysOutput
Returns all tag keys in the specified region for the AWS account.
302 303 304 305 |
# File 'lib/aws-sdk-resourcegroupstaggingapi/client.rb', line 302 def get_tag_keys(params = {}, = {}) req = build_request(:get_tag_keys, params) req.send_request() end |
#get_tag_values(params = {}) ⇒ Types::GetTagValuesOutput
Returns all tag values for the specified key in the specified region for the AWS account.
342 343 344 345 |
# File 'lib/aws-sdk-resourcegroupstaggingapi/client.rb', line 342 def get_tag_values(params = {}, = {}) req = build_request(:get_tag_values, params) req.send_request() end |
#tag_resources(params = {}) ⇒ Types::TagResourcesOutput
Applies one or more tags to the specified resources. Note the following:
-
Not all resources can have tags. For a list of resources that support tagging, see [Supported Resources] in the *AWS Resource Groups and Tag Editor User Guide*.
-
Each resource can have up to 50 tags. For other limits, see [Tag Restrictions] in the *Amazon EC2 User Guide for Linux Instances*.
-
You can only tag resources that are located in the specified region for the AWS account.
-
To add tags to a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for adding tags. For more information, see [Obtaining Permissions for Tagging] in the *AWS Resource Groups and Tag Editor User Guide*.
[1]: docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/supported-resources.html [2]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-restrictions [3]: docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/obtaining-permissions-for-tagging.html
410 411 412 413 |
# File 'lib/aws-sdk-resourcegroupstaggingapi/client.rb', line 410 def tag_resources(params = {}, = {}) req = build_request(:tag_resources, params) req.send_request() end |
#untag_resources(params = {}) ⇒ Types::UntagResourcesOutput
Removes the specified tags from the specified resources. When you specify a tag key, the action removes both that key and its associated value. The operation succeeds even if you attempt to remove tags from a resource that were already removed. Note the following:
-
To remove tags from a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for removing tags. For more information, see [Obtaining Permissions for Tagging] in the *AWS Resource Groups and Tag Editor User Guide*.
-
You can only tag resources that are located in the specified region for the AWS account.
[1]: docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/obtaining-permissions-for-tagging.html
470 471 472 473 |
# File 'lib/aws-sdk-resourcegroupstaggingapi/client.rb', line 470 def untag_resources(params = {}, = {}) req = build_request(:untag_resources, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
494 495 496 |
# File 'lib/aws-sdk-resourcegroupstaggingapi/client.rb', line 494 def waiter_names [] end |