revokeSubscription method
Revokes a specified subscription in Amazon DataZone.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainIdentifier :
The identifier of the Amazon DataZone domain where you want to revoke a
subscription.
Parameter identifier :
The identifier of the revoked subscription.
Parameter retainPermissions :
Specifies whether permissions are retained when the subscription is
revoked.
Implementation
Future<RevokeSubscriptionOutput> revokeSubscription({
required String domainIdentifier,
required String identifier,
bool? retainPermissions,
}) async {
final $payload = <String, dynamic>{
if (retainPermissions != null) 'retainPermissions': retainPermissions,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/v2/domains/${Uri.encodeComponent(domainIdentifier)}/subscriptions/${Uri.encodeComponent(identifier)}/revoke',
exceptionFnMap: _exceptionFns,
);
return RevokeSubscriptionOutput.fromJson(response);
}