deletePortal method

Future<DeletePortalResponse> deletePortal({
  1. required String portalId,
  2. String? clientToken,
})

Deletes a portal from IoT SiteWise Monitor.

May throw ConflictingOperationException. May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter portalId : The ID of the portal to delete.

Parameter clientToken : A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

Implementation

Future<DeletePortalResponse> deletePortal({
  required String portalId,
  String? clientToken,
}) async {
  final $query = <String, List<String>>{
    if (clientToken != null) 'clientToken': [clientToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/portals/${Uri.encodeComponent(portalId)}',
    queryParams: $query,
    hostPrefix: 'monitor.',
    exceptionFnMap: _exceptionFns,
  );
  return DeletePortalResponse.fromJson(response);
}