UNPKG

@aws-sdk/client-ssm

Version:

AWS SDK for JavaScript Ssm Client for Node.js, Browser and React Native

103 lines (102 loc) 4.75 kB
import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { StartSessionRequest, StartSessionResponse } from "../models/models_1"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link StartSessionCommand}. */ export interface StartSessionCommandInput extends StartSessionRequest { } /** * @public * * The output of {@link StartSessionCommand}. */ export interface StartSessionCommandOutput extends StartSessionResponse, __MetadataBearer { } declare const StartSessionCommand_base: { new (input: StartSessionCommandInput): import("@smithy/core/client").CommandImpl<StartSessionCommandInput, StartSessionCommandOutput, import("..").SSMClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>; new (input: StartSessionCommandInput): import("@smithy/core/client").CommandImpl<StartSessionCommandInput, StartSessionCommandOutput, import("..").SSMClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** * <p>Initiates a connection to a target (for example, a managed node) for a Session Manager session. * Returns a URL and token that can be used to open a WebSocket connection for sending input and * receiving outputs.</p> * <note> * <p>Amazon Web Services CLI usage: <code>start-session</code> is an interactive command that requires the Session Manager * plugin to be installed on the client machine making the call. For information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html">Install * the Session Manager plugin for the Amazon Web Services CLI</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p> * <p>Amazon Web Services Tools for PowerShell usage: Start-SSMSession isn't currently supported by Amazon Web Services Tools * for PowerShell on Windows local machines.</p> * </note> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { SSMClient, StartSessionCommand } from "@aws-sdk/client-ssm"; // ES Modules import * // const { SSMClient, StartSessionCommand } = require("@aws-sdk/client-ssm"); // CommonJS import * // import type { SSMClientConfig } from "@aws-sdk/client-ssm"; * const config = {}; // type is SSMClientConfig * const client = new SSMClient(config); * const input = { // StartSessionRequest * Target: "STRING_VALUE", // required * DocumentName: "STRING_VALUE", * Reason: "STRING_VALUE", * Parameters: { // SessionManagerParameters * "<keys>": [ // SessionManagerParameterValueList * "STRING_VALUE", * ], * }, * }; * const command = new StartSessionCommand(input); * const response = await client.send(command); * // { // StartSessionResponse * // SessionId: "STRING_VALUE", * // TokenValue: "STRING_VALUE", * // StreamUrl: "STRING_VALUE", * // }; * * ``` * * @param StartSessionCommandInput - {@link StartSessionCommandInput} * @returns {@link StartSessionCommandOutput} * @see {@link StartSessionCommandInput} for command's `input` shape. * @see {@link StartSessionCommandOutput} for command's `response` shape. * @see {@link SSMClientResolvedConfig | config} for SSMClient's `config` shape. * * @throws {@link InternalServerError} (server fault) * <p>An error occurred on the server side.</p> * * @throws {@link InvalidDocument} (client fault) * <p>The specified SSM document doesn't exist.</p> * * @throws {@link TargetNotConnected} (client fault) * <p>The specified target managed node for the session isn't fully configured for use with Session Manager. * For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html">Setting up * Session Manager</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. This error is also returned if you * attempt to start a session on a managed node that is located in a different account or * Region</p> * * @throws {@link SSMServiceException} * <p>Base exception class for all service exceptions from SSM service.</p> * * * @public */ export declare class StartSessionCommand extends StartSessionCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: StartSessionRequest; output: StartSessionResponse; }; sdk: { input: StartSessionCommandInput; output: StartSessionCommandOutput; }; }; }