addEntityOwner method
Adds the owner of an entity (a domain unit).
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainIdentifier :
The ID of the domain in which you want to add the entity owner.
Parameter entityIdentifier :
The ID of the entity to which you want to add an owner.
Parameter entityType :
The type of an entity.
Parameter owner :
The owner that you want to add to the entity.
Parameter clientToken :
A unique, case-sensitive identifier that is provided to ensure the
idempotency of the request.
Implementation
Future<void> addEntityOwner({
required String domainIdentifier,
required String entityIdentifier,
required DataZoneEntityType entityType,
required OwnerProperties owner,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
'owner': owner,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/v2/domains/${Uri.encodeComponent(domainIdentifier)}/entities/${Uri.encodeComponent(entityType.value)}/${Uri.encodeComponent(entityIdentifier)}/addOwner',
exceptionFnMap: _exceptionFns,
);
}