Skip to main content

aws_sdk_networksecuritymanager/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_identifier(impl Into<String>)`](crate::operation::get_policy::builders::GetPolicyFluentBuilder::policy_identifier) / [`set_policy_identifier(Option<String>)`](crate::operation::get_policy::builders::GetPolicyFluentBuilder::set_policy_identifier):<br>required: **true**<br><p>The identifier of the policy. This is the policy's Amazon Resource Name (ARN).</p><br>
7    /// - On success, responds with [`GetPolicyOutput`](crate::operation::get_policy::GetPolicyOutput) with field(s):
8    ///   - [`policy_id(String)`](crate::operation::get_policy::GetPolicyOutput::policy_id): <p>The service-generated id of the policy.</p>
9    ///   - [`policy_arn(String)`](crate::operation::get_policy::GetPolicyOutput::policy_arn): <p>The Amazon Resource Name (ARN) of the policy.</p>
10    ///   - [`policy_name(String)`](crate::operation::get_policy::GetPolicyOutput::policy_name): <p>The name of the policy.</p>
11    ///   - [`policy_description(Option<String>)`](crate::operation::get_policy::GetPolicyOutput::policy_description): <p>A description of the policy.</p>
12    ///   - [`status(EntityStatus)`](crate::operation::get_policy::GetPolicyOutput::status): <p>The current status of the resource: <code>DRAFT</code> (unpublished, editable) or <code>ACTIVE</code> (published, in use).</p>
13    ///   - [`priority(i32)`](crate::operation::get_policy::GetPolicyOutput::priority): <p>The priority of the resource. A lower number indicates a higher priority.</p>
14    ///   - [`associated_template_and_rule_list(Vec::<AssociatedTemplateOrRule>)`](crate::operation::get_policy::GetPolicyOutput::associated_template_and_rule_list): <p>The templates and rules associated with the policy. For AWS WAF policies, this list contains 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list is empty.</p>
15    ///   - [`version(String)`](crate::operation::get_policy::GetPolicyOutput::version): <p>The version of the resource.</p>
16    ///   - [`update_token(Option<String>)`](crate::operation::get_policy::GetPolicyOutput::update_token): <p>A token used for optimistic concurrency control. Each read and write returns an <code>updateToken</code>. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.</p>
17    ///   - [`is_snapshot(Option<bool>)`](crate::operation::get_policy::GetPolicyOutput::is_snapshot): <p>Specifies whether the resource is a snapshot of a published version.</p>
18    ///   - [`has_published_version(Option<bool>)`](crate::operation::get_policy::GetPolicyOutput::has_published_version): <p>Specifies whether a published version of the resource exists.</p>
19    ///   - [`firewall_type(PolicyFirewallType)`](crate::operation::get_policy::GetPolicyOutput::firewall_type): <p>The firewall type associated with the resource.</p>
20    ///   - [`policy_configuration(Option<PolicyConfiguration>)`](crate::operation::get_policy::GetPolicyOutput::policy_configuration): <p>The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.</p>
21    ///   - [`updated_at(Option<DateTime>)`](crate::operation::get_policy::GetPolicyOutput::updated_at): <p>The time when the resource was last updated.</p>
22    /// - On failure, responds with [`SdkError<GetPolicyError>`](crate::operation::get_policy::GetPolicyError)
23    pub fn get_policy(&self) -> crate::operation::get_policy::builders::GetPolicyFluentBuilder {
24        crate::operation::get_policy::builders::GetPolicyFluentBuilder::new(self.handle.clone())
25    }
26}