aws_sdk_batch/types/_efs_authorization_config.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The authorization configuration details for the Amazon EFS file system.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct EfsAuthorizationConfig {
7 /// <p>The Amazon EFS access point ID to use. If an access point is specified, the root directory value specified in the <code>EFSVolumeConfiguration</code> must either be omitted or set to <code>/</code> which enforces the path set on the EFS access point. If an access point is used, transit encryption must be enabled in the <code>EFSVolumeConfiguration</code>. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html">Working with Amazon EFS access points</a> in the <i>Amazon Elastic File System User Guide</i>.</p>
8 pub access_point_id: ::std::option::Option<::std::string::String>,
9 /// <p>Whether or not to use the Batch job IAM role defined in a job definition when mounting the Amazon EFS file system. If enabled, transit encryption must be enabled in the <code>EFSVolumeConfiguration</code>. If this parameter is omitted, the default value of <code>DISABLED</code> is used. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/efs-volumes.html#efs-volume-accesspoints">Using Amazon EFS access points</a> in the <i>Batch User Guide</i>. EFS IAM authorization requires that <code>TransitEncryption</code> be <code>ENABLED</code> and that a <code>JobRoleArn</code> is specified.</p>
10 pub iam: ::std::option::Option<crate::types::EfsAuthorizationConfigIam>,
11}
12impl EfsAuthorizationConfig {
13 /// <p>The Amazon EFS access point ID to use. If an access point is specified, the root directory value specified in the <code>EFSVolumeConfiguration</code> must either be omitted or set to <code>/</code> which enforces the path set on the EFS access point. If an access point is used, transit encryption must be enabled in the <code>EFSVolumeConfiguration</code>. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html">Working with Amazon EFS access points</a> in the <i>Amazon Elastic File System User Guide</i>.</p>
14 pub fn access_point_id(&self) -> ::std::option::Option<&str> {
15 self.access_point_id.as_deref()
16 }
17 /// <p>Whether or not to use the Batch job IAM role defined in a job definition when mounting the Amazon EFS file system. If enabled, transit encryption must be enabled in the <code>EFSVolumeConfiguration</code>. If this parameter is omitted, the default value of <code>DISABLED</code> is used. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/efs-volumes.html#efs-volume-accesspoints">Using Amazon EFS access points</a> in the <i>Batch User Guide</i>. EFS IAM authorization requires that <code>TransitEncryption</code> be <code>ENABLED</code> and that a <code>JobRoleArn</code> is specified.</p>
18 pub fn iam(&self) -> ::std::option::Option<&crate::types::EfsAuthorizationConfigIam> {
19 self.iam.as_ref()
20 }
21}
22impl EfsAuthorizationConfig {
23 /// Creates a new builder-style object to manufacture [`EfsAuthorizationConfig`](crate::types::EfsAuthorizationConfig).
24 pub fn builder() -> crate::types::builders::EfsAuthorizationConfigBuilder {
25 crate::types::builders::EfsAuthorizationConfigBuilder::default()
26 }
27}
28
29/// A builder for [`EfsAuthorizationConfig`](crate::types::EfsAuthorizationConfig).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct EfsAuthorizationConfigBuilder {
33 pub(crate) access_point_id: ::std::option::Option<::std::string::String>,
34 pub(crate) iam: ::std::option::Option<crate::types::EfsAuthorizationConfigIam>,
35}
36impl EfsAuthorizationConfigBuilder {
37 /// <p>The Amazon EFS access point ID to use. If an access point is specified, the root directory value specified in the <code>EFSVolumeConfiguration</code> must either be omitted or set to <code>/</code> which enforces the path set on the EFS access point. If an access point is used, transit encryption must be enabled in the <code>EFSVolumeConfiguration</code>. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html">Working with Amazon EFS access points</a> in the <i>Amazon Elastic File System User Guide</i>.</p>
38 pub fn access_point_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.access_point_id = ::std::option::Option::Some(input.into());
40 self
41 }
42 /// <p>The Amazon EFS access point ID to use. If an access point is specified, the root directory value specified in the <code>EFSVolumeConfiguration</code> must either be omitted or set to <code>/</code> which enforces the path set on the EFS access point. If an access point is used, transit encryption must be enabled in the <code>EFSVolumeConfiguration</code>. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html">Working with Amazon EFS access points</a> in the <i>Amazon Elastic File System User Guide</i>.</p>
43 pub fn set_access_point_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.access_point_id = input;
45 self
46 }
47 /// <p>The Amazon EFS access point ID to use. If an access point is specified, the root directory value specified in the <code>EFSVolumeConfiguration</code> must either be omitted or set to <code>/</code> which enforces the path set on the EFS access point. If an access point is used, transit encryption must be enabled in the <code>EFSVolumeConfiguration</code>. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html">Working with Amazon EFS access points</a> in the <i>Amazon Elastic File System User Guide</i>.</p>
48 pub fn get_access_point_id(&self) -> &::std::option::Option<::std::string::String> {
49 &self.access_point_id
50 }
51 /// <p>Whether or not to use the Batch job IAM role defined in a job definition when mounting the Amazon EFS file system. If enabled, transit encryption must be enabled in the <code>EFSVolumeConfiguration</code>. If this parameter is omitted, the default value of <code>DISABLED</code> is used. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/efs-volumes.html#efs-volume-accesspoints">Using Amazon EFS access points</a> in the <i>Batch User Guide</i>. EFS IAM authorization requires that <code>TransitEncryption</code> be <code>ENABLED</code> and that a <code>JobRoleArn</code> is specified.</p>
52 pub fn iam(mut self, input: crate::types::EfsAuthorizationConfigIam) -> Self {
53 self.iam = ::std::option::Option::Some(input);
54 self
55 }
56 /// <p>Whether or not to use the Batch job IAM role defined in a job definition when mounting the Amazon EFS file system. If enabled, transit encryption must be enabled in the <code>EFSVolumeConfiguration</code>. If this parameter is omitted, the default value of <code>DISABLED</code> is used. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/efs-volumes.html#efs-volume-accesspoints">Using Amazon EFS access points</a> in the <i>Batch User Guide</i>. EFS IAM authorization requires that <code>TransitEncryption</code> be <code>ENABLED</code> and that a <code>JobRoleArn</code> is specified.</p>
57 pub fn set_iam(mut self, input: ::std::option::Option<crate::types::EfsAuthorizationConfigIam>) -> Self {
58 self.iam = input;
59 self
60 }
61 /// <p>Whether or not to use the Batch job IAM role defined in a job definition when mounting the Amazon EFS file system. If enabled, transit encryption must be enabled in the <code>EFSVolumeConfiguration</code>. If this parameter is omitted, the default value of <code>DISABLED</code> is used. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/efs-volumes.html#efs-volume-accesspoints">Using Amazon EFS access points</a> in the <i>Batch User Guide</i>. EFS IAM authorization requires that <code>TransitEncryption</code> be <code>ENABLED</code> and that a <code>JobRoleArn</code> is specified.</p>
62 pub fn get_iam(&self) -> &::std::option::Option<crate::types::EfsAuthorizationConfigIam> {
63 &self.iam
64 }
65 /// Consumes the builder and constructs a [`EfsAuthorizationConfig`](crate::types::EfsAuthorizationConfig).
66 pub fn build(self) -> crate::types::EfsAuthorizationConfig {
67 crate::types::EfsAuthorizationConfig {
68 access_point_id: self.access_point_id,
69 iam: self.iam,
70 }
71 }
72}