update_document
¶
update_document(
content: DocumentContent,
name: DocumentName,
*,
config_overrides: Optional[SSMClientConfig] = None,
attachments: Optional[AttachmentsSourceList] = None,
display_name: Optional[DocumentDisplayName] = None,
version_name: Optional[DocumentVersionName] = None,
document_version: Optional[DocumentVersion] = None,
document_format: Optional[DocumentFormat] = None,
target_type: Optional[TargetType] = None,
) -> UpdateDocumentResult
Updates one or more values for an SSM document.
Parameters:
-
content(DocumentContent) –A valid JSON or YAML string.
-
attachments(Optional[AttachmentsSourceList], default:None) –A list of key-value pairs that describe attachments to a version of a document.
-
name(DocumentName) –The name of the SSM document that you want to update.
-
display_name(Optional[DocumentDisplayName], default:None) –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.
-
version_name(Optional[DocumentVersionName], default:None) –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.
-
document_version(Optional[DocumentVersion], default:None) –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
$LATESTvariable.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-intervalparameter. -
document_format(Optional[DocumentFormat], default:None) –Specify the document format for the new document version. The document format can be JSON, YAML, or TEXT. JSON is the default format.
-
target_type(Optional[TargetType], default:None) –Specify a new target type for the document.
Raises:
-
DocumentVersionLimitExceeded–The document has too many versions. Delete one or more document versions and try again.
-
DuplicateDocumentContent–The content of the association document matches another document. Change the content of the document and try again.
-
DuplicateDocumentVersionName–The version name has already been used in this document. Specify a different version name, and then try again.
-
InternalServerError–An error occurred on the server side.
-
InvalidDocument–The specified SSM document doesn't exist.
-
InvalidDocumentContent–The content for the document isn't valid.
-
InvalidDocumentOperation–You attempted to delete a document while it is still shared. You must stop sharing the document before you can delete it.
-
InvalidDocumentSchemaVersion–The version of the document schema isn't supported.
-
InvalidDocumentVersion–The document version isn't valid or doesn't exist.
-
MaxDocumentSizeExceeded–The size limit of a document is 64 KB.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/ssm.py
11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 | |