Skip to main content

aws_sdk_context/client/
associate_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 [`AssociateCurationPolicy`](crate::operation::associate_curation_policy::builders::AssociateCurationPolicyFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`agent_context_id(impl Into<String>)`](crate::operation::associate_curation_policy::builders::AssociateCurationPolicyFluentBuilder::agent_context_id) / [`set_agent_context_id(Option<String>)`](crate::operation::associate_curation_policy::builders::AssociateCurationPolicyFluentBuilder::set_agent_context_id):<br>required: **true**<br><p>The agent context, by its ID or ARN.</p><br>
7    ///   - [`curation_policy_id(impl Into<String>)`](crate::operation::associate_curation_policy::builders::AssociateCurationPolicyFluentBuilder::curation_policy_id) / [`set_curation_policy_id(Option<String>)`](crate::operation::associate_curation_policy::builders::AssociateCurationPolicyFluentBuilder::set_curation_policy_id):<br>required: **true**<br><p>The ID of the curation policy to associate with the agent context. If the policy doesn't exist in your account, the request fails with <code>ResourceNotFoundException</code>. If it was deleted, the request fails with <code>ConflictException</code>.</p><br>
8    /// - On success, responds with [`AssociateCurationPolicyOutput`](crate::operation::associate_curation_policy::AssociateCurationPolicyOutput) with field(s):
9    ///   - [`agent_context_id(String)`](crate::operation::associate_curation_policy::AssociateCurationPolicyOutput::agent_context_id): <p>The agent context's ID.</p>
10    ///   - [`curation_policy_id(String)`](crate::operation::associate_curation_policy::AssociateCurationPolicyOutput::curation_policy_id): <p>The ID of the curation policy that is associated with the agent context.</p>
11    /// - On failure, responds with [`SdkError<AssociateCurationPolicyError>`](crate::operation::associate_curation_policy::AssociateCurationPolicyError)
12    pub fn associate_curation_policy(&self) -> crate::operation::associate_curation_policy::builders::AssociateCurationPolicyFluentBuilder {
13        crate::operation::associate_curation_policy::builders::AssociateCurationPolicyFluentBuilder::new(self.handle.clone())
14    }
15}