aws_sdk_cloudcontrol/operation/update_resource/_update_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 UpdateResourceInput {
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>The identifier for the resource.</p>
20 /// <p>You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.</p>
21 /// <p>For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values <i>in the order they are specified</i> in the primary identifier definition, separated by <code>|</code>.</p>
22 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html">Identifying resources</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
23 pub identifier: ::std::option::Option<::std::string::String>,
24 /// <p>A JavaScript Object Notation (JSON) document listing the patch operations that represent the updates to apply to the current resource properties. For details, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html#resource-operations-update-patch">Composing the patch document</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
25 pub patch_document: ::std::option::Option<::std::string::String>,
26}
27impl UpdateResourceInput {
28 /// <p>The name of the resource type.</p>
29 pub fn type_name(&self) -> ::std::option::Option<&str> {
30 self.type_name.as_deref()
31 }
32 /// <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>
33 pub fn type_version_id(&self) -> ::std::option::Option<&str> {
34 self.type_version_id.as_deref()
35 }
36 /// <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>
37 /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
38 /// <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>
39 pub fn role_arn(&self) -> ::std::option::Option<&str> {
40 self.role_arn.as_deref()
41 }
42 /// <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>
43 /// <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>
44 /// <p>If you do not specify a client token, one is generated for inclusion in the request.</p>
45 /// <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>
46 pub fn client_token(&self) -> ::std::option::Option<&str> {
47 self.client_token.as_deref()
48 }
49 /// <p>The identifier for the resource.</p>
50 /// <p>You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.</p>
51 /// <p>For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values <i>in the order they are specified</i> in the primary identifier definition, separated by <code>|</code>.</p>
52 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html">Identifying resources</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
53 pub fn identifier(&self) -> ::std::option::Option<&str> {
54 self.identifier.as_deref()
55 }
56 /// <p>A JavaScript Object Notation (JSON) document listing the patch operations that represent the updates to apply to the current resource properties. For details, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html#resource-operations-update-patch">Composing the patch document</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
57 pub fn patch_document(&self) -> ::std::option::Option<&str> {
58 self.patch_document.as_deref()
59 }
60}
61impl ::std::fmt::Debug for UpdateResourceInput {
62 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
63 let mut formatter = f.debug_struct("UpdateResourceInput");
64 formatter.field("type_name", &self.type_name);
65 formatter.field("type_version_id", &self.type_version_id);
66 formatter.field("role_arn", &self.role_arn);
67 formatter.field("client_token", &self.client_token);
68 formatter.field("identifier", &self.identifier);
69 formatter.field("patch_document", &"*** Sensitive Data Redacted ***");
70 formatter.finish()
71 }
72}
73impl UpdateResourceInput {
74 /// Creates a new builder-style object to manufacture [`UpdateResourceInput`](crate::operation::update_resource::UpdateResourceInput).
75 pub fn builder() -> crate::operation::update_resource::builders::UpdateResourceInputBuilder {
76 crate::operation::update_resource::builders::UpdateResourceInputBuilder::default()
77 }
78}
79
80/// A builder for [`UpdateResourceInput`](crate::operation::update_resource::UpdateResourceInput).
81#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
82#[non_exhaustive]
83pub struct UpdateResourceInputBuilder {
84 pub(crate) type_name: ::std::option::Option<::std::string::String>,
85 pub(crate) type_version_id: ::std::option::Option<::std::string::String>,
86 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
87 pub(crate) client_token: ::std::option::Option<::std::string::String>,
88 pub(crate) identifier: ::std::option::Option<::std::string::String>,
89 pub(crate) patch_document: ::std::option::Option<::std::string::String>,
90}
91impl UpdateResourceInputBuilder {
92 /// <p>The name of the resource type.</p>
93 /// This field is required.
94 pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.type_name = ::std::option::Option::Some(input.into());
96 self
97 }
98 /// <p>The name of the resource type.</p>
99 pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.type_name = input;
101 self
102 }
103 /// <p>The name of the resource type.</p>
104 pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
105 &self.type_name
106 }
107 /// <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>
108 pub fn type_version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109 self.type_version_id = ::std::option::Option::Some(input.into());
110 self
111 }
112 /// <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>
113 pub fn set_type_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114 self.type_version_id = input;
115 self
116 }
117 /// <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>
118 pub fn get_type_version_id(&self) -> &::std::option::Option<::std::string::String> {
119 &self.type_version_id
120 }
121 /// <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>
122 /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
123 /// <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>
124 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125 self.role_arn = ::std::option::Option::Some(input.into());
126 self
127 }
128 /// <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>
129 /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
130 /// <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>
131 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.role_arn = input;
133 self
134 }
135 /// <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>
136 /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
137 /// <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>
138 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
139 &self.role_arn
140 }
141 /// <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>
142 /// <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>
143 /// <p>If you do not specify a client token, one is generated for inclusion in the request.</p>
144 /// <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>
145 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146 self.client_token = ::std::option::Option::Some(input.into());
147 self
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 set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
154 self.client_token = input;
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 get_client_token(&self) -> &::std::option::Option<::std::string::String> {
162 &self.client_token
163 }
164 /// <p>The identifier for the resource.</p>
165 /// <p>You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.</p>
166 /// <p>For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values <i>in the order they are specified</i> in the primary identifier definition, separated by <code>|</code>.</p>
167 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html">Identifying resources</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
168 /// This field is required.
169 pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170 self.identifier = ::std::option::Option::Some(input.into());
171 self
172 }
173 /// <p>The identifier for the resource.</p>
174 /// <p>You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.</p>
175 /// <p>For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values <i>in the order they are specified</i> in the primary identifier definition, separated by <code>|</code>.</p>
176 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html">Identifying resources</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
177 pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178 self.identifier = input;
179 self
180 }
181 /// <p>The identifier for the resource.</p>
182 /// <p>You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.</p>
183 /// <p>For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values <i>in the order they are specified</i> in the primary identifier definition, separated by <code>|</code>.</p>
184 /// <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html">Identifying resources</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
185 pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
186 &self.identifier
187 }
188 /// <p>A JavaScript Object Notation (JSON) document listing the patch operations that represent the updates to apply to the current resource properties. For details, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html#resource-operations-update-patch">Composing the patch document</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
189 /// This field is required.
190 pub fn patch_document(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
191 self.patch_document = ::std::option::Option::Some(input.into());
192 self
193 }
194 /// <p>A JavaScript Object Notation (JSON) document listing the patch operations that represent the updates to apply to the current resource properties. For details, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html#resource-operations-update-patch">Composing the patch document</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
195 pub fn set_patch_document(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
196 self.patch_document = input;
197 self
198 }
199 /// <p>A JavaScript Object Notation (JSON) document listing the patch operations that represent the updates to apply to the current resource properties. For details, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html#resource-operations-update-patch">Composing the patch document</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
200 pub fn get_patch_document(&self) -> &::std::option::Option<::std::string::String> {
201 &self.patch_document
202 }
203 /// Consumes the builder and constructs a [`UpdateResourceInput`](crate::operation::update_resource::UpdateResourceInput).
204 pub fn build(
205 self,
206 ) -> ::std::result::Result<crate::operation::update_resource::UpdateResourceInput, ::aws_smithy_types::error::operation::BuildError> {
207 ::std::result::Result::Ok(crate::operation::update_resource::UpdateResourceInput {
208 type_name: self.type_name,
209 type_version_id: self.type_version_id,
210 role_arn: self.role_arn,
211 client_token: self.client_token,
212 identifier: self.identifier,
213 patch_document: self.patch_document,
214 })
215 }
216}
217impl ::std::fmt::Debug for UpdateResourceInputBuilder {
218 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
219 let mut formatter = f.debug_struct("UpdateResourceInputBuilder");
220 formatter.field("type_name", &self.type_name);
221 formatter.field("type_version_id", &self.type_version_id);
222 formatter.field("role_arn", &self.role_arn);
223 formatter.field("client_token", &self.client_token);
224 formatter.field("identifier", &self.identifier);
225 formatter.field("patch_document", &"*** Sensitive Data Redacted ***");
226 formatter.finish()
227 }
228}