Class: Aws::ResourceGroups::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::ResourceGroups::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-resourcegroups/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.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#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_tags(params = {}) ⇒ Types::GetTagsOutput
Returns a list of tags that are associated with a resource group, specified by an ARN.
-
#group_resources(params = {}) ⇒ Types::GroupResourcesOutput
Adds the specified resources to the specified group.
-
#list_group_resources(params = {}) ⇒ Types::ListGroupResourcesOutput
Returns a list of ARNs of the resources that are members of a specified resource group.
-
#list_groups(params = {}) ⇒ Types::ListGroupsOutput
Returns a list of existing Resource Groups in your account.
-
#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.
-
#tag(params = {}) ⇒ Types::TagOutput
Adds tags to a resource group with the specified 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.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
385 386 387 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 385 def initialize(*args) super end |
Instance Method Details
#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
^
519 520 521 522 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 519 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
^
563 564 565 566 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 563 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.
584 585 586 587 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 584 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
^
626 627 628 629 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 626 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
^
682 683 684 685 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 682 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
^
730 731 732 733 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 730 def get_group_query(params = {}, = {}) req = build_request(:get_group_query, 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 ARN.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GetTags
^
770 771 772 773 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 770 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 use this operation with only resource groups that are configured with the following types:
AWS::EC2::HostManagement
AWS::EC2::CapacityReservationPool
Other resource group type and resource types aren't currently supported by this operation.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GroupResources
^
829 830 831 832 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 829 def group_resources(params = {}, = {}) req = build_request(:group_resources, params) req.send_request() end |
#list_group_resources(params = {}) ⇒ Types::ListGroupResourcesOutput
Returns a list of 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.
947 948 949 950 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 947 def list_group_resources(params = {}, = {}) req = build_request(:list_group_resources, 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.
1043 1044 1045 1046 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 1043 def list_groups(params = {}, = {}) req = build_request(:list_groups, 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
^
1106 1107 1108 1109 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 1106 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.
1183 1184 1185 1186 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 1183 def search_resources(params = {}, = {}) req = build_request(:search_resources, params) req.send_request() end |
#tag(params = {}) ⇒ Types::TagOutput
Adds tags to a resource group with the specified 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
^
1236 1237 1238 1239 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 1236 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
^
1290 1291 1292 1293 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 1290 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
^
1335 1336 1337 1338 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 1335 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
.
1375 1376 1377 1378 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 1375 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
^
1424 1425 1426 1427 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 1424 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
^
1485 1486 1487 1488 |
# File 'gems/aws-sdk-resourcegroups/lib/aws-sdk-resourcegroups/client.rb', line 1485 def update_group_query(params = {}, = {}) req = build_request(:update_group_query, params) req.send_request() end |