tagResource method

Future<void> tagResource({
  1. required String resourceARN,
  2. required List<Tag> tags,
})

Tags a contact or escalation plan. You can tag only contacts and escalation plans in the first region of your replication set.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter resourceARN : The Amazon Resource Name (ARN) of the contact or escalation plan.

Parameter tags : A list of tags that you are adding to the contact or escalation plan.

Implementation

Future<void> tagResource({
  required String resourceARN,
  required List<Tag> tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SSMContacts.TagResource'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceARN': resourceARN,
      'Tags': tags,
    },
  );
}