describeNodeAssociationStatus method
Returns the current status of an existing association or disassociation request.
A ResourceNotFoundException
is thrown when no recent
association or disassociation request with the specified token is found,
or when the server does not exist. A ValidationException
is
raised when parameters of the request are not valid.
May throw ResourceNotFoundException. May throw ValidationException.
Parameter nodeAssociationStatusToken
:
The token returned in either the AssociateNodeResponse or the
DisassociateNodeResponse.
Parameter serverName
:
The name of the server from which to disassociate the node.
Implementation
Future<DescribeNodeAssociationStatusResponse> describeNodeAssociationStatus({
required String nodeAssociationStatusToken,
required String serverName,
}) async {
ArgumentError.checkNotNull(
nodeAssociationStatusToken, 'nodeAssociationStatusToken');
_s.validateStringLength(
'nodeAssociationStatusToken',
nodeAssociationStatusToken,
0,
10000,
isRequired: true,
);
ArgumentError.checkNotNull(serverName, 'serverName');
_s.validateStringLength(
'serverName',
serverName,
1,
40,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'OpsWorksCM_V2016_11_01.DescribeNodeAssociationStatus'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'NodeAssociationStatusToken': nodeAssociationStatusToken,
'ServerName': serverName,
},
);
return DescribeNodeAssociationStatusResponse.fromJson(jsonResponse.body);
}