deleteResource method

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

Deletes a Resource resource.

May throw UnauthorizedException. May throw NotFoundException. May throw BadRequestException. May throw ConflictException. May throw TooManyRequestsException.

Parameter resourceId : Required The identifier of the Resource resource.

Parameter restApiId : Required The string identifier of the associated RestApi.

Implementation

Future<void> deleteResource({
  required String resourceId,
  required String restApiId,
}) async {
  ArgumentError.checkNotNull(resourceId, 'resourceId');
  ArgumentError.checkNotNull(restApiId, 'restApiId');
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/restapis/${Uri.encodeComponent(restApiId)}/resources/${Uri.encodeComponent(resourceId)}',
    exceptionFnMap: _exceptionFns,
  );
}