aws_sdk_cloudformation/operation/get_template_summary/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_template_summary::_get_template_summary_output::GetTemplateSummaryOutputBuilder;
3
4pub use crate::operation::get_template_summary::_get_template_summary_input::GetTemplateSummaryInputBuilder;
5
6impl crate::operation::get_template_summary::builders::GetTemplateSummaryInputBuilder {
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::get_template_summary::GetTemplateSummaryOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::get_template_summary::GetTemplateSummaryError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.get_template_summary();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `GetTemplateSummary`.
24///
25/// <p>Returns information about a new or existing template. The <code>GetTemplateSummary</code> action is useful for viewing parameter information, such as default parameter values and parameter types, before you create or update a stack or stack set.</p>
26/// <p>You can use the <code>GetTemplateSummary</code> action when you submit a template, or you can get template information for a stack set, or a running or deleted stack.</p>
27/// <p>For deleted stacks, <code>GetTemplateSummary</code> returns the template information for up to 90 days after the stack has been deleted. If the template doesn't exist, a <code>ValidationError</code> is returned.</p>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct GetTemplateSummaryFluentBuilder {
30 handle: ::std::sync::Arc<crate::client::Handle>,
31 inner: crate::operation::get_template_summary::builders::GetTemplateSummaryInputBuilder,
32 config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35 crate::client::customize::internal::CustomizableSend<
36 crate::operation::get_template_summary::GetTemplateSummaryOutput,
37 crate::operation::get_template_summary::GetTemplateSummaryError,
38 > for GetTemplateSummaryFluentBuilder
39{
40 fn send(
41 self,
42 config_override: crate::config::Builder,
43 ) -> crate::client::customize::internal::BoxFuture<
44 crate::client::customize::internal::SendResult<
45 crate::operation::get_template_summary::GetTemplateSummaryOutput,
46 crate::operation::get_template_summary::GetTemplateSummaryError,
47 >,
48 > {
49 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50 }
51}
52impl GetTemplateSummaryFluentBuilder {
53 /// Creates a new `GetTemplateSummaryFluentBuilder`.
54 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55 Self {
56 handle,
57 inner: ::std::default::Default::default(),
58 config_override: ::std::option::Option::None,
59 }
60 }
61 /// Access the GetTemplateSummary as a reference.
62 pub fn as_input(&self) -> &crate::operation::get_template_summary::builders::GetTemplateSummaryInputBuilder {
63 &self.inner
64 }
65 /// Sends the request and returns the response.
66 ///
67 /// If an error occurs, an `SdkError` will be returned with additional details that
68 /// can be matched against.
69 ///
70 /// By default, any retryable failures will be retried twice. Retry behavior
71 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72 /// set when configuring the client.
73 pub async fn send(
74 self,
75 ) -> ::std::result::Result<
76 crate::operation::get_template_summary::GetTemplateSummaryOutput,
77 ::aws_smithy_runtime_api::client::result::SdkError<
78 crate::operation::get_template_summary::GetTemplateSummaryError,
79 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80 >,
81 > {
82 let input = self
83 .inner
84 .build()
85 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86 let runtime_plugins = crate::operation::get_template_summary::GetTemplateSummary::operation_runtime_plugins(
87 self.handle.runtime_plugins.clone(),
88 &self.handle.conf,
89 self.config_override,
90 );
91 crate::operation::get_template_summary::GetTemplateSummary::orchestrate(&runtime_plugins, input).await
92 }
93
94 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
95 pub fn customize(
96 self,
97 ) -> crate::client::customize::CustomizableOperation<
98 crate::operation::get_template_summary::GetTemplateSummaryOutput,
99 crate::operation::get_template_summary::GetTemplateSummaryError,
100 Self,
101 > {
102 crate::client::customize::CustomizableOperation::new(self)
103 }
104 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
105 self.set_config_override(::std::option::Option::Some(config_override.into()));
106 self
107 }
108
109 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
110 self.config_override = config_override;
111 self
112 }
113 /// <p>Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes.</p>
114 /// <p>Conditional: You must specify only one of the following parameters: <code>StackName</code>, <code>StackSetName</code>, <code>TemplateBody</code>, or <code>TemplateURL</code>.</p>
115 pub fn template_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.inner = self.inner.template_body(input.into());
117 self
118 }
119 /// <p>Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes.</p>
120 /// <p>Conditional: You must specify only one of the following parameters: <code>StackName</code>, <code>StackSetName</code>, <code>TemplateBody</code>, or <code>TemplateURL</code>.</p>
121 pub fn set_template_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.inner = self.inner.set_template_body(input);
123 self
124 }
125 /// <p>Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes.</p>
126 /// <p>Conditional: You must specify only one of the following parameters: <code>StackName</code>, <code>StackSetName</code>, <code>TemplateBody</code>, or <code>TemplateURL</code>.</p>
127 pub fn get_template_body(&self) -> &::std::option::Option<::std::string::String> {
128 self.inner.get_template_body()
129 }
130 /// <p>The URL of a file containing the template body. The URL must point to a template (max size: 1 MB) that's located in an Amazon S3 bucket or a Systems Manager document. The location for an Amazon S3 bucket must start with <code>https://</code>.</p>
131 /// <p>Conditional: You must specify only one of the following parameters: <code>StackName</code>, <code>StackSetName</code>, <code>TemplateBody</code>, or <code>TemplateURL</code>.</p>
132 pub fn template_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.inner = self.inner.template_url(input.into());
134 self
135 }
136 /// <p>The URL of a file containing the template body. The URL must point to a template (max size: 1 MB) that's located in an Amazon S3 bucket or a Systems Manager document. The location for an Amazon S3 bucket must start with <code>https://</code>.</p>
137 /// <p>Conditional: You must specify only one of the following parameters: <code>StackName</code>, <code>StackSetName</code>, <code>TemplateBody</code>, or <code>TemplateURL</code>.</p>
138 pub fn set_template_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139 self.inner = self.inner.set_template_url(input);
140 self
141 }
142 /// <p>The URL of a file containing the template body. The URL must point to a template (max size: 1 MB) that's located in an Amazon S3 bucket or a Systems Manager document. The location for an Amazon S3 bucket must start with <code>https://</code>.</p>
143 /// <p>Conditional: You must specify only one of the following parameters: <code>StackName</code>, <code>StackSetName</code>, <code>TemplateBody</code>, or <code>TemplateURL</code>.</p>
144 pub fn get_template_url(&self) -> &::std::option::Option<::std::string::String> {
145 self.inner.get_template_url()
146 }
147 /// <p>The name or the stack ID that's associated with the stack, which aren't always interchangeable. For running stacks, you can specify either the stack's name or its unique stack ID. For deleted stack, you must specify the unique stack ID.</p>
148 /// <p>Conditional: You must specify only one of the following parameters: <code>StackName</code>, <code>StackSetName</code>, <code>TemplateBody</code>, or <code>TemplateURL</code>.</p>
149 pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.inner = self.inner.stack_name(input.into());
151 self
152 }
153 /// <p>The name or the stack ID that's associated with the stack, which aren't always interchangeable. For running stacks, you can specify either the stack's name or its unique stack ID. For deleted stack, you must specify the unique stack ID.</p>
154 /// <p>Conditional: You must specify only one of the following parameters: <code>StackName</code>, <code>StackSetName</code>, <code>TemplateBody</code>, or <code>TemplateURL</code>.</p>
155 pub fn set_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.inner = self.inner.set_stack_name(input);
157 self
158 }
159 /// <p>The name or the stack ID that's associated with the stack, which aren't always interchangeable. For running stacks, you can specify either the stack's name or its unique stack ID. For deleted stack, you must specify the unique stack ID.</p>
160 /// <p>Conditional: You must specify only one of the following parameters: <code>StackName</code>, <code>StackSetName</code>, <code>TemplateBody</code>, or <code>TemplateURL</code>.</p>
161 pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
162 self.inner.get_stack_name()
163 }
164 /// <p>The name or unique ID of the stack set from which the stack was created.</p>
165 /// <p>Conditional: You must specify only one of the following parameters: <code>StackName</code>, <code>StackSetName</code>, <code>TemplateBody</code>, or <code>TemplateURL</code>.</p>
166 pub fn stack_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167 self.inner = self.inner.stack_set_name(input.into());
168 self
169 }
170 /// <p>The name or unique ID of the stack set from which the stack was created.</p>
171 /// <p>Conditional: You must specify only one of the following parameters: <code>StackName</code>, <code>StackSetName</code>, <code>TemplateBody</code>, or <code>TemplateURL</code>.</p>
172 pub fn set_stack_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173 self.inner = self.inner.set_stack_set_name(input);
174 self
175 }
176 /// <p>The name or unique ID of the stack set from which the stack was created.</p>
177 /// <p>Conditional: You must specify only one of the following parameters: <code>StackName</code>, <code>StackSetName</code>, <code>TemplateBody</code>, or <code>TemplateURL</code>.</p>
178 pub fn get_stack_set_name(&self) -> &::std::option::Option<::std::string::String> {
179 self.inner.get_stack_set_name()
180 }
181 /// <p>\[Service-managed permissions\] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.</p>
182 /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for stack sets with self-managed permissions.</p>
183 /// <ul>
184 /// <li>
185 /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
186 /// <li>
187 /// <p>If you are signed in to a delegated administrator account, specify <code>DELEGATED_ADMIN</code>.</p>
188 /// <p>Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html">Register a delegated administrator</a> in the <i>CloudFormation User Guide</i>.</p></li>
189 /// </ul>
190 pub fn call_as(mut self, input: crate::types::CallAs) -> Self {
191 self.inner = self.inner.call_as(input);
192 self
193 }
194 /// <p>\[Service-managed permissions\] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.</p>
195 /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for stack sets with self-managed permissions.</p>
196 /// <ul>
197 /// <li>
198 /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
199 /// <li>
200 /// <p>If you are signed in to a delegated administrator account, specify <code>DELEGATED_ADMIN</code>.</p>
201 /// <p>Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html">Register a delegated administrator</a> in the <i>CloudFormation User Guide</i>.</p></li>
202 /// </ul>
203 pub fn set_call_as(mut self, input: ::std::option::Option<crate::types::CallAs>) -> Self {
204 self.inner = self.inner.set_call_as(input);
205 self
206 }
207 /// <p>\[Service-managed permissions\] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.</p>
208 /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for stack sets with self-managed permissions.</p>
209 /// <ul>
210 /// <li>
211 /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
212 /// <li>
213 /// <p>If you are signed in to a delegated administrator account, specify <code>DELEGATED_ADMIN</code>.</p>
214 /// <p>Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html">Register a delegated administrator</a> in the <i>CloudFormation User Guide</i>.</p></li>
215 /// </ul>
216 pub fn get_call_as(&self) -> &::std::option::Option<crate::types::CallAs> {
217 self.inner.get_call_as()
218 }
219 /// <p>Specifies options for the <code>GetTemplateSummary</code> API action.</p>
220 pub fn template_summary_config(mut self, input: crate::types::TemplateSummaryConfig) -> Self {
221 self.inner = self.inner.template_summary_config(input);
222 self
223 }
224 /// <p>Specifies options for the <code>GetTemplateSummary</code> API action.</p>
225 pub fn set_template_summary_config(mut self, input: ::std::option::Option<crate::types::TemplateSummaryConfig>) -> Self {
226 self.inner = self.inner.set_template_summary_config(input);
227 self
228 }
229 /// <p>Specifies options for the <code>GetTemplateSummary</code> API action.</p>
230 pub fn get_template_summary_config(&self) -> &::std::option::Option<crate::types::TemplateSummaryConfig> {
231 self.inner.get_template_summary_config()
232 }
233}