aws_sdk_cloudfront/client/get_cache_policy.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 [`GetCachePolicy`](crate::operation::get_cache_policy::builders::GetCachePolicyFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`id(impl Into<String>)`](crate::operation::get_cache_policy::builders::GetCachePolicyFluentBuilder::id) / [`set_id(Option<String>)`](crate::operation::get_cache_policy::builders::GetCachePolicyFluentBuilder::set_id):<br>required: **true**<br><p>The unique identifier for the cache policy. If the cache policy is attached to a distribution's cache behavior, you can get the policy's identifier using <code>ListDistributions</code> or <code>GetDistribution</code>. If the cache policy is not attached to a cache behavior, you can get the identifier using <code>ListCachePolicies</code>.</p><br>
7 /// - On success, responds with [`GetCachePolicyOutput`](crate::operation::get_cache_policy::GetCachePolicyOutput) with field(s):
8 /// - [`cache_policy(Option<CachePolicy>)`](crate::operation::get_cache_policy::GetCachePolicyOutput::cache_policy): <p>The cache policy.</p>
9 /// - [`e_tag(Option<String>)`](crate::operation::get_cache_policy::GetCachePolicyOutput::e_tag): <p>The current version of the cache policy.</p>
10 /// - On failure, responds with [`SdkError<GetCachePolicyError>`](crate::operation::get_cache_policy::GetCachePolicyError)
11 pub fn get_cache_policy(&self) -> crate::operation::get_cache_policy::builders::GetCachePolicyFluentBuilder {
12 crate::operation::get_cache_policy::builders::GetCachePolicyFluentBuilder::new(self.handle.clone())
13 }
14}