1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// 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,
})
}
}