import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ECRClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ECRClient"; import type { GetAuthorizationTokenRequest, GetAuthorizationTokenResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link GetAuthorizationTokenCommand}. */ export interface GetAuthorizationTokenCommandInput extends GetAuthorizationTokenRequest { } /** * @public * * The output of {@link GetAuthorizationTokenCommand}. */ export interface GetAuthorizationTokenCommandOutput extends GetAuthorizationTokenResponse, __MetadataBearer { } declare const GetAuthorizationTokenCommand_base: { new (input: GetAuthorizationTokenCommandInput): import("@smithy/smithy-client").CommandImpl; new (...[input]: [] | [GetAuthorizationTokenCommandInput]): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Retrieves an authorization token. An authorization token represents your IAM * authentication credentials and can be used to access any Amazon ECR registry that your IAM * principal has access to. The authorization token is valid for 12 hours.

*

The authorizationToken returned is a base64 encoded string that can be * decoded and used in a docker login command to authenticate to a registry. * The CLI offers an get-login-password command that simplifies the login * process. For more information, see Registry * authentication in the Amazon Elastic Container Registry User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { ECRClient, GetAuthorizationTokenCommand } from "@aws-sdk/client-ecr"; // ES Modules import * // const { ECRClient, GetAuthorizationTokenCommand } = require("@aws-sdk/client-ecr"); // CommonJS import * // import type { ECRClientConfig } from "@aws-sdk/client-ecr"; * const config = {}; // type is ECRClientConfig * const client = new ECRClient(config); * const input = { // GetAuthorizationTokenRequest * registryIds: [ // GetAuthorizationTokenRegistryIdList * "STRING_VALUE", * ], * }; * const command = new GetAuthorizationTokenCommand(input); * const response = await client.send(command); * // { // GetAuthorizationTokenResponse * // authorizationData: [ // AuthorizationDataList * // { // AuthorizationData * // authorizationToken: "STRING_VALUE", * // expiresAt: new Date("TIMESTAMP"), * // proxyEndpoint: "STRING_VALUE", * // }, * // ], * // }; * * ``` * * @param GetAuthorizationTokenCommandInput - {@link GetAuthorizationTokenCommandInput} * @returns {@link GetAuthorizationTokenCommandOutput} * @see {@link GetAuthorizationTokenCommandInput} for command's `input` shape. * @see {@link GetAuthorizationTokenCommandOutput} for command's `response` shape. * @see {@link ECRClientResolvedConfig | config} for ECRClient's `config` shape. * * @throws {@link InvalidParameterException} (client fault) *

The specified parameter is invalid. Review the available parameters for the API * request.

* * @throws {@link ServerException} (server fault) *

These errors are usually caused by a server-side issue.

* * @throws {@link ECRServiceException} *

Base exception class for all service exceptions from ECR service.

* * * @public */ export declare class GetAuthorizationTokenCommand extends GetAuthorizationTokenCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: GetAuthorizationTokenRequest; output: GetAuthorizationTokenResponse; }; sdk: { input: GetAuthorizationTokenCommandInput; output: GetAuthorizationTokenCommandOutput; }; }; }