Skip to content

Update Document

ssm_update_document R Documentation

Updates one or more values for an SSM document

Description

Updates one or more values for an SSM document.

Usage

ssm_update_document(Content, Attachments, Name, DisplayName,
  VersionName, DocumentVersion, DocumentFormat, TargetType)

Arguments

Content

[required] A valid JSON or YAML string.

Attachments

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

Name

[required] The name of the SSM document that you want to update.

DisplayName

The friendly name of the SSM document that you want to update. This value can differ for each version of the document. If you don't specify a value for this parameter in your request, the existing value is applied to the new document version.

VersionName

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

DocumentVersion

The version of the document that you want to update. Currently, Systems Manager supports updating only the latest version of the document. You can specify the version number of the latest version or use the ⁠$LATEST⁠ variable.

If you change a document version for a State Manager association, Systems Manager immediately runs the association unless you previously specifed the apply-only-at-cron-interval parameter.

DocumentFormat

Specify the document format for the new document version. Systems Manager supports JSON and YAML documents. JSON is the default format.

TargetType

Specify a new target type for the document.

Value

A list with the following syntax:

list(
  DocumentDescription = list(
    Sha1 = "string",
    Hash = "string",
    HashType = "Sha256"|"Sha1",
    Name = "string",
    DisplayName = "string",
    VersionName = "string",
    Owner = "string",
    CreatedDate = as.POSIXct(
      "2015-01-01"
    ),
    Status = "Creating"|"Active"|"Updating"|"Deleting"|"Failed",
    StatusInformation = "string",
    DocumentVersion = "string",
    Description = "string",
    Parameters = list(
      list(
        Name = "string",
        Type = "String"|"StringList",
        Description = "string",
        DefaultValue = "string"
      )
    ),
    PlatformTypes = list(
      "Windows"|"Linux"|"MacOS"
    ),
    DocumentType = "Command"|"Policy"|"Automation"|"Session"|"Package"|"ApplicationConfiguration"|"ApplicationConfigurationSchema"|"DeploymentStrategy"|"ChangeCalendar"|"Automation.ChangeTemplate"|"ProblemAnalysis"|"ProblemAnalysisTemplate"|"CloudFormation"|"ConformancePackTemplate"|"QuickSetup",
    SchemaVersion = "string",
    LatestVersion = "string",
    DefaultVersion = "string",
    DocumentFormat = "YAML"|"JSON"|"TEXT",
    TargetType = "string",
    Tags = list(
      list(
        Key = "string",
        Value = "string"
      )
    ),
    AttachmentsInformation = list(
      list(
        Name = "string"
      )
    ),
    Requires = list(
      list(
        Name = "string",
        Version = "string",
        RequireType = "string",
        VersionName = "string"
      )
    ),
    Author = "string",
    ReviewInformation = list(
      list(
        ReviewedTime = as.POSIXct(
          "2015-01-01"
        ),
        Status = "APPROVED"|"NOT_REVIEWED"|"PENDING"|"REJECTED",
        Reviewer = "string"
      )
    ),
    ApprovedVersion = "string",
    PendingReviewVersion = "string",
    ReviewStatus = "APPROVED"|"NOT_REVIEWED"|"PENDING"|"REJECTED",
    Category = list(
      "string"
    ),
    CategoryEnum = list(
      "string"
    )
  )
)

Request syntax

svc$update_document(
  Content = "string",
  Attachments = list(
    list(
      Key = "SourceUrl"|"S3FileUrl"|"AttachmentReference",
      Values = list(
        "string"
      ),
      Name = "string"
    )
  ),
  Name = "string",
  DisplayName = "string",
  VersionName = "string",
  DocumentVersion = "string",
  DocumentFormat = "YAML"|"JSON"|"TEXT",
  TargetType = "string"
)