/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the resource-groups-2017-11-27.normal.json service model.
*/
using System;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Net;
using Amazon.ResourceGroups.Model;
using Amazon.ResourceGroups.Model.Internal.MarshallTransformations;
using Amazon.ResourceGroups.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.ResourceGroups
{
///
/// Implementation for accessing ResourceGroups
///
/// 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
///
///
///
public partial class AmazonResourceGroupsClient : AmazonServiceClient, IAmazonResourceGroups
{
private static IServiceMetadata serviceMetadata = new AmazonResourceGroupsMetadata();
#region Constructors
///
/// 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.
///
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
///
///
///
public AmazonResourceGroupsClient()
: base(FallbackCredentialsFactory.GetCredentials(), new 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.
///
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
///
///
///
/// The region to connect.
public AmazonResourceGroupsClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonResourceGroupsConfig{RegionEndpoint = region}) { }
///
/// 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.
///
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
///
///
///
/// The AmazonResourceGroupsClient Configuration Object
public AmazonResourceGroupsClient(AmazonResourceGroupsConfig config)
: base(FallbackCredentialsFactory.GetCredentials(config), config){}
///
/// Constructs AmazonResourceGroupsClient with AWS Credentials
///
/// AWS Credentials
public AmazonResourceGroupsClient(AWSCredentials credentials)
: this(credentials, new AmazonResourceGroupsConfig())
{
}
///
/// Constructs AmazonResourceGroupsClient with AWS Credentials
///
/// AWS Credentials
/// The region to connect.
public AmazonResourceGroupsClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonResourceGroupsConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonResourceGroupsClient with AWS Credentials and an
/// AmazonResourceGroupsClient Configuration object.
///
/// AWS Credentials
/// The AmazonResourceGroupsClient Configuration Object
public AmazonResourceGroupsClient(AWSCredentials credentials, AmazonResourceGroupsConfig clientConfig)
: base(credentials, clientConfig)
{
}
///
/// Constructs AmazonResourceGroupsClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
public AmazonResourceGroupsClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonResourceGroupsConfig())
{
}
///
/// Constructs AmazonResourceGroupsClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The region to connect.
public AmazonResourceGroupsClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonResourceGroupsConfig() {RegionEndpoint=region})
{
}
///
/// Constructs AmazonResourceGroupsClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonResourceGroupsClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The AmazonResourceGroupsClient Configuration Object
public AmazonResourceGroupsClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonResourceGroupsConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
///
/// Constructs AmazonResourceGroupsClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
public AmazonResourceGroupsClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonResourceGroupsConfig())
{
}
///
/// Constructs AmazonResourceGroupsClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The region to connect.
public AmazonResourceGroupsClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonResourceGroupsConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonResourceGroupsClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonResourceGroupsClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The AmazonResourceGroupsClient Configuration Object
public AmazonResourceGroupsClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonResourceGroupsConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#if AWS_ASYNC_ENUMERABLES_API
private IResourceGroupsPaginatorFactory _paginators;
///
/// Paginators for the service
///
public IResourceGroupsPaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new ResourceGroupsPaginatorFactory(this);
}
return this._paginators;
}
}
#endif
#region Overrides
///
/// Creates the signer for the service.
///
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
///
/// Customizes the runtime pipeline.
///
/// Runtime pipeline for the current client.
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.RemoveHandler();
pipeline.AddHandlerAfter(new AmazonResourceGroupsEndpointResolver());
}
///
/// Capture metadata for the service.
///
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
///
/// Disposes the service client.
///
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region CreateGroup
internal virtual CreateGroupResponse CreateGroup(CreateGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateGroupResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the CreateGroup service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the CreateGroup service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for CreateGroup Operation
public virtual Task CreateGroupAsync(CreateGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateGroupResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DeleteGroup
internal virtual DeleteGroupResponse DeleteGroup(DeleteGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteGroupResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the DeleteGroup service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteGroup service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// One or more of the specified resources don't exist.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for DeleteGroup Operation
public virtual Task DeleteGroupAsync(DeleteGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteGroupResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetAccountSettings
internal virtual GetAccountSettingsResponse GetAccountSettings(GetAccountSettingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAccountSettingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAccountSettingsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Retrieves the current status of optional features in Resource Groups.
///
/// Container for the necessary parameters to execute the GetAccountSettings service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetAccountSettings service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for GetAccountSettings Operation
public virtual Task GetAccountSettingsAsync(GetAccountSettingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAccountSettingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAccountSettingsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetGroup
internal virtual GetGroupResponse GetGroup(GetGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetGroupResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Returns information about a specified resource group.
///
///
///
/// Minimum permissions
///
///
///
/// To run this command, you must have the following permissions:
///
/// -
///
///
resource-groups:GetGroup
///
///
///
/// Container for the necessary parameters to execute the GetGroup service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetGroup service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// One or more of the specified resources don't exist.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for GetGroup Operation
public virtual Task GetGroupAsync(GetGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetGroupResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetGroupConfiguration
internal virtual GetGroupConfigurationResponse GetGroupConfiguration(GetGroupConfigurationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetGroupConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetGroupConfigurationResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the GetGroupConfiguration service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetGroupConfiguration service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// One or more of the specified resources don't exist.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for GetGroupConfiguration Operation
public virtual Task GetGroupConfigurationAsync(GetGroupConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetGroupConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetGroupConfigurationResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetGroupQuery
internal virtual GetGroupQueryResponse GetGroupQuery(GetGroupQueryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetGroupQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetGroupQueryResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the GetGroupQuery service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetGroupQuery service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// One or more of the specified resources don't exist.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for GetGroupQuery Operation
public virtual Task GetGroupQueryAsync(GetGroupQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetGroupQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetGroupQueryResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetTags
internal virtual GetTagsResponse GetTags(GetTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTagsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the GetTags service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetTags service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// One or more of the specified resources don't exist.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for GetTags Operation
public virtual Task GetTagsAsync(GetTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTagsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GroupResources
internal virtual GroupResourcesResponse GroupResources(GroupResourcesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GroupResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = GroupResourcesResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the GroupResources service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GroupResources service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// One or more of the specified resources don't exist.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for GroupResources Operation
public virtual Task GroupResourcesAsync(GroupResourcesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GroupResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = GroupResourcesResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListGroupResources
internal virtual ListGroupResourcesResponse ListGroupResources(ListGroupResourcesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListGroupResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListGroupResourcesResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the ListGroupResources service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListGroupResources service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// One or more of the specified resources don't exist.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
///
/// The request was rejected because it doesn't have valid credentials for the target
/// resource.
///
/// REST API Reference for ListGroupResources Operation
public virtual Task ListGroupResourcesAsync(ListGroupResourcesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListGroupResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListGroupResourcesResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListGroups
internal virtual ListGroupsResponse ListGroups(ListGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListGroupsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the ListGroups service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListGroups service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for ListGroups Operation
public virtual Task ListGroupsAsync(ListGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListGroupsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region PutGroupConfiguration
internal virtual PutGroupConfigurationResponse PutGroupConfiguration(PutGroupConfigurationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutGroupConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutGroupConfigurationResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the PutGroupConfiguration service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the PutGroupConfiguration service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// One or more of the specified resources don't exist.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for PutGroupConfiguration Operation
public virtual Task PutGroupConfigurationAsync(PutGroupConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutGroupConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutGroupConfigurationResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region SearchResources
internal virtual SearchResourcesResponse SearchResources(SearchResourcesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = SearchResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = SearchResourcesResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the SearchResources service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the SearchResources service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
///
/// The request was rejected because it doesn't have valid credentials for the target
/// resource.
///
/// REST API Reference for SearchResources Operation
public virtual Task SearchResourcesAsync(SearchResourcesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = SearchResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = SearchResourcesResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region Tag
internal virtual TagResponse Tag(TagRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = TagRequestMarshaller.Instance;
options.ResponseUnmarshaller = TagResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the Tag service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the Tag service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// One or more of the specified resources don't exist.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for Tag Operation
public virtual Task TagAsync(TagRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = TagRequestMarshaller.Instance;
options.ResponseUnmarshaller = TagResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region UngroupResources
internal virtual UngroupResourcesResponse UngroupResources(UngroupResourcesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UngroupResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = UngroupResourcesResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the UngroupResources service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the UngroupResources service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// One or more of the specified resources don't exist.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for UngroupResources Operation
public virtual Task UngroupResourcesAsync(UngroupResourcesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UngroupResourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = UngroupResourcesResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region Untag
internal virtual UntagResponse Untag(UntagRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UntagRequestMarshaller.Instance;
options.ResponseUnmarshaller = UntagResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Deletes tags from a specified resource group.
///
///
///
/// Minimum permissions
///
///
///
/// To run this command, you must have the following permissions:
///
/// -
///
///
resource-groups:Untag
///
///
///
/// Container for the necessary parameters to execute the Untag service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the Untag service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// One or more of the specified resources don't exist.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for Untag Operation
public virtual Task UntagAsync(UntagRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UntagRequestMarshaller.Instance;
options.ResponseUnmarshaller = UntagResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region UpdateAccountSettings
internal virtual UpdateAccountSettingsResponse UpdateAccountSettings(UpdateAccountSettingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateAccountSettingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateAccountSettingsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
.
///
///
/// Container for the necessary parameters to execute the UpdateAccountSettings service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the UpdateAccountSettings service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for UpdateAccountSettings Operation
public virtual Task UpdateAccountSettingsAsync(UpdateAccountSettingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateAccountSettingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateAccountSettingsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region UpdateGroup
internal virtual UpdateGroupResponse UpdateGroup(UpdateGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateGroupResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the UpdateGroup service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the UpdateGroup service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// One or more of the specified resources don't exist.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for UpdateGroup Operation
public virtual Task UpdateGroupAsync(UpdateGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateGroupResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region UpdateGroupQuery
internal virtual UpdateGroupQueryResponse UpdateGroupQuery(UpdateGroupQueryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateGroupQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateGroupQueryResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// 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
///
///
///
/// Container for the necessary parameters to execute the UpdateGroupQuery service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the UpdateGroupQuery service method, as returned by ResourceGroups.
///
/// The request includes one or more parameters that violate validation rules.
///
///
/// The caller isn't authorized to make the request. Check permissions.
///
///
/// An internal error occurred while processing the request. Try again later.
///
///
/// The request uses an HTTP method that isn't allowed for the specified resource.
///
///
/// One or more of the specified resources don't exist.
///
///
/// You've exceeded throttling limits by making too many requests in a period of time.
///
/// REST API Reference for UpdateGroupQuery Operation
public virtual Task UpdateGroupQueryAsync(UpdateGroupQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateGroupQueryRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateGroupQueryResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
}
}