updateDomainUnit method

Future<UpdateDomainUnitOutput> updateDomainUnit({
  1. required String domainIdentifier,
  2. required String identifier,
  3. String? description,
  4. String? name,
})

Updates the domain unit.

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

Parameter domainIdentifier : The ID of the domain where you want to update a domain unit.

Parameter identifier : The ID of the domain unit that you want to update.

Parameter description : The description of the domain unit that you want to update.

Parameter name : The name of the domain unit that you want to update.

Implementation

Future<UpdateDomainUnitOutput> updateDomainUnit({
  required String domainIdentifier,
  required String identifier,
  String? description,
  String? name,
}) async {
  final $payload = <String, dynamic>{
    if (description != null) 'description': description,
    if (name != null) 'name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/domain-units/${Uri.encodeComponent(identifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateDomainUnitOutput.fromJson(response);
}