Class: Aws::ResourceGroups::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::ResourceGroups::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-resourcegroups/client.rb
Overview
An API client for ResourceGroups. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::ResourceGroups::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#cancel_tag_sync_task(params = {}) ⇒ Struct
Cancels the specified tag-sync task.
-
#create_group(params = {}) ⇒ Types::CreateGroupOutput
Creates a resource group with the specified name and description.
-
#delete_group(params = {}) ⇒ Types::DeleteGroupOutput
Deletes the specified resource group.
-
#get_account_settings(params = {}) ⇒ Types::GetAccountSettingsOutput
Retrieves the current status of optional features in Resource Groups.
-
#get_group(params = {}) ⇒ Types::GetGroupOutput
Returns information about a specified resource group.
-
#get_group_configuration(params = {}) ⇒ Types::GetGroupConfigurationOutput
Retrieves the service configuration associated with the specified resource group.
-
#get_group_query(params = {}) ⇒ Types::GetGroupQueryOutput
Retrieves the resource query associated with the specified resource group.
-
#get_tag_sync_task(params = {}) ⇒ Types::GetTagSyncTaskOutput
Returns information about a specified tag-sync task.
-
#get_tags(params = {}) ⇒ Types::GetTagsOutput
Returns a list of tags that are associated with a resource group, specified by an Amazon resource name (ARN).
-
#group_resources(params = {}) ⇒ Types::GroupResourcesOutput
Adds the specified resources to the specified group.
-
#list_group_resources(params = {}) ⇒ Types::ListGroupResourcesOutput
Returns a list of Amazon resource names (ARNs) of the resources that are members of a specified resource group.
-
#list_grouping_statuses(params = {}) ⇒ Types::ListGroupingStatusesOutput
Returns the status of the last grouping or ungrouping action for each resource in the specified application group.
-
#list_groups(params = {}) ⇒ Types::ListGroupsOutput
Returns a list of existing Resource Groups in your account.
-
#list_tag_sync_tasks(params = {}) ⇒ Types::ListTagSyncTasksOutput
Returns a list of tag-sync tasks.
-
#put_group_configuration(params = {}) ⇒ Struct
Attaches a service configuration to the specified group.
-
#search_resources(params = {}) ⇒ Types::SearchResourcesOutput
Returns a list of Amazon Web Services resource identifiers that matches the specified query.
-
#start_tag_sync_task(params = {}) ⇒ Types::StartTagSyncTaskOutput
Creates a new tag-sync task to onboard and sync resources tagged with a specific tag key-value pair to an application.
-
#tag(params = {}) ⇒ Types::TagOutput
Adds tags to a resource group with the specified Amazon resource name (ARN).
-
#ungroup_resources(params = {}) ⇒ Types::UngroupResourcesOutput
Removes the specified resources from the specified group.
-
#untag(params = {}) ⇒ Types::UntagOutput
Deletes tags from a specified resource group.
-
#update_account_settings(params = {}) ⇒ Types::UpdateAccountSettingsOutput
Turns on or turns off optional features in Resource Groups.
-
#update_group(params = {}) ⇒ Types::UpdateGroupOutput
Updates the description for an existing group.
-
#update_group_query(params = {}) ⇒ Types::UpdateGroupQueryOutput
Updates the resource query of a group.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
467 468 469 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 467 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.
1961 1962 1963 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1961 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.
1964 1965 1966 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1964 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.
1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1934 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::ResourceGroups') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-resourcegroups' context[:gem_version] = '1.77.0' Seahorse::Client::Request.new(handlers, context) end |
#cancel_tag_sync_task(params = {}) ⇒ Struct
Cancels the specified tag-sync task.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:CancelTagSyncTask` on the application group
-
‘resource-groups:DeleteGroup`
498 499 500 501 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 498 def cancel_tag_sync_task(params = {}, = {}) req = build_request(:cancel_tag_sync_task, params) req.send_request() end |
#create_group(params = {}) ⇒ Types::CreateGroupOutput
Creates a resource group with the specified name and description. You can optionally include either a resource query or a service configuration. For more information about constructing a resource query, see [Build queries and groups in Resource Groups] in the *Resource Groups User Guide*. For more information about service-linked groups and service configurations, see [Service configurations for Resource Groups].
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:CreateGroup`
^
[1]: docs.aws.amazon.com/ARG/latest/userguide/getting_started-query.html [2]: docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html
652 653 654 655 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 652 def create_group(params = {}, = {}) req = build_request(:create_group, params) req.send_request() end |
#delete_group(params = {}) ⇒ Types::DeleteGroupOutput
Deletes the specified resource group. Deleting a resource group does not delete any resources that are members of the group; it only deletes the group structure.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:DeleteGroup`
^
702 703 704 705 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 702 def delete_group(params = {}, = {}) req = build_request(:delete_group, params) req.send_request() end |
#get_account_settings(params = {}) ⇒ Types::GetAccountSettingsOutput
Retrieves the current status of optional features in Resource Groups.
723 724 725 726 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 723 def get_account_settings(params = {}, = {}) req = build_request(:get_account_settings, params) req.send_request() end |
#get_group(params = {}) ⇒ Types::GetGroupOutput
Returns information about a specified resource group.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:GetGroup`
^
771 772 773 774 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 771 def get_group(params = {}, = {}) req = build_request(:get_group, params) req.send_request() end |
#get_group_configuration(params = {}) ⇒ Types::GetGroupConfigurationOutput
Retrieves the service configuration associated with the specified resource group. For details about the service configuration syntax, see [Service configurations for Resource Groups].
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:GetGroupConfiguration`
^
[1]: docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html
827 828 829 830 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 827 def get_group_configuration(params = {}, = {}) req = build_request(:get_group_configuration, params) req.send_request() end |
#get_group_query(params = {}) ⇒ Types::GetGroupQueryOutput
Retrieves the resource query associated with the specified resource group. For more information about resource queries, see [Create a tag-based group in Resource Groups].
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:GetGroupQuery`
^
[1]: docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag
876 877 878 879 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 876 def get_group_query(params = {}, = {}) req = build_request(:get_group_query, params) req.send_request() end |
#get_tag_sync_task(params = {}) ⇒ Types::GetTagSyncTaskOutput
Returns information about a specified tag-sync task.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:GetTagSyncTask` on the application group
^
928 929 930 931 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 928 def get_tag_sync_task(params = {}, = {}) req = build_request(:get_tag_sync_task, params) req.send_request() end |
#get_tags(params = {}) ⇒ Types::GetTagsOutput
Returns a list of tags that are associated with a resource group, specified by an Amazon resource name (ARN).
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:GetTags`
^
969 970 971 972 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 969 def (params = {}, = {}) req = build_request(:get_tags, params) req.send_request() end |
#group_resources(params = {}) ⇒ Types::GroupResourcesOutput
Adds the specified resources to the specified group.
You can only use this operation with the following groups:
* `AWS::EC2::HostManagement`
-
‘AWS::EC2::CapacityReservationPool`
-
‘AWS::ResourceGroups::ApplicationGroup`
Other resource group types and resource types are not currently
supported by this operation.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:GroupResources`
^
1031 1032 1033 1034 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1031 def group_resources(params = {}, = {}) req = build_request(:group_resources, params) req.send_request() end |
#list_group_resources(params = {}) ⇒ Types::ListGroupResourcesOutput
Returns a list of Amazon resource names (ARNs) of the resources that are members of a specified resource group.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:ListGroupResources`
-
‘cloudformation:DescribeStacks`
-
‘cloudformation:ListStackResources`
-
‘tag:GetResources`
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1149 1150 1151 1152 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1149 def list_group_resources(params = {}, = {}) req = build_request(:list_group_resources, params) req.send_request() end |
#list_grouping_statuses(params = {}) ⇒ Types::ListGroupingStatusesOutput
Returns the status of the last grouping or ungrouping action for each resource in the specified application group.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1214 1215 1216 1217 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1214 def list_grouping_statuses(params = {}, = {}) req = build_request(:list_grouping_statuses, params) req.send_request() end |
#list_groups(params = {}) ⇒ Types::ListGroupsOutput
Returns a list of existing Resource Groups in your account.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:ListGroups`
^
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1321 1322 1323 1324 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1321 def list_groups(params = {}, = {}) req = build_request(:list_groups, params) req.send_request() end |
#list_tag_sync_tasks(params = {}) ⇒ Types::ListTagSyncTasksOutput
Returns a list of tag-sync tasks.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:ListTagSyncTasks` with the group passed in the filters as the resource or * if using no filters
^
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1389 1390 1391 1392 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1389 def list_tag_sync_tasks(params = {}, = {}) req = build_request(:list_tag_sync_tasks, params) req.send_request() end |
#put_group_configuration(params = {}) ⇒ Struct
Attaches a service configuration to the specified group. This occurs asynchronously, and can take time to complete. You can use GetGroupConfiguration to check the status of the update.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:PutGroupConfiguration`
^
1452 1453 1454 1455 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1452 def put_group_configuration(params = {}, = {}) req = build_request(:put_group_configuration, params) req.send_request() end |
#search_resources(params = {}) ⇒ Types::SearchResourcesOutput
Returns a list of Amazon Web Services resource identifiers that matches the specified query. The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery operation.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:SearchResources`
-
‘cloudformation:DescribeStacks`
-
‘cloudformation:ListStackResources`
-
‘tag:GetResources`
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1529 1530 1531 1532 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1529 def search_resources(params = {}, = {}) req = build_request(:search_resources, params) req.send_request() end |
#start_tag_sync_task(params = {}) ⇒ Types::StartTagSyncTaskOutput
Creates a new tag-sync task to onboard and sync resources tagged with a specific tag key-value pair to an application.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:StartTagSyncTask` on the application group
-
‘resource-groups:CreateGroup`
-
‘iam:PassRole` on the role provided in the request
1596 1597 1598 1599 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1596 def start_tag_sync_task(params = {}, = {}) req = build_request(:start_tag_sync_task, params) req.send_request() end |
#tag(params = {}) ⇒ Types::TagOutput
Adds tags to a resource group with the specified Amazon resource name (ARN). Existing tags on a resource group are not changed if they are not specified in the request parameters.
Do not store personally identifiable information (PII) or other confidential or sensitive information in tags. We use tags to provide you with billing and administration services. Tags are not intended to be used for private or sensitive data.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:Tag`
^
1650 1651 1652 1653 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1650 def tag(params = {}, = {}) req = build_request(:tag, params) req.send_request() end |
#ungroup_resources(params = {}) ⇒ Types::UngroupResourcesOutput
Removes the specified resources from the specified group. This operation works only with static groups that you populated using the GroupResources operation. It doesn’t work with any resource groups that are automatically populated by tag-based or CloudFormation stack-based queries.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:UngroupResources`
^
1705 1706 1707 1708 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1705 def ungroup_resources(params = {}, = {}) req = build_request(:ungroup_resources, params) req.send_request() end |
#untag(params = {}) ⇒ Types::UntagOutput
Deletes tags from a specified resource group.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:Untag`
^
1750 1751 1752 1753 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1750 def untag(params = {}, = {}) req = build_request(:untag, params) req.send_request() end |
#update_account_settings(params = {}) ⇒ Types::UpdateAccountSettingsOutput
Turns on or turns off optional features in Resource Groups.
The preceding example shows that the request to turn on group lifecycle events is ‘IN_PROGRESS`. You can call the GetAccountSettings operation to check for completion by looking for `GroupLifecycleEventsStatus` to change to `ACTIVE`.
1793 1794 1795 1796 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1793 def update_account_settings(params = {}, = {}) req = build_request(:update_account_settings, params) req.send_request() end |
#update_group(params = {}) ⇒ Types::UpdateGroupOutput
Updates the description for an existing group. You cannot update the name of a resource group.
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:UpdateGroup`
^
1863 1864 1865 1866 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1863 def update_group(params = {}, = {}) req = build_request(:update_group, params) req.send_request() end |
#update_group_query(params = {}) ⇒ Types::UpdateGroupQueryOutput
Updates the resource query of a group. For more information about resource queries, see [Create a tag-based group in Resource Groups].
**Minimum permissions**
To run this command, you must have the following permissions:
-
‘resource-groups:UpdateGroupQuery`
^
[1]: docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag
1925 1926 1927 1928 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1925 def update_group_query(params = {}, = {}) req = build_request(:update_group_query, 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.
1954 1955 1956 |
# File 'lib/aws-sdk-resourcegroups/client.rb', line 1954 def waiter_names [] end |