delete_association
async
¶
delete_association(
*,
config_overrides: Optional[AsyncSSMClientConfig] = None,
name: Optional[DocumentARN] = None,
instance_id: Optional[InstanceId] = None,
association_id: Optional[AssociationId] = None,
) -> DeleteAssociationResult
Disassociates the specified Amazon Web Services Systems Manager document (SSM document) from the specified managed node. If you created the association by using the Targets parameter, then you must delete the association by using the association ID.
When you disassociate a document from a managed node, it doesn't change the configuration of the node. To change the configuration state of a managed node after you disassociate a document, you must create a new document with the desired configuration and associate it with the node.
Parameters:
-
name(Optional[DocumentARN], default:None) –The name of the SSM document.
-
instance_id(Optional[InstanceId], default:None) –The managed node ID.
InstanceIdhas been deprecated. To specify a managed node ID for an association, use theTargetsparameter. Requests that include the parameterInstanceIDwith Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameterInstanceId, you can't use the parametersAssociationName,DocumentVersion,MaxErrors,MaxConcurrency,OutputLocation, orScheduleExpression. To use these parameters, you must use theTargetsparameter. -
association_id(Optional[AssociationId], default:None) –The association ID that you want to delete.
Raises:
-
AssociationDoesNotExist–The specified association doesn't exist.
-
InternalServerError–An error occurred on the server side.
-
InvalidDocument–The specified SSM document doesn't exist.
-
InvalidInstanceId–The following problems can cause this exception:
-
You don't have permission to access the managed node.
-
Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is running.
-
SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.
-
The managed node isn't in a valid state. Valid states are:
Running,Pending,Stopped, andStopping. Invalid states are:Shutting-downandTerminated.
-
-
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.