JSPM

@aws-sdk/client-ssm

3.887.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2729598
  • Score
    100M100P100Q216543F
  • License Apache-2.0

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

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@aws-sdk/client-ssm) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @aws-sdk/client-ssm

    Description

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

    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.

    This reference is intended to be used with the Amazon Web Services Systems Manager User Guide. To get started, see Setting up Amazon Web Services Systems Manager.

    Related resources

    Installing

    To install this package, simply type add or install @aws-sdk/client-ssm using your favorite package manager:

    • npm install @aws-sdk/client-ssm
    • yarn add @aws-sdk/client-ssm
    • pnpm add @aws-sdk/client-ssm

    Getting Started

    Import

    The 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";

    Usage

    To send a request, you:

    • Initiate client with configuration (e.g. credentials, region).
    • Initiate command with input parameters.
    • Call send operation on client with command object as input.
    • If you are using a custom http handler, you may call destroy() to close open connections.
    // a client can be shared by different commands.
    const client = new SSMClient({ region: "REGION" });
    
    const params = {
      /** input parameters */
    };
    const command = new ListNodesCommand(params);

    Async/await

    We recommend using 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.
    }

    Async-await is clean, concise, intuitive, easy to debug and has better error handling as compared to using Promise chains or callbacks.

    Promises

    You can also use Promise chaining to execute send operation.

    client.send(command).then(
      (data) => {
        // process data.
      },
      (error) => {
        // error handling.
      }
    );

    Promises can also be called using .catch() and .finally() as follows:

    client
      .send(command)
      .then((data) => {
        // process data.
      })
      .catch((error) => {
        // error handling.
      })
      .finally(() => {
        // finally.
      });

    Callbacks

    We do not recommend using callbacks because of callback hell, but they are supported by the send operation.

    // callbacks.
    client.send(command, (err, data) => {
      // process err and data.
    });

    v2 compatible style

    The client can also send requests using v2 compatible style. However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post on modular packages in AWS SDK for JavaScript

    import * as AWS from "@aws-sdk/client-ssm";
    const client = new AWS.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.
    client.listNodes(params, (err, data) => {
      // process err and data.
    });

    Troubleshooting

    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;
       * }
       */
    }

    Getting Help

    Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.

    To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.

    Contributing

    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.

    License

    This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.

    Client Commands (Operations List)

    AddTagsToResource

    Command API Reference / Input / Output

    AssociateOpsItemRelatedItem

    Command API Reference / Input / Output

    CancelCommand

    Command API Reference / Input / Output

    CancelMaintenanceWindowExecution

    Command API Reference / Input / Output

    CreateActivation

    Command API Reference / Input / Output

    CreateAssociation

    Command API Reference / Input / Output

    CreateAssociationBatch

    Command API Reference / Input / Output

    CreateDocument

    Command API Reference / Input / Output

    CreateMaintenanceWindow

    Command API Reference / Input / Output

    CreateOpsItem

    Command API Reference / Input / Output

    CreateOpsMetadata

    Command API Reference / Input / Output

    CreatePatchBaseline

    Command API Reference / Input / Output

    CreateResourceDataSync

    Command API Reference / Input / Output

    DeleteActivation

    Command API Reference / Input / Output

    DeleteAssociation

    Command API Reference / Input / Output

    DeleteDocument

    Command API Reference / Input / Output

    DeleteInventory

    Command API Reference / Input / Output

    DeleteMaintenanceWindow

    Command API Reference / Input / Output

    DeleteOpsItem

    Command API Reference / Input / Output

    DeleteOpsMetadata

    Command API Reference / Input / Output

    DeleteParameter

    Command API Reference / Input / Output

    DeleteParameters

    Command API Reference / Input / Output

    DeletePatchBaseline

    Command API Reference / Input / Output

    DeleteResourceDataSync

    Command API Reference / Input / Output

    DeleteResourcePolicy

    Command API Reference / Input / Output

    DeregisterManagedInstance

    Command API Reference / Input / Output

    DeregisterPatchBaselineForPatchGroup

    Command API Reference / Input / Output

    DeregisterTargetFromMaintenanceWindow

    Command API Reference / Input / Output

    DeregisterTaskFromMaintenanceWindow

    Command API Reference / Input / Output

    DescribeActivations

    Command API Reference / Input / Output

    DescribeAssociation

    Command API Reference / Input / Output

    DescribeAssociationExecutions

    Command API Reference / Input / Output

    DescribeAssociationExecutionTargets

    Command API Reference / Input / Output

    DescribeAutomationExecutions

    Command API Reference / Input / Output

    DescribeAutomationStepExecutions

    Command API Reference / Input / Output

    DescribeAvailablePatches

    Command API Reference / Input / Output

    DescribeDocument

    Command API Reference / Input / Output

    DescribeDocumentPermission

    Command API Reference / Input / Output

    DescribeEffectiveInstanceAssociations

    Command API Reference / Input / Output

    DescribeEffectivePatchesForPatchBaseline

    Command API Reference / Input / Output

    DescribeInstanceAssociationsStatus

    Command API Reference / Input / Output

    DescribeInstanceInformation

    Command API Reference / Input / Output

    DescribeInstancePatches

    Command API Reference / Input / Output

    DescribeInstancePatchStates

    Command API Reference / Input / Output

    DescribeInstancePatchStatesForPatchGroup

    Command API Reference / Input / Output

    DescribeInstanceProperties

    Command API Reference / Input / Output

    DescribeInventoryDeletions

    Command API Reference / Input / Output

    DescribeMaintenanceWindowExecutions

    Command API Reference / Input / Output

    DescribeMaintenanceWindowExecutionTaskInvocations

    Command API Reference / Input / Output

    DescribeMaintenanceWindowExecutionTasks

    Command API Reference / Input / Output

    DescribeMaintenanceWindows

    Command API Reference / Input / Output

    DescribeMaintenanceWindowSchedule

    Command API Reference / Input / Output

    DescribeMaintenanceWindowsForTarget

    Command API Reference / Input / Output

    DescribeMaintenanceWindowTargets

    Command API Reference / Input / Output

    DescribeMaintenanceWindowTasks

    Command API Reference / Input / Output

    DescribeOpsItems

    Command API Reference / Input / Output

    DescribeParameters

    Command API Reference / Input / Output

    DescribePatchBaselines

    Command API Reference / Input / Output

    DescribePatchGroups

    Command API Reference / Input / Output

    DescribePatchGroupState

    Command API Reference / Input / Output

    DescribePatchProperties

    Command API Reference / Input / Output

    DescribeSessions

    Command API Reference / Input / Output

    DisassociateOpsItemRelatedItem

    Command API Reference / Input / Output

    GetAccessToken

    Command API Reference / Input / Output

    GetAutomationExecution

    Command API Reference / Input / Output

    GetCalendarState

    Command API Reference / Input / Output

    GetCommandInvocation

    Command API Reference / Input / Output

    GetConnectionStatus

    Command API Reference / Input / Output

    GetDefaultPatchBaseline

    Command API Reference / Input / Output

    GetDeployablePatchSnapshotForInstance

    Command API Reference / Input / Output

    GetDocument

    Command API Reference / Input / Output

    GetExecutionPreview

    Command API Reference / Input / Output

    GetInventory

    Command API Reference / Input / Output

    GetInventorySchema

    Command API Reference / Input / Output

    GetMaintenanceWindow

    Command API Reference / Input / Output

    GetMaintenanceWindowExecution

    Command API Reference / Input / Output

    GetMaintenanceWindowExecutionTask

    Command API Reference / Input / Output

    GetMaintenanceWindowExecutionTaskInvocation

    Command API Reference / Input / Output

    GetMaintenanceWindowTask

    Command API Reference / Input / Output

    GetOpsItem

    Command API Reference / Input / Output

    GetOpsMetadata

    Command API Reference / Input / Output

    GetOpsSummary

    Command API Reference / Input / Output

    GetParameter

    Command API Reference / Input / Output

    GetParameterHistory

    Command API Reference / Input / Output

    GetParameters

    Command API Reference / Input / Output

    GetParametersByPath

    Command API Reference / Input / Output

    GetPatchBaseline

    Command API Reference / Input / Output

    GetPatchBaselineForPatchGroup

    Command API Reference / Input / Output

    GetResourcePolicies

    Command API Reference / Input / Output

    GetServiceSetting

    Command API Reference / Input / Output

    LabelParameterVersion

    Command API Reference / Input / Output

    ListAssociations

    Command API Reference / Input / Output

    ListAssociationVersions

    Command API Reference / Input / Output

    ListCommandInvocations

    Command API Reference / Input / Output

    ListCommands

    Command API Reference / Input / Output

    ListComplianceItems

    Command API Reference / Input / Output

    ListComplianceSummaries

    Command API Reference / Input / Output

    ListDocumentMetadataHistory

    Command API Reference / Input / Output

    ListDocuments

    Command API Reference / Input / Output

    ListDocumentVersions

    Command API Reference / Input / Output

    ListInventoryEntries

    Command API Reference / Input / Output

    ListNodes

    Command API Reference / Input / Output

    ListNodesSummary

    Command API Reference / Input / Output

    ListOpsItemEvents

    Command API Reference / Input / Output

    ListOpsItemRelatedItems

    Command API Reference / Input / Output

    ListOpsMetadata

    Command API Reference / Input / Output

    ListResourceComplianceSummaries

    Command API Reference / Input / Output

    ListResourceDataSync

    Command API Reference / Input / Output

    ListTagsForResource

    Command API Reference / Input / Output

    ModifyDocumentPermission

    Command API Reference / Input / Output

    PutComplianceItems

    Command API Reference / Input / Output

    PutInventory

    Command API Reference / Input / Output

    PutParameter

    Command API Reference / Input / Output

    PutResourcePolicy

    Command API Reference / Input / Output

    RegisterDefaultPatchBaseline

    Command API Reference / Input / Output

    RegisterPatchBaselineForPatchGroup

    Command API Reference / Input / Output

    RegisterTargetWithMaintenanceWindow

    Command API Reference / Input / Output

    RegisterTaskWithMaintenanceWindow

    Command API Reference / Input / Output

    RemoveTagsFromResource

    Command API Reference / Input / Output

    ResetServiceSetting

    Command API Reference / Input / Output

    ResumeSession

    Command API Reference / Input / Output

    SendAutomationSignal

    Command API Reference / Input / Output

    SendCommand

    Command API Reference / Input / Output

    StartAccessRequest

    Command API Reference / Input / Output

    StartAssociationsOnce

    Command API Reference / Input / Output

    StartAutomationExecution

    Command API Reference / Input / Output

    StartChangeRequestExecution

    Command API Reference / Input / Output

    StartExecutionPreview

    Command API Reference / Input / Output

    StartSession

    Command API Reference / Input / Output

    StopAutomationExecution

    Command API Reference / Input / Output

    TerminateSession

    Command API Reference / Input / Output

    UnlabelParameterVersion

    Command API Reference / Input / Output

    UpdateAssociation

    Command API Reference / Input / Output

    UpdateAssociationStatus

    Command API Reference / Input / Output

    UpdateDocument

    Command API Reference / Input / Output

    UpdateDocumentDefaultVersion

    Command API Reference / Input / Output

    UpdateDocumentMetadata

    Command API Reference / Input / Output

    UpdateMaintenanceWindow

    Command API Reference / Input / Output

    UpdateMaintenanceWindowTarget

    Command API Reference / Input / Output

    UpdateMaintenanceWindowTask

    Command API Reference / Input / Output

    UpdateManagedInstanceRole

    Command API Reference / Input / Output

    UpdateOpsItem

    Command API Reference / Input / Output

    UpdateOpsMetadata

    Command API Reference / Input / Output

    UpdatePatchBaseline

    Command API Reference / Input / Output

    UpdateResourceDataSync

    Command API Reference / Input / Output

    UpdateServiceSetting

    Command API Reference / Input / Output