aws_sdk_cloudformation/operation/register_type/
_register_type_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 RegisterTypeInput {
6    /// <p>The kind of extension.</p>
7    pub r#type: ::std::option::Option<crate::types::RegistryType>,
8    /// <p>The name of the extension being registered.</p>
9    /// <p>We suggest that extension names adhere to the following patterns:</p>
10    /// <ul>
11    /// <li>
12    /// <p>For resource types, <code>company_or_organization::service::type</code>.</p></li>
13    /// <li>
14    /// <p>For modules, <code>company_or_organization::service::type::MODULE</code>.</p></li>
15    /// <li>
16    /// <p>For Hooks, <code>MyCompany::Testing::MyTestHook</code>.</p></li>
17    /// </ul><note>
18    /// <p>The following organization namespaces are reserved and can't be used in your extension names:</p>
19    /// <ul>
20    /// <li>
21    /// <p><code>Alexa</code></p></li>
22    /// <li>
23    /// <p><code>AMZN</code></p></li>
24    /// <li>
25    /// <p><code>Amazon</code></p></li>
26    /// <li>
27    /// <p><code>AWS</code></p></li>
28    /// <li>
29    /// <p><code>Custom</code></p></li>
30    /// <li>
31    /// <p><code>Dev</code></p></li>
32    /// </ul>
33    /// </note>
34    pub type_name: ::std::option::Option<::std::string::String>,
35    /// <p>A URL to the S3 bucket that contains the extension project package that contains the necessary files for the extension you want to register.</p>
36    /// <p>For information about generating a schema handler package for the extension you want to register, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html">submit</a> in the <i>CloudFormation Command Line Interface (CLI) User Guide</i>.</p><note>
37    /// <p>The user registering the extension must be able to access the package in the S3 bucket. That's, the user needs to have <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> permissions for the schema handler package. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html">Actions, Resources, and Condition Keys for Amazon S3</a> in the <i>Identity and Access Management User Guide</i>.</p>
38    /// </note>
39    pub schema_handler_package: ::std::option::Option<::std::string::String>,
40    /// <p>Specifies logging configuration information for an extension.</p>
41    pub logging_config: ::std::option::Option<crate::types::LoggingConfig>,
42    /// <p>The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the extension.</p>
43    /// <p>For CloudFormation to assume the specified execution role, the role must contain a trust relationship with the CloudFormation service principal (<code>resources.cloudformation.amazonaws.com</code>). For more information about adding trust relationships, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-managingrole-editing-console.html#roles-managingrole_edit-trust-policy">Modifying a role trust policy</a> in the <i>Identity and Access Management User Guide</i>.</p>
44    /// <p>If your extension calls Amazon Web Services APIs in any of its handlers, you must create an <i> <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM execution role</a> </i> that includes the necessary permissions to call those Amazon Web Services APIs, and provision that execution role in your account. When CloudFormation needs to invoke the resource type handler, CloudFormation assumes this execution role to create a temporary session token, which it then passes to the resource type handler, thereby supplying your resource type with the appropriate credentials.</p>
45    pub execution_role_arn: ::std::option::Option<::std::string::String>,
46    /// <p>A unique identifier that acts as an idempotency key for this registration request. Specifying a client request token prevents CloudFormation from generating more than one version of an extension from the same registration request, even if the request is submitted multiple times.</p>
47    pub client_request_token: ::std::option::Option<::std::string::String>,
48}
49impl RegisterTypeInput {
50    /// <p>The kind of extension.</p>
51    pub fn r#type(&self) -> ::std::option::Option<&crate::types::RegistryType> {
52        self.r#type.as_ref()
53    }
54    /// <p>The name of the extension being registered.</p>
55    /// <p>We suggest that extension names adhere to the following patterns:</p>
56    /// <ul>
57    /// <li>
58    /// <p>For resource types, <code>company_or_organization::service::type</code>.</p></li>
59    /// <li>
60    /// <p>For modules, <code>company_or_organization::service::type::MODULE</code>.</p></li>
61    /// <li>
62    /// <p>For Hooks, <code>MyCompany::Testing::MyTestHook</code>.</p></li>
63    /// </ul><note>
64    /// <p>The following organization namespaces are reserved and can't be used in your extension names:</p>
65    /// <ul>
66    /// <li>
67    /// <p><code>Alexa</code></p></li>
68    /// <li>
69    /// <p><code>AMZN</code></p></li>
70    /// <li>
71    /// <p><code>Amazon</code></p></li>
72    /// <li>
73    /// <p><code>AWS</code></p></li>
74    /// <li>
75    /// <p><code>Custom</code></p></li>
76    /// <li>
77    /// <p><code>Dev</code></p></li>
78    /// </ul>
79    /// </note>
80    pub fn type_name(&self) -> ::std::option::Option<&str> {
81        self.type_name.as_deref()
82    }
83    /// <p>A URL to the S3 bucket that contains the extension project package that contains the necessary files for the extension you want to register.</p>
84    /// <p>For information about generating a schema handler package for the extension you want to register, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html">submit</a> in the <i>CloudFormation Command Line Interface (CLI) User Guide</i>.</p><note>
85    /// <p>The user registering the extension must be able to access the package in the S3 bucket. That's, the user needs to have <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> permissions for the schema handler package. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html">Actions, Resources, and Condition Keys for Amazon S3</a> in the <i>Identity and Access Management User Guide</i>.</p>
86    /// </note>
87    pub fn schema_handler_package(&self) -> ::std::option::Option<&str> {
88        self.schema_handler_package.as_deref()
89    }
90    /// <p>Specifies logging configuration information for an extension.</p>
91    pub fn logging_config(&self) -> ::std::option::Option<&crate::types::LoggingConfig> {
92        self.logging_config.as_ref()
93    }
94    /// <p>The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the extension.</p>
95    /// <p>For CloudFormation to assume the specified execution role, the role must contain a trust relationship with the CloudFormation service principal (<code>resources.cloudformation.amazonaws.com</code>). For more information about adding trust relationships, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-managingrole-editing-console.html#roles-managingrole_edit-trust-policy">Modifying a role trust policy</a> in the <i>Identity and Access Management User Guide</i>.</p>
96    /// <p>If your extension calls Amazon Web Services APIs in any of its handlers, you must create an <i> <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM execution role</a> </i> that includes the necessary permissions to call those Amazon Web Services APIs, and provision that execution role in your account. When CloudFormation needs to invoke the resource type handler, CloudFormation assumes this execution role to create a temporary session token, which it then passes to the resource type handler, thereby supplying your resource type with the appropriate credentials.</p>
97    pub fn execution_role_arn(&self) -> ::std::option::Option<&str> {
98        self.execution_role_arn.as_deref()
99    }
100    /// <p>A unique identifier that acts as an idempotency key for this registration request. Specifying a client request token prevents CloudFormation from generating more than one version of an extension from the same registration request, even if the request is submitted multiple times.</p>
101    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
102        self.client_request_token.as_deref()
103    }
104}
105impl RegisterTypeInput {
106    /// Creates a new builder-style object to manufacture [`RegisterTypeInput`](crate::operation::register_type::RegisterTypeInput).
107    pub fn builder() -> crate::operation::register_type::builders::RegisterTypeInputBuilder {
108        crate::operation::register_type::builders::RegisterTypeInputBuilder::default()
109    }
110}
111
112/// A builder for [`RegisterTypeInput`](crate::operation::register_type::RegisterTypeInput).
113#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
114#[non_exhaustive]
115pub struct RegisterTypeInputBuilder {
116    pub(crate) r#type: ::std::option::Option<crate::types::RegistryType>,
117    pub(crate) type_name: ::std::option::Option<::std::string::String>,
118    pub(crate) schema_handler_package: ::std::option::Option<::std::string::String>,
119    pub(crate) logging_config: ::std::option::Option<crate::types::LoggingConfig>,
120    pub(crate) execution_role_arn: ::std::option::Option<::std::string::String>,
121    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
122}
123impl RegisterTypeInputBuilder {
124    /// <p>The kind of extension.</p>
125    pub fn r#type(mut self, input: crate::types::RegistryType) -> Self {
126        self.r#type = ::std::option::Option::Some(input);
127        self
128    }
129    /// <p>The kind of extension.</p>
130    pub fn set_type(mut self, input: ::std::option::Option<crate::types::RegistryType>) -> Self {
131        self.r#type = input;
132        self
133    }
134    /// <p>The kind of extension.</p>
135    pub fn get_type(&self) -> &::std::option::Option<crate::types::RegistryType> {
136        &self.r#type
137    }
138    /// <p>The name of the extension being registered.</p>
139    /// <p>We suggest that extension names adhere to the following patterns:</p>
140    /// <ul>
141    /// <li>
142    /// <p>For resource types, <code>company_or_organization::service::type</code>.</p></li>
143    /// <li>
144    /// <p>For modules, <code>company_or_organization::service::type::MODULE</code>.</p></li>
145    /// <li>
146    /// <p>For Hooks, <code>MyCompany::Testing::MyTestHook</code>.</p></li>
147    /// </ul><note>
148    /// <p>The following organization namespaces are reserved and can't be used in your extension names:</p>
149    /// <ul>
150    /// <li>
151    /// <p><code>Alexa</code></p></li>
152    /// <li>
153    /// <p><code>AMZN</code></p></li>
154    /// <li>
155    /// <p><code>Amazon</code></p></li>
156    /// <li>
157    /// <p><code>AWS</code></p></li>
158    /// <li>
159    /// <p><code>Custom</code></p></li>
160    /// <li>
161    /// <p><code>Dev</code></p></li>
162    /// </ul>
163    /// </note>
164    /// This field is required.
165    pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166        self.type_name = ::std::option::Option::Some(input.into());
167        self
168    }
169    /// <p>The name of the extension being registered.</p>
170    /// <p>We suggest that extension names adhere to the following patterns:</p>
171    /// <ul>
172    /// <li>
173    /// <p>For resource types, <code>company_or_organization::service::type</code>.</p></li>
174    /// <li>
175    /// <p>For modules, <code>company_or_organization::service::type::MODULE</code>.</p></li>
176    /// <li>
177    /// <p>For Hooks, <code>MyCompany::Testing::MyTestHook</code>.</p></li>
178    /// </ul><note>
179    /// <p>The following organization namespaces are reserved and can't be used in your extension names:</p>
180    /// <ul>
181    /// <li>
182    /// <p><code>Alexa</code></p></li>
183    /// <li>
184    /// <p><code>AMZN</code></p></li>
185    /// <li>
186    /// <p><code>Amazon</code></p></li>
187    /// <li>
188    /// <p><code>AWS</code></p></li>
189    /// <li>
190    /// <p><code>Custom</code></p></li>
191    /// <li>
192    /// <p><code>Dev</code></p></li>
193    /// </ul>
194    /// </note>
195    pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
196        self.type_name = input;
197        self
198    }
199    /// <p>The name of the extension being registered.</p>
200    /// <p>We suggest that extension names adhere to the following patterns:</p>
201    /// <ul>
202    /// <li>
203    /// <p>For resource types, <code>company_or_organization::service::type</code>.</p></li>
204    /// <li>
205    /// <p>For modules, <code>company_or_organization::service::type::MODULE</code>.</p></li>
206    /// <li>
207    /// <p>For Hooks, <code>MyCompany::Testing::MyTestHook</code>.</p></li>
208    /// </ul><note>
209    /// <p>The following organization namespaces are reserved and can't be used in your extension names:</p>
210    /// <ul>
211    /// <li>
212    /// <p><code>Alexa</code></p></li>
213    /// <li>
214    /// <p><code>AMZN</code></p></li>
215    /// <li>
216    /// <p><code>Amazon</code></p></li>
217    /// <li>
218    /// <p><code>AWS</code></p></li>
219    /// <li>
220    /// <p><code>Custom</code></p></li>
221    /// <li>
222    /// <p><code>Dev</code></p></li>
223    /// </ul>
224    /// </note>
225    pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
226        &self.type_name
227    }
228    /// <p>A URL to the S3 bucket that contains the extension project package that contains the necessary files for the extension you want to register.</p>
229    /// <p>For information about generating a schema handler package for the extension you want to register, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html">submit</a> in the <i>CloudFormation Command Line Interface (CLI) User Guide</i>.</p><note>
230    /// <p>The user registering the extension must be able to access the package in the S3 bucket. That's, the user needs to have <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> permissions for the schema handler package. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html">Actions, Resources, and Condition Keys for Amazon S3</a> in the <i>Identity and Access Management User Guide</i>.</p>
231    /// </note>
232    /// This field is required.
233    pub fn schema_handler_package(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
234        self.schema_handler_package = ::std::option::Option::Some(input.into());
235        self
236    }
237    /// <p>A URL to the S3 bucket that contains the extension project package that contains the necessary files for the extension you want to register.</p>
238    /// <p>For information about generating a schema handler package for the extension you want to register, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html">submit</a> in the <i>CloudFormation Command Line Interface (CLI) User Guide</i>.</p><note>
239    /// <p>The user registering the extension must be able to access the package in the S3 bucket. That's, the user needs to have <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> permissions for the schema handler package. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html">Actions, Resources, and Condition Keys for Amazon S3</a> in the <i>Identity and Access Management User Guide</i>.</p>
240    /// </note>
241    pub fn set_schema_handler_package(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
242        self.schema_handler_package = input;
243        self
244    }
245    /// <p>A URL to the S3 bucket that contains the extension project package that contains the necessary files for the extension you want to register.</p>
246    /// <p>For information about generating a schema handler package for the extension you want to register, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html">submit</a> in the <i>CloudFormation Command Line Interface (CLI) User Guide</i>.</p><note>
247    /// <p>The user registering the extension must be able to access the package in the S3 bucket. That's, the user needs to have <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> permissions for the schema handler package. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html">Actions, Resources, and Condition Keys for Amazon S3</a> in the <i>Identity and Access Management User Guide</i>.</p>
248    /// </note>
249    pub fn get_schema_handler_package(&self) -> &::std::option::Option<::std::string::String> {
250        &self.schema_handler_package
251    }
252    /// <p>Specifies logging configuration information for an extension.</p>
253    pub fn logging_config(mut self, input: crate::types::LoggingConfig) -> Self {
254        self.logging_config = ::std::option::Option::Some(input);
255        self
256    }
257    /// <p>Specifies logging configuration information for an extension.</p>
258    pub fn set_logging_config(mut self, input: ::std::option::Option<crate::types::LoggingConfig>) -> Self {
259        self.logging_config = input;
260        self
261    }
262    /// <p>Specifies logging configuration information for an extension.</p>
263    pub fn get_logging_config(&self) -> &::std::option::Option<crate::types::LoggingConfig> {
264        &self.logging_config
265    }
266    /// <p>The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the extension.</p>
267    /// <p>For CloudFormation to assume the specified execution role, the role must contain a trust relationship with the CloudFormation service principal (<code>resources.cloudformation.amazonaws.com</code>). For more information about adding trust relationships, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-managingrole-editing-console.html#roles-managingrole_edit-trust-policy">Modifying a role trust policy</a> in the <i>Identity and Access Management User Guide</i>.</p>
268    /// <p>If your extension calls Amazon Web Services APIs in any of its handlers, you must create an <i> <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM execution role</a> </i> that includes the necessary permissions to call those Amazon Web Services APIs, and provision that execution role in your account. When CloudFormation needs to invoke the resource type handler, CloudFormation assumes this execution role to create a temporary session token, which it then passes to the resource type handler, thereby supplying your resource type with the appropriate credentials.</p>
269    pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
270        self.execution_role_arn = ::std::option::Option::Some(input.into());
271        self
272    }
273    /// <p>The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the extension.</p>
274    /// <p>For CloudFormation to assume the specified execution role, the role must contain a trust relationship with the CloudFormation service principal (<code>resources.cloudformation.amazonaws.com</code>). For more information about adding trust relationships, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-managingrole-editing-console.html#roles-managingrole_edit-trust-policy">Modifying a role trust policy</a> in the <i>Identity and Access Management User Guide</i>.</p>
275    /// <p>If your extension calls Amazon Web Services APIs in any of its handlers, you must create an <i> <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM execution role</a> </i> that includes the necessary permissions to call those Amazon Web Services APIs, and provision that execution role in your account. When CloudFormation needs to invoke the resource type handler, CloudFormation assumes this execution role to create a temporary session token, which it then passes to the resource type handler, thereby supplying your resource type with the appropriate credentials.</p>
276    pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
277        self.execution_role_arn = input;
278        self
279    }
280    /// <p>The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the extension.</p>
281    /// <p>For CloudFormation to assume the specified execution role, the role must contain a trust relationship with the CloudFormation service principal (<code>resources.cloudformation.amazonaws.com</code>). For more information about adding trust relationships, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-managingrole-editing-console.html#roles-managingrole_edit-trust-policy">Modifying a role trust policy</a> in the <i>Identity and Access Management User Guide</i>.</p>
282    /// <p>If your extension calls Amazon Web Services APIs in any of its handlers, you must create an <i> <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM execution role</a> </i> that includes the necessary permissions to call those Amazon Web Services APIs, and provision that execution role in your account. When CloudFormation needs to invoke the resource type handler, CloudFormation assumes this execution role to create a temporary session token, which it then passes to the resource type handler, thereby supplying your resource type with the appropriate credentials.</p>
283    pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
284        &self.execution_role_arn
285    }
286    /// <p>A unique identifier that acts as an idempotency key for this registration request. Specifying a client request token prevents CloudFormation from generating more than one version of an extension from the same registration request, even if the request is submitted multiple times.</p>
287    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
288        self.client_request_token = ::std::option::Option::Some(input.into());
289        self
290    }
291    /// <p>A unique identifier that acts as an idempotency key for this registration request. Specifying a client request token prevents CloudFormation from generating more than one version of an extension from the same registration request, even if the request is submitted multiple times.</p>
292    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
293        self.client_request_token = input;
294        self
295    }
296    /// <p>A unique identifier that acts as an idempotency key for this registration request. Specifying a client request token prevents CloudFormation from generating more than one version of an extension from the same registration request, even if the request is submitted multiple times.</p>
297    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
298        &self.client_request_token
299    }
300    /// Consumes the builder and constructs a [`RegisterTypeInput`](crate::operation::register_type::RegisterTypeInput).
301    pub fn build(
302        self,
303    ) -> ::std::result::Result<crate::operation::register_type::RegisterTypeInput, ::aws_smithy_types::error::operation::BuildError> {
304        ::std::result::Result::Ok(crate::operation::register_type::RegisterTypeInput {
305            r#type: self.r#type,
306            type_name: self.type_name,
307            schema_handler_package: self.schema_handler_package,
308            logging_config: self.logging_config,
309            execution_role_arn: self.execution_role_arn,
310            client_request_token: self.client_request_token,
311        })
312    }
313}