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.

Associates a resource with an application. The resource can be specified by its ARN or name. The application can be specified by ARN, ID, or name.

Minimum permissions

You must have the following permissions to associate a resource using the OPTIONS parameter set to APPLY_APPLICATION_TAG.

You must also have these additional permissions if you don't use the AWSServiceCatalogAppRegistryFullAccess policy. For more information, see AWSServiceCatalogAppRegistryFullAccess in the AppRegistry Administrator Guide.

In addition, you must have the tagging permission defined by the Amazon Web Services service that creates the resource. For more information, see TagResources in the Resource Groups Tagging API Reference.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginAssociateResource and EndAssociateResource.

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

Syntax

C#
public abstract Task<AssociateResourceResponse> AssociateResourceAsync(
         AssociateResourceRequest request,
         CancellationToken cancellationToken
)

Parameters

request
Type: Amazon.AppRegistry.Model.AssociateResourceRequest

Container for the necessary parameters to execute the AssociateResource service method.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value


The response from the AssociateResource service method, as returned by AppRegistry.

Exceptions

ExceptionCondition
ConflictException There was a conflict when processing the request (for example, a resource with the given name already exists within the account).
InternalServerException The service is experiencing internal problems.
ResourceNotFoundException The specified resource does not exist.
ServiceQuotaExceededException The maximum number of resources per account has been reached.
ThrottlingException The maximum number of API requests has been exceeded.
ValidationException The request has invalid or missing parameters.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer

See Also