aws_sdk_cloudcontrol/operation/create_resource/_create_resource_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)]
5pub struct CreateResourceInput {
6 /// <p>The name of the resource type.</p>
7 pub type_name: ::std::option::Option<::std::string::String>,
8 /// <p>For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.</p>
9 pub type_version_id: ::std::option::Option<::std::string::String>,
10 /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the <code> <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers">handlers</a> </code> section of the <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html">resource type definition schema</a>.</p>
11 /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
12 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions">Specifying credentials</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
13 pub role_arn: ::std::option::Option<::std::string::String>,
14 /// <p>A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.</p>
15 /// <p>A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.</p>
16 /// <p>If you do not specify a client token, one is generated for inclusion in the request.</p>
17 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency">Ensuring resource operation requests are unique</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
18 pub client_token: ::std::option::Option<::std::string::String>,
19 /// <p>Structured data format representing the desired state of the resource, consisting of that resource's properties and their desired values.</p><note>
20 /// <p>Cloud Control API currently supports JSON as a structured data format.</p>
21 /// </note>
22 /// <p>Specify the desired state as one of the following:</p>
23 /// <ul>
24 /// <li>
25 /// <p>A JSON blob</p></li>
26 /// <li>
27 /// <p>A local path containing the desired state in JSON data format</p></li>
28 /// </ul>
29 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html#resource-operations-create-desiredstate">Composing the desired state of the resource</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
30 /// <p>For more information about the properties of a specific resource, refer to the related topic for the resource in the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Resource and property types reference</a> in the <i>CloudFormation Users Guide</i>.</p>
31 pub desired_state: ::std::option::Option<::std::string::String>,
32}
33impl CreateResourceInput {
34 /// <p>The name of the resource type.</p>
35 pub fn type_name(&self) -> ::std::option::Option<&str> {
36 self.type_name.as_deref()
37 }
38 /// <p>For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.</p>
39 pub fn type_version_id(&self) -> ::std::option::Option<&str> {
40 self.type_version_id.as_deref()
41 }
42 /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the <code> <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers">handlers</a> </code> section of the <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html">resource type definition schema</a>.</p>
43 /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
44 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions">Specifying credentials</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
45 pub fn role_arn(&self) -> ::std::option::Option<&str> {
46 self.role_arn.as_deref()
47 }
48 /// <p>A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.</p>
49 /// <p>A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.</p>
50 /// <p>If you do not specify a client token, one is generated for inclusion in the request.</p>
51 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency">Ensuring resource operation requests are unique</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
52 pub fn client_token(&self) -> ::std::option::Option<&str> {
53 self.client_token.as_deref()
54 }
55 /// <p>Structured data format representing the desired state of the resource, consisting of that resource's properties and their desired values.</p><note>
56 /// <p>Cloud Control API currently supports JSON as a structured data format.</p>
57 /// </note>
58 /// <p>Specify the desired state as one of the following:</p>
59 /// <ul>
60 /// <li>
61 /// <p>A JSON blob</p></li>
62 /// <li>
63 /// <p>A local path containing the desired state in JSON data format</p></li>
64 /// </ul>
65 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html#resource-operations-create-desiredstate">Composing the desired state of the resource</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
66 /// <p>For more information about the properties of a specific resource, refer to the related topic for the resource in the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Resource and property types reference</a> in the <i>CloudFormation Users Guide</i>.</p>
67 pub fn desired_state(&self) -> ::std::option::Option<&str> {
68 self.desired_state.as_deref()
69 }
70}
71impl ::std::fmt::Debug for CreateResourceInput {
72 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
73 let mut formatter = f.debug_struct("CreateResourceInput");
74 formatter.field("type_name", &self.type_name);
75 formatter.field("type_version_id", &self.type_version_id);
76 formatter.field("role_arn", &self.role_arn);
77 formatter.field("client_token", &self.client_token);
78 formatter.field("desired_state", &"*** Sensitive Data Redacted ***");
79 formatter.finish()
80 }
81}
82impl CreateResourceInput {
83 /// Creates a new builder-style object to manufacture [`CreateResourceInput`](crate::operation::create_resource::CreateResourceInput).
84 pub fn builder() -> crate::operation::create_resource::builders::CreateResourceInputBuilder {
85 crate::operation::create_resource::builders::CreateResourceInputBuilder::default()
86 }
87}
88
89/// A builder for [`CreateResourceInput`](crate::operation::create_resource::CreateResourceInput).
90#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
91#[non_exhaustive]
92pub struct CreateResourceInputBuilder {
93 pub(crate) type_name: ::std::option::Option<::std::string::String>,
94 pub(crate) type_version_id: ::std::option::Option<::std::string::String>,
95 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
96 pub(crate) client_token: ::std::option::Option<::std::string::String>,
97 pub(crate) desired_state: ::std::option::Option<::std::string::String>,
98}
99impl CreateResourceInputBuilder {
100 /// <p>The name of the resource type.</p>
101 /// This field is required.
102 pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103 self.type_name = ::std::option::Option::Some(input.into());
104 self
105 }
106 /// <p>The name of the resource type.</p>
107 pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108 self.type_name = input;
109 self
110 }
111 /// <p>The name of the resource type.</p>
112 pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
113 &self.type_name
114 }
115 /// <p>For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.</p>
116 pub fn type_version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.type_version_id = ::std::option::Option::Some(input.into());
118 self
119 }
120 /// <p>For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.</p>
121 pub fn set_type_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.type_version_id = input;
123 self
124 }
125 /// <p>For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.</p>
126 pub fn get_type_version_id(&self) -> &::std::option::Option<::std::string::String> {
127 &self.type_version_id
128 }
129 /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the <code> <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers">handlers</a> </code> section of the <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html">resource type definition schema</a>.</p>
130 /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
131 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions">Specifying credentials</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
132 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.role_arn = ::std::option::Option::Some(input.into());
134 self
135 }
136 /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the <code> <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers">handlers</a> </code> section of the <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html">resource type definition schema</a>.</p>
137 /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
138 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions">Specifying credentials</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
139 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140 self.role_arn = input;
141 self
142 }
143 /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the <code> <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers">handlers</a> </code> section of the <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html">resource type definition schema</a>.</p>
144 /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
145 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions">Specifying credentials</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
146 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
147 &self.role_arn
148 }
149 /// <p>A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.</p>
150 /// <p>A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.</p>
151 /// <p>If you do not specify a client token, one is generated for inclusion in the request.</p>
152 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency">Ensuring resource operation requests are unique</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
153 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154 self.client_token = ::std::option::Option::Some(input.into());
155 self
156 }
157 /// <p>A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.</p>
158 /// <p>A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.</p>
159 /// <p>If you do not specify a client token, one is generated for inclusion in the request.</p>
160 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency">Ensuring resource operation requests are unique</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
161 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162 self.client_token = input;
163 self
164 }
165 /// <p>A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.</p>
166 /// <p>A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.</p>
167 /// <p>If you do not specify a client token, one is generated for inclusion in the request.</p>
168 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency">Ensuring resource operation requests are unique</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
169 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
170 &self.client_token
171 }
172 /// <p>Structured data format representing the desired state of the resource, consisting of that resource's properties and their desired values.</p><note>
173 /// <p>Cloud Control API currently supports JSON as a structured data format.</p>
174 /// </note>
175 /// <p>Specify the desired state as one of the following:</p>
176 /// <ul>
177 /// <li>
178 /// <p>A JSON blob</p></li>
179 /// <li>
180 /// <p>A local path containing the desired state in JSON data format</p></li>
181 /// </ul>
182 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html#resource-operations-create-desiredstate">Composing the desired state of the resource</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
183 /// <p>For more information about the properties of a specific resource, refer to the related topic for the resource in the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Resource and property types reference</a> in the <i>CloudFormation Users Guide</i>.</p>
184 /// This field is required.
185 pub fn desired_state(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
186 self.desired_state = ::std::option::Option::Some(input.into());
187 self
188 }
189 /// <p>Structured data format representing the desired state of the resource, consisting of that resource's properties and their desired values.</p><note>
190 /// <p>Cloud Control API currently supports JSON as a structured data format.</p>
191 /// </note>
192 /// <p>Specify the desired state as one of the following:</p>
193 /// <ul>
194 /// <li>
195 /// <p>A JSON blob</p></li>
196 /// <li>
197 /// <p>A local path containing the desired state in JSON data format</p></li>
198 /// </ul>
199 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html#resource-operations-create-desiredstate">Composing the desired state of the resource</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
200 /// <p>For more information about the properties of a specific resource, refer to the related topic for the resource in the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Resource and property types reference</a> in the <i>CloudFormation Users Guide</i>.</p>
201 pub fn set_desired_state(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
202 self.desired_state = input;
203 self
204 }
205 /// <p>Structured data format representing the desired state of the resource, consisting of that resource's properties and their desired values.</p><note>
206 /// <p>Cloud Control API currently supports JSON as a structured data format.</p>
207 /// </note>
208 /// <p>Specify the desired state as one of the following:</p>
209 /// <ul>
210 /// <li>
211 /// <p>A JSON blob</p></li>
212 /// <li>
213 /// <p>A local path containing the desired state in JSON data format</p></li>
214 /// </ul>
215 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html#resource-operations-create-desiredstate">Composing the desired state of the resource</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
216 /// <p>For more information about the properties of a specific resource, refer to the related topic for the resource in the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Resource and property types reference</a> in the <i>CloudFormation Users Guide</i>.</p>
217 pub fn get_desired_state(&self) -> &::std::option::Option<::std::string::String> {
218 &self.desired_state
219 }
220 /// Consumes the builder and constructs a [`CreateResourceInput`](crate::operation::create_resource::CreateResourceInput).
221 pub fn build(
222 self,
223 ) -> ::std::result::Result<crate::operation::create_resource::CreateResourceInput, ::aws_smithy_types::error::operation::BuildError> {
224 ::std::result::Result::Ok(crate::operation::create_resource::CreateResourceInput {
225 type_name: self.type_name,
226 type_version_id: self.type_version_id,
227 role_arn: self.role_arn,
228 client_token: self.client_token,
229 desired_state: self.desired_state,
230 })
231 }
232}
233impl ::std::fmt::Debug for CreateResourceInputBuilder {
234 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
235 let mut formatter = f.debug_struct("CreateResourceInputBuilder");
236 formatter.field("type_name", &self.type_name);
237 formatter.field("type_version_id", &self.type_version_id);
238 formatter.field("role_arn", &self.role_arn);
239 formatter.field("client_token", &self.client_token);
240 formatter.field("desired_state", &"*** Sensitive Data Redacted ***");
241 formatter.finish()
242 }
243}