updateTagsForDomain method

Future<void> updateTagsForDomain({
  1. required String domainName,
  2. List<Tag>? tagsToUpdate,
})

This operation adds or updates tags for a specified domain.

All tag operations are eventually consistent; subsequent operations might not immediately represent all issued operations.

May throw InvalidInput. May throw OperationLimitExceeded. May throw UnsupportedTLD.

Parameter domainName : The domain for which you want to add or update tags.

Parameter tagsToUpdate : A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced.

Implementation

Future<void> updateTagsForDomain({
  required String domainName,
  List<Tag>? tagsToUpdate,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    0,
    255,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53Domains_v20140515.UpdateTagsForDomain'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DomainName': domainName,
      if (tagsToUpdate != null) 'TagsToUpdate': tagsToUpdate,
    },
  );
}