aws_sdk_efs/types/_root_directory.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Specifies the directory on the Amazon EFS file system that the access point provides access to. The access point exposes the specified file system path as the root directory of your file system to applications using the access point. NFS clients using the access point can only access data in the access point's <code>RootDirectory</code> and its subdirectories.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RootDirectory {
7 /// <p>Specifies the path on the EFS file system to expose as the root directory to NFS clients using the access point to access the EFS file system. A path can have up to four subdirectories. If the specified path does not exist, you are required to provide the <code>CreationInfo</code>.</p>
8 pub path: ::std::option::Option<::std::string::String>,
9 /// <p>(Optional) Specifies the POSIX IDs and permissions to apply to the access point's <code>RootDirectory</code>. If the <code>RootDirectory</code> > <code>Path</code> specified does not exist, EFS creates the root directory using the <code>CreationInfo</code> settings when a client connects to an access point. When specifying the <code>CreationInfo</code>, you must provide values for all properties.</p><important>
10 /// <p>If you do not provide <code>CreationInfo</code> and the specified <code>RootDirectory</code> > <code>Path</code> does not exist, attempts to mount the file system using the access point will fail.</p>
11 /// </important>
12 pub creation_info: ::std::option::Option<crate::types::CreationInfo>,
13}
14impl RootDirectory {
15 /// <p>Specifies the path on the EFS file system to expose as the root directory to NFS clients using the access point to access the EFS file system. A path can have up to four subdirectories. If the specified path does not exist, you are required to provide the <code>CreationInfo</code>.</p>
16 pub fn path(&self) -> ::std::option::Option<&str> {
17 self.path.as_deref()
18 }
19 /// <p>(Optional) Specifies the POSIX IDs and permissions to apply to the access point's <code>RootDirectory</code>. If the <code>RootDirectory</code> > <code>Path</code> specified does not exist, EFS creates the root directory using the <code>CreationInfo</code> settings when a client connects to an access point. When specifying the <code>CreationInfo</code>, you must provide values for all properties.</p><important>
20 /// <p>If you do not provide <code>CreationInfo</code> and the specified <code>RootDirectory</code> > <code>Path</code> does not exist, attempts to mount the file system using the access point will fail.</p>
21 /// </important>
22 pub fn creation_info(&self) -> ::std::option::Option<&crate::types::CreationInfo> {
23 self.creation_info.as_ref()
24 }
25}
26impl RootDirectory {
27 /// Creates a new builder-style object to manufacture [`RootDirectory`](crate::types::RootDirectory).
28 pub fn builder() -> crate::types::builders::RootDirectoryBuilder {
29 crate::types::builders::RootDirectoryBuilder::default()
30 }
31}
32
33/// A builder for [`RootDirectory`](crate::types::RootDirectory).
34#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
35#[non_exhaustive]
36pub struct RootDirectoryBuilder {
37 pub(crate) path: ::std::option::Option<::std::string::String>,
38 pub(crate) creation_info: ::std::option::Option<crate::types::CreationInfo>,
39}
40impl RootDirectoryBuilder {
41 /// <p>Specifies the path on the EFS file system to expose as the root directory to NFS clients using the access point to access the EFS file system. A path can have up to four subdirectories. If the specified path does not exist, you are required to provide the <code>CreationInfo</code>.</p>
42 pub fn path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
43 self.path = ::std::option::Option::Some(input.into());
44 self
45 }
46 /// <p>Specifies the path on the EFS file system to expose as the root directory to NFS clients using the access point to access the EFS file system. A path can have up to four subdirectories. If the specified path does not exist, you are required to provide the <code>CreationInfo</code>.</p>
47 pub fn set_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
48 self.path = input;
49 self
50 }
51 /// <p>Specifies the path on the EFS file system to expose as the root directory to NFS clients using the access point to access the EFS file system. A path can have up to four subdirectories. If the specified path does not exist, you are required to provide the <code>CreationInfo</code>.</p>
52 pub fn get_path(&self) -> &::std::option::Option<::std::string::String> {
53 &self.path
54 }
55 /// <p>(Optional) Specifies the POSIX IDs and permissions to apply to the access point's <code>RootDirectory</code>. If the <code>RootDirectory</code> > <code>Path</code> specified does not exist, EFS creates the root directory using the <code>CreationInfo</code> settings when a client connects to an access point. When specifying the <code>CreationInfo</code>, you must provide values for all properties.</p><important>
56 /// <p>If you do not provide <code>CreationInfo</code> and the specified <code>RootDirectory</code> > <code>Path</code> does not exist, attempts to mount the file system using the access point will fail.</p>
57 /// </important>
58 pub fn creation_info(mut self, input: crate::types::CreationInfo) -> Self {
59 self.creation_info = ::std::option::Option::Some(input);
60 self
61 }
62 /// <p>(Optional) Specifies the POSIX IDs and permissions to apply to the access point's <code>RootDirectory</code>. If the <code>RootDirectory</code> > <code>Path</code> specified does not exist, EFS creates the root directory using the <code>CreationInfo</code> settings when a client connects to an access point. When specifying the <code>CreationInfo</code>, you must provide values for all properties.</p><important>
63 /// <p>If you do not provide <code>CreationInfo</code> and the specified <code>RootDirectory</code> > <code>Path</code> does not exist, attempts to mount the file system using the access point will fail.</p>
64 /// </important>
65 pub fn set_creation_info(mut self, input: ::std::option::Option<crate::types::CreationInfo>) -> Self {
66 self.creation_info = input;
67 self
68 }
69 /// <p>(Optional) Specifies the POSIX IDs and permissions to apply to the access point's <code>RootDirectory</code>. If the <code>RootDirectory</code> > <code>Path</code> specified does not exist, EFS creates the root directory using the <code>CreationInfo</code> settings when a client connects to an access point. When specifying the <code>CreationInfo</code>, you must provide values for all properties.</p><important>
70 /// <p>If you do not provide <code>CreationInfo</code> and the specified <code>RootDirectory</code> > <code>Path</code> does not exist, attempts to mount the file system using the access point will fail.</p>
71 /// </important>
72 pub fn get_creation_info(&self) -> &::std::option::Option<crate::types::CreationInfo> {
73 &self.creation_info
74 }
75 /// Consumes the builder and constructs a [`RootDirectory`](crate::types::RootDirectory).
76 pub fn build(self) -> crate::types::RootDirectory {
77 crate::types::RootDirectory {
78 path: self.path,
79 creation_info: self.creation_info,
80 }
81 }
82}