- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
BatchAssociateAnalyticsDataSetCommand
Associates a list of analytics datasets for a given Amazon Connect instance to a target account. You can associate multiple datasets in a single call.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ConnectClient, BatchAssociateAnalyticsDataSetCommand } from "@aws-sdk/client-connect"; // ES Modules import
// const { ConnectClient, BatchAssociateAnalyticsDataSetCommand } = require("@aws-sdk/client-connect"); // CommonJS import
const client = new ConnectClient(config);
const input = { // BatchAssociateAnalyticsDataSetRequest
InstanceId: "STRING_VALUE", // required
DataSetIds: [ // DataSetIds // required
"STRING_VALUE",
],
TargetAccountId: "STRING_VALUE",
};
const command = new BatchAssociateAnalyticsDataSetCommand(input);
const response = await client.send(command);
// { // BatchAssociateAnalyticsDataSetResponse
// Created: [ // AnalyticsDataAssociationResults
// { // AnalyticsDataAssociationResult
// DataSetId: "STRING_VALUE",
// TargetAccountId: "STRING_VALUE",
// ResourceShareId: "STRING_VALUE",
// ResourceShareArn: "STRING_VALUE",
// ResourceShareStatus: "STRING_VALUE",
// },
// ],
// Errors: [ // ErrorResults
// { // ErrorResult
// ErrorCode: "STRING_VALUE",
// ErrorMessage: "STRING_VALUE",
// },
// ],
// };
BatchAssociateAnalyticsDataSetCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DataSetIds Required | string[] | undefined | An array of dataset identifiers to associate. |
InstanceId Required | string | undefined | The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. |
TargetAccountId | string | undefined | The identifier of the target account. Use to associate a dataset to a different account than the one containing the Amazon Connect instance. If not specified, by default this value is the Amazon Web Services account that has the Amazon Connect instance. |
BatchAssociateAnalyticsDataSetCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Created | AnalyticsDataAssociationResult[] | undefined | Information about associations that are successfully created: |
Errors | ErrorResult[] | undefined | A list of errors for datasets that aren't successfully associated with the target account. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServiceException | server | Request processing failed because of an error or failure with the service. |
InvalidParameterException | client | One or more of the specified parameters are not valid. |
InvalidRequestException | client | The request is not valid. |
ResourceNotFoundException | client | The specified resource was not found. |
ThrottlingException | client | The throttling limit has been exceeded. |
ConnectServiceException | Base exception class for all service exceptions from Connect service. |