aws_sdk_accessanalyzer/client/
validate_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 [`ValidatePolicy`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder) operation.
4    /// This operation supports pagination; See [`into_paginator()`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::into_paginator).
5    ///
6    /// - The fluent builder is configurable:
7    ///   - [`locale(Locale)`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::locale) / [`set_locale(Option<Locale>)`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::set_locale):<br>required: **false**<br><p>The locale to use for localizing the findings.</p><br>
8    ///   - [`max_results(i32)`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::set_max_results):<br>required: **false**<br><p>The maximum number of results to return in the response.</p><br>
9    ///   - [`next_token(impl Into<String>)`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::set_next_token):<br>required: **false**<br><p>A token used for pagination of results returned.</p><br>
10    ///   - [`policy_document(impl Into<String>)`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::policy_document) / [`set_policy_document(Option<String>)`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::set_policy_document):<br>required: **true**<br><p>The JSON policy document to use as the content for the policy.</p><br>
11    ///   - [`policy_type(PolicyType)`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::policy_type) / [`set_policy_type(Option<PolicyType>)`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::set_policy_type):<br>required: **true**<br><p>The type of policy to validate. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups.</p> <p>Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You can provide a generic input such as identity policy or resource policy or a specific input such as managed policy or Amazon S3 bucket policy.</p> <p>Service control policies (SCPs) are a type of organization policy attached to an Amazon Web Services organization, organizational unit (OU), or an account.</p><br>
12    ///   - [`validate_policy_resource_type(ValidatePolicyResourceType)`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::validate_policy_resource_type) / [`set_validate_policy_resource_type(Option<ValidatePolicyResourceType>)`](crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::set_validate_policy_resource_type):<br>required: **false**<br><p>The type of resource to attach to your resource policy. Specify a value for the policy validation resource type only if the policy type is <code>RESOURCE_POLICY</code>. For example, to validate a resource policy to attach to an Amazon S3 bucket, you can choose <code>AWS::S3::Bucket</code> for the policy validation resource type.</p> <p>For resource types not supported as valid values, IAM Access Analyzer runs policy checks that apply to all resource policies. For example, to validate a resource policy to attach to a KMS key, do not specify a value for the policy validation resource type and IAM Access Analyzer will run policy checks that apply to all resource policies.</p><br>
13    /// - On success, responds with [`ValidatePolicyOutput`](crate::operation::validate_policy::ValidatePolicyOutput) with field(s):
14    ///   - [`findings(Vec::<ValidatePolicyFinding>)`](crate::operation::validate_policy::ValidatePolicyOutput::findings): <p>The list of findings in a policy returned by IAM Access Analyzer based on its suite of policy checks.</p>
15    ///   - [`next_token(Option<String>)`](crate::operation::validate_policy::ValidatePolicyOutput::next_token): <p>A token used for pagination of results returned.</p>
16    /// - On failure, responds with [`SdkError<ValidatePolicyError>`](crate::operation::validate_policy::ValidatePolicyError)
17    pub fn validate_policy(&self) -> crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder {
18        crate::operation::validate_policy::builders::ValidatePolicyFluentBuilder::new(self.handle.clone())
19    }
20}