- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetConnectionStatusCommand
Retrieves the Session Manager connection status for a managed node to determine whether it is running and ready to receive Session Manager connections.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { SSMClient, GetConnectionStatusCommand } from "@aws-sdk/client-ssm"; // ES Modules import
// const { SSMClient, GetConnectionStatusCommand } = require("@aws-sdk/client-ssm"); // CommonJS import
const client = new SSMClient(config);
const input = { // GetConnectionStatusRequest
Target: "STRING_VALUE", // required
};
const command = new GetConnectionStatusCommand(input);
const response = await client.send(command);
// { // GetConnectionStatusResponse
// Target: "STRING_VALUE",
// Status: "connected" || "notconnected",
// };
GetConnectionStatusCommand Input
See GetConnectionStatusCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Target Required | string | undefined | The managed node ID. |
GetConnectionStatusCommand Output
See GetConnectionStatusCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Status | ConnectionStatus | undefined | The status of the connection to the managed node. |
Target | string | undefined | The ID of the managed node to check connection status. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerError | server | An error occurred on the server side. |
SSMServiceException | Base exception class for all service exceptions from SSM service. |