aws_sdk_cloudcontrol/operation/get_resource/
_get_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 GetResourceInput {
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>The identifier for the resource.</p>
15    /// <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>
16    /// <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>
17    /// <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>
18    pub identifier: ::std::option::Option<::std::string::String>,
19}
20impl GetResourceInput {
21    /// <p>The name of the resource type.</p>
22    pub fn type_name(&self) -> ::std::option::Option<&str> {
23        self.type_name.as_deref()
24    }
25    /// <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>
26    pub fn type_version_id(&self) -> ::std::option::Option<&str> {
27        self.type_version_id.as_deref()
28    }
29    /// <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>
30    /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
31    /// <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>
32    pub fn role_arn(&self) -> ::std::option::Option<&str> {
33        self.role_arn.as_deref()
34    }
35    /// <p>The identifier for the resource.</p>
36    /// <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>
37    /// <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>
38    /// <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>
39    pub fn identifier(&self) -> ::std::option::Option<&str> {
40        self.identifier.as_deref()
41    }
42}
43impl GetResourceInput {
44    /// Creates a new builder-style object to manufacture [`GetResourceInput`](crate::operation::get_resource::GetResourceInput).
45    pub fn builder() -> crate::operation::get_resource::builders::GetResourceInputBuilder {
46        crate::operation::get_resource::builders::GetResourceInputBuilder::default()
47    }
48}
49
50/// A builder for [`GetResourceInput`](crate::operation::get_resource::GetResourceInput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
52#[non_exhaustive]
53pub struct GetResourceInputBuilder {
54    pub(crate) type_name: ::std::option::Option<::std::string::String>,
55    pub(crate) type_version_id: ::std::option::Option<::std::string::String>,
56    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
57    pub(crate) identifier: ::std::option::Option<::std::string::String>,
58}
59impl GetResourceInputBuilder {
60    /// <p>The name of the resource type.</p>
61    /// This field is required.
62    pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63        self.type_name = ::std::option::Option::Some(input.into());
64        self
65    }
66    /// <p>The name of the resource type.</p>
67    pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68        self.type_name = input;
69        self
70    }
71    /// <p>The name of the resource type.</p>
72    pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
73        &self.type_name
74    }
75    /// <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>
76    pub fn type_version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77        self.type_version_id = ::std::option::Option::Some(input.into());
78        self
79    }
80    /// <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>
81    pub fn set_type_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82        self.type_version_id = input;
83        self
84    }
85    /// <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>
86    pub fn get_type_version_id(&self) -> &::std::option::Option<::std::string::String> {
87        &self.type_version_id
88    }
89    /// <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>
90    /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
91    /// <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>
92    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93        self.role_arn = ::std::option::Option::Some(input.into());
94        self
95    }
96    /// <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>
97    /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
98    /// <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>
99    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.role_arn = input;
101        self
102    }
103    /// <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>
104    /// <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p>
105    /// <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>
106    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
107        &self.role_arn
108    }
109    /// <p>The identifier for the resource.</p>
110    /// <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>
111    /// <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>
112    /// <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>
113    /// This field is required.
114    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.identifier = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The identifier for the resource.</p>
119    /// <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>
120    /// <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>
121    /// <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>
122    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.identifier = input;
124        self
125    }
126    /// <p>The identifier for the resource.</p>
127    /// <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>
128    /// <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>
129    /// <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>
130    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
131        &self.identifier
132    }
133    /// Consumes the builder and constructs a [`GetResourceInput`](crate::operation::get_resource::GetResourceInput).
134    pub fn build(self) -> ::std::result::Result<crate::operation::get_resource::GetResourceInput, ::aws_smithy_types::error::operation::BuildError> {
135        ::std::result::Result::Ok(crate::operation::get_resource::GetResourceInput {
136            type_name: self.type_name,
137            type_version_id: self.type_version_id,
138            role_arn: self.role_arn,
139            identifier: self.identifier,
140        })
141    }
142}