updateAssociationStatus method
Future<UpdateAssociationStatusResult>
updateAssociationStatus({
- required AssociationStatus associationStatus,
- required String instanceId,
- required String name,
Updates the status of the Systems Manager document associated with the specified instance.
May throw InternalServerError. May throw InvalidInstanceId. May throw InvalidDocument. May throw AssociationDoesNotExist. May throw StatusUnchanged. May throw TooManyUpdates.
Parameter associationStatus
:
The association status.
Parameter instanceId
:
The ID of the instance.
Parameter name
:
The name of the Systems Manager document.
Implementation
Future<UpdateAssociationStatusResult> updateAssociationStatus({
required AssociationStatus associationStatus,
required String instanceId,
required String name,
}) async {
ArgumentError.checkNotNull(associationStatus, 'associationStatus');
ArgumentError.checkNotNull(instanceId, 'instanceId');
ArgumentError.checkNotNull(name, 'name');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.UpdateAssociationStatus'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AssociationStatus': associationStatus,
'InstanceId': instanceId,
'Name': name,
},
);
return UpdateAssociationStatusResult.fromJson(jsonResponse.body);
}