tagResource method

Future<void> tagResource({
  1. required String arn,
  2. required Map<String, String> tags,
})

Add new tags to the specified resource.

Parameter arn : The ARN of the resource that should receive the new tags.

Parameter tags : A map of tags to apply to the specified resource.

Implementation

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