Skip to main content

aws_sdk_context/client/
get_curation_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 [`GetCurationPolicy`](crate::operation::get_curation_policy::builders::GetCurationPolicyFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`curation_policy_id(impl Into<String>)`](crate::operation::get_curation_policy::builders::GetCurationPolicyFluentBuilder::curation_policy_id) / [`set_curation_policy_id(Option<String>)`](crate::operation::get_curation_policy::builders::GetCurationPolicyFluentBuilder::set_curation_policy_id):<br>required: **true**<br><p>The ID of the curation policy to return.</p><br>
7    ///   - [`version(impl Into<String>)`](crate::operation::get_curation_policy::builders::GetCurationPolicyFluentBuilder::version) / [`set_version(Option<String>)`](crate::operation::get_curation_policy::builders::GetCurationPolicyFluentBuilder::set_version):<br>required: **false**<br><p>The version to return: <code>DRAFT</code> for the working copy, or a published version number. If you omit it, AWS Context returns the working copy.</p><br>
8    /// - On success, responds with [`GetCurationPolicyOutput`](crate::operation::get_curation_policy::GetCurationPolicyOutput) with field(s):
9    ///   - [`id(String)`](crate::operation::get_curation_policy::GetCurationPolicyOutput::id): <p>The ID of the curation policy. Requests take it as <code>curationPolicyId</code>.</p>
10    ///   - [`arn(String)`](crate::operation::get_curation_policy::GetCurationPolicyOutput::arn): <p>The ARN of the curation policy.</p>
11    ///   - [`name(String)`](crate::operation::get_curation_policy::GetCurationPolicyOutput::name): <p>The name of the curation policy.</p>
12    ///   - [`last_published_version(Option<String>)`](crate::operation::get_curation_policy::GetCurationPolicyOutput::last_published_version): <p>Newest published version. Absent until the policy's first version is created (a DRAFT that has never been published has no version).</p>
13    ///   - [`revision_id(String)`](crate::operation::get_curation_policy::GetCurationPolicyOutput::revision_id): <p>An opaque revision token for the working copy. Pass it as <code>revisionId</code> on <code>UpdateCurationPolicy</code>. The update applies only if the token still matches the current working copy.</p>
14    ///   - [`created_at(DateTime)`](crate::operation::get_curation_policy::GetCurationPolicyOutput::created_at): <p>The date and time when the curation policy was created.</p>
15    ///   - [`updated_at(DateTime)`](crate::operation::get_curation_policy::GetCurationPolicyOutput::updated_at): <p>When the resource last changed. Equal to <code>createdAt</code> until the first update.</p>
16    ///   - [`auto_reject_after_seconds(Option<i64>)`](crate::operation::get_curation_policy::GetCurationPolicyOutput::auto_reject_after_seconds): <p>The number of seconds that a proposal held for review under this policy can wait for a decision before AWS Context rejects it with <code>statusReasonCode</code> <code>REQUEST_EXPIRED</code>. From 86,400 seconds (1 day) to 15,552,000 seconds (180 days). Absent if proposals held under this policy are never rejected automatically.</p>
17    ///   - [`description(Option<String>)`](crate::operation::get_curation_policy::GetCurationPolicyOutput::description): <p>The description of the curation policy.</p>
18    ///   - [`policy_document(String)`](crate::operation::get_curation_policy::GetCurationPolicyOutput::policy_document): <p>The policy's rules, as a Cedar policy document: the rule the engine evaluates. Always present on the resource.</p>
19    ///   - [`status(CurationPolicyStatus)`](crate::operation::get_curation_policy::GetCurationPolicyOutput::status): <p>The policy's status.</p> <p>Valid values:</p> <ul>  <li>   <p><code>DRAFT</code> - The policy has never been published, so no agent context enforces it.</p></li>  <li>   <p><code>ACTIVE</code> - The policy has a published version, which the agent contexts associated with it enforce.</p></li>  <li>   <p><code>DELETED</code> - The policy is deleted. Nothing enforces it, and only GetCurationPolicy still returns it.</p></li> </ul>
20    /// - On failure, responds with [`SdkError<GetCurationPolicyError>`](crate::operation::get_curation_policy::GetCurationPolicyError)
21    pub fn get_curation_policy(&self) -> crate::operation::get_curation_policy::builders::GetCurationPolicyFluentBuilder {
22        crate::operation::get_curation_policy::builders::GetCurationPolicyFluentBuilder::new(self.handle.clone())
23    }
24}