import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { SubscribeToDatasetRequest, SubscribeToDatasetResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link SubscribeToDatasetCommand}. */ export interface SubscribeToDatasetCommandInput extends SubscribeToDatasetRequest { } /** * @public * * The output of {@link SubscribeToDatasetCommand}. */ export interface SubscribeToDatasetCommandOutput extends SubscribeToDatasetResponse, __MetadataBearer { } declare const SubscribeToDatasetCommand_base: { new (input: SubscribeToDatasetCommandInput): import("@smithy/core/client").CommandImpl; new (input: SubscribeToDatasetCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Subscribes to receive notifications when a dataset is modified by another device.

This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.

* * * SubscribeToDataset * The following examples have been edited for readability. * * POST / HTTP/1.1 * CONTENT-TYPE: application/json * X-AMZN-REQUESTID: 8b9932b7-201d-4418-a960-0a470e11de9f * X-AMZ-TARGET: com.amazonaws.cognito.sync.model.AWSCognitoSyncService.SubscribeToDataset * HOST: cognito-sync.us-east-1.amazonaws.com * X-AMZ-DATE: 20141004T195350Z * X-AMZ-SECURITY-TOKEN: * AUTHORIZATION: AWS4-HMAC-SHA256 Credential=, SignedHeaders=content-type;content-length;host;x-amz-date;x-amz-target, Signature= * * \{ * "Operation": "com.amazonaws.cognito.sync.model#SubscribeToDataset", * "Service": "com.amazonaws.cognito.sync.model#AWSCognitoSyncService", * "Input": * \{ * "IdentityPoolId": "ID_POOL_ID", * "IdentityId": "IDENTITY_ID", * "DatasetName": "Rufus", * "DeviceId": "5cd28fbe-dd83-47ab-9f83-19093a5fb014" * \} * \} * * * 1.1 200 OK * x-amzn-requestid: 8b9932b7-201d-4418-a960-0a470e11de9f * date: Sat, 04 Oct 2014 19:53:50 GMT * content-type: application/json * content-length: 99 * * \{ * "Output": * \{ * "__type": "com.amazonaws.cognito.sync.model#SubscribeToDatasetResponse" * \}, * "Version": "1.0" * \} * * * * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoSyncClient, SubscribeToDatasetCommand } from "@aws-sdk/client-cognito-sync"; // ES Modules import * // const { CognitoSyncClient, SubscribeToDatasetCommand } = require("@aws-sdk/client-cognito-sync"); // CommonJS import * // import type { CognitoSyncClientConfig } from "@aws-sdk/client-cognito-sync"; * const config = {}; // type is CognitoSyncClientConfig * const client = new CognitoSyncClient(config); * const input = { // SubscribeToDatasetRequest * IdentityPoolId: "STRING_VALUE", // required * IdentityId: "STRING_VALUE", // required * DatasetName: "STRING_VALUE", // required * DeviceId: "STRING_VALUE", // required * }; * const command = new SubscribeToDatasetCommand(input); * const response = await client.send(command); * // {}; * * ``` * * @param SubscribeToDatasetCommandInput - {@link SubscribeToDatasetCommandInput} * @returns {@link SubscribeToDatasetCommandOutput} * @see {@link SubscribeToDatasetCommandInput} for command's `input` shape. * @see {@link SubscribeToDatasetCommandOutput} for command's `response` shape. * @see {@link CognitoSyncClientResolvedConfig | config} for CognitoSyncClient's `config` shape. * * @throws {@link InternalErrorException} (server fault) * Indicates an internal service * error. * * @throws {@link InvalidConfigurationException} (client fault) * * @throws {@link InvalidParameterException} (client fault) * Thrown when a request parameter does not comply * with the associated constraints. * * @throws {@link NotAuthorizedException} (client fault) * Thrown when a user is not authorized to access the * requested resource. * * @throws {@link ResourceNotFoundException} (client fault) * Thrown if the resource doesn't * exist. * * @throws {@link TooManyRequestsException} (client fault) * Thrown if the request is * throttled. * * @throws {@link CognitoSyncServiceException} *

Base exception class for all service exceptions from CognitoSync service.

* * * @public */ export declare class SubscribeToDatasetCommand extends SubscribeToDatasetCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: SubscribeToDatasetRequest; output: {}; }; sdk: { input: SubscribeToDatasetCommandInput; output: SubscribeToDatasetCommandOutput; }; }; }