aws_sdk_bedrockagentcorecontrol/client/
get_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 [`GetPolicy`](crate::operation::get_policy::builders::GetPolicyFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`policy_engine_id(impl Into<String>)`](crate::operation::get_policy::builders::GetPolicyFluentBuilder::policy_engine_id) / [`set_policy_engine_id(Option<String>)`](crate::operation::get_policy::builders::GetPolicyFluentBuilder::set_policy_engine_id):<br>required: **true**<br><p>The identifier of the policy engine that manages the policy to be retrieved.</p><br>
7    ///   - [`policy_id(impl Into<String>)`](crate::operation::get_policy::builders::GetPolicyFluentBuilder::policy_id) / [`set_policy_id(Option<String>)`](crate::operation::get_policy::builders::GetPolicyFluentBuilder::set_policy_id):<br>required: **true**<br><p>The unique identifier of the policy to be retrieved. This must be a valid policy ID that exists within the specified policy engine.</p><br>
8    /// - On success, responds with [`GetPolicyOutput`](crate::operation::get_policy::GetPolicyOutput) with field(s):
9    ///   - [`policy_id(String)`](crate::operation::get_policy::GetPolicyOutput::policy_id): <p>The unique identifier of the retrieved policy. This matches the policy ID provided in the request and serves as the system identifier for the policy.</p>
10    ///   - [`name(String)`](crate::operation::get_policy::GetPolicyOutput::name): <p>The customer-assigned name of the policy. This is the human-readable identifier that was specified when the policy was created.</p>
11    ///   - [`policy_engine_id(String)`](crate::operation::get_policy::GetPolicyOutput::policy_engine_id): <p>The identifier of the policy engine that manages this policy. This confirms the policy engine context for the retrieved policy.</p>
12    ///   - [`definition(Option<PolicyDefinition>)`](crate::operation::get_policy::GetPolicyOutput::definition): <p>The Cedar policy statement that defines the access control rules. This contains the actual policy logic used for agent behavior control and access decisions.</p>
13    ///   - [`description(Option<String>)`](crate::operation::get_policy::GetPolicyOutput::description): <p>The human-readable description of the policy's purpose and functionality. This helps administrators understand and manage the policy.</p>
14    ///   - [`created_at(DateTime)`](crate::operation::get_policy::GetPolicyOutput::created_at): <p>The timestamp when the policy was originally created.</p>
15    ///   - [`updated_at(DateTime)`](crate::operation::get_policy::GetPolicyOutput::updated_at): <p>The timestamp when the policy was last modified. This tracks the most recent changes to the policy configuration.</p>
16    ///   - [`policy_arn(String)`](crate::operation::get_policy::GetPolicyOutput::policy_arn): <p>The Amazon Resource Name (ARN) of the policy. This globally unique identifier can be used for cross-service references and IAM policy statements.</p>
17    ///   - [`status(PolicyStatus)`](crate::operation::get_policy::GetPolicyOutput::status): <p>The current status of the policy.</p>
18    ///   - [`status_reasons(Vec::<String>)`](crate::operation::get_policy::GetPolicyOutput::status_reasons): <p>Additional information about the policy status. This provides details about any failures or the current state of the policy.</p>
19    /// - On failure, responds with [`SdkError<GetPolicyError>`](crate::operation::get_policy::GetPolicyError)
20    pub fn get_policy(&self) -> crate::operation::get_policy::builders::GetPolicyFluentBuilder {
21        crate::operation::get_policy::builders::GetPolicyFluentBuilder::new(self.handle.clone())
22    }
23}