AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Implementation for accessing ResourceGroups 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.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonServiceClient
    Amazon.ResourceGroups.AmazonResourceGroupsClient

Namespace: Amazon.ResourceGroups
Assembly: AWSSDK.ResourceGroups.dll
Version: 3.x.y.z

Syntax

C#
public class AmazonResourceGroupsClient : AmazonServiceClient
         IAmazonResourceGroups, IAmazonService, IDisposable

The AmazonResourceGroupsClient type exposes the following members

Constructors

NameDescription
Public Method AmazonResourceGroupsClient()

Constructs AmazonResourceGroupsClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.



    
        
    

             

Public Method AmazonResourceGroupsClient(RegionEndpoint)

Constructs AmazonResourceGroupsClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.



    
        
    

             

Public Method AmazonResourceGroupsClient(AmazonResourceGroupsConfig)

Constructs AmazonResourceGroupsClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.



    
        
    

             

Public Method AmazonResourceGroupsClient(AWSCredentials)

Constructs AmazonResourceGroupsClient with AWS Credentials

Public Method AmazonResourceGroupsClient(AWSCredentials, RegionEndpoint)

Constructs AmazonResourceGroupsClient with AWS Credentials

Public Method AmazonResourceGroupsClient(AWSCredentials, AmazonResourceGroupsConfig)

Constructs AmazonResourceGroupsClient with AWS Credentials and an AmazonResourceGroupsClient Configuration object.

Public Method AmazonResourceGroupsClient(string, string)

Constructs AmazonResourceGroupsClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonResourceGroupsClient(string, string, RegionEndpoint)

Constructs AmazonResourceGroupsClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonResourceGroupsClient(string, string, AmazonResourceGroupsConfig)

Constructs AmazonResourceGroupsClient with AWS Access Key ID, AWS Secret Key and an AmazonResourceGroupsClient Configuration object.

Public Method AmazonResourceGroupsClient(string, string, string)

Constructs AmazonResourceGroupsClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonResourceGroupsClient(string, string, string, RegionEndpoint)

Constructs AmazonResourceGroupsClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonResourceGroupsClient(string, string, string, AmazonResourceGroupsConfig)

Constructs AmazonResourceGroupsClient with AWS Access Key ID, AWS Secret Key and an AmazonResourceGroupsClient Configuration object.

Properties

NameTypeDescription
Public Property Config Amazon.Runtime.IClientConfig Inherited from Amazon.Runtime.AmazonServiceClient.

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method CreateGroup(CreateGroupRequest)

Creates a group with a specified name, description, and resource query.

Public Method CreateGroupAsync(CreateGroupRequest, CancellationToken)

Initiates the asynchronous execution of the CreateGroup operation.

Public Method DeleteGroup(DeleteGroupRequest)

Deletes a specified resource group. Deleting a resource group does not delete resources that are members of the group; it only deletes the group structure.

Public Method DeleteGroupAsync(DeleteGroupRequest, CancellationToken)

Initiates the asynchronous execution of the DeleteGroup operation.

Public Method Dispose() Inherited from Amazon.Runtime.AmazonServiceClient.
Public Method GetGroup(GetGroupRequest)

Returns information about a specified resource group.

Public Method GetGroupAsync(GetGroupRequest, CancellationToken)

Initiates the asynchronous execution of the GetGroup operation.

Public Method GetGroupQuery(GetGroupQueryRequest)

Returns the resource query associated with the specified resource group.

Public Method GetGroupQueryAsync(GetGroupQueryRequest, CancellationToken)

Initiates the asynchronous execution of the GetGroupQuery operation.

Public Method GetTags(GetTagsRequest)

Returns a list of tags that are associated with a resource, specified by an ARN.

Public Method GetTagsAsync(GetTagsRequest, CancellationToken)

Initiates the asynchronous execution of the GetTags operation.

Public Method ListGroupResources(ListGroupResourcesRequest)

Returns a list of ARNs of resources that are members of a specified resource group.

Public Method ListGroupResourcesAsync(ListGroupResourcesRequest, CancellationToken)

Initiates the asynchronous execution of the ListGroupResources operation.

Public Method ListGroups(ListGroupsRequest)

Returns a list of existing resource groups in your account.

Public Method ListGroupsAsync(ListGroupsRequest, CancellationToken)

Initiates the asynchronous execution of the ListGroups operation.

Public Method SearchResources(SearchResourcesRequest)

Returns a list of AWS resource identifiers that matches a specified query. The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery operation.

Public Method SearchResourcesAsync(SearchResourcesRequest, CancellationToken)

Initiates the asynchronous execution of the SearchResources operation.

Public Method Tag(TagRequest)

Adds specified tags to a resource with the specified ARN. Existing tags on a resource are not changed if they are not specified in the request parameters.

Public Method TagAsync(TagRequest, CancellationToken)

Initiates the asynchronous execution of the Tag operation.

Public Method Untag(UntagRequest)

Deletes specified tags from a specified resource.

Public Method UntagAsync(UntagRequest, CancellationToken)

Initiates the asynchronous execution of the Untag operation.

Public Method UpdateGroup(UpdateGroupRequest)

Updates an existing group with a new or changed description. You cannot update the name of a resource group.

Public Method UpdateGroupAsync(UpdateGroupRequest, CancellationToken)

Initiates the asynchronous execution of the UpdateGroup operation.

Public Method UpdateGroupQuery(UpdateGroupQueryRequest)

Updates the resource query of a group.

Public Method UpdateGroupQueryAsync(UpdateGroupQueryRequest, CancellationToken)

Initiates the asynchronous execution of the UpdateGroupQuery operation.

Events

NameDescription
Event AfterResponseEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event BeforeRequestEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event ExceptionEvent Inherited from Amazon.Runtime.AmazonServiceClient.

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms