SSMContacts / Client / tag_resource
tag_resource#
- SSMContacts.Client.tag_resource(**kwargs)#
Tags a contact or escalation plan. You can tag only contacts and escalation plans in the first region of your replication set.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource( ResourceARN='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
- Parameters:
ResourceARN (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the contact or escalation plan.
Tags (list) –
[REQUIRED]
A list of tags that you are adding to the contact or escalation plan.
(dict) –
A container of a key-value name pair.
Key (string) –
Name of the object key.
Value (string) –
Value of the tag.
- Return type:
dict
- Returns:
Response Syntax
{}
Response Structure
(dict) –
Exceptions
SSMContacts.Client.exceptions.AccessDeniedException
SSMContacts.Client.exceptions.ThrottlingException
SSMContacts.Client.exceptions.ResourceNotFoundException
SSMContacts.Client.exceptions.InternalServerException
SSMContacts.Client.exceptions.ServiceQuotaExceededException
SSMContacts.Client.exceptions.ValidationException
Examples
The following tag-resource example tags a specified contact with the provided tag key value pair.
response = client.tag_resource( ResourceARN='arn:aws:ssm-contacts:us-east-1:111122223333:contact/akuam', Tags=[ { 'Key': 'group1', 'Value': '1', }, ], ) print(response)
Expected Output:
{ 'ResponseMetadata': { '...': '...', }, }