AppRegistry / Client / associate_resource
associate_resource#
- AppRegistry.Client.associate_resource(**kwargs)#
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 toAPPLY_APPLICATION_TAG
.tag:GetResources
tag:TagResources
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.resource-groups:AssociateResource
cloudformation:UpdateStack
cloudformation:DescribeStacks
Note
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.
See also: AWS API Documentation
Request Syntax
response = client.associate_resource( application='string', resourceType='CFN_STACK'|'RESOURCE_TAG_VALUE', resource='string', options=[ 'APPLY_APPLICATION_TAG'|'SKIP_APPLICATION_TAG', ] )
- Parameters:
application (string) –
[REQUIRED]
The name, ID, or ARN of the application.
resourceType (string) –
[REQUIRED]
The type of resource of which the application will be associated.
resource (string) –
[REQUIRED]
The name or ID of the resource of which the application will be associated.
options (list) –
Determines whether an application tag is applied or skipped.
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'applicationArn': 'string', 'resourceArn': 'string', 'options': [ 'APPLY_APPLICATION_TAG'|'SKIP_APPLICATION_TAG', ] }
Response Structure
(dict) –
applicationArn (string) –
The Amazon resource name (ARN) of the application that was augmented with attributes.
resourceArn (string) –
The Amazon resource name (ARN) that specifies the resource.
options (list) –
Determines whether an application tag is applied or skipped.
(string) –
Exceptions
AppRegistry.Client.exceptions.ResourceNotFoundException
AppRegistry.Client.exceptions.InternalServerException
AppRegistry.Client.exceptions.ServiceQuotaExceededException
AppRegistry.Client.exceptions.ConflictException
AppRegistry.Client.exceptions.ValidationException
AppRegistry.Client.exceptions.ThrottlingException