aws_sdk_eks/operation/update_capability/
_update_capability_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateCapabilityInput {
6    /// <p>The name of the Amazon EKS cluster that contains the capability you want to update configuration for.</p>
7    pub cluster_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the capability to update configuration for.</p>
9    pub capability_name: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Resource Name (ARN) of the IAM role that the capability uses to interact with Amazon Web Services services. If you specify a new role ARN, the capability will start using the new role for all subsequent operations.</p>
11    pub role_arn: ::std::option::Option<::std::string::String>,
12    /// <p>The updated configuration settings for the capability. You only need to specify the configuration parameters you want to change. For Argo CD capabilities, you can update RBAC role mappings and network access settings.</p>
13    pub configuration: ::std::option::Option<crate::types::UpdateCapabilityConfiguration>,
14    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is valid for 24 hours after creation.</p>
15    pub client_request_token: ::std::option::Option<::std::string::String>,
16    /// <p>The updated delete propagation policy for the capability. Currently, the only supported value is <code>RETAIN</code>.</p>
17    pub delete_propagation_policy: ::std::option::Option<crate::types::CapabilityDeletePropagationPolicy>,
18}
19impl UpdateCapabilityInput {
20    /// <p>The name of the Amazon EKS cluster that contains the capability you want to update configuration for.</p>
21    pub fn cluster_name(&self) -> ::std::option::Option<&str> {
22        self.cluster_name.as_deref()
23    }
24    /// <p>The name of the capability to update configuration for.</p>
25    pub fn capability_name(&self) -> ::std::option::Option<&str> {
26        self.capability_name.as_deref()
27    }
28    /// <p>The Amazon Resource Name (ARN) of the IAM role that the capability uses to interact with Amazon Web Services services. If you specify a new role ARN, the capability will start using the new role for all subsequent operations.</p>
29    pub fn role_arn(&self) -> ::std::option::Option<&str> {
30        self.role_arn.as_deref()
31    }
32    /// <p>The updated configuration settings for the capability. You only need to specify the configuration parameters you want to change. For Argo CD capabilities, you can update RBAC role mappings and network access settings.</p>
33    pub fn configuration(&self) -> ::std::option::Option<&crate::types::UpdateCapabilityConfiguration> {
34        self.configuration.as_ref()
35    }
36    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is valid for 24 hours after creation.</p>
37    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
38        self.client_request_token.as_deref()
39    }
40    /// <p>The updated delete propagation policy for the capability. Currently, the only supported value is <code>RETAIN</code>.</p>
41    pub fn delete_propagation_policy(&self) -> ::std::option::Option<&crate::types::CapabilityDeletePropagationPolicy> {
42        self.delete_propagation_policy.as_ref()
43    }
44}
45impl UpdateCapabilityInput {
46    /// Creates a new builder-style object to manufacture [`UpdateCapabilityInput`](crate::operation::update_capability::UpdateCapabilityInput).
47    pub fn builder() -> crate::operation::update_capability::builders::UpdateCapabilityInputBuilder {
48        crate::operation::update_capability::builders::UpdateCapabilityInputBuilder::default()
49    }
50}
51
52/// A builder for [`UpdateCapabilityInput`](crate::operation::update_capability::UpdateCapabilityInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct UpdateCapabilityInputBuilder {
56    pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
57    pub(crate) capability_name: ::std::option::Option<::std::string::String>,
58    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
59    pub(crate) configuration: ::std::option::Option<crate::types::UpdateCapabilityConfiguration>,
60    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
61    pub(crate) delete_propagation_policy: ::std::option::Option<crate::types::CapabilityDeletePropagationPolicy>,
62}
63impl UpdateCapabilityInputBuilder {
64    /// <p>The name of the Amazon EKS cluster that contains the capability you want to update configuration for.</p>
65    /// This field is required.
66    pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.cluster_name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the Amazon EKS cluster that contains the capability you want to update configuration for.</p>
71    pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.cluster_name = input;
73        self
74    }
75    /// <p>The name of the Amazon EKS cluster that contains the capability you want to update configuration for.</p>
76    pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.cluster_name
78    }
79    /// <p>The name of the capability to update configuration for.</p>
80    /// This field is required.
81    pub fn capability_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.capability_name = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The name of the capability to update configuration for.</p>
86    pub fn set_capability_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.capability_name = input;
88        self
89    }
90    /// <p>The name of the capability to update configuration for.</p>
91    pub fn get_capability_name(&self) -> &::std::option::Option<::std::string::String> {
92        &self.capability_name
93    }
94    /// <p>The Amazon Resource Name (ARN) of the IAM role that the capability uses to interact with Amazon Web Services services. If you specify a new role ARN, the capability will start using the new role for all subsequent operations.</p>
95    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.role_arn = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The Amazon Resource Name (ARN) of the IAM role that the capability uses to interact with Amazon Web Services services. If you specify a new role ARN, the capability will start using the new role for all subsequent operations.</p>
100    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.role_arn = input;
102        self
103    }
104    /// <p>The Amazon Resource Name (ARN) of the IAM role that the capability uses to interact with Amazon Web Services services. If you specify a new role ARN, the capability will start using the new role for all subsequent operations.</p>
105    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
106        &self.role_arn
107    }
108    /// <p>The updated configuration settings for the capability. You only need to specify the configuration parameters you want to change. For Argo CD capabilities, you can update RBAC role mappings and network access settings.</p>
109    pub fn configuration(mut self, input: crate::types::UpdateCapabilityConfiguration) -> Self {
110        self.configuration = ::std::option::Option::Some(input);
111        self
112    }
113    /// <p>The updated configuration settings for the capability. You only need to specify the configuration parameters you want to change. For Argo CD capabilities, you can update RBAC role mappings and network access settings.</p>
114    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::UpdateCapabilityConfiguration>) -> Self {
115        self.configuration = input;
116        self
117    }
118    /// <p>The updated configuration settings for the capability. You only need to specify the configuration parameters you want to change. For Argo CD capabilities, you can update RBAC role mappings and network access settings.</p>
119    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::UpdateCapabilityConfiguration> {
120        &self.configuration
121    }
122    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is valid for 24 hours after creation.</p>
123    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.client_request_token = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is valid for 24 hours after creation.</p>
128    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.client_request_token = input;
130        self
131    }
132    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is valid for 24 hours after creation.</p>
133    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
134        &self.client_request_token
135    }
136    /// <p>The updated delete propagation policy for the capability. Currently, the only supported value is <code>RETAIN</code>.</p>
137    pub fn delete_propagation_policy(mut self, input: crate::types::CapabilityDeletePropagationPolicy) -> Self {
138        self.delete_propagation_policy = ::std::option::Option::Some(input);
139        self
140    }
141    /// <p>The updated delete propagation policy for the capability. Currently, the only supported value is <code>RETAIN</code>.</p>
142    pub fn set_delete_propagation_policy(mut self, input: ::std::option::Option<crate::types::CapabilityDeletePropagationPolicy>) -> Self {
143        self.delete_propagation_policy = input;
144        self
145    }
146    /// <p>The updated delete propagation policy for the capability. Currently, the only supported value is <code>RETAIN</code>.</p>
147    pub fn get_delete_propagation_policy(&self) -> &::std::option::Option<crate::types::CapabilityDeletePropagationPolicy> {
148        &self.delete_propagation_policy
149    }
150    /// Consumes the builder and constructs a [`UpdateCapabilityInput`](crate::operation::update_capability::UpdateCapabilityInput).
151    pub fn build(
152        self,
153    ) -> ::std::result::Result<crate::operation::update_capability::UpdateCapabilityInput, ::aws_smithy_types::error::operation::BuildError> {
154        ::std::result::Result::Ok(crate::operation::update_capability::UpdateCapabilityInput {
155            cluster_name: self.cluster_name,
156            capability_name: self.capability_name,
157            role_arn: self.role_arn,
158            configuration: self.configuration,
159            client_request_token: self.client_request_token,
160            delete_propagation_policy: self.delete_propagation_policy,
161        })
162    }
163}