@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface ResourceGroupsClient extends AwsClient
builder() method.
Resource Groups lets you organize Amazon Web Services resources such as Amazon Elastic Compute Cloud instances, Amazon Relational Database Service databases, and Amazon Simple Storage Service buckets into groups using criteria that you define as tags. A resource group is a collection of resources that match the resource types specified in a query, and share one or more tags or portions of tags. You can create a group of resources based on their roles in your cloud infrastructure, lifecycle stages, regions, application layers, or virtually any criteria. Resource Groups enable you to automate management tasks, such as those in Amazon Web Services Systems Manager Automation documents, on tag-related resources in Amazon Web Services Systems Manager. Groups of tagged resources also let you quickly view a custom console in Amazon Web Services Systems Manager that shows Config compliance and other monitoring data about member resources.
To create a resource group, build a resource query, and specify tags that identify the criteria that members of the group have in common. Tags are key-value pairs.
For more information about Resource Groups, see the Resource Groups User Guide.
Resource Groups uses a REST-compliant API that you can use to perform the following types of operations.
Create, Read, Update, and Delete (CRUD) operations on resource groups and resource query entities
Applying, editing, and removing tags from resource groups
Resolving resource group member ARNs so they can be returned as search results
Getting data about resources that are members of a group
Searching Amazon Web Services resources based on a resource query
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static ResourceGroupsClientBuilder |
builder()
Create a builder that can be used to configure and create a
ResourceGroupsClient. |
static ResourceGroupsClient |
create()
Create a
ResourceGroupsClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default CreateGroupResponse |
createGroup(Consumer<CreateGroupRequest.Builder> createGroupRequest)
Creates a resource group with the specified name and description.
|
default CreateGroupResponse |
createGroup(CreateGroupRequest createGroupRequest)
Creates a resource group with the specified name and description.
|
default DeleteGroupResponse |
deleteGroup(Consumer<DeleteGroupRequest.Builder> deleteGroupRequest)
Deletes the specified resource group.
|
default DeleteGroupResponse |
deleteGroup(DeleteGroupRequest deleteGroupRequest)
Deletes the specified resource group.
|
default GetAccountSettingsResponse |
getAccountSettings(Consumer<GetAccountSettingsRequest.Builder> getAccountSettingsRequest)
Retrieves the current status of optional features in Resource Groups.
|
default GetAccountSettingsResponse |
getAccountSettings(GetAccountSettingsRequest getAccountSettingsRequest)
Retrieves the current status of optional features in Resource Groups.
|
default GetGroupResponse |
getGroup(Consumer<GetGroupRequest.Builder> getGroupRequest)
Returns information about a specified resource group.
|
default GetGroupResponse |
getGroup(GetGroupRequest getGroupRequest)
Returns information about a specified resource group.
|
default GetGroupConfigurationResponse |
getGroupConfiguration(Consumer<GetGroupConfigurationRequest.Builder> getGroupConfigurationRequest)
Retrieves the service configuration associated with the specified resource group.
|
default GetGroupConfigurationResponse |
getGroupConfiguration(GetGroupConfigurationRequest getGroupConfigurationRequest)
Retrieves the service configuration associated with the specified resource group.
|
default GetGroupQueryResponse |
getGroupQuery(Consumer<GetGroupQueryRequest.Builder> getGroupQueryRequest)
Retrieves the resource query associated with the specified resource group.
|
default GetGroupQueryResponse |
getGroupQuery(GetGroupQueryRequest getGroupQueryRequest)
Retrieves the resource query associated with the specified resource group.
|
default GetTagsResponse |
getTags(Consumer<GetTagsRequest.Builder> getTagsRequest)
Returns a list of tags that are associated with a resource group, specified by an ARN.
|
default GetTagsResponse |
getTags(GetTagsRequest getTagsRequest)
Returns a list of tags that are associated with a resource group, specified by an ARN.
|
default GroupResourcesResponse |
groupResources(Consumer<GroupResourcesRequest.Builder> groupResourcesRequest)
Adds the specified resources to the specified group.
|
default GroupResourcesResponse |
groupResources(GroupResourcesRequest groupResourcesRequest)
Adds the specified resources to the specified group.
|
default ListGroupResourcesResponse |
listGroupResources(Consumer<ListGroupResourcesRequest.Builder> listGroupResourcesRequest)
Returns a list of ARNs of the resources that are members of a specified resource group.
|
default ListGroupResourcesResponse |
listGroupResources(ListGroupResourcesRequest listGroupResourcesRequest)
Returns a list of ARNs of the resources that are members of a specified resource group.
|
default ListGroupResourcesIterable |
listGroupResourcesPaginator(Consumer<ListGroupResourcesRequest.Builder> listGroupResourcesRequest)
Returns a list of ARNs of the resources that are members of a specified resource group.
|
default ListGroupResourcesIterable |
listGroupResourcesPaginator(ListGroupResourcesRequest listGroupResourcesRequest)
Returns a list of ARNs of the resources that are members of a specified resource group.
|
default ListGroupsResponse |
listGroups()
Returns a list of existing Resource Groups in your account.
|
default ListGroupsResponse |
listGroups(Consumer<ListGroupsRequest.Builder> listGroupsRequest)
Returns a list of existing Resource Groups in your account.
|
default ListGroupsResponse |
listGroups(ListGroupsRequest listGroupsRequest)
Returns a list of existing Resource Groups in your account.
|
default ListGroupsIterable |
listGroupsPaginator()
Returns a list of existing Resource Groups in your account.
|
default ListGroupsIterable |
listGroupsPaginator(Consumer<ListGroupsRequest.Builder> listGroupsRequest)
Returns a list of existing Resource Groups in your account.
|
default ListGroupsIterable |
listGroupsPaginator(ListGroupsRequest listGroupsRequest)
Returns a list of existing Resource Groups in your account.
|
default PutGroupConfigurationResponse |
putGroupConfiguration(Consumer<PutGroupConfigurationRequest.Builder> putGroupConfigurationRequest)
Attaches a service configuration to the specified group.
|
default PutGroupConfigurationResponse |
putGroupConfiguration(PutGroupConfigurationRequest putGroupConfigurationRequest)
Attaches a service configuration to the specified group.
|
default SearchResourcesResponse |
searchResources(Consumer<SearchResourcesRequest.Builder> searchResourcesRequest)
Returns a list of Amazon Web Services resource identifiers that matches the specified query.
|
default SearchResourcesResponse |
searchResources(SearchResourcesRequest searchResourcesRequest)
Returns a list of Amazon Web Services resource identifiers that matches the specified query.
|
default SearchResourcesIterable |
searchResourcesPaginator(Consumer<SearchResourcesRequest.Builder> searchResourcesRequest)
Returns a list of Amazon Web Services resource identifiers that matches the specified query.
|
default SearchResourcesIterable |
searchResourcesPaginator(SearchResourcesRequest searchResourcesRequest)
Returns a list of Amazon Web Services resource identifiers that matches the specified query.
|
default ResourceGroupsServiceClientConfiguration |
serviceClientConfiguration() |
static ServiceMetadata |
serviceMetadata() |
default TagResponse |
tag(Consumer<TagRequest.Builder> tagRequest)
Adds tags to a resource group with the specified ARN.
|
default TagResponse |
tag(TagRequest tagRequest)
Adds tags to a resource group with the specified ARN.
|
default UngroupResourcesResponse |
ungroupResources(Consumer<UngroupResourcesRequest.Builder> ungroupResourcesRequest)
Removes the specified resources from the specified group.
|
default UngroupResourcesResponse |
ungroupResources(UngroupResourcesRequest ungroupResourcesRequest)
Removes the specified resources from the specified group.
|
default UntagResponse |
untag(Consumer<UntagRequest.Builder> untagRequest)
Deletes tags from a specified resource group.
|
default UntagResponse |
untag(UntagRequest untagRequest)
Deletes tags from a specified resource group.
|
default UpdateAccountSettingsResponse |
updateAccountSettings(Consumer<UpdateAccountSettingsRequest.Builder> updateAccountSettingsRequest)
Turns on or turns off optional features in Resource Groups.
|
default UpdateAccountSettingsResponse |
updateAccountSettings(UpdateAccountSettingsRequest updateAccountSettingsRequest)
Turns on or turns off optional features in Resource Groups.
|
default UpdateGroupResponse |
updateGroup(Consumer<UpdateGroupRequest.Builder> updateGroupRequest)
Updates the description for an existing group.
|
default UpdateGroupResponse |
updateGroup(UpdateGroupRequest updateGroupRequest)
Updates the description for an existing group.
|
default UpdateGroupQueryResponse |
updateGroupQuery(Consumer<UpdateGroupQueryRequest.Builder> updateGroupQueryRequest)
Updates the resource query of a group.
|
default UpdateGroupQueryResponse |
updateGroupQuery(UpdateGroupQueryRequest updateGroupQueryRequest)
Updates the resource query of a group.
|
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.default CreateGroupResponse createGroup(CreateGroupRequest createGroupRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
createGroupRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault CreateGroupResponse createGroup(Consumer<CreateGroupRequest.Builder> createGroupRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the CreateGroupRequest.Builder avoiding the need to
create one manually via CreateGroupRequest.builder()
createGroupRequest - A Consumer that will call methods on CreateGroupInput.Builder to create a request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DeleteGroupResponse deleteGroup(DeleteGroupRequest deleteGroupRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
deleteGroupRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DeleteGroupResponse deleteGroup(Consumer<DeleteGroupRequest.Builder> deleteGroupRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the DeleteGroupRequest.Builder avoiding the need to
create one manually via DeleteGroupRequest.builder()
deleteGroupRequest - A Consumer that will call methods on DeleteGroupInput.Builder to create a request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetAccountSettingsResponse getAccountSettings(GetAccountSettingsRequest getAccountSettingsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
Retrieves the current status of optional features in Resource Groups.
getAccountSettingsRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetAccountSettingsResponse getAccountSettings(Consumer<GetAccountSettingsRequest.Builder> getAccountSettingsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
Retrieves the current status of optional features in Resource Groups.
This is a convenience which creates an instance of the GetAccountSettingsRequest.Builder avoiding the
need to create one manually via GetAccountSettingsRequest.builder()
getAccountSettingsRequest - A Consumer that will call methods on GetAccountSettingsRequest.Builder to create a
request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetGroupResponse getGroup(GetGroupRequest getGroupRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
Returns information about a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GetGroup
getGroupRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetGroupResponse getGroup(Consumer<GetGroupRequest.Builder> getGroupRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
Returns information about a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:GetGroup
This is a convenience which creates an instance of the GetGroupRequest.Builder avoiding the need to
create one manually via GetGroupRequest.builder()
getGroupRequest - A Consumer that will call methods on GetGroupInput.Builder to create a request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetGroupConfigurationResponse getGroupConfiguration(GetGroupConfigurationRequest getGroupConfigurationRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
getGroupConfigurationRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetGroupConfigurationResponse getGroupConfiguration(Consumer<GetGroupConfigurationRequest.Builder> getGroupConfigurationRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the GetGroupConfigurationRequest.Builder avoiding the
need to create one manually via GetGroupConfigurationRequest.builder()
getGroupConfigurationRequest - A Consumer that will call methods on GetGroupConfigurationInput.Builder to create a
request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetGroupQueryResponse getGroupQuery(GetGroupQueryRequest getGroupQueryRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
getGroupQueryRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetGroupQueryResponse getGroupQuery(Consumer<GetGroupQueryRequest.Builder> getGroupQueryRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the GetGroupQueryRequest.Builder avoiding the need to
create one manually via GetGroupQueryRequest.builder()
getGroupQueryRequest - A Consumer that will call methods on GetGroupQueryInput.Builder to create a request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetTagsResponse getTags(GetTagsRequest getTagsRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
getTagsRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetTagsResponse getTags(Consumer<GetTagsRequest.Builder> getTagsRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the GetTagsRequest.Builder avoiding the need to create
one manually via GetTagsRequest.builder()
getTagsRequest - A Consumer that will call methods on GetTagsInput.Builder to create a request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GroupResourcesResponse groupResources(GroupResourcesRequest groupResourcesRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
groupResourcesRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GroupResourcesResponse groupResources(Consumer<GroupResourcesRequest.Builder> groupResourcesRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the GroupResourcesRequest.Builder avoiding the need to
create one manually via GroupResourcesRequest.builder()
groupResourcesRequest - A Consumer that will call methods on GroupResourcesInput.Builder to create a request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListGroupResourcesResponse listGroupResources(ListGroupResourcesRequest listGroupResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
listGroupResourcesRequest - UnauthorizedException - The request was rejected because it doesn't have valid credentials for the target resource.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListGroupResourcesResponse listGroupResources(Consumer<ListGroupResourcesRequest.Builder> listGroupResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the ListGroupResourcesRequest.Builder avoiding the
need to create one manually via ListGroupResourcesRequest.builder()
listGroupResourcesRequest - A Consumer that will call methods on ListGroupResourcesInput.Builder to create a request.UnauthorizedException - The request was rejected because it doesn't have valid credentials for the target resource.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListGroupResourcesIterable listGroupResourcesPaginator(ListGroupResourcesRequest listGroupResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a variant of
listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesIterable responses = client.listGroupResourcesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesIterable responses = client
.listGroupResourcesPaginator(request);
for (software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesIterable responses = client.listGroupResourcesPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)
operation.
listGroupResourcesRequest - UnauthorizedException - The request was rejected because it doesn't have valid credentials for the target resource.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListGroupResourcesIterable listGroupResourcesPaginator(Consumer<ListGroupResourcesRequest.Builder> listGroupResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a variant of
listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesIterable responses = client.listGroupResourcesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesIterable responses = client
.listGroupResourcesPaginator(request);
for (software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesIterable responses = client.listGroupResourcesPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)
operation.
This is a convenience which creates an instance of the ListGroupResourcesRequest.Builder avoiding the
need to create one manually via ListGroupResourcesRequest.builder()
listGroupResourcesRequest - A Consumer that will call methods on ListGroupResourcesInput.Builder to create a request.UnauthorizedException - The request was rejected because it doesn't have valid credentials for the target resource.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListGroupsResponse listGroups(ListGroupsRequest listGroupsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
listGroupsRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListGroupsResponse listGroups(Consumer<ListGroupsRequest.Builder> listGroupsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the ListGroupsRequest.Builder avoiding the need to
create one manually via ListGroupsRequest.builder()
listGroupsRequest - A Consumer that will call methods on ListGroupsInput.Builder to create a request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListGroupsResponse listGroups() throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptionlistGroups(ListGroupsRequest),
AWS
API Documentationdefault ListGroupsIterable listGroupsPaginator() throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a variant of listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request);
for (software.amazon.awssdk.services.resourcegroups.model.ListGroupsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest) operation.
BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptionlistGroupsPaginator(ListGroupsRequest),
AWS
API Documentationdefault ListGroupsIterable listGroupsPaginator(ListGroupsRequest listGroupsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a variant of listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request);
for (software.amazon.awssdk.services.resourcegroups.model.ListGroupsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest) operation.
listGroupsRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListGroupsIterable listGroupsPaginator(Consumer<ListGroupsRequest.Builder> listGroupsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a variant of listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request);
for (software.amazon.awssdk.services.resourcegroups.model.ListGroupsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest) operation.
This is a convenience which creates an instance of the ListGroupsRequest.Builder avoiding the need to
create one manually via ListGroupsRequest.builder()
listGroupsRequest - A Consumer that will call methods on ListGroupsInput.Builder to create a request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault PutGroupConfigurationResponse putGroupConfiguration(PutGroupConfigurationRequest putGroupConfigurationRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
putGroupConfigurationRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault PutGroupConfigurationResponse putGroupConfiguration(Consumer<PutGroupConfigurationRequest.Builder> putGroupConfigurationRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the PutGroupConfigurationRequest.Builder avoiding the
need to create one manually via PutGroupConfigurationRequest.builder()
putGroupConfigurationRequest - A Consumer that will call methods on PutGroupConfigurationInput.Builder to create a
request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault SearchResourcesResponse searchResources(SearchResourcesRequest searchResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
searchResourcesRequest - UnauthorizedException - The request was rejected because it doesn't have valid credentials for the target resource.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault SearchResourcesResponse searchResources(Consumer<SearchResourcesRequest.Builder> searchResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the SearchResourcesRequest.Builder avoiding the need
to create one manually via SearchResourcesRequest.builder()
searchResourcesRequest - A Consumer that will call methods on SearchResourcesInput.Builder to create a request.UnauthorizedException - The request was rejected because it doesn't have valid credentials for the target resource.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault SearchResourcesIterable searchResourcesPaginator(SearchResourcesRequest searchResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a variant of
searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest) operation.
The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally
handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesIterable responses = client.searchResourcesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesIterable responses = client
.searchResourcesPaginator(request);
for (software.amazon.awssdk.services.resourcegroups.model.SearchResourcesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesIterable responses = client.searchResourcesPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)
operation.
searchResourcesRequest - UnauthorizedException - The request was rejected because it doesn't have valid credentials for the target resource.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault SearchResourcesIterable searchResourcesPaginator(Consumer<SearchResourcesRequest.Builder> searchResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a variant of
searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest) operation.
The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally
handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesIterable responses = client.searchResourcesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesIterable responses = client
.searchResourcesPaginator(request);
for (software.amazon.awssdk.services.resourcegroups.model.SearchResourcesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesIterable responses = client.searchResourcesPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)
operation.
This is a convenience which creates an instance of the SearchResourcesRequest.Builder avoiding the need
to create one manually via SearchResourcesRequest.builder()
searchResourcesRequest - A Consumer that will call methods on SearchResourcesInput.Builder to create a request.UnauthorizedException - The request was rejected because it doesn't have valid credentials for the target resource.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault TagResponse tag(TagRequest tagRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
tagRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault TagResponse tag(Consumer<TagRequest.Builder> tagRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the TagRequest.Builder avoiding the need to create one
manually via TagRequest.builder()
tagRequest - A Consumer that will call methods on TagInput.Builder to create a request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UngroupResourcesResponse ungroupResources(UngroupResourcesRequest ungroupResourcesRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
ungroupResourcesRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UngroupResourcesResponse ungroupResources(Consumer<UngroupResourcesRequest.Builder> ungroupResourcesRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the UngroupResourcesRequest.Builder avoiding the need
to create one manually via UngroupResourcesRequest.builder()
ungroupResourcesRequest - A Consumer that will call methods on UngroupResourcesInput.Builder to create a request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UntagResponse untag(UntagRequest untagRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
Deletes tags from a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:Untag
untagRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UntagResponse untag(Consumer<UntagRequest.Builder> untagRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
Deletes tags from a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:Untag
This is a convenience which creates an instance of the UntagRequest.Builder avoiding the need to create
one manually via UntagRequest.builder()
untagRequest - A Consumer that will call methods on UntagInput.Builder to create a request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UpdateAccountSettingsResponse updateAccountSettings(UpdateAccountSettingsRequest updateAccountSettingsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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.
updateAccountSettingsRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UpdateAccountSettingsResponse updateAccountSettings(Consumer<UpdateAccountSettingsRequest.Builder> updateAccountSettingsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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.
This is a convenience which creates an instance of the UpdateAccountSettingsRequest.Builder avoiding the
need to create one manually via UpdateAccountSettingsRequest.builder()
updateAccountSettingsRequest - A Consumer that will call methods on UpdateAccountSettingsInput.Builder to create a
request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UpdateGroupResponse updateGroup(UpdateGroupRequest updateGroupRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
updateGroupRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UpdateGroupResponse updateGroup(Consumer<UpdateGroupRequest.Builder> updateGroupRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the UpdateGroupRequest.Builder avoiding the need to
create one manually via UpdateGroupRequest.builder()
updateGroupRequest - A Consumer that will call methods on UpdateGroupInput.Builder to create a request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UpdateGroupQueryResponse updateGroupQuery(UpdateGroupQueryRequest updateGroupQueryRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
updateGroupQueryRequest - BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UpdateGroupQueryResponse updateGroupQuery(Consumer<UpdateGroupQueryRequest.Builder> updateGroupQueryRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException
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
This is a convenience which creates an instance of the UpdateGroupQueryRequest.Builder avoiding the need
to create one manually via UpdateGroupQueryRequest.builder()
updateGroupQueryRequest - A Consumer that will call methods on UpdateGroupQueryInput.Builder to create a request.BadRequestException - The request includes one or more parameters that violate validation rules.ForbiddenException - The caller isn't authorized to make the request. Check permissions.NotFoundException - One or more of the specified resources don't exist.MethodNotAllowedException - The request uses an HTTP method that isn't allowed for the specified resource.TooManyRequestsException - You've exceeded throttling limits by making too many requests in a period of time.InternalServerErrorException - An internal error occurred while processing the request. Try again later.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.ResourceGroupsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptionstatic ResourceGroupsClient create()
ResourceGroupsClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static ResourceGroupsClientBuilder builder()
ResourceGroupsClient.static ServiceMetadata serviceMetadata()
default ResourceGroupsServiceClientConfiguration serviceClientConfiguration()
serviceClientConfiguration in interface AwsClientserviceClientConfiguration in interface SdkClientCopyright © 2023. All rights reserved.