import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ListDatasetsRequest, ListDatasetsResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link ListDatasetsCommand}. */ export interface ListDatasetsCommandInput extends ListDatasetsRequest { } /** * @public * * The output of {@link ListDatasetsCommand}. */ export interface ListDatasetsCommandOutput extends ListDatasetsResponse, __MetadataBearer { } declare const ListDatasetsCommand_base: { new (input: ListDatasetsCommandInput): import("@smithy/core/client").CommandImpl; new (input: ListDatasetsCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Lists datasets for an identity. With Amazon Cognito Sync, each identity has access only to * its own data. Thus, the credentials used to make this API call need to have access to the * identity data.

*

ListDatasets can be called with temporary user credentials provided by Cognito * Identity or with developer credentials. You should use the Cognito Identity credentials to * make this API call.

* * * ListDatasets * The following examples have been edited for readability. * * POST / HTTP/1.1 * CONTENT-TYPE: application/json * X-AMZN-REQUESTID: 15225768-209f-4078-aaed-7494ace9f2db * X-AMZ-TARGET: com.amazonaws.cognito.sync.model.AWSCognitoSyncService.ListDatasets * HOST: cognito-sync.us-east-1.amazonaws.com:443 * X-AMZ-DATE: 20141111T215640Z * AUTHORIZATION: AWS4-HMAC-SHA256 Credential=, SignedHeaders=content-type;host;x-amz-date;x-amz-target;x-amzn-requestid, Signature= * * \{ * "Operation": "com.amazonaws.cognito.sync.model#ListDatasets", * "Service": "com.amazonaws.cognito.sync.model#AWSCognitoSyncService", * "Input": * \{ * "IdentityPoolId": "IDENTITY_POOL_ID", * "IdentityId": "IDENTITY_ID", * "MaxResults": "3" * \} * \} * * * 1.1 200 OK * x-amzn-requestid: 15225768-209f-4078-aaed-7494ace9f2db, 15225768-209f-4078-aaed-7494ace9f2db * content-type: application/json * content-length: 355 * date: Tue, 11 Nov 2014 21:56:40 GMT * * \{ * "Output": * \{ * "__type": "com.amazonaws.cognito.sync.model#ListDatasetsResponse", * "Count": 1, * "Datasets": [ * \{ * "CreationDate": 1.412974057151E9, * "DataStorage": 16, * "DatasetName": "my_list", * "IdentityId": "IDENTITY_ID", * "LastModifiedBy": "123456789012", * "LastModifiedDate": 1.412974057244E9, * "NumRecords": 1 * \}], * "NextToken": null * \}, * "Version": "1.0" * \} * * * * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoSyncClient, ListDatasetsCommand } from "@aws-sdk/client-cognito-sync"; // ES Modules import * // const { CognitoSyncClient, ListDatasetsCommand } = 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 = { // ListDatasetsRequest * IdentityPoolId: "STRING_VALUE", // required * IdentityId: "STRING_VALUE", // required * NextToken: "STRING_VALUE", * MaxResults: Number("int"), * }; * const command = new ListDatasetsCommand(input); * const response = await client.send(command); * // { // ListDatasetsResponse * // Datasets: [ // DatasetList * // { // Dataset * // IdentityId: "STRING_VALUE", * // DatasetName: "STRING_VALUE", * // CreationDate: new Date("TIMESTAMP"), * // LastModifiedDate: new Date("TIMESTAMP"), * // LastModifiedBy: "STRING_VALUE", * // DataStorage: Number("long"), * // NumRecords: Number("long"), * // }, * // ], * // Count: Number("int"), * // NextToken: "STRING_VALUE", * // }; * * ``` * * @param ListDatasetsCommandInput - {@link ListDatasetsCommandInput} * @returns {@link ListDatasetsCommandOutput} * @see {@link ListDatasetsCommandInput} for command's `input` shape. * @see {@link ListDatasetsCommandOutput} 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 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 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 ListDatasetsCommand extends ListDatasetsCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: ListDatasetsRequest; output: ListDatasetsResponse; }; sdk: { input: ListDatasetsCommandInput; output: ListDatasetsCommandOutput; }; }; }