import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { RegisterDeviceRequest, RegisterDeviceResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link RegisterDeviceCommand}. */ export interface RegisterDeviceCommandInput extends RegisterDeviceRequest { } /** * @public * * The output of {@link RegisterDeviceCommand}. */ export interface RegisterDeviceCommandOutput extends RegisterDeviceResponse, __MetadataBearer { } declare const RegisterDeviceCommand_base: { new (input: RegisterDeviceCommandInput): import("@smithy/core/client").CommandImpl; new (input: RegisterDeviceCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Registers a device to receive push sync notifications.

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

* * * RegisterDevice * The following examples have been edited for readability. * * POST / HTTP/1.1 * CONTENT-TYPE: application/json * X-AMZN-REQUESTID: 368f9200-3eca-449e-93b3-7b9c08d8e185 * X-AMZ-TARGET: com.amazonaws.cognito.sync.model.AWSCognitoSyncService.RegisterDevice * HOST: cognito-sync.us-east-1.amazonaws.com * X-AMZ-DATE: 20141004T194643Z * 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#RegisterDevice", * "Service": "com.amazonaws.cognito.sync.model#AWSCognitoSyncService", * "Input": * \{ * "IdentityPoolId": "ID_POOL_ID", * "IdentityId": "IDENTITY_ID", * "Platform": "GCM", * "Token": "PUSH_TOKEN" * \} * \} * * * 1.1 200 OK * x-amzn-requestid: 368f9200-3eca-449e-93b3-7b9c08d8e185 * date: Sat, 04 Oct 2014 19:46:44 GMT * content-type: application/json * content-length: 145 * * \{ * "Output": * \{ * "__type": "com.amazonaws.cognito.sync.model#RegisterDeviceResponse", * "DeviceId": "5cd28fbe-dd83-47ab-9f83-19093a5fb014" * \}, * "Version": "1.0" * \} * * * * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoSyncClient, RegisterDeviceCommand } from "@aws-sdk/client-cognito-sync"; // ES Modules import * // const { CognitoSyncClient, RegisterDeviceCommand } = 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 = { // RegisterDeviceRequest * IdentityPoolId: "STRING_VALUE", // required * IdentityId: "STRING_VALUE", // required * Platform: "APNS" || "APNS_SANDBOX" || "GCM" || "ADM", // required * Token: "STRING_VALUE", // required * }; * const command = new RegisterDeviceCommand(input); * const response = await client.send(command); * // { // RegisterDeviceResponse * // DeviceId: "STRING_VALUE", * // }; * * ``` * * @param RegisterDeviceCommandInput - {@link RegisterDeviceCommandInput} * @returns {@link RegisterDeviceCommandOutput} * @see {@link RegisterDeviceCommandInput} for command's `input` shape. * @see {@link RegisterDeviceCommandOutput} 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 RegisterDeviceCommand extends RegisterDeviceCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: RegisterDeviceRequest; output: RegisterDeviceResponse; }; sdk: { input: RegisterDeviceCommandInput; output: RegisterDeviceCommandOutput; }; }; }