aws_sdk_apprunner/operation/update_service/
_update_service_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 UpdateServiceInput {
6    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to update.</p>
7    pub service_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The source configuration to apply to the App Runner service.</p>
9    /// <p>You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of <code>SourceConfiguration</code> that you originally included when you created the service. Specifically, you can include either <code>CodeRepository</code> or <code>ImageRepository</code>. To update the source configuration, set the values to members of the structure that you include.</p>
10    pub source_configuration: ::std::option::Option<crate::types::SourceConfiguration>,
11    /// <p>The runtime configuration to apply to instances (scaling units) of your service.</p>
12    pub instance_configuration: ::std::option::Option<crate::types::InstanceConfiguration>,
13    /// <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.</p>
14    pub auto_scaling_configuration_arn: ::std::option::Option<::std::string::String>,
15    /// <p>The settings for the health check that App Runner performs to monitor the health of the App Runner service.</p>
16    pub health_check_configuration: ::std::option::Option<crate::types::HealthCheckConfiguration>,
17    /// <p>Configuration settings related to network traffic of the web application that the App Runner service runs.</p>
18    pub network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
19    /// <p>The observability configuration of your service.</p>
20    pub observability_configuration: ::std::option::Option<crate::types::ServiceObservabilityConfiguration>,
21}
22impl UpdateServiceInput {
23    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to update.</p>
24    pub fn service_arn(&self) -> ::std::option::Option<&str> {
25        self.service_arn.as_deref()
26    }
27    /// <p>The source configuration to apply to the App Runner service.</p>
28    /// <p>You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of <code>SourceConfiguration</code> that you originally included when you created the service. Specifically, you can include either <code>CodeRepository</code> or <code>ImageRepository</code>. To update the source configuration, set the values to members of the structure that you include.</p>
29    pub fn source_configuration(&self) -> ::std::option::Option<&crate::types::SourceConfiguration> {
30        self.source_configuration.as_ref()
31    }
32    /// <p>The runtime configuration to apply to instances (scaling units) of your service.</p>
33    pub fn instance_configuration(&self) -> ::std::option::Option<&crate::types::InstanceConfiguration> {
34        self.instance_configuration.as_ref()
35    }
36    /// <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.</p>
37    pub fn auto_scaling_configuration_arn(&self) -> ::std::option::Option<&str> {
38        self.auto_scaling_configuration_arn.as_deref()
39    }
40    /// <p>The settings for the health check that App Runner performs to monitor the health of the App Runner service.</p>
41    pub fn health_check_configuration(&self) -> ::std::option::Option<&crate::types::HealthCheckConfiguration> {
42        self.health_check_configuration.as_ref()
43    }
44    /// <p>Configuration settings related to network traffic of the web application that the App Runner service runs.</p>
45    pub fn network_configuration(&self) -> ::std::option::Option<&crate::types::NetworkConfiguration> {
46        self.network_configuration.as_ref()
47    }
48    /// <p>The observability configuration of your service.</p>
49    pub fn observability_configuration(&self) -> ::std::option::Option<&crate::types::ServiceObservabilityConfiguration> {
50        self.observability_configuration.as_ref()
51    }
52}
53impl UpdateServiceInput {
54    /// Creates a new builder-style object to manufacture [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
55    pub fn builder() -> crate::operation::update_service::builders::UpdateServiceInputBuilder {
56        crate::operation::update_service::builders::UpdateServiceInputBuilder::default()
57    }
58}
59
60/// A builder for [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
61#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct UpdateServiceInputBuilder {
64    pub(crate) service_arn: ::std::option::Option<::std::string::String>,
65    pub(crate) source_configuration: ::std::option::Option<crate::types::SourceConfiguration>,
66    pub(crate) instance_configuration: ::std::option::Option<crate::types::InstanceConfiguration>,
67    pub(crate) auto_scaling_configuration_arn: ::std::option::Option<::std::string::String>,
68    pub(crate) health_check_configuration: ::std::option::Option<crate::types::HealthCheckConfiguration>,
69    pub(crate) network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
70    pub(crate) observability_configuration: ::std::option::Option<crate::types::ServiceObservabilityConfiguration>,
71}
72impl UpdateServiceInputBuilder {
73    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to update.</p>
74    /// This field is required.
75    pub fn service_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.service_arn = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to update.</p>
80    pub fn set_service_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.service_arn = input;
82        self
83    }
84    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to update.</p>
85    pub fn get_service_arn(&self) -> &::std::option::Option<::std::string::String> {
86        &self.service_arn
87    }
88    /// <p>The source configuration to apply to the App Runner service.</p>
89    /// <p>You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of <code>SourceConfiguration</code> that you originally included when you created the service. Specifically, you can include either <code>CodeRepository</code> or <code>ImageRepository</code>. To update the source configuration, set the values to members of the structure that you include.</p>
90    pub fn source_configuration(mut self, input: crate::types::SourceConfiguration) -> Self {
91        self.source_configuration = ::std::option::Option::Some(input);
92        self
93    }
94    /// <p>The source configuration to apply to the App Runner service.</p>
95    /// <p>You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of <code>SourceConfiguration</code> that you originally included when you created the service. Specifically, you can include either <code>CodeRepository</code> or <code>ImageRepository</code>. To update the source configuration, set the values to members of the structure that you include.</p>
96    pub fn set_source_configuration(mut self, input: ::std::option::Option<crate::types::SourceConfiguration>) -> Self {
97        self.source_configuration = input;
98        self
99    }
100    /// <p>The source configuration to apply to the App Runner service.</p>
101    /// <p>You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of <code>SourceConfiguration</code> that you originally included when you created the service. Specifically, you can include either <code>CodeRepository</code> or <code>ImageRepository</code>. To update the source configuration, set the values to members of the structure that you include.</p>
102    pub fn get_source_configuration(&self) -> &::std::option::Option<crate::types::SourceConfiguration> {
103        &self.source_configuration
104    }
105    /// <p>The runtime configuration to apply to instances (scaling units) of your service.</p>
106    pub fn instance_configuration(mut self, input: crate::types::InstanceConfiguration) -> Self {
107        self.instance_configuration = ::std::option::Option::Some(input);
108        self
109    }
110    /// <p>The runtime configuration to apply to instances (scaling units) of your service.</p>
111    pub fn set_instance_configuration(mut self, input: ::std::option::Option<crate::types::InstanceConfiguration>) -> Self {
112        self.instance_configuration = input;
113        self
114    }
115    /// <p>The runtime configuration to apply to instances (scaling units) of your service.</p>
116    pub fn get_instance_configuration(&self) -> &::std::option::Option<crate::types::InstanceConfiguration> {
117        &self.instance_configuration
118    }
119    /// <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.</p>
120    pub fn auto_scaling_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.auto_scaling_configuration_arn = ::std::option::Option::Some(input.into());
122        self
123    }
124    /// <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.</p>
125    pub fn set_auto_scaling_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126        self.auto_scaling_configuration_arn = input;
127        self
128    }
129    /// <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.</p>
130    pub fn get_auto_scaling_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
131        &self.auto_scaling_configuration_arn
132    }
133    /// <p>The settings for the health check that App Runner performs to monitor the health of the App Runner service.</p>
134    pub fn health_check_configuration(mut self, input: crate::types::HealthCheckConfiguration) -> Self {
135        self.health_check_configuration = ::std::option::Option::Some(input);
136        self
137    }
138    /// <p>The settings for the health check that App Runner performs to monitor the health of the App Runner service.</p>
139    pub fn set_health_check_configuration(mut self, input: ::std::option::Option<crate::types::HealthCheckConfiguration>) -> Self {
140        self.health_check_configuration = input;
141        self
142    }
143    /// <p>The settings for the health check that App Runner performs to monitor the health of the App Runner service.</p>
144    pub fn get_health_check_configuration(&self) -> &::std::option::Option<crate::types::HealthCheckConfiguration> {
145        &self.health_check_configuration
146    }
147    /// <p>Configuration settings related to network traffic of the web application that the App Runner service runs.</p>
148    pub fn network_configuration(mut self, input: crate::types::NetworkConfiguration) -> Self {
149        self.network_configuration = ::std::option::Option::Some(input);
150        self
151    }
152    /// <p>Configuration settings related to network traffic of the web application that the App Runner service runs.</p>
153    pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfiguration>) -> Self {
154        self.network_configuration = input;
155        self
156    }
157    /// <p>Configuration settings related to network traffic of the web application that the App Runner service runs.</p>
158    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfiguration> {
159        &self.network_configuration
160    }
161    /// <p>The observability configuration of your service.</p>
162    pub fn observability_configuration(mut self, input: crate::types::ServiceObservabilityConfiguration) -> Self {
163        self.observability_configuration = ::std::option::Option::Some(input);
164        self
165    }
166    /// <p>The observability configuration of your service.</p>
167    pub fn set_observability_configuration(mut self, input: ::std::option::Option<crate::types::ServiceObservabilityConfiguration>) -> Self {
168        self.observability_configuration = input;
169        self
170    }
171    /// <p>The observability configuration of your service.</p>
172    pub fn get_observability_configuration(&self) -> &::std::option::Option<crate::types::ServiceObservabilityConfiguration> {
173        &self.observability_configuration
174    }
175    /// Consumes the builder and constructs a [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
176    pub fn build(
177        self,
178    ) -> ::std::result::Result<crate::operation::update_service::UpdateServiceInput, ::aws_smithy_types::error::operation::BuildError> {
179        ::std::result::Result::Ok(crate::operation::update_service::UpdateServiceInput {
180            service_arn: self.service_arn,
181            source_configuration: self.source_configuration,
182            instance_configuration: self.instance_configuration,
183            auto_scaling_configuration_arn: self.auto_scaling_configuration_arn,
184            health_check_configuration: self.health_check_configuration,
185            network_configuration: self.network_configuration,
186            observability_configuration: self.observability_configuration,
187        })
188    }
189}