tagResource method
Associates a set of tags with a DAX resource. You can call
TagResource
up to 5 times per second, per account.
May throw ClusterNotFoundFault. May throw TagQuotaPerResourceExceeded. May throw InvalidARNFault. May throw InvalidClusterStateFault. May throw ServiceLinkedRoleNotFoundFault. May throw InvalidParameterValueException. May throw InvalidParameterCombinationException.
Parameter resourceName
:
The name of the DAX resource to which tags should be added.
Parameter tags
:
The tags to be assigned to the DAX resource.
Implementation
Future<TagResourceResponse> tagResource({
required String resourceName,
required List<Tag> tags,
}) async {
ArgumentError.checkNotNull(resourceName, 'resourceName');
ArgumentError.checkNotNull(tags, 'tags');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDAXV3.TagResource'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceName': resourceName,
'Tags': tags,
},
);
return TagResourceResponse.fromJson(jsonResponse.body);
}