aws_sdk_apigateway/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    ///   - [`rest_api_id(impl Into<String>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::rest_api_id) / [`set_rest_api_id(Option<String>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::set_rest_api_id):<br>required: **true**<br><p>The string identifier of the associated RestApi.</p><br>
7    ///   - [`resource_id(impl Into<String>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::resource_id) / [`set_resource_id(Option<String>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::set_resource_id):<br>required: **true**<br><p>The identifier for the Resource resource.</p><br>
8    ///   - [`embed(impl Into<String>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::embed) / [`set_embed(Option<Vec::<String>>)`](crate::operation::get_resource::builders::GetResourceFluentBuilder::set_embed):<br>required: **false**<br><p>A query parameter to retrieve the specified resources embedded in the returned Resource representation in the response. This <code>embed</code> parameter value is a list of comma-separated strings. Currently, the request supports only retrieval of the embedded Method resources this way. The query parameter value must be a single-valued list and contain the <code>"methods"</code> string. For example, <code>GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods</code>.</p><br>
9    /// - On success, responds with [`GetResourceOutput`](crate::operation::get_resource::GetResourceOutput) with field(s):
10    ///   - [`id(Option<String>)`](crate::operation::get_resource::GetResourceOutput::id): <p>The resource's identifier.</p>
11    ///   - [`parent_id(Option<String>)`](crate::operation::get_resource::GetResourceOutput::parent_id): <p>The parent resource's identifier.</p>
12    ///   - [`path_part(Option<String>)`](crate::operation::get_resource::GetResourceOutput::path_part): <p>The last path segment for this resource.</p>
13    ///   - [`path(Option<String>)`](crate::operation::get_resource::GetResourceOutput::path): <p>The full path for this resource.</p>
14    ///   - [`resource_methods(Option<HashMap::<String, Method>>)`](crate::operation::get_resource::GetResourceOutput::resource_methods): <p>Gets an API resource's method of a given HTTP verb.</p>
15    /// - On failure, responds with [`SdkError<GetResourceError>`](crate::operation::get_resource::GetResourceError)
16    pub fn get_resource(&self) -> crate::operation::get_resource::builders::GetResourceFluentBuilder {
17        crate::operation::get_resource::builders::GetResourceFluentBuilder::new(self.handle.clone())
18    }
19}