The AWS SDK for JavaScript v2 has reached end-of-support.
We recommend that you migrate to AWS SDK for JavaScript v3. For additional details and information on how to migrate, please refer to the announcement.

Class: AWS.SSM

Inherits:
AWS.Service show all
Identifier:
ssm
API Version:
2014-11-06
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

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

Sending a Request Using SSM

var ssm = new AWS.SSM();
ssm.deregisterTargetFromMaintenanceWindow(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the SSM object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var ssm = new AWS.SSM({apiVersion: '2014-11-06'});

You can also set the API version globally in AWS.config.apiVersions using the ssm service identifier:

AWS.config.apiVersions = {
  ssm: '2014-11-06',
  // other service API versions
};

var ssm = new AWS.SSM();

Version:

  • 2014-11-06

Waiter Resource States

This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:

commandExecuted

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService

Constructor Details

new AWS.SSM(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a SSM object

var ssm = new AWS.SSM({apiVersion: '2014-11-06'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.SSM.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.SSM.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.SSM.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

addTagsToResource(params = {}, callback) ⇒ AWS.Request

Adds or overwrites one or more tags for the specified resource. Tags are metadata that you can assign to your automations, documents, managed nodes, maintenance windows, Parameter Store parameters, and patch baselines. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define. For example, you could define a set of tags for your account's managed nodes that helps you track each node's owner and stack level. For example:

  • Key=Owner,Value=DbAdmin

  • Key=Owner,Value=SysAdmin

  • Key=Owner,Value=Dev

  • Key=Stack,Value=Production

  • Key=Stack,Value=Pre-Production

  • Key=Stack,Value=Test

Most resources can have a maximum of 50 tags. Automations can have a maximum of 5 tags.

We recommend that you devise a set of tag keys that meets your needs for each resource type. Using a consistent set of tag keys makes it easier for you to manage your resources. You can search and filter the resources based on the tags you add. Tags don't have any semantic meaning to and are interpreted strictly as a string of characters.

For more information about using tags with Amazon Elastic Compute Cloud (Amazon EC2) instances, see Tag your Amazon EC2 resources in the Amazon EC2 User Guide.

Service Reference:

Examples:

Calling the addTagsToResource operation

var params = {
  ResourceId: 'STRING_VALUE', /* required */
  ResourceType: Document | ManagedInstance | MaintenanceWindow | Parameter | PatchBaseline | OpsItem | OpsMetadata | Automation | Association, /* required */
  Tags: [ /* required */
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
ssm.addTagsToResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceType — (String)

      Specifies the type of resource you are tagging.

      Note: The ManagedInstance type for this API operation is for on-premises managed nodes. You must specify the name of the managed node in the following format: mi-ID_number . For example, mi-1a2b3c4d5e6f.
      Possible values include:
      • "Document"
      • "ManagedInstance"
      • "MaintenanceWindow"
      • "Parameter"
      • "PatchBaseline"
      • "OpsItem"
      • "OpsMetadata"
      • "Automation"
      • "Association"
    • ResourceId — (String)

      The resource ID you want to tag.

      Use the ID of the resource. Here are some examples:

      MaintenanceWindow: mw-012345abcde

      PatchBaseline: pb-012345abcde

      Automation: example-c160-4567-8519-012345abcde

      OpsMetadata object: ResourceID for tagging is created from the Amazon Resource Name (ARN) for the object. Specifically, ResourceID is created from the strings that come after the word opsmetadata in the ARN. For example, an OpsMetadata object with an ARN of arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager has a ResourceID of either aws/ssm/MyGroup/appmanager or /aws/ssm/MyGroup/appmanager.

      For the Document and Parameter values, use the name of the resource. If you're tagging a shared document, you must use the full ARN of the document.

      ManagedInstance: mi-012345abcde

      Note: The ManagedInstance type for this API operation is only for on-premises managed nodes. You must specify the name of the managed node in the following format: mi-ID_number . For example, mi-1a2b3c4d5e6f.
    • Tags — (Array<map>)

      One or more tags. The value parameter is required.

      Don't enter personally identifiable information in this field.

      • Keyrequired — (String)

        The name of the tag.

      • Valuerequired — (String)

        The value of the tag.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

associateOpsItemRelatedItem(params = {}, callback) ⇒ AWS.Request

Associates a related item to a Systems Manager OpsCenter OpsItem. For example, you can associate an Incident Manager incident or analysis with an OpsItem. Incident Manager and OpsCenter are capabilities of Amazon Web Services Systems Manager.

Service Reference:

Examples:

Calling the associateOpsItemRelatedItem operation

var params = {
  AssociationType: 'STRING_VALUE', /* required */
  OpsItemId: 'STRING_VALUE', /* required */
  ResourceType: 'STRING_VALUE', /* required */
  ResourceUri: 'STRING_VALUE' /* required */
};
ssm.associateOpsItemRelatedItem(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OpsItemId — (String)

      The ID of the OpsItem to which you want to associate a resource as a related item.

    • AssociationType — (String)

      The type of association that you want to create between an OpsItem and a resource. OpsCenter supports IsParentOf and RelatesTo association types.

    • ResourceType — (String)

      The type of resource that you want to associate with an OpsItem. OpsCenter supports the following types:

      AWS::SSMIncidents::IncidentRecord: an Incident Manager incident.

      AWS::SSM::Document: a Systems Manager (SSM) document.

    • ResourceUri — (String)

      The Amazon Resource Name (ARN) of the Amazon Web Services resource that you want to associate with the OpsItem.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AssociationId — (String)

        The association ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelCommand(params = {}, callback) ⇒ AWS.Request

Attempts to cancel the command specified by the Command ID. There is no guarantee that the command will be terminated and the underlying process stopped.

Service Reference:

Examples:

Calling the cancelCommand operation

var params = {
  CommandId: 'STRING_VALUE', /* required */
  InstanceIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ssm.cancelCommand(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CommandId — (String)

      The ID of the command you want to cancel.

    • InstanceIds — (Array<String>)

      (Optional) A list of managed node IDs on which you want to cancel the command. If not provided, the command is canceled on every node on which it was requested.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelMaintenanceWindowExecution(params = {}, callback) ⇒ AWS.Request

Stops a maintenance window execution that is already in progress and cancels any tasks in the window that haven't already starting running. Tasks already in progress will continue to completion.

Examples:

Calling the cancelMaintenanceWindowExecution operation

var params = {
  WindowExecutionId: 'STRING_VALUE' /* required */
};
ssm.cancelMaintenanceWindowExecution(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • WindowExecutionId — (String)

      The ID of the maintenance window execution to stop.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • WindowExecutionId — (String)

        The ID of the maintenance window execution that has been stopped.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createActivation(params = {}, callback) ⇒ AWS.Request

Generates an activation code and activation ID you can use to register your on-premises servers, edge devices, or virtual machine (VM) with Amazon Web Services Systems Manager. Registering these machines with Systems Manager makes it possible to manage them using Systems Manager capabilities. You use the activation code and ID when installing SSM Agent on machines in your hybrid environment. For more information about requirements for managing on-premises machines using Systems Manager, see Setting up Amazon Web Services Systems Manager for hybrid and multicloud environments in the Amazon Web Services Systems Manager User Guide.

Note: Amazon Elastic Compute Cloud (Amazon EC2) instances, edge devices, and on-premises servers and VMs that are configured for Systems Manager are all called managed nodes.

Service Reference:

Examples:

Calling the createActivation operation

var params = {
  IamRole: 'STRING_VALUE', /* required */
  DefaultInstanceName: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  ExpirationDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  RegistrationLimit: 'NUMBER_VALUE',
  RegistrationMetadata: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
ssm.createActivation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Description — (String)

      A user-defined description of the resource that you want to register with Systems Manager.

      Don't enter personally identifiable information in this field.

    • DefaultInstanceName — (String)

      The name of the registered, managed node as it will appear in the Amazon Web Services Systems Manager console or when you use the Amazon Web Services command line tools to list Systems Manager resources.

      Don't enter personally identifiable information in this field.

    • IamRole — (String)

      The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com. For more information, see Create an IAM service role for a hybrid and multicloud environment in the Amazon Web Services Systems Manager User Guide.

      Note: You can't specify an IAM service-linked role for this parameter. You must create a unique role.
    • RegistrationLimit — (Integer)

      Specify the maximum number of managed nodes you want to register. The default value is 1.

    • ExpirationDate — (Date)

      The date by which this activation request should expire, in timestamp format, such as "2021-07-07T00:00:00". You can specify a date up to 30 days in advance. If you don't provide an expiration date, the activation code expires in 24 hours.

    • Tags — (Array<map>)

      Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an activation to identify which servers or virtual machines (VMs) in your on-premises environment you intend to activate. In this case, you could specify the following key-value pairs:

      • Key=OS,Value=Windows

      • Key=Environment,Value=Production

      When you install SSM Agent on your on-premises servers and VMs, you specify an activation ID and code. When you specify the activation ID and code, tags assigned to the activation are automatically applied to the on-premises servers or VMs.

      You can't add tags to or delete tags from an existing activation. You can tag your on-premises servers, edge devices, and VMs after they connect to Systems Manager for the first time and are assigned a managed node ID. This means they are listed in the Amazon Web Services Systems Manager console with an ID that is prefixed with "mi-". For information about how to add tags to your managed nodes, see AddTagsToResource. For information about how to remove tags from your managed nodes, see RemoveTagsFromResource.

      • Keyrequired — (String)

        The name of the tag.

      • Valuerequired — (String)

        The value of the tag.

    • RegistrationMetadata — (Array<map>)

      Reserved for internal use.

      • Keyrequired — (String)

        Reserved for internal use.

      • Valuerequired — (String)

        Reserved for internal use.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ActivationId — (String)

        The ID number generated by the system when it processed the activation. The activation ID functions like a user name.

      • ActivationCode — (String)

        The code the system generates when it processes the activation. The activation code functions like a password to validate the activation ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createAssociation(params = {}, callback) ⇒ AWS.Request

A State Manager association defines the state that you want to maintain on your managed nodes. For example, an association can specify that anti-virus software must be installed and running on your managed nodes, or that certain ports must be closed. For static targets, the association specifies a schedule for when the configuration is reapplied. For dynamic targets, such as an Amazon Web Services resource group or an Amazon Web Services autoscaling group, State Manager, a capability of Amazon Web Services Systems Manager applies the configuration when new managed nodes are added to the group. The association also specifies actions to take when applying the configuration. For example, an association for anti-virus software might run once a day. If the software isn't installed, then State Manager installs it. If the software is installed, but the service isn't running, then the association might instruct State Manager to start the service.

Service Reference:

Examples:

Calling the createAssociation operation

var params = {
  Name: 'STRING_VALUE', /* required */
  AlarmConfiguration: {
    Alarms: [ /* required */
      {
        Name: 'STRING_VALUE' /* required */
      },
      /* more items */
    ],
    IgnorePollAlarmFailure: true || false
  },
  ApplyOnlyAtCronInterval: true || false,
  AssociationName: 'STRING_VALUE',
  AutomationTargetParameterName: 'STRING_VALUE',
  CalendarNames: [
    'STRING_VALUE',
    /* more items */
  ],
  ComplianceSeverity: CRITICAL | HIGH | MEDIUM | LOW | UNSPECIFIED,
  DocumentVersion: 'STRING_VALUE',
  Duration: 'NUMBER_VALUE',
  InstanceId: 'STRING_VALUE',
  MaxConcurrency: 'STRING_VALUE',
  MaxErrors: 'STRING_VALUE',
  OutputLocation: {
    S3Location: {
      OutputS3BucketName: 'STRING_VALUE',
      OutputS3KeyPrefix: 'STRING_VALUE',
      OutputS3Region: 'STRING_VALUE'
    }
  },
  Parameters: {
    '<ParameterName>': [
      'STRING_VALUE',
      /* more items */
    ],
    /* '<ParameterName>': ... */
  },
  ScheduleExpression: 'STRING_VALUE',
  ScheduleOffset: 'NUMBER_VALUE',
  SyncCompliance: AUTO | MANUAL,
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  TargetLocations: [
    {
      Accounts: [
        'STRING_VALUE',
        /* more items */
      ],
      ExecutionRoleName: 'STRING_VALUE',
      Regions: [
        'STRING_VALUE',
        /* more items */
      ],
      TargetLocationAlarmConfiguration: {
        Alarms: [ /* required */
          {
            Name: 'STRING_VALUE' /* required */
          },
          /* more items */
        ],
        IgnorePollAlarmFailure: true || false
      },
      TargetLocationMaxConcurrency: 'STRING_VALUE',
      TargetLocationMaxErrors: 'STRING_VALUE'
    },
    /* more items */
  ],
  TargetMaps: [
    {
      '<TargetMapKey>': [
        'STRING_VALUE',
        /* more items */
      ],
      /* '<TargetMapKey>': ... */
    },
    /* more items */
  ],
  Targets: [
    {
      Key: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ]
};
ssm.createAssociation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.

      You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another Amazon Web Services account.

      For Systems Manager documents (SSM documents) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:

      arn:partition:ssm:region:account-id:document/document-name

      For example:

      arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document

      For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, AWS-ApplyPatchBaseline or My-Document.

    • DocumentVersion — (String)

      The document version you want to associate with the targets. Can be a specific version or the default version.

      State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the default version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to default.

    • InstanceId — (String)

      The managed node ID.

      Note: InstanceId has been deprecated. To specify a managed node ID for an association, use the Targets parameter. Requests that include the parameter InstanceID with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter InstanceId, you can't use the parameters AssociationName, DocumentVersion, MaxErrors, MaxConcurrency, OutputLocation, or ScheduleExpression. To use these parameters, you must use the Targets parameter.
    • Parameters — (map<Array<String>>)

      The parameters for the runtime configuration of the document.

    • Targets — (Array<map>)

      The targets for the association. You can target managed nodes by using tags, Amazon Web Services resource groups, all managed nodes in an Amazon Web Services account, or individual managed node IDs. You can target all managed nodes in an Amazon Web Services account by specifying the InstanceIds key with a value of *. For more information about choosing targets for an association, see About targets and rate controls in State Manager associations in the Amazon Web Services Systems Manager User Guide.

      • Key — (String)

        User-defined criteria for sending commands that target managed nodes that meet the criteria.

      • Values — (Array<String>)

        User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.

        Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.

    • ScheduleExpression — (String)

      A cron expression when the association will be applied to the targets.

    • OutputLocation — (map)

      An Amazon Simple Storage Service (Amazon S3) bucket where you want to store the output details of the request.

      • S3Location — (map)

        An S3 bucket where you want to store the results of this request.

        • OutputS3Region — (String)

          The Amazon Web Services Region of the S3 bucket.

        • OutputS3BucketName — (String)

          The name of the S3 bucket.

        • OutputS3KeyPrefix — (String)

          The S3 bucket subfolder.

    • AssociationName — (String)

      Specify a descriptive name for the association.

    • AutomationTargetParameterName — (String)

      Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.

    • MaxErrors — (String)

      The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.

      Executions that are already running an association when MaxErrors is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set MaxConcurrency to 1 so that executions proceed one at a time.

    • MaxConcurrency — (String)

      The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.

      If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.

    • ComplianceSeverity — (String)

      The severity level to assign to the association.

      Possible values include:
      • "CRITICAL"
      • "HIGH"
      • "MEDIUM"
      • "LOW"
      • "UNSPECIFIED"
    • SyncCompliance — (String)

      The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.

      In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager. It is managed by your direct call to the PutComplianceItems API operation.

      By default, all associations use AUTO mode.

      Possible values include:
      • "AUTO"
      • "MANUAL"
    • ApplyOnlyAtCronInterval — (Boolean)

      By default, when you create a new association, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.

    • CalendarNames — (Array<String>)

      The names or Amazon Resource Names (ARNs) of the Change Calendar type documents you want to gate your associations under. The associations only run when that change calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.

    • TargetLocations — (Array<map>)

      A location is a combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association. Use this action to create an association in multiple Regions and multiple accounts.

      • Accounts — (Array<String>)

        The Amazon Web Services accounts targeted by the current Automation execution.

      • Regions — (Array<String>)

        The Amazon Web Services Regions targeted by the current Automation execution.

      • TargetLocationMaxConcurrency — (String)

        The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.

      • TargetLocationMaxErrors — (String)

        The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.

      • ExecutionRoleName — (String)

        The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.

      • TargetLocationAlarmConfiguration — (map)

        The details for the CloudWatch alarm you want to apply to an automation or command.

        • IgnorePollAlarmFailure — (Boolean)

          When this value is true, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is false.

        • Alarmsrequired — (Array<map>)

          The name of the CloudWatch alarm specified in the configuration.

          • Namerequired — (String)

            The name of your CloudWatch alarm.

    • ScheduleOffset — (Integer)

      Number of days to wait after the scheduled day to run an association. For example, if you specified a cron schedule of cron(0 0 ? * THU#2 *), you could specify an offset of 3 to run the association each Sunday after the second Thursday of the month. For more information about cron schedules for associations, see Reference: Cron and rate expressions for Systems Manager in the Amazon Web Services Systems Manager User Guide.

      Note: To use offsets, you must specify the ApplyOnlyAtCronInterval parameter. This option tells the system not to run an association immediately after you create it.
    • Duration — (Integer)

      The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.

      The Duration parameter applies only when both these conditions are true:

      • The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.

      • The command specifies the ApplyOnlyAtCronInterval parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.

    • TargetMaps — (Array<map<Array<String>>>)

      A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.

    • Tags — (Array<map>)

      Adds or overwrites one or more tags for a State Manager association. Tags are metadata that you can assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define.

      • Keyrequired — (String)

        The name of the tag.

      • Valuerequired — (String)

        The value of the tag.

    • AlarmConfiguration — (map)

      The details for the CloudWatch alarm you want to apply to an automation or command.

      • IgnorePollAlarmFailure — (Boolean)

        When this value is true, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is false.

      • Alarmsrequired — (Array<map>)

        The name of the CloudWatch alarm specified in the configuration.

        • Namerequired — (String)

          The name of your CloudWatch alarm.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AssociationDescription — (map)

        Information about the association.

        • Name — (String)

          The name of the SSM document.

        • InstanceId — (String)

          The managed node ID.

        • AssociationVersion — (String)

          The association version.

        • Date — (Date)

          The date when the association was made.

        • LastUpdateAssociationDate — (Date)

          The date when the association was last updated.

        • Status — (map)

          The association status.

          • Daterequired — (Date)

            The date when the status changed.

          • Namerequired — (String)

            The status.

            Possible values include:
            • "Pending"
            • "Success"
            • "Failed"
          • Messagerequired — (String)

            The reason for the status.

          • AdditionalInfo — (String)

            A user-defined string.

        • Overview — (map)

          Information about the association.

          • Status — (String)

            The status of the association. Status can be: Pending, Success, or Failed.

          • DetailedStatus — (String)

            A detailed status of the association.

          • AssociationStatusAggregatedCount — (map<Integer>)

            Returns the number of targets for the association status. For example, if you created an association with two managed nodes, and one of them was successful, this would return the count of managed nodes by status.

        • DocumentVersion — (String)

          The document version.

        • AutomationTargetParameterName — (String)

          Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.

        • Parameters — (map<Array<String>>)

          A description of the parameters for a document.

        • AssociationId — (String)

          The association ID.

        • Targets — (Array<map>)

          The managed nodes targeted by the request.

          • Key — (String)

            User-defined criteria for sending commands that target managed nodes that meet the criteria.

          • Values — (Array<String>)

            User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.

            Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.

        • ScheduleExpression — (String)

          A cron expression that specifies a schedule when the association runs.

        • OutputLocation — (map)

          An S3 bucket where you want to store the output details of the request.

          • S3Location — (map)

            An S3 bucket where you want to store the results of this request.

            • OutputS3Region — (String)

              The Amazon Web Services Region of the S3 bucket.

            • OutputS3BucketName — (String)

              The name of the S3 bucket.

            • OutputS3KeyPrefix — (String)

              The S3 bucket subfolder.

        • LastExecutionDate — (Date)

          The date on which the association was last run.

        • LastSuccessfulExecutionDate — (Date)

          The last date on which the association was successfully run.

        • AssociationName — (String)

          The association name.

        • MaxErrors — (String)

          The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.

          Executions that are already running an association when MaxErrors is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set MaxConcurrency to 1 so that executions proceed one at a time.

        • MaxConcurrency — (String)

          The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.

          If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.

        • ComplianceSeverity — (String)

          The severity level that is assigned to the association.

          Possible values include:
          • "CRITICAL"
          • "HIGH"
          • "MEDIUM"
          • "LOW"
          • "UNSPECIFIED"
        • SyncCompliance — (String)

          The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.

          In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.

          By default, all associations use AUTO mode.

          Possible values include:
          • "AUTO"
          • "MANUAL"
        • ApplyOnlyAtCronInterval — (Boolean)

          By default, when you create a new associations, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.

        • CalendarNames — (Array<String>)

          The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that change calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.

        • TargetLocations — (Array<map>)

          The combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association.

          • Accounts — (Array<String>)

            The Amazon Web Services accounts targeted by the current Automation execution.

          • Regions — (Array<String>)

            The Amazon Web Services Regions targeted by the current Automation execution.

          • TargetLocationMaxConcurrency — (String)

            The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.

          • TargetLocationMaxErrors — (String)

            The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.

          • ExecutionRoleName — (String)

            The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.

          • TargetLocationAlarmConfiguration — (map)

            The details for the CloudWatch alarm you want to apply to an automation or command.

            • IgnorePollAlarmFailure — (Boolean)

              When this value is true, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is false.

            • Alarmsrequired — (Array<map>)

              The name of the CloudWatch alarm specified in the configuration.

              • Namerequired — (String)

                The name of your CloudWatch alarm.

        • ScheduleOffset — (Integer)

          Number of days to wait after the scheduled day to run an association.

        • Duration — (Integer)

          The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.

        • TargetMaps — (Array<map<Array<String>>>)

          A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.

        • AlarmConfiguration — (map)

          The details for the CloudWatch alarm you want to apply to an automation or command.

          • IgnorePollAlarmFailure — (Boolean)

            When this value is true, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is false.

          • Alarmsrequired — (Array<map>)

            The name of the CloudWatch alarm specified in the configuration.

            • Namerequired — (String)

              The name of your CloudWatch alarm.

        • TriggeredAlarms — (Array<map>)

          The CloudWatch alarm that was invoked during the association.

          • Namerequired — (String)

            The name of your CloudWatch alarm.

          • Staterequired — (String)

            The state of your CloudWatch alarm.

            Possible values include:
            • "UNKNOWN"
            • "ALARM"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createAssociationBatch(params = {}, callback) ⇒ AWS.Request

Associates the specified Amazon Web Services Systems Manager document (SSM document) with the specified managed nodes or targets.

When you associate a document with one or more managed nodes using IDs or tags, Amazon Web Services Systems Manager Agent (SSM Agent) running on the managed node processes the document and configures the node as specified.

If you associate a document with a managed node that already has an associated document, the system returns the AssociationAlreadyExists exception.

Service Reference:

Examples:

Calling the createAssociationBatch operation

var params = {
  Entries: [ /* required */
    {
      Name: 'STRING_VALUE', /* required */
      AlarmConfiguration: {
        Alarms: [ /* required */
          {
            Name: 'STRING_VALUE' /* required */
          },
          /* more items */
        ],
        IgnorePollAlarmFailure: true || false
      },
      ApplyOnlyAtCronInterval: true || false,
      AssociationName: 'STRING_VALUE',
      AutomationTargetParameterName: 'STRING_VALUE',
      CalendarNames: [
        'STRING_VALUE',
        /* more items */
      ],
      ComplianceSeverity: CRITICAL | HIGH | MEDIUM | LOW | UNSPECIFIED,
      DocumentVersion: 'STRING_VALUE',
      Duration: 'NUMBER_VALUE',
      InstanceId: 'STRING_VALUE',
      MaxConcurrency: 'STRING_VALUE',
      MaxErrors: 'STRING_VALUE',
      OutputLocation: {
        S3Location: {
          OutputS3BucketName: 'STRING_VALUE',
          OutputS3KeyPrefix: 'STRING_VALUE',
          OutputS3Region: 'STRING_VALUE'
        }
      },
      Parameters: {
        '<ParameterName>': [
          'STRING_VALUE',
          /* more items */
        ],
        /* '<ParameterName>': ... */
      },
      ScheduleExpression: 'STRING_VALUE',
      ScheduleOffset: 'NUMBER_VALUE',
      SyncCompliance: AUTO | MANUAL,
      TargetLocations: [
        {
          Accounts: [
            'STRING_VALUE',
            /* more items */
          ],
          ExecutionRoleName: 'STRING_VALUE',
          Regions: [
            'STRING_VALUE',
            /* more items */
          ],
          TargetLocationAlarmConfiguration: {
            Alarms: [ /* required */
              {
                Name: 'STRING_VALUE' /* required */
              },
              /* more items */
            ],
            IgnorePollAlarmFailure: true || false
          },
          TargetLocationMaxConcurrency: 'STRING_VALUE',
          TargetLocationMaxErrors: 'STRING_VALUE'
        },
        /* more items */
      ],
      TargetMaps: [
        {
          '<TargetMapKey>': [
            'STRING_VALUE',
            /* more items */
          ],
          /* '<TargetMapKey>': ... */
        },
        /* more items */
      ],
      Targets: [
        {
          Key: 'STRING_VALUE',
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
ssm.createAssociationBatch(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Entries — (Array<map>)

      One or more associations.

      • Namerequired — (String)

        The name of the SSM document that contains the configuration information for the managed node. You can specify Command or Automation runbooks.

        You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.

        For SSM documents that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:

        arn:aws:ssm:region:account-id:document/document-name

        For example:

        arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document

        For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, AWS-ApplyPatchBaseline or My-Document.

      • InstanceId — (String)

        The managed node ID.

        Note: InstanceId has been deprecated. To specify a managed node ID for an association, use the Targets parameter. Requests that include the parameter InstanceID with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter InstanceId, you can't use the parameters AssociationName, DocumentVersion, MaxErrors, MaxConcurrency, OutputLocation, or ScheduleExpression. To use these parameters, you must use the Targets parameter.
      • Parameters — (map<Array<String>>)

        A description of the parameters for a document.

      • AutomationTargetParameterName — (String)

        Specify the target for the association. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.

      • DocumentVersion — (String)

        The document version.

      • Targets — (Array<map>)

        The managed nodes targeted by the request.

        • Key — (String)

          User-defined criteria for sending commands that target managed nodes that meet the criteria.

        • Values — (Array<String>)

          User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.

          Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.

      • ScheduleExpression — (String)

        A cron expression that specifies a schedule when the association runs.

      • OutputLocation — (map)

        An S3 bucket where you want to store the results of this request.

        • S3Location — (map)

          An S3 bucket where you want to store the results of this request.

          • OutputS3Region — (String)

            The Amazon Web Services Region of the S3 bucket.

          • OutputS3BucketName — (String)

            The name of the S3 bucket.

          • OutputS3KeyPrefix — (String)

            The S3 bucket subfolder.

      • AssociationName — (String)

        Specify a descriptive name for the association.

      • MaxErrors — (String)

        The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.

        Executions that are already running an association when MaxErrors is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set MaxConcurrency to 1 so that executions proceed one at a time.

      • MaxConcurrency — (String)

        The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.

        If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.

      • ComplianceSeverity — (String)

        The severity level to assign to the association.

        Possible values include:
        • "CRITICAL"
        • "HIGH"
        • "MEDIUM"
        • "LOW"
        • "UNSPECIFIED"
      • SyncCompliance — (String)

        The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.

        In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.

        By default, all associations use AUTO mode.

        Possible values include:
        • "AUTO"
        • "MANUAL"
      • ApplyOnlyAtCronInterval — (Boolean)

        By default, when you create a new associations, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.

      • CalendarNames — (Array<String>)

        The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that Change Calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.

      • TargetLocations — (Array<map>)

        Use this action to create an association in multiple Regions and multiple accounts.

        • Accounts — (Array<String>)

          The Amazon Web Services accounts targeted by the current Automation execution.

        • Regions — (Array<String>)

          The Amazon Web Services Regions targeted by the current Automation execution.

        • TargetLocationMaxConcurrency — (String)

          The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.

        • TargetLocationMaxErrors — (String)

          The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.

        • ExecutionRoleName — (String)

          The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.

        • TargetLocationAlarmConfiguration — (map)

          The details for the CloudWatch alarm you want to apply to an automation or command.

          • IgnorePollAlarmFailure — (Boolean)

            When this value is true, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is false.

          • Alarmsrequired — (Array<map>)

            The name of the CloudWatch alarm specified in the configuration.

            • Namerequired — (String)

              The name of your CloudWatch alarm.

      • ScheduleOffset — (Integer)

        Number of days to wait after the scheduled day to run an association.

      • Duration — (Integer)

        The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.

        The Duration parameter applies only when both these conditions are true:

        • The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.

        • The command specifies the ApplyOnlyAtCronInterval parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.

      • TargetMaps — (Array<map<Array<String>>>)

        A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.

      • AlarmConfiguration — (map)

        The details for the CloudWatch alarm you want to apply to an automation or command.

        • IgnorePollAlarmFailure — (Boolean)

          When this value is true, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is false.

        • Alarmsrequired — (Array<map>)

          The name of the CloudWatch alarm specified in the configuration.

          • Namerequired — (String)

            The name of your CloudWatch alarm.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Successful — (Array<map>)

        Information about the associations that succeeded.

        • Name — (String)

          The name of the SSM document.

        • InstanceId — (String)

          The managed node ID.

        • AssociationVersion — (String)

          The association version.

        • Date — (Date)

          The date when the association was made.

        • LastUpdateAssociationDate — (Date)

          The date when the association was last updated.

        • Status — (map)

          The association status.

          • Daterequired — (Date)

            The date when the status changed.

          • Namerequired — (String)

            The status.

            Possible values include:
            • "Pending"
            • "Success"
            • "Failed"
          • Messagerequired — (String)

            The reason for the status.

          • AdditionalInfo — (String)

            A user-defined string.

        • Overview — (map)

          Information about the association.

          • Status — (String)

            The status of the association. Status can be: Pending, Success, or Failed.

          • DetailedStatus — (String)

            A detailed status of the association.

          • AssociationStatusAggregatedCount — (map<Integer>)

            Returns the number of targets for the association status. For example, if you created an association with two managed nodes, and one of them was successful, this would return the count of managed nodes by status.

        • DocumentVersion — (String)

          The document version.

        • AutomationTargetParameterName — (String)

          Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.

        • Parameters — (map<Array<String>>)

          A description of the parameters for a document.

        • AssociationId — (String)

          The association ID.

        • Targets — (Array<map>)

          The managed nodes targeted by the request.

          • Key — (String)

            User-defined criteria for sending commands that target managed nodes that meet the criteria.

          • Values — (Array<String>)

            User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.

            Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.

        • ScheduleExpression — (String)

          A cron expression that specifies a schedule when the association runs.

        • OutputLocation — (map)

          An S3 bucket where you want to store the output details of the request.

          • S3Location — (map)

            An S3 bucket where you want to store the results of this request.

            • OutputS3Region — (String)

              The Amazon Web Services Region of the S3 bucket.

            • OutputS3BucketName — (String)

              The name of the S3 bucket.

            • OutputS3KeyPrefix — (String)

              The S3 bucket subfolder.

        • LastExecutionDate — (Date)

          The date on which the association was last run.

        • LastSuccessfulExecutionDate — (Date)

          The last date on which the association was successfully run.

        • AssociationName — (String)

          The association name.

        • MaxErrors — (String)

          The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.

          Executions that are already running an association when MaxErrors is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set MaxConcurrency to 1 so that executions proceed one at a time.

        • MaxConcurrency — (String)

          The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.

          If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.

        • ComplianceSeverity — (String)

          The severity level that is assigned to the association.

          Possible values include:
          • "CRITICAL"
          • "HIGH"
          • "MEDIUM"
          • "LOW"
          • "UNSPECIFIED"
        • SyncCompliance — (String)

          The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.

          In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.

          By default, all associations use AUTO mode.

          Possible values include:
          • "AUTO"
          • "MANUAL"
        • ApplyOnlyAtCronInterval — (Boolean)

          By default, when you create a new associations, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.

        • CalendarNames — (Array<String>)

          The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that change calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.

        • TargetLocations — (Array<map>)

          The combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association.

          • Accounts — (Array<String>)

            The Amazon Web Services accounts targeted by the current Automation execution.

          • Regions — (Array<String>)

            The Amazon Web Services Regions targeted by the current Automation execution.

          • TargetLocationMaxConcurrency — (String)

            The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.

          • TargetLocationMaxErrors — (String)

            The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.

          • ExecutionRoleName — (String)

            The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.

          • TargetLocationAlarmConfiguration — (map)

            The details for the CloudWatch alarm you want to apply to an automation or command.

            • IgnorePollAlarmFailure — (Boolean)

              When this value is true, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is false.

            • Alarmsrequired — (Array<map>)

              The name of the CloudWatch alarm specified in the configuration.

              • Namerequired — (String)

                The name of your CloudWatch alarm.

        • ScheduleOffset — (Integer)

          Number of days to wait after the scheduled day to run an association.

        • Duration — (Integer)

          The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.

        • TargetMaps — (Array<map<Array<String>>>)

          A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.

        • AlarmConfiguration — (map)

          The details for the CloudWatch alarm you want to apply to an automation or command.

          • IgnorePollAlarmFailure — (Boolean)

            When this value is true, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is false.

          • Alarmsrequired — (Array<map>)

            The name of the CloudWatch alarm specified in the configuration.

            • Namerequired — (String)

              The name of your CloudWatch alarm.

        • TriggeredAlarms — (Array<map>)

          The CloudWatch alarm that was invoked during the association.

          • Namerequired — (String)

            The name of your CloudWatch alarm.

          • Staterequired — (String)

            The state of your CloudWatch alarm.

            Possible values include:
            • "UNKNOWN"
            • "ALARM"
      • Failed — (Array<map>)

        Information about the associations that failed.

        • Entry — (map)

          The association.

          • Namerequired — (String)

            The name of the SSM document that contains the configuration information for the managed node. You can specify Command or Automation runbooks.

            You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.

            For SSM documents that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:

            arn:aws:ssm:region:account-id:document/document-name

            For example:

            arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document

            For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, AWS-ApplyPatchBaseline or My-Document.

          • InstanceId — (String)

            The managed node ID.

            Note: InstanceId has been deprecated. To specify a managed node ID for an association, use the Targets parameter. Requests that include the parameter InstanceID with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter InstanceId, you can't use the parameters AssociationName, DocumentVersion, MaxErrors, MaxConcurrency, OutputLocation, or ScheduleExpression. To use these parameters, you must use the Targets parameter.
          • Parameters — (map<Array<String>>)

            A description of the parameters for a document.

          • AutomationTargetParameterName — (String)

            Specify the target for the association. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.

          • DocumentVersion — (String)

            The document version.

          • Targets — (Array<map>)

            The managed nodes targeted by the request.

            • Key — (String)

              User-defined criteria for sending commands that target managed nodes that meet the criteria.

            • Values — (Array<String>)

              User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.

              Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.

          • ScheduleExpression — (String)

            A cron expression that specifies a schedule when the association runs.

          • OutputLocation — (map)

            An S3 bucket where you want to store the results of this request.

            • S3Location — (map)

              An S3 bucket where you want to store the results of this request.

              • OutputS3Region — (String)

                The Amazon Web Services Region of the S3 bucket.

              • OutputS3BucketName — (String)

                The name of the S3 bucket.

              • OutputS3KeyPrefix — (String)

                The S3 bucket subfolder.

          • AssociationName — (String)

            Specify a descriptive name for the association.

          • MaxErrors — (String)

            The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.

            Executions that are already running an association when MaxErrors is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set MaxConcurrency to 1 so that executions proceed one at a time.

          • MaxConcurrency — (String)

            The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.

            If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.

          • ComplianceSeverity — (String)

            The severity level to assign to the association.

            Possible values include:
            • "CRITICAL"
            • "HIGH"
            • "MEDIUM"
            • "LOW"
            • "UNSPECIFIED"
          • SyncCompliance — (String)

            The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.

            In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.

            By default, all associations use AUTO mode.

            Possible values include:
            • "AUTO"
            • "MANUAL"
          • ApplyOnlyAtCronInterval — (Boolean)

            By default, when you create a new associations, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.

          • CalendarNames — (Array<String>)

            The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that Change Calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.

          • TargetLocations — (Array<map>)

            Use this action to create an association in multiple Regions and multiple accounts.

            • Accounts — (Array<String>)

              The Amazon Web Services accounts targeted by the current Automation execution.

            • Regions — (Array<String>)

              The Amazon Web Services Regions targeted by the current Automation execution.

            • TargetLocationMaxConcurrency — (String)

              The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.

            • TargetLocationMaxErrors — (String)

              The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.

            • ExecutionRoleName — (String)

              The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.

            • TargetLocationAlarmConfiguration — (map)

              The details for the CloudWatch alarm you want to apply to an automation or command.

              • IgnorePollAlarmFailure — (Boolean)

                When this value is true, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is false.

              • Alarmsrequired — (Array<map>)

                The name of the CloudWatch alarm specified in the configuration.

                • Namerequired — (String)

                  The name of your CloudWatch alarm.

          • ScheduleOffset — (Integer)

            Number of days to wait after the scheduled day to run an association.

          • Duration — (Integer)

            The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.

            The Duration parameter applies only when both these conditions are true:

            • The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.

            • The command specifies the ApplyOnlyAtCronInterval parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.

          • TargetMaps — (Array<map<Array<String>>>)

            A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.

          • AlarmConfiguration — (map)

            The details for the CloudWatch alarm you want to apply to an automation or command.

            • IgnorePollAlarmFailure — (Boolean)

              When this value is true, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is false.

            • Alarmsrequired — (Array<map>)

              The name of the CloudWatch alarm specified in the configuration.

              • Namerequired — (String)

                The name of your CloudWatch alarm.

        • Message — (String)

          A description of the failure.

        • Fault — (String)

          The source of the failure.

          Possible values include:
          • "Client"
          • "Server"
          • "Unknown"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDocument(params = {}, callback) ⇒ AWS.Request

Creates a Amazon Web Services Systems Manager (SSM document). An SSM document defines the actions that Systems Manager performs on your managed nodes. For more information about SSM documents, including information about supported schemas, features, and syntax, see Amazon Web Services Systems Manager Documents in the Amazon Web Services Systems Manager User Guide.

Service Reference:

Examples:

Calling the createDocument operation

var params = {
  Content: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  Attachments: [
    {
      Key: SourceUrl | S3FileUrl | AttachmentReference,
      Name: 'STRING_VALUE',
      Values: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  DisplayName: 'STRING_VALUE',
  DocumentFormat: YAML | JSON | TEXT,
  DocumentType: Command | Policy | Automation | Session | Package | ApplicationConfiguration | ApplicationConfigurationSchema | DeploymentStrategy | ChangeCalendar | Automation.ChangeTemplate | ProblemAnalysis | ProblemAnalysisTemplate | CloudFormation | ConformancePackTemplate | QuickSetup,
  Requires: [
    {
      Name: 'STRING_VALUE', /* required */
      RequireType: 'STRING_VALUE',
      Version: 'STRING_VALUE',
      VersionName: 'STRING_VALUE'
    },
    /* more items */
  ],
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  TargetType: 'STRING_VALUE',
  VersionName: 'STRING_VALUE'
};
ssm.createDocument(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Content — (String)

      The content for the new SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.

      For examples, see the following topics in the Amazon Web Services Systems Manager User Guide.

    • Requires — (Array<map>)

      A list of SSM documents required by a document. This parameter is used exclusively by AppConfig. When a user creates an AppConfig configuration in an SSM document, the user must also specify a required document for validation purposes. In this case, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document for validation purposes. For more information, see What is AppConfig? in the AppConfig User Guide.

      • Namerequired — (String)

        The name of the required SSM document. The name can be an Amazon Resource Name (ARN).

      • Version — (String)

        The document version required by the current document.

      • RequireType — (String)

        The document type of the required SSM document.

      • VersionName — (String)

        An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.

    • Attachments — (Array<map>)

      A list of key-value pairs that describe attachments to a version of a document.

      • Key — (String)

        The key of a key-value pair that identifies the location of an attachment to a document.

        Possible values include:
        • "SourceUrl"
        • "S3FileUrl"
        • "AttachmentReference"
      • Values — (Array<String>)

        The value of a key-value pair that identifies the location of an attachment to a document. The format for Value depends on the type of key you specify.

        • For the key SourceUrl, the value is an S3 bucket location. For example:

          "Values": [ "s3://doc-example-bucket/my-folder" ]

        • For the key S3FileUrl, the value is a file in an S3 bucket. For example:

          "Values": [ "s3://doc-example-bucket/my-folder/my-file.py" ]

        • For the key AttachmentReference, the value is constructed from the name of another SSM document in your account, a version number of that document, and a file attached to that document version that you want to reuse. For example:

          "Values": [ "MyOtherDocument/3/my-other-file.py" ]

          However, if the SSM document is shared with you from another account, the full SSM document ARN must be specified instead of the document name only. For example:

          "Values": [ "arn:aws:ssm:us-east-2:111122223333:document/OtherAccountDocument/3/their-file.py" ]

      • Name — (String)

        The name of the document attachment file.

    • Name — (String)

      A name for the SSM document.

      You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services for use as document name prefixes:

      • aws

      • amazon

      • amzn

      • AWSEC2

      • AWSConfigRemediation

      • AWSSupport

    • DisplayName — (String)

      An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. You can update this value at a later time using the UpdateDocument operation.

    • VersionName — (String)

      An optional field specifying the version of the artifact you are creating with the document. For example, Release12.1. This value is unique across all versions of a document, and can't be changed.

    • DocumentType — (String)

      The type of document to create.

      Note: The DeploymentStrategy document type is an internal-use-only document type reserved for AppConfig.
      Possible values include:
      • "Command"
      • "Policy"
      • "Automation"
      • "Session"
      • "Package"
      • "ApplicationConfiguration"
      • "ApplicationConfigurationSchema"
      • "DeploymentStrategy"
      • "ChangeCalendar"
      • "Automation.ChangeTemplate"
      • "ProblemAnalysis"
      • "ProblemAnalysisTemplate"
      • "CloudFormation"
      • "ConformancePackTemplate"
      • "QuickSetup"
    • DocumentFormat — (String)

      Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the default format.

      Possible values include:
      • "YAML"
      • "JSON"
      • "TEXT"
    • TargetType — (String)

      Specify a target type to define the kinds of resources the document can run on. For example, to run a document on EC2 instances, specify the following value: /AWS::EC2::Instance. If you specify a value of '/' the document can run on all types of resources. If you don't specify a value, the document can't run on any resources. For a list of valid resource types, see Amazon Web Services resource and property types reference in the CloudFormation User Guide.

    • Tags — (Array<map>)

      Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an SSM document to identify the types of targets or the environment where it will run. In this case, you could specify the following key-value pairs:

      • Key=OS,Value=Windows

      • Key=Environment,Value=Production

      Note: To add tags to an existing SSM document, use the AddTagsToResource operation.
      • Keyrequired — (String)

        The name of the tag.

      • Valuerequired — (String)

        The value of the tag.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DocumentDescription — (map)

        Information about the SSM document.

        • Sha1 — (String)

          The SHA1 hash of the document, which you can use for verification.

        • Hash — (String)

          The Sha256 or Sha1 hash created by the system when the document was created.

          Note: Sha1 hashes have been deprecated.
        • HashType — (String)

          The hash type of the document. Valid values include Sha256 or Sha1.

          Note: Sha1 hashes have been deprecated.
          Possible values include:
          • "Sha256"
          • "Sha1"
        • Name — (String)

          The name of the SSM document.

        • DisplayName — (String)

          The friendly name of the SSM document. This value can differ for each version of the document. If you want to update this value, see UpdateDocument.

        • VersionName — (String)

          The version of the artifact associated with the document.

        • Owner — (String)

          The Amazon Web Services user that created the document.

        • CreatedDate — (Date)

          The date when the document was created.

        • Status — (String)

          The status of the SSM document.

          Possible values include:
          • "Creating"
          • "Active"
          • "Updating"
          • "Deleting"
          • "Failed"
        • StatusInformation — (String)

          A message returned by Amazon Web Services Systems Manager that explains the Status value. For example, a Failed status might be explained by the StatusInformation message, "The specified S3 bucket doesn't exist. Verify that the URL of the S3 bucket is correct."

        • DocumentVersion — (String)

          The document version.

        • Description — (String)

          A description of the document.

        • Parameters — (Array<map>)

          A description of the parameters for a document.

          • Name — (String)

            The name of the parameter.

          • Type — (String)

            The type of parameter. The type can be either String or StringList.

            Possible values include:
            • "String"
            • "StringList"
          • Description — (String)

            A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.

          • DefaultValue — (String)

            If specified, the default values for the parameters. Parameters without a default value are required. Parameters with a default value are optional.

        • PlatformTypes — (Array<String>)

          The list of operating system (OS) platforms compatible with this SSM document.

        • DocumentType — (String)

          The type of document.

          Possible values include:
          • "Command"
          • "Policy"
          • "Automation"
          • "Session"
          • "Package"
          • "ApplicationConfiguration"
          • "ApplicationConfigurationSchema"
          • "DeploymentStrategy"
          • "ChangeCalendar"
          • "Automation.ChangeTemplate"
          • "ProblemAnalysis"
          • "ProblemAnalysisTemplate"
          • "CloudFormation"
          • "ConformancePackTemplate"
          • "QuickSetup"
        • SchemaVersion — (String)

          The schema version.

        • LatestVersion — (String)

          The latest version of the document.

        • DefaultVersion — (String)

          The default version.

        • DocumentFormat — (String)

          The document format, either JSON or YAML.

          Possible values include:
          • "YAML"
          • "JSON"
          • "TEXT"
        • TargetType — (String)

          The target type which defines the kinds of resources the document can run on. For example, /AWS::EC2::Instance. For a list of valid resource types, see Amazon Web Services resource and property types reference in the CloudFormation User Guide.

        • Tags — (Array<map>)

          The tags, or metadata, that have been applied to the document.

          • Keyrequired — (String)

            The name of the tag.

          • Valuerequired — (String)

            The value of the tag.

        • AttachmentsInformation — (Array<map>)

          Details about the document attachments, including names, locations, sizes, and so on.

          • Name — (String)

            The name of the attachment.

        • Requires — (Array<map>)

          A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.

          • Namerequired — (String)

            The name of the required SSM document. The name can be an Amazon Resource Name (ARN).

          • Version — (String)

            The document version required by the current document.

          • RequireType — (String)

            The document type of the required SSM document.

          • VersionName — (String)

            An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.

        • Author — (String)

          The user in your organization who created the document.

        • ReviewInformation — (Array<map>)

          Details about the review of a document.

          • ReviewedTime — (Date)

            The time that the reviewer took action on the document review request.

          • Status — (String)

            The current status of the document review request.

            Possible values include:
            • "APPROVED"
            • "NOT_REVIEWED"
            • "PENDING"
            • "REJECTED"
          • Reviewer — (String)

            The reviewer assigned to take action on the document review request.

        • ApprovedVersion — (String)

          The version of the document currently approved for use in the organization.

        • PendingReviewVersion — (String)

          The version of the document that is currently under review.

        • ReviewStatus — (String)

          The current status of the review.

          Possible values include:
          • "APPROVED"
          • "NOT_REVIEWED"
          • "PENDING"
          • "REJECTED"
        • Category — (Array<String>)

          The classification of a document to help you identify and categorize its use.

        • CategoryEnum — (Array<String>)

          The value that identifies a document's category.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createMaintenanceWindow(params = {}, callback) ⇒ AWS.Request

Creates a new maintenance window.

Note: The value you specify for Duration determines the specific end time for the maintenance window based on the time it begins. No maintenance window tasks are permitted to start after the resulting endtime minus the number of hours you specify for Cutoff. For example, if the maintenance window starts at 3 PM, the duration is three hours, and the value you specify for Cutoff is one hour, no maintenance window tasks can start after 5 PM.

Service Reference:

Examples:

Calling the createMaintenanceWindow operation

var params = {
  AllowUnassociatedTargets: true || false, /* required */
  Cutoff: 'NUMBER_VALUE', /* required */
  Duration: 'NUMBER_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  Schedule: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  EndDate: 'STRING_VALUE',
  ScheduleOffset: 'NUMBER_VALUE',
  ScheduleTimezone: 'STRING_VALUE',
  StartDate: 'STRING_VALUE',
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
ssm.createMaintenanceWindow(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the maintenance window.

    • Description — (String)

      An optional description for the maintenance window. We recommend specifying a description to help you organize your maintenance windows.

    • StartDate — (String)

      The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. StartDate allows you to delay activation of the maintenance window until the specified future date.

      Note: When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.
    • EndDate — (String)

      The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. EndDate allows you to set a date and time in the future when the maintenance window will no longer run.

    • Schedule — (String)

      The schedule of the maintenance window in the form of a cron or rate expression.

    • ScheduleTimezone — (String)

      The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website.

    • ScheduleOffset — (Integer)

      The number of days to wait after the date and time specified by a cron expression before running the maintenance window.

      For example, the following cron expression schedules a maintenance window to run on the third Tuesday of every month at 11:30 PM.

      cron(30 23 ? * TUE#3 *)

      If the schedule offset is 2, the maintenance window won't run until two days later.

    • Duration — (Integer)

      The duration of the maintenance window in hours.

    • Cutoff — (Integer)

      The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.

    • AllowUnassociatedTargets — (Boolean)

      Enables a maintenance window task to run on managed nodes, even if you haven't registered those nodes as targets. If enabled, then you must specify the unregistered managed nodes (by node ID) when you register a task with the maintenance window.

      If you don't enable this option, then you must specify previously-registered targets when you register a task with the maintenance window.

    • ClientToken — (String)

      User-provided idempotency token.

      If a token is not provided, the SDK will use a version 4 UUID.
    • Tags — (Array<map>)

      Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a maintenance window to identify the type of tasks it will run, the types of targets, and the environment it will run in. In this case, you could specify the following key-value pairs:

      • Key=TaskType,Value=AgentUpdate

      • Key=OS,Value=Windows

      • Key=Environment,Value=Production

      Note: To add tags to an existing maintenance window, use the AddTagsToResource operation.
      • Keyrequired — (String)

        The name of the tag.

      • Valuerequired — (String)

        The value of the tag.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • WindowId — (String)

        The ID of the created maintenance window.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createOpsItem(params = {}, callback) ⇒ AWS.Request

Creates a new OpsItem. You must have permission in Identity and Access Management (IAM) to create a new OpsItem. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide.

Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see Amazon Web Services Systems Manager OpsCenter in the Amazon Web Services Systems Manager User Guide.

Service Reference:

Examples:

Calling the createOpsItem operation

var params = {
  Description: 'STRING_VALUE', /* required */
  Source: 'STRING_VALUE', /* required */
  Title: 'STRING_VALUE', /* required */
  AccountId: 'STRING_VALUE',
  ActualEndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  ActualStartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  Category: 'STRING_VALUE',
  Notifications: [
    {
      Arn: 'STRING_VALUE'
    },
    /* more items */
  ],
  OperationalData: {
    '<OpsItemDataKey>': {
      Type: SearchableString | String,
      Value: 'STRING_VALUE'
    },
    /* '<OpsItemDataKey>': ... */
  },
  OpsItemType: 'STRING_VALUE',
  PlannedEndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  PlannedStartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  Priority: 'NUMBER_VALUE',
  RelatedOpsItems: [
    {
      OpsItemId: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  Severity: 'STRING_VALUE',
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
ssm.createOpsItem(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Description — (String)

      User-defined text that contains information about the OpsItem, in Markdown format.

      Note: Provide enough information so that users viewing this OpsItem for the first time understand the issue.
    • OpsItemType — (String)

      The type of OpsItem to create. Systems Manager supports the following types of OpsItems:

      • /aws/issue

        This type of OpsItem is used for default OpsItems created by OpsCenter.

      • /aws/changerequest

        This type of OpsItem is used by Change Manager for reviewing and approving or rejecting change requests.

      • /aws/insight

        This type of OpsItem is used by OpsCenter for aggregating and reporting on duplicate OpsItems.

    • OperationalData — (map<map>)

      Operational data is custom data that provides useful reference details about the OpsItem. For example, you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size of 20 KB.

      Operational data keys can't begin with the following: amazon, aws, amzn, ssm, /amazon, /aws, /amzn, /ssm.

      You can choose to make the data searchable by other users in the account or you can restrict search access. Searchable data means that all users with access to the OpsItem Overview page (as provided by the DescribeOpsItems API operation) can view and search on the specified data. Operational data that isn't searchable is only viewable by users who have access to the OpsItem (as provided by the GetOpsItem API operation).

      Use the /aws/resources key in OperationalData to specify a related resource in the request. Use the /aws/automations key in OperationalData to associate an Automation runbook with the OpsItem. To view Amazon Web Services CLI example commands that use these keys, see Create OpsItems manually in the Amazon Web Services Systems Manager User Guide.

      • Value — (String)

        The value of the OperationalData key.

      • Type — (String)

        The type of key-value pair. Valid types include SearchableString and String.

        Possible values include:
        • "SearchableString"
        • "String"
    • Notifications — (Array<map>)

      The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.

      • Arn — (String)

        The Amazon Resource Name (ARN) of an Amazon Simple Notification Service (Amazon SNS) topic where notifications are sent when this OpsItem is edited or changed.

    • Priority — (Integer)

      The importance of this OpsItem in relation to other OpsItems in the system.

    • RelatedOpsItems — (Array<map>)

      One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.

      • OpsItemIdrequired — (String)

        The ID of an OpsItem related to the current OpsItem.

    • Source — (String)

      The origin of the OpsItem, such as Amazon EC2 or Systems Manager.

      Note: The source name can't contain the following strings: aws, amazon, and amzn.
    • Title — (String)

      A short heading that describes the nature of the OpsItem and the impacted resource.

    • Tags — (Array<map>)

      Optional metadata that you assign to a resource.

      Tags use a key-value pair. For example:

      Key=Department,Value=Finance

      To add tags to a new OpsItem, a user must have IAM permissions for both the ssm:CreateOpsItems operation and the ssm:AddTagsToResource operation. To add tags to an existing OpsItem, use the AddTagsToResource operation.

      • Keyrequired — (String)

        The name of the tag.

      • Valuerequired — (String)

        The value of the tag.

    • Category — (String)

      Specify a category to assign to an OpsItem.

    • Severity — (String)

      Specify a severity to assign to an OpsItem.

    • ActualStartTime — (Date)

      The time a runbook workflow started. Currently reported only for the OpsItem type /aws/changerequest.

    • ActualEndTime — (Date)

      The time a runbook workflow ended. Currently reported only for the OpsItem type /aws/changerequest.

    • PlannedStartTime — (Date)

      The time specified in a change request for a runbook workflow to start. Currently supported only for the OpsItem type /aws/changerequest.

    • PlannedEndTime — (Date)

      The time specified in a change request for a runbook workflow to end. Currently supported only for the OpsItem type /aws/changerequest.

    • AccountId — (String)

      The target Amazon Web Services account where you want to create an OpsItem. To make this call, your account must be configured to work with OpsItems across accounts. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • OpsItemId — (String)

        The ID of the OpsItem.

      • OpsItemArn — (String)

        The OpsItem Amazon Resource Name (ARN).

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createOpsMetadata(params = {}, callback) ⇒ AWS.Request

If you create a new application in Application Manager, Amazon Web Services Systems Manager calls this API operation to specify information about the new application, including the application type.

Service Reference: