update_document
async
¶
update_document(
content: DocumentContent,
name: DocumentName,
*,
config_overrides: Optional[AsyncSSMClientConfig] = 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/async_ssm.py
11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 | |