@aws-sdk/client-ssm
Version:
AWS SDK for JavaScript Ssm Client for Node.js, Browser and React Native
187 lines (186 loc) • 7.63 kB
TypeScript
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
import type { UpdateDocumentRequest, UpdateDocumentResult } from "../models/models_1";
/**
* @public
*/
export type { __MetadataBearer };
/**
* @public
*
* The input for {@link UpdateDocumentCommand}.
*/
export interface UpdateDocumentCommandInput extends UpdateDocumentRequest {
}
/**
* @public
*
* The output of {@link UpdateDocumentCommand}.
*/
export interface UpdateDocumentCommandOutput extends UpdateDocumentResult, __MetadataBearer {
}
declare const UpdateDocumentCommand_base: {
new (input: UpdateDocumentCommandInput): import("@smithy/core/client").CommandImpl<UpdateDocumentCommandInput, UpdateDocumentCommandOutput, import("..").SSMClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
new (input: UpdateDocumentCommandInput): import("@smithy/core/client").CommandImpl<UpdateDocumentCommandInput, UpdateDocumentCommandOutput, import("..").SSMClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
};
/**
* <p>Updates one or more values for an SSM document.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { SSMClient, UpdateDocumentCommand } from "@aws-sdk/client-ssm"; // ES Modules import
* // const { SSMClient, UpdateDocumentCommand } = require("@aws-sdk/client-ssm"); // CommonJS import
* // import type { SSMClientConfig } from "@aws-sdk/client-ssm";
* const config = {}; // type is SSMClientConfig
* const client = new SSMClient(config);
* const input = { // UpdateDocumentRequest
* Content: "STRING_VALUE", // required
* Attachments: [ // AttachmentsSourceList
* { // AttachmentsSource
* Key: "SourceUrl" || "S3FileUrl" || "AttachmentReference",
* Values: [ // AttachmentsSourceValues
* "STRING_VALUE",
* ],
* Name: "STRING_VALUE",
* },
* ],
* Name: "STRING_VALUE", // required
* DisplayName: "STRING_VALUE",
* VersionName: "STRING_VALUE",
* DocumentVersion: "STRING_VALUE",
* DocumentFormat: "YAML" || "JSON" || "TEXT",
* TargetType: "STRING_VALUE",
* };
* const command = new UpdateDocumentCommand(input);
* const response = await client.send(command);
* // { // UpdateDocumentResult
* // DocumentDescription: { // DocumentDescription
* // Sha1: "STRING_VALUE",
* // Hash: "STRING_VALUE",
* // HashType: "Sha256" || "Sha1",
* // Name: "STRING_VALUE",
* // DisplayName: "STRING_VALUE",
* // VersionName: "STRING_VALUE",
* // Owner: "STRING_VALUE",
* // CreatedDate: new Date("TIMESTAMP"),
* // Status: "Creating" || "Active" || "Updating" || "Deleting" || "Failed",
* // StatusInformation: "STRING_VALUE",
* // DocumentVersion: "STRING_VALUE",
* // Description: "STRING_VALUE",
* // Parameters: [ // DocumentParameterList
* // { // DocumentParameter
* // Name: "STRING_VALUE",
* // Type: "String" || "StringList",
* // Description: "STRING_VALUE",
* // DefaultValue: "STRING_VALUE",
* // },
* // ],
* // PlatformTypes: [ // PlatformTypeList
* // "Windows" || "Linux" || "MacOS",
* // ],
* // DocumentType: "Command" || "Policy" || "Automation" || "Session" || "Package" || "ApplicationConfiguration" || "ApplicationConfigurationSchema" || "DeploymentStrategy" || "ChangeCalendar" || "Automation.ChangeTemplate" || "ProblemAnalysis" || "ProblemAnalysisTemplate" || "CloudFormation" || "ConformancePackTemplate" || "QuickSetup" || "ManualApprovalPolicy" || "AutoApprovalPolicy",
* // SchemaVersion: "STRING_VALUE",
* // LatestVersion: "STRING_VALUE",
* // DefaultVersion: "STRING_VALUE",
* // DocumentFormat: "YAML" || "JSON" || "TEXT",
* // TargetType: "STRING_VALUE",
* // Tags: [ // TagList
* // { // Tag
* // Key: "STRING_VALUE", // required
* // Value: "STRING_VALUE", // required
* // },
* // ],
* // AttachmentsInformation: [ // AttachmentInformationList
* // { // AttachmentInformation
* // Name: "STRING_VALUE",
* // },
* // ],
* // Requires: [ // DocumentRequiresList
* // { // DocumentRequires
* // Name: "STRING_VALUE", // required
* // Version: "STRING_VALUE",
* // RequireType: "STRING_VALUE",
* // VersionName: "STRING_VALUE",
* // },
* // ],
* // Author: "STRING_VALUE",
* // ReviewInformation: [ // ReviewInformationList
* // { // ReviewInformation
* // ReviewedTime: new Date("TIMESTAMP"),
* // Status: "APPROVED" || "NOT_REVIEWED" || "PENDING" || "REJECTED",
* // Reviewer: "STRING_VALUE",
* // },
* // ],
* // ApprovedVersion: "STRING_VALUE",
* // PendingReviewVersion: "STRING_VALUE",
* // ReviewStatus: "APPROVED" || "NOT_REVIEWED" || "PENDING" || "REJECTED",
* // Category: [ // CategoryList
* // "STRING_VALUE",
* // ],
* // CategoryEnum: [ // CategoryEnumList
* // "STRING_VALUE",
* // ],
* // },
* // };
*
* ```
*
* @param UpdateDocumentCommandInput - {@link UpdateDocumentCommandInput}
* @returns {@link UpdateDocumentCommandOutput}
* @see {@link UpdateDocumentCommandInput} for command's `input` shape.
* @see {@link UpdateDocumentCommandOutput} for command's `response` shape.
* @see {@link SSMClientResolvedConfig | config} for SSMClient's `config` shape.
*
* @throws {@link DocumentVersionLimitExceeded} (client fault)
* <p>The document has too many versions. Delete one or more document versions and try
* again.</p>
*
* @throws {@link DuplicateDocumentContent} (client fault)
* <p>The content of the association document matches another document. Change the content of the
* document and try again.</p>
*
* @throws {@link DuplicateDocumentVersionName} (client fault)
* <p>The version name has already been used in this document. Specify a different version name,
* and then try again.</p>
*
* @throws {@link InternalServerError} (server fault)
* <p>An error occurred on the server side.</p>
*
* @throws {@link InvalidDocument} (client fault)
* <p>The specified SSM document doesn't exist.</p>
*
* @throws {@link InvalidDocumentContent} (client fault)
* <p>The content for the document isn't valid.</p>
*
* @throws {@link InvalidDocumentOperation} (client fault)
* <p>You attempted to delete a document while it is still shared. You must stop sharing the
* document before you can delete it.</p>
*
* @throws {@link InvalidDocumentSchemaVersion} (client fault)
* <p>The version of the document schema isn't supported.</p>
*
* @throws {@link InvalidDocumentVersion} (client fault)
* <p>The document version isn't valid or doesn't exist.</p>
*
* @throws {@link MaxDocumentSizeExceeded} (client fault)
* <p>The size limit of a document is 64 KB.</p>
*
* @throws {@link SSMServiceException}
* <p>Base exception class for all service exceptions from SSM service.</p>
*
*
* @public
*/
export declare class UpdateDocumentCommand extends UpdateDocumentCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: UpdateDocumentRequest;
output: UpdateDocumentResult;
};
sdk: {
input: UpdateDocumentCommandInput;
output: UpdateDocumentCommandOutput;
};
};
}