aws-sdk-accessanalyzer 1.106.0

AWS SDK for Access Analyzer
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetGeneratedPolicyInput {
    /// <p>The <code>JobId</code> that is returned by the <code>StartPolicyGeneration</code> operation. The <code>JobId</code> can be used with <code>GetGeneratedPolicy</code> to retrieve the generated policies or used with <code>CancelPolicyGeneration</code> to cancel the policy generation request.</p>
    pub job_id: ::std::option::Option<::std::string::String>,
    /// <p>The level of detail that you want to generate. You can specify whether to generate policies with placeholders for resource ARNs for actions that support resource level granularity in policies.</p>
    /// <p>For example, in the resource section of a policy, you can receive a placeholder such as <code>"Resource":"arn:aws:s3:::${BucketName}"</code> instead of <code>"*"</code>.</p>
    pub include_resource_placeholders: ::std::option::Option<bool>,
    /// <p>The level of detail that you want to generate. You can specify whether to generate service-level policies.</p>
    /// <p>IAM Access Analyzer uses <code>iam:servicelastaccessed</code> to identify services that have been used recently to create this service-level template.</p>
    pub include_service_level_template: ::std::option::Option<bool>,
}
impl GetGeneratedPolicyInput {
    /// <p>The <code>JobId</code> that is returned by the <code>StartPolicyGeneration</code> operation. The <code>JobId</code> can be used with <code>GetGeneratedPolicy</code> to retrieve the generated policies or used with <code>CancelPolicyGeneration</code> to cancel the policy generation request.</p>
    pub fn job_id(&self) -> ::std::option::Option<&str> {
        self.job_id.as_deref()
    }
    /// <p>The level of detail that you want to generate. You can specify whether to generate policies with placeholders for resource ARNs for actions that support resource level granularity in policies.</p>
    /// <p>For example, in the resource section of a policy, you can receive a placeholder such as <code>"Resource":"arn:aws:s3:::${BucketName}"</code> instead of <code>"*"</code>.</p>
    pub fn include_resource_placeholders(&self) -> ::std::option::Option<bool> {
        self.include_resource_placeholders
    }
    /// <p>The level of detail that you want to generate. You can specify whether to generate service-level policies.</p>
    /// <p>IAM Access Analyzer uses <code>iam:servicelastaccessed</code> to identify services that have been used recently to create this service-level template.</p>
    pub fn include_service_level_template(&self) -> ::std::option::Option<bool> {
        self.include_service_level_template
    }
}
impl GetGeneratedPolicyInput {
    /// Creates a new builder-style object to manufacture [`GetGeneratedPolicyInput`](crate::operation::get_generated_policy::GetGeneratedPolicyInput).
    pub fn builder() -> crate::operation::get_generated_policy::builders::GetGeneratedPolicyInputBuilder {
        crate::operation::get_generated_policy::builders::GetGeneratedPolicyInputBuilder::default()
    }
}

/// A builder for [`GetGeneratedPolicyInput`](crate::operation::get_generated_policy::GetGeneratedPolicyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetGeneratedPolicyInputBuilder {
    pub(crate) job_id: ::std::option::Option<::std::string::String>,
    pub(crate) include_resource_placeholders: ::std::option::Option<bool>,
    pub(crate) include_service_level_template: ::std::option::Option<bool>,
}
impl GetGeneratedPolicyInputBuilder {
    /// <p>The <code>JobId</code> that is returned by the <code>StartPolicyGeneration</code> operation. The <code>JobId</code> can be used with <code>GetGeneratedPolicy</code> to retrieve the generated policies or used with <code>CancelPolicyGeneration</code> to cancel the policy generation request.</p>
    /// This field is required.
    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.job_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>JobId</code> that is returned by the <code>StartPolicyGeneration</code> operation. The <code>JobId</code> can be used with <code>GetGeneratedPolicy</code> to retrieve the generated policies or used with <code>CancelPolicyGeneration</code> to cancel the policy generation request.</p>
    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.job_id = input;
        self
    }
    /// <p>The <code>JobId</code> that is returned by the <code>StartPolicyGeneration</code> operation. The <code>JobId</code> can be used with <code>GetGeneratedPolicy</code> to retrieve the generated policies or used with <code>CancelPolicyGeneration</code> to cancel the policy generation request.</p>
    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.job_id
    }
    /// <p>The level of detail that you want to generate. You can specify whether to generate policies with placeholders for resource ARNs for actions that support resource level granularity in policies.</p>
    /// <p>For example, in the resource section of a policy, you can receive a placeholder such as <code>"Resource":"arn:aws:s3:::${BucketName}"</code> instead of <code>"*"</code>.</p>
    pub fn include_resource_placeholders(mut self, input: bool) -> Self {
        self.include_resource_placeholders = ::std::option::Option::Some(input);
        self
    }
    /// <p>The level of detail that you want to generate. You can specify whether to generate policies with placeholders for resource ARNs for actions that support resource level granularity in policies.</p>
    /// <p>For example, in the resource section of a policy, you can receive a placeholder such as <code>"Resource":"arn:aws:s3:::${BucketName}"</code> instead of <code>"*"</code>.</p>
    pub fn set_include_resource_placeholders(mut self, input: ::std::option::Option<bool>) -> Self {
        self.include_resource_placeholders = input;
        self
    }
    /// <p>The level of detail that you want to generate. You can specify whether to generate policies with placeholders for resource ARNs for actions that support resource level granularity in policies.</p>
    /// <p>For example, in the resource section of a policy, you can receive a placeholder such as <code>"Resource":"arn:aws:s3:::${BucketName}"</code> instead of <code>"*"</code>.</p>
    pub fn get_include_resource_placeholders(&self) -> &::std::option::Option<bool> {
        &self.include_resource_placeholders
    }
    /// <p>The level of detail that you want to generate. You can specify whether to generate service-level policies.</p>
    /// <p>IAM Access Analyzer uses <code>iam:servicelastaccessed</code> to identify services that have been used recently to create this service-level template.</p>
    pub fn include_service_level_template(mut self, input: bool) -> Self {
        self.include_service_level_template = ::std::option::Option::Some(input);
        self
    }
    /// <p>The level of detail that you want to generate. You can specify whether to generate service-level policies.</p>
    /// <p>IAM Access Analyzer uses <code>iam:servicelastaccessed</code> to identify services that have been used recently to create this service-level template.</p>
    pub fn set_include_service_level_template(mut self, input: ::std::option::Option<bool>) -> Self {
        self.include_service_level_template = input;
        self
    }
    /// <p>The level of detail that you want to generate. You can specify whether to generate service-level policies.</p>
    /// <p>IAM Access Analyzer uses <code>iam:servicelastaccessed</code> to identify services that have been used recently to create this service-level template.</p>
    pub fn get_include_service_level_template(&self) -> &::std::option::Option<bool> {
        &self.include_service_level_template
    }
    /// Consumes the builder and constructs a [`GetGeneratedPolicyInput`](crate::operation::get_generated_policy::GetGeneratedPolicyInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_generated_policy::GetGeneratedPolicyInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_generated_policy::GetGeneratedPolicyInput {
            job_id: self.job_id,
            include_resource_placeholders: self.include_resource_placeholders,
            include_service_level_template: self.include_service_level_template,
        })
    }
}