1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateClusterSettingsInput {
/// <p>The name of the cluster to modify the settings for.</p>
pub cluster: ::std::option::Option<::std::string::String>,
/// <p>The setting to use by default for a cluster. This parameter is used to turn on CloudWatch Container Insights for a cluster. If this value is specified, it overrides the <code>containerInsights</code> value set with <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSetting.html">PutAccountSetting</a> or <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSettingDefault.html">PutAccountSettingDefault</a>.</p><important>
/// <p>Currently, if you delete an existing cluster that does not have Container Insights turned on, and then create a new cluster with the same name with Container Insights tuned on, Container Insights will not actually be turned on. If you want to preserve the same name for your existing cluster and turn on Container Insights, you must wait 7 days before you can re-create it.</p>
/// </important>
pub settings: ::std::option::Option<::std::vec::Vec<crate::types::ClusterSetting>>,
}
impl UpdateClusterSettingsInput {
/// <p>The name of the cluster to modify the settings for.</p>
pub fn cluster(&self) -> ::std::option::Option<&str> {
self.cluster.as_deref()
}
/// <p>The setting to use by default for a cluster. This parameter is used to turn on CloudWatch Container Insights for a cluster. If this value is specified, it overrides the <code>containerInsights</code> value set with <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSetting.html">PutAccountSetting</a> or <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSettingDefault.html">PutAccountSettingDefault</a>.</p><important>
/// <p>Currently, if you delete an existing cluster that does not have Container Insights turned on, and then create a new cluster with the same name with Container Insights tuned on, Container Insights will not actually be turned on. If you want to preserve the same name for your existing cluster and turn on Container Insights, you must wait 7 days before you can re-create it.</p>
/// </important>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.settings.is_none()`.
pub fn settings(&self) -> &[crate::types::ClusterSetting] {
self.settings.as_deref().unwrap_or_default()
}
}
impl UpdateClusterSettingsInput {
/// Creates a new builder-style object to manufacture [`UpdateClusterSettingsInput`](crate::operation::update_cluster_settings::UpdateClusterSettingsInput).
pub fn builder() -> crate::operation::update_cluster_settings::builders::UpdateClusterSettingsInputBuilder {
crate::operation::update_cluster_settings::builders::UpdateClusterSettingsInputBuilder::default()
}
}
/// A builder for [`UpdateClusterSettingsInput`](crate::operation::update_cluster_settings::UpdateClusterSettingsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateClusterSettingsInputBuilder {
pub(crate) cluster: ::std::option::Option<::std::string::String>,
pub(crate) settings: ::std::option::Option<::std::vec::Vec<crate::types::ClusterSetting>>,
}
impl UpdateClusterSettingsInputBuilder {
/// <p>The name of the cluster to modify the settings for.</p>
/// This field is required.
pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cluster = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the cluster to modify the settings for.</p>
pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster = input;
self
}
/// <p>The name of the cluster to modify the settings for.</p>
pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster
}
/// Appends an item to `settings`.
///
/// To override the contents of this collection use [`set_settings`](Self::set_settings).
///
/// <p>The setting to use by default for a cluster. This parameter is used to turn on CloudWatch Container Insights for a cluster. If this value is specified, it overrides the <code>containerInsights</code> value set with <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSetting.html">PutAccountSetting</a> or <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSettingDefault.html">PutAccountSettingDefault</a>.</p><important>
/// <p>Currently, if you delete an existing cluster that does not have Container Insights turned on, and then create a new cluster with the same name with Container Insights tuned on, Container Insights will not actually be turned on. If you want to preserve the same name for your existing cluster and turn on Container Insights, you must wait 7 days before you can re-create it.</p>
/// </important>
pub fn settings(mut self, input: crate::types::ClusterSetting) -> Self {
let mut v = self.settings.unwrap_or_default();
v.push(input);
self.settings = ::std::option::Option::Some(v);
self
}
/// <p>The setting to use by default for a cluster. This parameter is used to turn on CloudWatch Container Insights for a cluster. If this value is specified, it overrides the <code>containerInsights</code> value set with <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSetting.html">PutAccountSetting</a> or <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSettingDefault.html">PutAccountSettingDefault</a>.</p><important>
/// <p>Currently, if you delete an existing cluster that does not have Container Insights turned on, and then create a new cluster with the same name with Container Insights tuned on, Container Insights will not actually be turned on. If you want to preserve the same name for your existing cluster and turn on Container Insights, you must wait 7 days before you can re-create it.</p>
/// </important>
pub fn set_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ClusterSetting>>) -> Self {
self.settings = input;
self
}
/// <p>The setting to use by default for a cluster. This parameter is used to turn on CloudWatch Container Insights for a cluster. If this value is specified, it overrides the <code>containerInsights</code> value set with <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSetting.html">PutAccountSetting</a> or <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSettingDefault.html">PutAccountSettingDefault</a>.</p><important>
/// <p>Currently, if you delete an existing cluster that does not have Container Insights turned on, and then create a new cluster with the same name with Container Insights tuned on, Container Insights will not actually be turned on. If you want to preserve the same name for your existing cluster and turn on Container Insights, you must wait 7 days before you can re-create it.</p>
/// </important>
pub fn get_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ClusterSetting>> {
&self.settings
}
/// Consumes the builder and constructs a [`UpdateClusterSettingsInput`](crate::operation::update_cluster_settings::UpdateClusterSettingsInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_cluster_settings::UpdateClusterSettingsInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::update_cluster_settings::UpdateClusterSettingsInput {
cluster: self.cluster,
settings: self.settings,
})
}
}