aws_sdk_cloudcontrol/client/
get_resource.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`GetResource`](crate::operation::get_resource::builders::GetResourceFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`type_name(impl Into<String>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::type_name) / [`set_type_name(Option<String>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::set_type_name):<br>required: **true**<br><p>The name of the resource type.</p><br>
7    ///   - [`type_version_id(impl Into<String>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::type_version_id) / [`set_type_version_id(Option<String>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::set_type_version_id):<br>required: **false**<br><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><br>
8    ///   - [`role_arn(impl Into<String>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::role_arn) / [`set_role_arn(Option<String>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::set_role_arn):<br>required: **false**<br><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> <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p> <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><br>
9    ///   - [`identifier(impl Into<String>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::identifier) / [`set_identifier(Option<String>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::set_identifier):<br>required: **true**<br><p>The identifier for the resource.</p> <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> <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> <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><br>
10    /// - On success, responds with [`GetResourceOutput`](crate::operation::get_resource::GetResourceOutput) with field(s):
11    ///   - [`type_name(Option<String>)`](crate::operation::get_resource::GetResourceOutput::type_name): <p>The name of the resource type.</p>
12    ///   - [`resource_description(Option<ResourceDescription>)`](crate::operation::get_resource::GetResourceOutput::resource_description): <p>Represents information about a provisioned resource.</p>
13    /// - On failure, responds with [`SdkError<GetResourceError>`](crate::operation::get_resource::GetResourceError)
14    pub fn get_resource(&self) -> crate::operation::get_resource::builders::GetResourceFluentBuilder {
15        crate::operation::get_resource::builders::GetResourceFluentBuilder::new(self.handle.clone())
16    }
17}