aws_sdk_swf/operation/register_domain/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::register_domain::_register_domain_output::RegisterDomainOutputBuilder;
3
4pub use crate::operation::register_domain::_register_domain_input::RegisterDomainInputBuilder;
5
6impl crate::operation::register_domain::builders::RegisterDomainInputBuilder {
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::register_domain::RegisterDomainOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::register_domain::RegisterDomainError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.register_domain();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `RegisterDomain`.
24///
25/// <p>Registers a new domain.</p>
26/// <p><b>Access Control</b></p>
27/// <p>You can use IAM policies to control this action's access to Amazon SWF resources as follows:</p>
28/// <ul>
29/// <li>
30/// <p>You cannot use an IAM policy to control domain access for this action. The name of the domain being registered is available as the resource of this action.</p></li>
31/// <li>
32/// <p>Use an <code>Action</code> element to allow or deny permission to call this action.</p></li>
33/// <li>
34/// <p>You cannot use an IAM policy to constrain this action's parameters.</p></li>
35/// </ul>
36/// <p>If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's <code>cause</code> parameter is set to <code>OPERATION_NOT_PERMITTED</code>. For details and example IAM policies, see <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html">Using IAM to Manage Access to Amazon SWF Workflows</a> in the <i>Amazon SWF Developer Guide</i>.</p>
37#[derive(::std::clone::Clone, ::std::fmt::Debug)]
38pub struct RegisterDomainFluentBuilder {
39 handle: ::std::sync::Arc<crate::client::Handle>,
40 inner: crate::operation::register_domain::builders::RegisterDomainInputBuilder,
41 config_override: ::std::option::Option<crate::config::Builder>,
42}
43impl
44 crate::client::customize::internal::CustomizableSend<
45 crate::operation::register_domain::RegisterDomainOutput,
46 crate::operation::register_domain::RegisterDomainError,
47 > for RegisterDomainFluentBuilder
48{
49 fn send(
50 self,
51 config_override: crate::config::Builder,
52 ) -> crate::client::customize::internal::BoxFuture<
53 crate::client::customize::internal::SendResult<
54 crate::operation::register_domain::RegisterDomainOutput,
55 crate::operation::register_domain::RegisterDomainError,
56 >,
57 > {
58 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
59 }
60}
61impl RegisterDomainFluentBuilder {
62 /// Creates a new `RegisterDomainFluentBuilder`.
63 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
64 Self {
65 handle,
66 inner: ::std::default::Default::default(),
67 config_override: ::std::option::Option::None,
68 }
69 }
70 /// Access the RegisterDomain as a reference.
71 pub fn as_input(&self) -> &crate::operation::register_domain::builders::RegisterDomainInputBuilder {
72 &self.inner
73 }
74 /// Sends the request and returns the response.
75 ///
76 /// If an error occurs, an `SdkError` will be returned with additional details that
77 /// can be matched against.
78 ///
79 /// By default, any retryable failures will be retried twice. Retry behavior
80 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
81 /// set when configuring the client.
82 pub async fn send(
83 self,
84 ) -> ::std::result::Result<
85 crate::operation::register_domain::RegisterDomainOutput,
86 ::aws_smithy_runtime_api::client::result::SdkError<
87 crate::operation::register_domain::RegisterDomainError,
88 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
89 >,
90 > {
91 let input = self
92 .inner
93 .build()
94 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
95 let runtime_plugins = crate::operation::register_domain::RegisterDomain::operation_runtime_plugins(
96 self.handle.runtime_plugins.clone(),
97 &self.handle.conf,
98 self.config_override,
99 );
100 crate::operation::register_domain::RegisterDomain::orchestrate(&runtime_plugins, input).await
101 }
102
103 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
104 pub fn customize(
105 self,
106 ) -> crate::client::customize::CustomizableOperation<
107 crate::operation::register_domain::RegisterDomainOutput,
108 crate::operation::register_domain::RegisterDomainError,
109 Self,
110 > {
111 crate::client::customize::CustomizableOperation::new(self)
112 }
113 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
114 self.set_config_override(::std::option::Option::Some(config_override.into()));
115 self
116 }
117
118 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
119 self.config_override = config_override;
120 self
121 }
122 /// <p>Name of the domain to register. The name must be unique in the region that the domain is registered in.</p>
123 /// <p>The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
124 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125 self.inner = self.inner.name(input.into());
126 self
127 }
128 /// <p>Name of the domain to register. The name must be unique in the region that the domain is registered in.</p>
129 /// <p>The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
130 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131 self.inner = self.inner.set_name(input);
132 self
133 }
134 /// <p>Name of the domain to register. The name must be unique in the region that the domain is registered in.</p>
135 /// <p>The specified string must not start or end with whitespace. It must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
136 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
137 self.inner.get_name()
138 }
139 /// <p>A text description of the domain.</p>
140 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141 self.inner = self.inner.description(input.into());
142 self
143 }
144 /// <p>A text description of the domain.</p>
145 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146 self.inner = self.inner.set_description(input);
147 self
148 }
149 /// <p>A text description of the domain.</p>
150 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
151 self.inner.get_description()
152 }
153 /// <p>The duration (in days) that records and histories of workflow executions on the domain should be kept by the service. After the retention period, the workflow execution isn't available in the results of visibility calls.</p>
154 /// <p>If you pass the value <code>NONE</code> or <code>0</code> (zero), then the workflow execution history isn't retained. As soon as the workflow execution completes, the execution record and its history are deleted.</p>
155 /// <p>The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service limits, see: <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-limits.html">Amazon SWF Service Limits</a> in the <i>Amazon SWF Developer Guide</i>.</p>
156 pub fn workflow_execution_retention_period_in_days(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157 self.inner = self.inner.workflow_execution_retention_period_in_days(input.into());
158 self
159 }
160 /// <p>The duration (in days) that records and histories of workflow executions on the domain should be kept by the service. After the retention period, the workflow execution isn't available in the results of visibility calls.</p>
161 /// <p>If you pass the value <code>NONE</code> or <code>0</code> (zero), then the workflow execution history isn't retained. As soon as the workflow execution completes, the execution record and its history are deleted.</p>
162 /// <p>The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service limits, see: <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-limits.html">Amazon SWF Service Limits</a> in the <i>Amazon SWF Developer Guide</i>.</p>
163 pub fn set_workflow_execution_retention_period_in_days(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.inner = self.inner.set_workflow_execution_retention_period_in_days(input);
165 self
166 }
167 /// <p>The duration (in days) that records and histories of workflow executions on the domain should be kept by the service. After the retention period, the workflow execution isn't available in the results of visibility calls.</p>
168 /// <p>If you pass the value <code>NONE</code> or <code>0</code> (zero), then the workflow execution history isn't retained. As soon as the workflow execution completes, the execution record and its history are deleted.</p>
169 /// <p>The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service limits, see: <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-limits.html">Amazon SWF Service Limits</a> in the <i>Amazon SWF Developer Guide</i>.</p>
170 pub fn get_workflow_execution_retention_period_in_days(&self) -> &::std::option::Option<::std::string::String> {
171 self.inner.get_workflow_execution_retention_period_in_days()
172 }
173 ///
174 /// Appends an item to `tags`.
175 ///
176 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
177 ///
178 /// <p>Tags to be added when registering a domain.</p>
179 /// <p>Tags may only contain unicode letters, digits, whitespace, or these symbols: <code>_ . : / = + - @</code>.</p>
180 pub fn tags(mut self, input: crate::types::ResourceTag) -> Self {
181 self.inner = self.inner.tags(input);
182 self
183 }
184 /// <p>Tags to be added when registering a domain.</p>
185 /// <p>Tags may only contain unicode letters, digits, whitespace, or these symbols: <code>_ . : / = + - @</code>.</p>
186 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResourceTag>>) -> Self {
187 self.inner = self.inner.set_tags(input);
188 self
189 }
190 /// <p>Tags to be added when registering a domain.</p>
191 /// <p>Tags may only contain unicode letters, digits, whitespace, or these symbols: <code>_ . : / = + - @</code>.</p>
192 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourceTag>> {
193 self.inner.get_tags()
194 }
195}