aws_sdk_lightsail/operation/update_container_service/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_container_service::_update_container_service_output::UpdateContainerServiceOutputBuilder;
3
4pub use crate::operation::update_container_service::_update_container_service_input::UpdateContainerServiceInputBuilder;
5
6impl crate::operation::update_container_service::builders::UpdateContainerServiceInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::update_container_service::UpdateContainerServiceOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_container_service::UpdateContainerServiceError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_container_service();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateContainerService`.
24///
25/// <p>Updates the configuration of your Amazon Lightsail container service, such as its power, scale, and public domain names.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateContainerServiceFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::update_container_service::builders::UpdateContainerServiceInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::update_container_service::UpdateContainerServiceOutput,
35 crate::operation::update_container_service::UpdateContainerServiceError,
36 > for UpdateContainerServiceFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::update_container_service::UpdateContainerServiceOutput,
44 crate::operation::update_container_service::UpdateContainerServiceError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl UpdateContainerServiceFluentBuilder {
51 /// Creates a new `UpdateContainerServiceFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the UpdateContainerService as a reference.
60 pub fn as_input(&self) -> &crate::operation::update_container_service::builders::UpdateContainerServiceInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::update_container_service::UpdateContainerServiceOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::update_container_service::UpdateContainerServiceError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::update_container_service::UpdateContainerService::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::update_container_service::UpdateContainerService::orchestrate(&runtime_plugins, input).await
90 }
91
92 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::update_container_service::UpdateContainerServiceOutput,
97 crate::operation::update_container_service::UpdateContainerServiceError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 /// <p>The name of the container service to update.</p>
112 pub fn service_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.service_name(input.into());
114 self
115 }
116 /// <p>The name of the container service to update.</p>
117 pub fn set_service_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_service_name(input);
119 self
120 }
121 /// <p>The name of the container service to update.</p>
122 pub fn get_service_name(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_service_name()
124 }
125 /// <p>The power for the container service.</p>
126 /// <p>The power specifies the amount of memory, vCPUs, and base monthly cost of each node of the container service. The <code>power</code> and <code>scale</code> of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the <code>power</code> with the <code>scale</code> (the number of nodes) of the service.</p>
127 /// <p>Use the <code>GetContainerServicePowers</code> action to view the specifications of each power option.</p>
128 pub fn power(mut self, input: crate::types::ContainerServicePowerName) -> Self {
129 self.inner = self.inner.power(input);
130 self
131 }
132 /// <p>The power for the container service.</p>
133 /// <p>The power specifies the amount of memory, vCPUs, and base monthly cost of each node of the container service. The <code>power</code> and <code>scale</code> of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the <code>power</code> with the <code>scale</code> (the number of nodes) of the service.</p>
134 /// <p>Use the <code>GetContainerServicePowers</code> action to view the specifications of each power option.</p>
135 pub fn set_power(mut self, input: ::std::option::Option<crate::types::ContainerServicePowerName>) -> Self {
136 self.inner = self.inner.set_power(input);
137 self
138 }
139 /// <p>The power for the container service.</p>
140 /// <p>The power specifies the amount of memory, vCPUs, and base monthly cost of each node of the container service. The <code>power</code> and <code>scale</code> of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the <code>power</code> with the <code>scale</code> (the number of nodes) of the service.</p>
141 /// <p>Use the <code>GetContainerServicePowers</code> action to view the specifications of each power option.</p>
142 pub fn get_power(&self) -> &::std::option::Option<crate::types::ContainerServicePowerName> {
143 self.inner.get_power()
144 }
145 /// <p>The scale for the container service.</p>
146 /// <p>The scale specifies the allocated compute nodes of the container service. The <code>power</code> and <code>scale</code> of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the <code>power</code> with the <code>scale</code> (the number of nodes) of the service.</p>
147 pub fn scale(mut self, input: i32) -> Self {
148 self.inner = self.inner.scale(input);
149 self
150 }
151 /// <p>The scale for the container service.</p>
152 /// <p>The scale specifies the allocated compute nodes of the container service. The <code>power</code> and <code>scale</code> of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the <code>power</code> with the <code>scale</code> (the number of nodes) of the service.</p>
153 pub fn set_scale(mut self, input: ::std::option::Option<i32>) -> Self {
154 self.inner = self.inner.set_scale(input);
155 self
156 }
157 /// <p>The scale for the container service.</p>
158 /// <p>The scale specifies the allocated compute nodes of the container service. The <code>power</code> and <code>scale</code> of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the <code>power</code> with the <code>scale</code> (the number of nodes) of the service.</p>
159 pub fn get_scale(&self) -> &::std::option::Option<i32> {
160 self.inner.get_scale()
161 }
162 /// <p>A Boolean value to indicate whether the container service is disabled.</p>
163 pub fn is_disabled(mut self, input: bool) -> Self {
164 self.inner = self.inner.is_disabled(input);
165 self
166 }
167 /// <p>A Boolean value to indicate whether the container service is disabled.</p>
168 pub fn set_is_disabled(mut self, input: ::std::option::Option<bool>) -> Self {
169 self.inner = self.inner.set_is_disabled(input);
170 self
171 }
172 /// <p>A Boolean value to indicate whether the container service is disabled.</p>
173 pub fn get_is_disabled(&self) -> &::std::option::Option<bool> {
174 self.inner.get_is_disabled()
175 }
176 ///
177 /// Adds a key-value pair to `publicDomainNames`.
178 ///
179 /// To override the contents of this collection use [`set_public_domain_names`](Self::set_public_domain_names).
180 ///
181 /// <p>The public domain names to use with the container service, such as <code>example.com</code> and <code>www.example.com</code>.</p>
182 /// <p>You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.</p>
183 /// <p>If you don't specify public domain names, then you can use the default domain of the container service.</p><important>
184 /// <p>You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the <code>CreateCertificate</code> action to create a certificate for the public domain names you want to use with your container service.</p>
185 /// </important>
186 /// <p>You can specify public domain names using a string to array map as shown in the example later on this page.</p>
187 pub fn public_domain_names(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
188 self.inner = self.inner.public_domain_names(k.into(), v);
189 self
190 }
191 /// <p>The public domain names to use with the container service, such as <code>example.com</code> and <code>www.example.com</code>.</p>
192 /// <p>You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.</p>
193 /// <p>If you don't specify public domain names, then you can use the default domain of the container service.</p><important>
194 /// <p>You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the <code>CreateCertificate</code> action to create a certificate for the public domain names you want to use with your container service.</p>
195 /// </important>
196 /// <p>You can specify public domain names using a string to array map as shown in the example later on this page.</p>
197 pub fn set_public_domain_names(
198 mut self,
199 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
200 ) -> Self {
201 self.inner = self.inner.set_public_domain_names(input);
202 self
203 }
204 /// <p>The public domain names to use with the container service, such as <code>example.com</code> and <code>www.example.com</code>.</p>
205 /// <p>You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.</p>
206 /// <p>If you don't specify public domain names, then you can use the default domain of the container service.</p><important>
207 /// <p>You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the <code>CreateCertificate</code> action to create a certificate for the public domain names you want to use with your container service.</p>
208 /// </important>
209 /// <p>You can specify public domain names using a string to array map as shown in the example later on this page.</p>
210 pub fn get_public_domain_names(
211 &self,
212 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
213 self.inner.get_public_domain_names()
214 }
215 /// <p>An object to describe the configuration for the container service to access private container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private repositories.</p>
216 /// <p>For more information, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-container-service-ecr-private-repo-access">Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service</a> in the <i>Amazon Lightsail Developer Guide</i>.</p>
217 pub fn private_registry_access(mut self, input: crate::types::PrivateRegistryAccessRequest) -> Self {
218 self.inner = self.inner.private_registry_access(input);
219 self
220 }
221 /// <p>An object to describe the configuration for the container service to access private container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private repositories.</p>
222 /// <p>For more information, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-container-service-ecr-private-repo-access">Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service</a> in the <i>Amazon Lightsail Developer Guide</i>.</p>
223 pub fn set_private_registry_access(mut self, input: ::std::option::Option<crate::types::PrivateRegistryAccessRequest>) -> Self {
224 self.inner = self.inner.set_private_registry_access(input);
225 self
226 }
227 /// <p>An object to describe the configuration for the container service to access private container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private repositories.</p>
228 /// <p>For more information, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-container-service-ecr-private-repo-access">Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service</a> in the <i>Amazon Lightsail Developer Guide</i>.</p>
229 pub fn get_private_registry_access(&self) -> &::std::option::Option<crate::types::PrivateRegistryAccessRequest> {
230 self.inner.get_private_registry_access()
231 }
232}