batchDisassociateAnalyticsDataSet method

Future<BatchDisassociateAnalyticsDataSetResponse> batchDisassociateAnalyticsDataSet({
  1. required List<String> dataSetIds,
  2. required String instanceId,
  3. String? targetAccountId,
})

Removes a list of analytics datasets associated with a given Connect Customer instance. You can disassociate multiple datasets in a single call.

May throw InternalServiceException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter dataSetIds : An array of associated dataset identifiers to remove.

Parameter instanceId : The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

Parameter targetAccountId : The identifier of the target account. Use to disassociate a dataset from a different account than the one containing the Connect Customer instance. If not specified, by default this value is the Amazon Web Services account that has the Connect Customer instance.

Implementation

Future<BatchDisassociateAnalyticsDataSetResponse>
    batchDisassociateAnalyticsDataSet({
  required List<String> dataSetIds,
  required String instanceId,
  String? targetAccountId,
}) async {
  final $payload = <String, dynamic>{
    'DataSetIds': dataSetIds,
    if (targetAccountId != null) 'TargetAccountId': targetAccountId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/analytics-data/instance/${Uri.encodeComponent(instanceId)}/associations',
    exceptionFnMap: _exceptionFns,
  );
  return BatchDisassociateAnalyticsDataSetResponse.fromJson(response);
}