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,
cloud_providers: Optional[CloudProviderList] = 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.
-
cloud_providers(Optional[CloudProviderList], default:None) –The cloud providers that the new document version can run against. Valid values include the following:
-
AWS- The document runs against Amazon Web Services resources. -
Azure- The document runs against Microsoft Azure resources. -
GCP- The document runs against Google Cloud resources.
If you don't specify a value, the new version uses the cloud providers of the latest version.
-
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
11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 | |