aws_sdk_cloudcontrol/operation/delete_resource/
_delete_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, ::std::fmt::Debug)]
5pub struct DeleteResourceInput {
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}
25impl DeleteResourceInput {
26    /// <p>The name of the resource type.</p>
27    pub fn type_name(&self) -> ::std::option::Option<&str> {
28        self.type_name.as_deref()
29    }
30    /// <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>
31    pub fn type_version_id(&self) -> ::std::option::Option<&str> {
32        self.type_version_id.as_deref()
33    }
34    /// <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>
35    /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
36    /// <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>
37    pub fn role_arn(&self) -> ::std::option::Option<&str> {
38        self.role_arn.as_deref()
39    }
40    /// <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>
41    /// <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>
42    /// <p>If you do not specify a client token, one is generated for inclusion in the request.</p>
43    /// <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>
44    pub fn client_token(&self) -> ::std::option::Option<&str> {
45        self.client_token.as_deref()
46    }
47    /// <p>The identifier for the resource.</p>
48    /// <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>
49    /// <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>
50    /// <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>
51    pub fn identifier(&self) -> ::std::option::Option<&str> {
52        self.identifier.as_deref()
53    }
54}
55impl DeleteResourceInput {
56    /// Creates a new builder-style object to manufacture [`DeleteResourceInput`](crate::operation::delete_resource::DeleteResourceInput).
57    pub fn builder() -> crate::operation::delete_resource::builders::DeleteResourceInputBuilder {
58        crate::operation::delete_resource::builders::DeleteResourceInputBuilder::default()
59    }
60}
61
62/// A builder for [`DeleteResourceInput`](crate::operation::delete_resource::DeleteResourceInput).
63#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
64#[non_exhaustive]
65pub struct DeleteResourceInputBuilder {
66    pub(crate) type_name: ::std::option::Option<::std::string::String>,
67    pub(crate) type_version_id: ::std::option::Option<::std::string::String>,
68    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
69    pub(crate) client_token: ::std::option::Option<::std::string::String>,
70    pub(crate) identifier: ::std::option::Option<::std::string::String>,
71}
72impl DeleteResourceInputBuilder {
73    /// <p>The name of the resource type.</p>
74    /// This field is required.
75    pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.type_name = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>The name of the resource type.</p>
80    pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.type_name = input;
82        self
83    }
84    /// <p>The name of the resource type.</p>
85    pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
86        &self.type_name
87    }
88    /// <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>
89    pub fn type_version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.type_version_id = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <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>
94    pub fn set_type_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.type_version_id = input;
96        self
97    }
98    /// <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>
99    pub fn get_type_version_id(&self) -> &::std::option::Option<::std::string::String> {
100        &self.type_version_id
101    }
102    /// <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>
103    /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
104    /// <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>
105    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106        self.role_arn = ::std::option::Option::Some(input.into());
107        self
108    }
109    /// <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>
110    /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
111    /// <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>
112    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.role_arn = input;
114        self
115    }
116    /// <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>
117    /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
118    /// <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>
119    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
120        &self.role_arn
121    }
122    /// <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>
123    /// <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>
124    /// <p>If you do not specify a client token, one is generated for inclusion in the request.</p>
125    /// <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>
126    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.client_token = ::std::option::Option::Some(input.into());
128        self
129    }
130    /// <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>
131    /// <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>
132    /// <p>If you do not specify a client token, one is generated for inclusion in the request.</p>
133    /// <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>
134    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.client_token = input;
136        self
137    }
138    /// <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>
139    /// <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>
140    /// <p>If you do not specify a client token, one is generated for inclusion in the request.</p>
141    /// <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>
142    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
143        &self.client_token
144    }
145    /// <p>The identifier for the resource.</p>
146    /// <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>
147    /// <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>
148    /// <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>
149    /// This field is required.
150    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151        self.identifier = ::std::option::Option::Some(input.into());
152        self
153    }
154    /// <p>The identifier for the resource.</p>
155    /// <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>
156    /// <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>
157    /// <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>
158    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159        self.identifier = input;
160        self
161    }
162    /// <p>The identifier for the resource.</p>
163    /// <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>
164    /// <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>
165    /// <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>
166    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
167        &self.identifier
168    }
169    /// Consumes the builder and constructs a [`DeleteResourceInput`](crate::operation::delete_resource::DeleteResourceInput).
170    pub fn build(
171        self,
172    ) -> ::std::result::Result<crate::operation::delete_resource::DeleteResourceInput, ::aws_smithy_types::error::operation::BuildError> {
173        ::std::result::Result::Ok(crate::operation::delete_resource::DeleteResourceInput {
174            type_name: self.type_name,
175            type_version_id: self.type_version_id,
176            role_arn: self.role_arn,
177            client_token: self.client_token,
178            identifier: self.identifier,
179        })
180    }
181}