deleteResource method
Deletes the specified resource.
May throw EntityStateException. May throw InvalidParameterException. May throw OrganizationNotFoundException. May throw OrganizationStateException.
Parameter organizationId
:
The identifier associated with the organization from which the resource is
deleted.
Parameter resourceId
:
The identifier of the resource to be deleted.
Implementation
Future<void> deleteResource({
required String organizationId,
required String resourceId,
}) async {
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.DeleteResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'OrganizationId': organizationId,
'ResourceId': resourceId,
},
);
}