disassociateDelegateFromResource method

Future<void> disassociateDelegateFromResource({
  1. required String entityId,
  2. required String organizationId,
  3. required String resourceId,
})

Removes a member from the resource's set of delegates.

May throw EntityNotFoundException. May throw EntityStateException. May throw InvalidParameterException. May throw OrganizationNotFoundException. May throw OrganizationStateException.

Parameter entityId : The identifier for the member (user, group) to be removed from the resource's delegates.

Parameter organizationId : The identifier for the organization under which the resource exists.

Parameter resourceId : The identifier of the resource from which delegates' set members are removed.

Implementation

Future<void> disassociateDelegateFromResource({
  required String entityId,
  required String organizationId,
  required String resourceId,
}) async {
  ArgumentError.checkNotNull(entityId, 'entityId');
  _s.validateStringLength(
    'entityId',
    entityId,
    12,
    256,
    isRequired: true,
  );
  ArgumentError.checkNotNull(organizationId, 'organizationId');
  _s.validateStringLength(
    'organizationId',
    organizationId,
    34,
    34,
    isRequired: true,
  );
  ArgumentError.checkNotNull(resourceId, 'resourceId');
  _s.validateStringLength(
    'resourceId',
    resourceId,
    34,
    34,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkMailService.DisassociateDelegateFromResource'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'EntityId': entityId,
      'OrganizationId': organizationId,
      'ResourceId': resourceId,
    },
  );
}