revokeInvitation method

Future<void> revokeInvitation({
  1. String? enrollmentId,
  2. String? userArn,
})

Revokes an invitation and invalidates the enrollment URL.

May throw NotFoundException. May throw ConcurrentModificationException.

Parameter enrollmentId : The ARN of the enrollment invitation to revoke. Required.

Parameter userArn : The ARN of the user for whom to revoke an enrollment invitation. Required.

Implementation

Future<void> revokeInvitation({
  String? enrollmentId,
  String? userArn,
}) async {
  _s.validateStringLength(
    'enrollmentId',
    enrollmentId,
    0,
    128,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AlexaForBusiness.RevokeInvitation'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (enrollmentId != null) 'EnrollmentId': enrollmentId,
      if (userArn != null) 'UserArn': userArn,
    },
  );
}