deleteResource method

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

Deletes the specified resource.

May throw EntityStateException. May throw InvalidParameterException. May throw OrganizationNotFoundException. May throw OrganizationStateException. May throw UnsupportedOperationException.

Parameter organizationId : The identifier associated with the organization from which the resource is deleted.

Parameter resourceId : The identifier of the resource to be deleted.

The identifier can accept ResourceId, or Resourcename. The following identity formats are available:

  • Resource ID: r-0123456789a0123456789b0123456789
  • Resource name: resource

Implementation

Future<void> deleteResource({
  required String organizationId,
  required String resourceId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkMailService.DeleteResource'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'OrganizationId': organizationId,
      'ResourceId': resourceId,
    },
  );
}