tagResource method

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

Adds tags to an Amazon Managed Workflows for Apache Airflow Serverless resource. Tags are key-value pairs that help you organize and categorize your resources.

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

Parameter resourceArn : The Amazon Resource Name (ARN) of the resource to which to add tags.

Parameter tags : A map of tags to add to the resource. Each tag consists of a key-value pair.

Implementation

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