import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { GetRandomPasswordRequest, GetRandomPasswordResponse } from "../models/models_0"; import type { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link GetRandomPasswordCommand}. */ export interface GetRandomPasswordCommandInput extends GetRandomPasswordRequest { } /** * @public * * The output of {@link GetRandomPasswordCommand}. */ export interface GetRandomPasswordCommandOutput extends GetRandomPasswordResponse, __MetadataBearer { } declare const GetRandomPasswordCommand_base: { new (input: GetRandomPasswordCommandInput): import("@smithy/smithy-client").CommandImpl; new (...[input]: [] | [GetRandomPasswordCommandInput]): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Generates a random password. We recommend that you specify the maximum length and * include every character type that the system you are generating a password for can * support. By default, Secrets Manager uses uppercase and lowercase letters, numbers, and the * following characters in passwords: * !\"#$%&'()*+,-./:;<=>?@[\\]^_`\{|\}~ *

*

Secrets Manager generates a CloudTrail log entry when you call this * action.

*

* Required permissions: * * secretsmanager:GetRandomPassword. For more information, see * IAM policy actions for Secrets Manager and Authentication * and access control in Secrets Manager.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { SecretsManagerClient, GetRandomPasswordCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import * // const { SecretsManagerClient, GetRandomPasswordCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import * // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager"; * const config = {}; // type is SecretsManagerClientConfig * const client = new SecretsManagerClient(config); * const input = { // GetRandomPasswordRequest * PasswordLength: Number("long"), * ExcludeCharacters: "STRING_VALUE", * ExcludeNumbers: true || false, * ExcludePunctuation: true || false, * ExcludeUppercase: true || false, * ExcludeLowercase: true || false, * IncludeSpace: true || false, * RequireEachIncludedType: true || false, * }; * const command = new GetRandomPasswordCommand(input); * const response = await client.send(command); * // { // GetRandomPasswordResponse * // RandomPassword: "STRING_VALUE", * // }; * * ``` * * @param GetRandomPasswordCommandInput - {@link GetRandomPasswordCommandInput} * @returns {@link GetRandomPasswordCommandOutput} * @see {@link GetRandomPasswordCommandInput} for command's `input` shape. * @see {@link GetRandomPasswordCommandOutput} for command's `response` shape. * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. * * @throws {@link InternalServiceError} (server fault) *

An error occurred on the server side.

* * @throws {@link InvalidParameterException} (client fault) *

The parameter name or value is invalid.

* * @throws {@link InvalidRequestException} (client fault) *

A parameter value is not valid for the current state of the * resource.

*

Possible causes:

* * * @throws {@link SecretsManagerServiceException} *

Base exception class for all service exceptions from SecretsManager service.

* * * @example To generate a random password * ```javascript * // The following example shows how to request a randomly generated password. This example includes the optional flags to require spaces and at least one character of each included type. It specifies a length of 20 characters. * const input = { * IncludeSpace: true, * PasswordLength: 20, * RequireEachIncludedType: true * }; * const command = new GetRandomPasswordCommand(input); * const response = await client.send(command); * /* response is * { * RandomPassword: "EXAMPLE-PASSWORD" * } * *\/ * ``` * * @public */ export declare class GetRandomPasswordCommand extends GetRandomPasswordCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: GetRandomPasswordRequest; output: GetRandomPasswordResponse; }; sdk: { input: GetRandomPasswordCommandInput; output: GetRandomPasswordCommandOutput; }; }; }