submitAttachmentStateChanges method
Future<SubmitAttachmentStateChangesResponse>
submitAttachmentStateChanges({
- required List<
AttachmentStateChange> attachments, - String? cluster,
Sent to acknowledge that an attachment changed states.
May throw ServerException. May throw ClientException. May throw AccessDeniedException. May throw InvalidParameterException.
Parameter attachments
:
Any attachments associated with the state change request.
Parameter cluster
:
The short name or full ARN of the cluster that hosts the container
instance the attachment belongs to.
Implementation
Future<SubmitAttachmentStateChangesResponse> submitAttachmentStateChanges({
required List<AttachmentStateChange> attachments,
String? cluster,
}) async {
ArgumentError.checkNotNull(attachments, 'attachments');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AmazonEC2ContainerServiceV20141113.SubmitAttachmentStateChanges'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'attachments': attachments,
if (cluster != null) 'cluster': cluster,
},
);
return SubmitAttachmentStateChangesResponse.fromJson(jsonResponse.body);
}