/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace ResourceGroups
{
namespace Model
{
class CreateGroupRequest;
class DeleteGroupRequest;
class GetGroupRequest;
class GetGroupConfigurationRequest;
class GetGroupQueryRequest;
class GetTagsRequest;
class GroupResourcesRequest;
class ListGroupResourcesRequest;
class ListGroupsRequest;
class SearchResourcesRequest;
class TagRequest;
class UngroupResourcesRequest;
class UntagRequest;
class UpdateGroupRequest;
class UpdateGroupQueryRequest;
typedef Aws::Utils::Outcome CreateGroupOutcome;
typedef Aws::Utils::Outcome DeleteGroupOutcome;
typedef Aws::Utils::Outcome GetGroupOutcome;
typedef Aws::Utils::Outcome GetGroupConfigurationOutcome;
typedef Aws::Utils::Outcome GetGroupQueryOutcome;
typedef Aws::Utils::Outcome GetTagsOutcome;
typedef Aws::Utils::Outcome GroupResourcesOutcome;
typedef Aws::Utils::Outcome ListGroupResourcesOutcome;
typedef Aws::Utils::Outcome ListGroupsOutcome;
typedef Aws::Utils::Outcome SearchResourcesOutcome;
typedef Aws::Utils::Outcome TagOutcome;
typedef Aws::Utils::Outcome UngroupResourcesOutcome;
typedef Aws::Utils::Outcome UntagOutcome;
typedef Aws::Utils::Outcome UpdateGroupOutcome;
typedef Aws::Utils::Outcome UpdateGroupQueryOutcome;
typedef std::future CreateGroupOutcomeCallable;
typedef std::future DeleteGroupOutcomeCallable;
typedef std::future GetGroupOutcomeCallable;
typedef std::future GetGroupConfigurationOutcomeCallable;
typedef std::future GetGroupQueryOutcomeCallable;
typedef std::future GetTagsOutcomeCallable;
typedef std::future GroupResourcesOutcomeCallable;
typedef std::future ListGroupResourcesOutcomeCallable;
typedef std::future ListGroupsOutcomeCallable;
typedef std::future SearchResourcesOutcomeCallable;
typedef std::future TagOutcomeCallable;
typedef std::future UngroupResourcesOutcomeCallable;
typedef std::future UntagOutcomeCallable;
typedef std::future UpdateGroupOutcomeCallable;
typedef std::future UpdateGroupQueryOutcomeCallable;
} // namespace Model
class ResourceGroupsClient;
typedef std::function&) > CreateGroupResponseReceivedHandler;
typedef std::function&) > DeleteGroupResponseReceivedHandler;
typedef std::function&) > GetGroupResponseReceivedHandler;
typedef std::function&) > GetGroupConfigurationResponseReceivedHandler;
typedef std::function&) > GetGroupQueryResponseReceivedHandler;
typedef std::function&) > GetTagsResponseReceivedHandler;
typedef std::function&) > GroupResourcesResponseReceivedHandler;
typedef std::function&) > ListGroupResourcesResponseReceivedHandler;
typedef std::function&) > ListGroupsResponseReceivedHandler;
typedef std::function&) > SearchResourcesResponseReceivedHandler;
typedef std::function&) > TagResponseReceivedHandler;
typedef std::function&) > UngroupResourcesResponseReceivedHandler;
typedef std::function&) > UntagResponseReceivedHandler;
typedef std::function&) > UpdateGroupResponseReceivedHandler;
typedef std::function&) > UpdateGroupQueryResponseReceivedHandler;
/**
* AWS Resource Groups AWS Resource Groups lets you
* organize AWS resources such as Amazon EC2 instances, Amazon Relational Database
* Service databases, and Amazon S3 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 AWS Systems Manager Automation documents, on tag-related resources in AWS
* Systems Manager. Groups of tagged resources also let you quickly view a custom
* console in AWS Systems Manager that shows AWS 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 AWS
* Resource Groups User Guide.
AWS 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 AWS resources
* based on a resource query
*/
class AWS_RESOURCEGROUPS_API ResourceGroupsClient : public Aws::Client::AWSJsonClient
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
ResourceGroupsClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
ResourceGroupsClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
ResourceGroupsClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~ResourceGroupsClient();
/**
* Creates a resource group with the specified name and description. You can
* optionally include a resource query, or a service configuration.
See
* Also:
AWS
* API Reference
*/
virtual Model::CreateGroupOutcome CreateGroup(const Model::CreateGroupRequest& request) const;
/**
* Creates a resource group with the specified name and description. You can
* optionally include a resource query, or a service configuration.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CreateGroupOutcomeCallable CreateGroupCallable(const Model::CreateGroupRequest& request) const;
/**
* Creates a resource group with the specified name and description. You can
* optionally include a resource query, or a service configuration.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CreateGroupAsync(const Model::CreateGroupRequest& request, const CreateGroupResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* 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.
See Also:
AWS
* API Reference
*/
virtual Model::DeleteGroupOutcome DeleteGroup(const Model::DeleteGroupRequest& request) const;
/**
* 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.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeleteGroupOutcomeCallable DeleteGroupCallable(const Model::DeleteGroupRequest& request) const;
/**
* 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.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeleteGroupAsync(const Model::DeleteGroupRequest& request, const DeleteGroupResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns information about a specified resource group.
See
* Also:
AWS
* API Reference
*/
virtual Model::GetGroupOutcome GetGroup(const Model::GetGroupRequest& request) const;
/**
* Returns information about a specified resource group.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetGroupOutcomeCallable GetGroupCallable(const Model::GetGroupRequest& request) const;
/**
* Returns information about a specified resource group.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetGroupAsync(const Model::GetGroupRequest& request, const GetGroupResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns the service configuration associated with the specified resource
* group. AWS Resource Groups supports configurations for the following resource
* group types:
See Also:
AWS
* API Reference
*/
virtual Model::GetGroupConfigurationOutcome GetGroupConfiguration(const Model::GetGroupConfigurationRequest& request) const;
/**
* Returns the service configuration associated with the specified resource
* group. AWS Resource Groups supports configurations for the following resource
* group types:
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetGroupConfigurationOutcomeCallable GetGroupConfigurationCallable(const Model::GetGroupConfigurationRequest& request) const;
/**
* Returns the service configuration associated with the specified resource
* group. AWS Resource Groups supports configurations for the following resource
* group types:
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetGroupConfigurationAsync(const Model::GetGroupConfigurationRequest& request, const GetGroupConfigurationResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Retrieves the resource query associated with the specified resource
* group.
See Also:
AWS
* API Reference
*/
virtual Model::GetGroupQueryOutcome GetGroupQuery(const Model::GetGroupQueryRequest& request) const;
/**
* Retrieves the resource query associated with the specified resource
* group.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetGroupQueryOutcomeCallable GetGroupQueryCallable(const Model::GetGroupQueryRequest& request) const;
/**
* Retrieves the resource query associated with the specified resource
* group.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetGroupQueryAsync(const Model::GetGroupQueryRequest& request, const GetGroupQueryResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns a list of tags that are associated with a resource group, specified
* by an ARN.
See Also:
AWS
* API Reference
*/
virtual Model::GetTagsOutcome GetTags(const Model::GetTagsRequest& request) const;
/**
* Returns a list of tags that are associated with a resource group, specified
* by an ARN.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetTagsOutcomeCallable GetTagsCallable(const Model::GetTagsRequest& request) const;
/**
* Returns a list of tags that are associated with a resource group, specified
* by an ARN.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetTagsAsync(const Model::GetTagsRequest& request, const GetTagsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Adds the specified resources to the specified group.
See Also:
* AWS
* API Reference
*/
virtual Model::GroupResourcesOutcome GroupResources(const Model::GroupResourcesRequest& request) const;
/**
* Adds the specified resources to the specified group.
See Also:
* AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GroupResourcesOutcomeCallable GroupResourcesCallable(const Model::GroupResourcesRequest& request) const;
/**
* Adds the specified resources to the specified group.
See Also:
* AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GroupResourcesAsync(const Model::GroupResourcesRequest& request, const GroupResourcesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns a list of ARNs of the resources that are members of a specified
* resource group.
See Also:
AWS
* API Reference
*/
virtual Model::ListGroupResourcesOutcome ListGroupResources(const Model::ListGroupResourcesRequest& request) const;
/**
* Returns a list of ARNs of the resources that are members of a specified
* resource group.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListGroupResourcesOutcomeCallable ListGroupResourcesCallable(const Model::ListGroupResourcesRequest& request) const;
/**
* Returns a list of ARNs of the resources that are members of a specified
* resource group.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListGroupResourcesAsync(const Model::ListGroupResourcesRequest& request, const ListGroupResourcesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns a list of existing resource groups in your account.
See
* Also:
AWS
* API Reference
*/
virtual Model::ListGroupsOutcome ListGroups(const Model::ListGroupsRequest& request) const;
/**
* Returns a list of existing resource groups in your account.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListGroupsOutcomeCallable ListGroupsCallable(const Model::ListGroupsRequest& request) const;
/**
* Returns a list of existing resource groups in your account.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListGroupsAsync(const Model::ListGroupsRequest& request, const ListGroupsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns a list of AWS resource identifiers that matches tne specified query.
* The query uses the same format as a resource query in a CreateGroup or
* UpdateGroupQuery operation.
See Also:
AWS
* API Reference
*/
virtual Model::SearchResourcesOutcome SearchResources(const Model::SearchResourcesRequest& request) const;
/**
* Returns a list of AWS resource identifiers that matches tne specified query.
* The query uses the same format as a resource query in a CreateGroup or
* UpdateGroupQuery operation.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::SearchResourcesOutcomeCallable SearchResourcesCallable(const Model::SearchResourcesRequest& request) const;
/**
* Returns a list of AWS resource identifiers that matches tne specified query.
* The query uses the same format as a resource query in a CreateGroup or
* UpdateGroupQuery operation.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void SearchResourcesAsync(const Model::SearchResourcesRequest& request, const SearchResourcesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* 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.
See Also:
* AWS
* API Reference
*/
virtual Model::TagOutcome Tag(const Model::TagRequest& request) const;
/**
* 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.
See Also:
* AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::TagOutcomeCallable TagCallable(const Model::TagRequest& request) const;
/**
* 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.
See Also:
* AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void TagAsync(const Model::TagRequest& request, const TagResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Removes the specified resources from the specified group.
See
* Also:
AWS
* API Reference
*/
virtual Model::UngroupResourcesOutcome UngroupResources(const Model::UngroupResourcesRequest& request) const;
/**
* Removes the specified resources from the specified group.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UngroupResourcesOutcomeCallable UngroupResourcesCallable(const Model::UngroupResourcesRequest& request) const;
/**
* Removes the specified resources from the specified group.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UngroupResourcesAsync(const Model::UngroupResourcesRequest& request, const UngroupResourcesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Deletes tags from a specified resource group.
See Also:
AWS
* API Reference
*/
virtual Model::UntagOutcome Untag(const Model::UntagRequest& request) const;
/**
* Deletes tags from a specified resource group.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UntagOutcomeCallable UntagCallable(const Model::UntagRequest& request) const;
/**
* Deletes tags from a specified resource group.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UntagAsync(const Model::UntagRequest& request, const UntagResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Updates the description for an existing group. You cannot update the name of
* a resource group.
See Also:
AWS
* API Reference
*/
virtual Model::UpdateGroupOutcome UpdateGroup(const Model::UpdateGroupRequest& request) const;
/**
* Updates the description for an existing group. You cannot update the name of
* a resource group.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UpdateGroupOutcomeCallable UpdateGroupCallable(const Model::UpdateGroupRequest& request) const;
/**
* Updates the description for an existing group. You cannot update the name of
* a resource group.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UpdateGroupAsync(const Model::UpdateGroupRequest& request, const UpdateGroupResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Updates the resource query of a group.
See Also:
AWS
* API Reference
*/
virtual Model::UpdateGroupQueryOutcome UpdateGroupQuery(const Model::UpdateGroupQueryRequest& request) const;
/**
* Updates the resource query of a group.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UpdateGroupQueryOutcomeCallable UpdateGroupQueryCallable(const Model::UpdateGroupQueryRequest& request) const;
/**
* Updates the resource query of a group.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UpdateGroupQueryAsync(const Model::UpdateGroupQueryRequest& request, const UpdateGroupQueryResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void CreateGroupAsyncHelper(const Model::CreateGroupRequest& request, const CreateGroupResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DeleteGroupAsyncHelper(const Model::DeleteGroupRequest& request, const DeleteGroupResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void GetGroupAsyncHelper(const Model::GetGroupRequest& request, const GetGroupResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void GetGroupConfigurationAsyncHelper(const Model::GetGroupConfigurationRequest& request, const GetGroupConfigurationResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void GetGroupQueryAsyncHelper(const Model::GetGroupQueryRequest& request, const GetGroupQueryResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void GetTagsAsyncHelper(const Model::GetTagsRequest& request, const GetTagsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void GroupResourcesAsyncHelper(const Model::GroupResourcesRequest& request, const GroupResourcesResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListGroupResourcesAsyncHelper(const Model::ListGroupResourcesRequest& request, const ListGroupResourcesResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListGroupsAsyncHelper(const Model::ListGroupsRequest& request, const ListGroupsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void SearchResourcesAsyncHelper(const Model::SearchResourcesRequest& request, const SearchResourcesResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void TagAsyncHelper(const Model::TagRequest& request, const TagResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void UngroupResourcesAsyncHelper(const Model::UngroupResourcesRequest& request, const UngroupResourcesResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void UntagAsyncHelper(const Model::UntagRequest& request, const UntagResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void UpdateGroupAsyncHelper(const Model::UpdateGroupRequest& request, const UpdateGroupResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void UpdateGroupQueryAsyncHelper(const Model::UpdateGroupQueryRequest& request, const UpdateGroupQueryResponseReceivedHandler& handler, const std::shared_ptr& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr m_executor;
};
} // namespace ResourceGroups
} // namespace Aws