updateClusterSettings method
Future<UpdateClusterSettingsResponse>
updateClusterSettings({
- required String cluster,
- required List<
ClusterSetting> settings,
Modifies the settings to use for a cluster.
May throw ServerException. May throw ClientException. May throw ClusterNotFoundException. May throw InvalidParameterException.
Parameter cluster
:
The name of the cluster to modify the settings for.
Parameter settings
:
The setting to use by default for a cluster. This parameter is used to
enable CloudWatch Container Insights for a cluster. If this value is
specified, it will override the containerInsights
value set
with PutAccountSetting or PutAccountSettingDefault.
Implementation
Future<UpdateClusterSettingsResponse> updateClusterSettings({
required String cluster,
required List<ClusterSetting> settings,
}) async {
ArgumentError.checkNotNull(cluster, 'cluster');
ArgumentError.checkNotNull(settings, 'settings');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonEC2ContainerServiceV20141113.UpdateClusterSettings'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'cluster': cluster,
'settings': settings,
},
);
return UpdateClusterSettingsResponse.fromJson(jsonResponse.body);
}