clients/client-ssm/README.md
AWS SDK for JavaScript SSM Client for Node.js, Browser and React Native.
<p>Amazon Web Services Systems Manager is the operations hub for your Amazon Web Services applications and resources and a secure end-to-end management solution for hybrid cloud environments that enables safe and secure operations at scale.</p> <p>This reference is intended to be used with the <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/">Amazon Web Services Systems Manager User Guide</a>. To get started, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up-console.html">Setting up Amazon Web Services Systems Manager</a>.</p> <p class="title"> <b>Related resources</b> </p> <ul> <li> <p>For information about each of the tools that comprise Systems Manager, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-tools.html">Using Systems Manager tools</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p> </li> <li> <p>For details about predefined runbooks for Automation, a tool in Amazon Web Services Systems Manager, see the <i> <a href="https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/automation-runbook-reference.html">Systems Manager Automation Runbook Reference</a> </i>.</p> </li> <li> <p>For information about AppConfig, a tool in Systems Manager, see the <i> <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/">AppConfig User Guide</a> </i> and the <i> <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/">AppConfig API Reference</a> </i>.</p> </li> <li> <p>For information about Incident Manager, a tool in Systems Manager, see the <i> <a href="https://docs.aws.amazon.com/incident-manager/latest/userguide/">Systems Manager Incident Manager User Guide</a> </i> and the <i> <a href="https://docs.aws.amazon.com/incident-manager/latest/APIReference/">Systems Manager Incident Manager API Reference</a> </i>.</p> </li> </ul>To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-ssmyarn add @aws-sdk/client-ssmpnpm add @aws-sdk/client-ssmThe AWS SDK is modulized by clients and commands.
To send a request, you only need to import the SSMClient and
the commands you need, for example ListNodesCommand:
// ES5 example
const { SSMClient, ListNodesCommand } = require("@aws-sdk/client-ssm");
// ES6+ example
import { SSMClient, ListNodesCommand } from "@aws-sdk/client-ssm";
To send a request:
send operation on the client, providing the command object as input.const client = new SSMClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListNodesCommand(params);
We recommend using the await operator to wait for the promise returned by send operation as follows:
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
You can also use Promise chaining.
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
The aggregated client class is exported from the same package, but without the "Client" suffix.
SSM extends SSMClient and additionally supports all operations, waiters, and paginators as methods.
This style may be familiar to you from the AWS SDK for JavaScript v2.
If you are bundling the AWS SDK, we recommend using only the bare-bones client (SSMClient).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { SSM } from "@aws-sdk/client-ssm";
const client = new SSM({ region: "REGION" });
// async/await.
try {
const data = await client.listNodes(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listNodes(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listNodes(params, (err, data) => {
// process err and data.
});
When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).
try {
const data = await client.send(command);
// process data.
} catch (error) {
const { requestId, cfId, extendedRequestId } = error.$metadata;
console.log({ requestId, cfId, extendedRequestId });
/**
* The keys within exceptions are also parsed.
* You can access them by specifying exception names:
* if (error.name === 'SomeServiceException') {
* const value = error.specialKeyInException;
* }
*/
}
See also docs/ERROR_HANDLING.
Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
aws-sdk-js
on AWS Developer Blog.aws-sdk-js.To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.
This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-ssm package is updated.
To contribute to client you can check our generate clients scripts.
This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.
Command API Reference / Input / Output
</details> <details> <summary> AssociateOpsItemRelatedItem </summary>Command API Reference / Input / Output
</details> <details> <summary> CancelCommand </summary>Command API Reference / Input / Output
</details> <details> <summary> CancelMaintenanceWindowExecution </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateActivation </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateAssociation </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateAssociationBatch </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateDocument </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateMaintenanceWindow </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateOpsItem </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateOpsMetadata </summary>Command API Reference / Input / Output
</details> <details> <summary> CreatePatchBaseline </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateResourceDataSync </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteActivation </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteAssociation </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteDocument </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteInventory </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteMaintenanceWindow </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteOpsItem </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteOpsMetadata </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteParameter </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteParameters </summary>Command API Reference / Input / Output
</details> <details> <summary> DeletePatchBaseline </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteResourceDataSync </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteResourcePolicy </summary>Command API Reference / Input / Output
</details> <details> <summary> DeregisterManagedInstance </summary>Command API Reference / Input / Output
</details> <details> <summary> DeregisterPatchBaselineForPatchGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> DeregisterTargetFromMaintenanceWindow </summary>Command API Reference / Input / Output
</details> <details> <summary> DeregisterTaskFromMaintenanceWindow </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeActivations </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeAssociation </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeAssociationExecutions </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeAssociationExecutionTargets </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeAutomationExecutions </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeAutomationStepExecutions </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeAvailablePatches </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeDocument </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeDocumentPermission </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeEffectiveInstanceAssociations </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeEffectivePatchesForPatchBaseline </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeInstanceAssociationsStatus </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeInstanceInformation </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeInstancePatches </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeInstancePatchStates </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeInstancePatchStatesForPatchGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeInstanceProperties </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeInventoryDeletions </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeMaintenanceWindowExecutions </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeMaintenanceWindowExecutionTaskInvocations </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeMaintenanceWindowExecutionTasks </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeMaintenanceWindows </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeMaintenanceWindowSchedule </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeMaintenanceWindowsForTarget </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeMaintenanceWindowTargets </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeMaintenanceWindowTasks </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeOpsItems </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeParameters </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribePatchBaselines </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribePatchGroups </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribePatchGroupState </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribePatchProperties </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeSessions </summary>Command API Reference / Input / Output
</details> <details> <summary> DisassociateOpsItemRelatedItem </summary>Command API Reference / Input / Output
</details> <details> <summary> GetAccessToken </summary>Command API Reference / Input / Output
</details> <details> <summary> GetAutomationExecution </summary>Command API Reference / Input / Output
</details> <details> <summary> GetCalendarState </summary>Command API Reference / Input / Output
</details> <details> <summary> GetCommandInvocation </summary>Command API Reference / Input / Output
</details> <details> <summary> GetConnectionStatus </summary>Command API Reference / Input / Output
</details> <details> <summary> GetDefaultPatchBaseline </summary>Command API Reference / Input / Output
</details> <details> <summary> GetDeployablePatchSnapshotForInstance </summary>Command API Reference / Input / Output
</details> <details> <summary> GetDocument </summary>Command API Reference / Input / Output
</details> <details> <summary> GetExecutionPreview </summary>Command API Reference / Input / Output
</details> <details> <summary> GetInventory </summary>Command API Reference / Input / Output
</details> <details> <summary> GetInventorySchema </summary>Command API Reference / Input / Output
</details> <details> <summary> GetMaintenanceWindow </summary>Command API Reference / Input / Output
</details> <details> <summary> GetMaintenanceWindowExecution </summary>Command API Reference / Input / Output
</details> <details> <summary> GetMaintenanceWindowExecutionTask </summary>Command API Reference / Input / Output
</details> <details> <summary> GetMaintenanceWindowExecutionTaskInvocation </summary>Command API Reference / Input / Output
</details> <details> <summary> GetMaintenanceWindowTask </summary>Command API Reference / Input / Output
</details> <details> <summary> GetOpsItem </summary>Command API Reference / Input / Output
</details> <details> <summary> GetOpsMetadata </summary>Command API Reference / Input / Output
</details> <details> <summary> GetOpsSummary </summary>Command API Reference / Input / Output
</details> <details> <summary> GetParameter </summary>Command API Reference / Input / Output
</details> <details> <summary> GetParameterHistory </summary>Command API Reference / Input / Output
</details> <details> <summary> GetParameters </summary>Command API Reference / Input / Output
</details> <details> <summary> GetParametersByPath </summary>Command API Reference / Input / Output
</details> <details> <summary> GetPatchBaseline </summary>Command API Reference / Input / Output
</details> <details> <summary> GetPatchBaselineForPatchGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> GetResourcePolicies </summary>Command API Reference / Input / Output
</details> <details> <summary> GetServiceSetting </summary>Command API Reference / Input / Output
</details> <details> <summary> LabelParameterVersion </summary>Command API Reference / Input / Output
</details> <details> <summary> ListAssociations </summary>Command API Reference / Input / Output
</details> <details> <summary> ListAssociationVersions </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCommandInvocations </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCommands </summary>Command API Reference / Input / Output
</details> <details> <summary> ListComplianceItems </summary>Command API Reference / Input / Output
</details> <details> <summary> ListComplianceSummaries </summary>Command API Reference / Input / Output
</details> <details> <summary> ListDocumentMetadataHistory </summary>Command API Reference / Input / Output
</details> <details> <summary> ListDocuments </summary>Command API Reference / Input / Output
</details> <details> <summary> ListDocumentVersions </summary>Command API Reference / Input / Output
</details> <details> <summary> ListInventoryEntries </summary>Command API Reference / Input / Output
</details> <details> <summary> ListNodes </summary>Command API Reference / Input / Output
</details> <details> <summary> ListNodesSummary </summary>Command API Reference / Input / Output
</details> <details> <summary> ListOpsItemEvents </summary>Command API Reference / Input / Output
</details> <details> <summary> ListOpsItemRelatedItems </summary>Command API Reference / Input / Output
</details> <details> <summary> ListOpsMetadata </summary>Command API Reference / Input / Output
</details> <details> <summary> ListResourceComplianceSummaries </summary>Command API Reference / Input / Output
</details> <details> <summary> ListResourceDataSync </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTagsForResource </summary>Command API Reference / Input / Output
</details> <details> <summary> ModifyDocumentPermission </summary>Command API Reference / Input / Output
</details> <details> <summary> PutComplianceItems </summary>Command API Reference / Input / Output
</details> <details> <summary> PutInventory </summary>Command API Reference / Input / Output
</details> <details> <summary> PutParameter </summary>Command API Reference / Input / Output
</details> <details> <summary> PutResourcePolicy </summary>Command API Reference / Input / Output
</details> <details> <summary> RegisterDefaultPatchBaseline </summary>Command API Reference / Input / Output
</details> <details> <summary> RegisterPatchBaselineForPatchGroup </summary>Command API Reference / Input / Output
</details> <details> <summary> RegisterTargetWithMaintenanceWindow </summary>Command API Reference / Input / Output
</details> <details> <summary> RegisterTaskWithMaintenanceWindow </summary>Command API Reference / Input / Output
</details> <details> <summary> RemoveTagsFromResource </summary>Command API Reference / Input / Output
</details> <details> <summary> ResetServiceSetting </summary>Command API Reference / Input / Output
</details> <details> <summary> ResumeSession </summary>Command API Reference / Input / Output
</details> <details> <summary> SendAutomationSignal </summary>Command API Reference / Input / Output
</details> <details> <summary> SendCommand </summary>Command API Reference / Input / Output
</details> <details> <summary> StartAccessRequest </summary>Command API Reference / Input / Output
</details> <details> <summary> StartAssociationsOnce </summary>Command API Reference / Input / Output
</details> <details> <summary> StartAutomationExecution </summary>Command API Reference / Input / Output
</details> <details> <summary> StartChangeRequestExecution </summary>Command API Reference / Input / Output
</details> <details> <summary> StartExecutionPreview </summary>Command API Reference / Input / Output
</details> <details> <summary> StartSession </summary>Command API Reference / Input / Output
</details> <details> <summary> StopAutomationExecution </summary>Command API Reference / Input / Output
</details> <details> <summary> TerminateSession </summary>Command API Reference / Input / Output
</details> <details> <summary> UnlabelParameterVersion </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateAssociation </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateAssociationStatus </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateDocument </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateDocumentDefaultVersion </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateDocumentMetadata </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateMaintenanceWindow </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateMaintenanceWindowTarget </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateMaintenanceWindowTask </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateManagedInstanceRole </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateOpsItem </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateOpsMetadata </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdatePatchBaseline </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateResourceDataSync </summary> </details> <details> <summary> UpdateServiceSetting </summary> </details>