batchDisassociateProjectAssets method
Disassociates a group (batch) of assets from an IoT SiteWise Monitor project.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter assetIds :
The IDs of the assets to be disassociated from the project.
Parameter projectId :
The ID of the project from which to disassociate the assets.
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<BatchDisassociateProjectAssetsResponse>
batchDisassociateProjectAssets({
required List<String> assetIds,
required String projectId,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
'assetIds': assetIds,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/projects/${Uri.encodeComponent(projectId)}/assets/disassociate',
exceptionFnMap: _exceptionFns,
);
return BatchDisassociateProjectAssetsResponse.fromJson(response);
}