delete_document
¶
delete_document(
name: DocumentName,
*,
config_overrides: Optional[SSMClientConfig] = None,
document_version: Optional[DocumentVersion] = None,
version_name: Optional[DocumentVersionName] = None,
force: Optional[Boolean] = None,
) -> DeleteDocumentResult
Deletes the Amazon Web Services Systems Manager document (SSM document) and all managed node associations to the document.
Before you delete the document, we recommend that you use DeleteAssociation to disassociate all managed nodes that are associated with the document.
Parameters:
-
name(DocumentName) –The name of the document.
-
document_version(Optional[DocumentVersion], default:None) –The version of the document that you want to delete. If not provided, all versions of the document are deleted.
-
version_name(Optional[DocumentVersionName], default:None) –The version name of the document that you want to delete. If not provided, all versions of the document are deleted.
-
force(Optional[Boolean], default:None) –Some SSM document types require that you specify a
Forceflag before you can delete the document. For example, you must specify aForceflag to delete a document of typeApplicationConfigurationSchema. You can restrict access to theForceflag in an Identity and Access Management (IAM) policy.
Raises:
-
AssociatedInstances–You must disassociate a document from all managed nodes before you can delete it.
-
InternalServerError–An error occurred on the server side.
-
InvalidDocument–The specified SSM document doesn't exist.
-
InvalidDocumentOperation–You attempted to delete a document while it is still shared. You must stop sharing the document before you can delete it.
-
TooManyUpdates–There are concurrent updates for a resource that supports one update at a time.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/ssm.py
2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 | |