Class: AWSCDK::EFS::AccessPointOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
efs/access_point_options.rb

Overview

Options to create an AccessPoint.

Direct Known Subclasses

AccessPointProps

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client_token: nil, create_acl: nil, path: nil, posix_user: nil) ⇒ AccessPointOptions

Returns a new instance of AccessPointOptions.

Parameters:

  • client_token (String, nil) (defaults to: nil)

    The opaque string specified in the request to ensure idempotent creation.

  • create_acl (AWSCDK::EFS::Acl, nil) (defaults to: nil)

    Specifies the POSIX IDs and permissions to apply when creating the access point's root directory.

  • path (String, nil) (defaults to: nil)

    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.

  • posix_user (AWSCDK::EFS::PosixUser, nil) (defaults to: nil)

    The full POSIX identity, including the user ID, group ID, and any secondary group IDs, on the access point that is used for all file system operations performed by NFS clients using the access point.



11
12
13
14
15
16
17
18
19
20
# File 'efs/access_point_options.rb', line 11

def initialize(client_token: nil, create_acl: nil, path: nil, posix_user: nil)
  @client_token = client_token
  Jsii::Type.check_type(@client_token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientToken") unless @client_token.nil?
  @create_acl = create_acl.is_a?(Hash) ? ::AWSCDK::EFS::Acl.new(**create_acl.transform_keys(&:to_sym)) : create_acl
  Jsii::Type.check_type(@create_acl, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWZzLkFjbCJ9")), "createAcl") unless @create_acl.nil?
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil?
  @posix_user = posix_user.is_a?(Hash) ? ::AWSCDK::EFS::PosixUser.new(**posix_user.transform_keys(&:to_sym)) : posix_user
  Jsii::Type.check_type(@posix_user, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWZzLlBvc2l4VXNlciJ9")), "posixUser") unless @posix_user.nil?
end

Instance Attribute Details

#client_tokenString? (readonly)

Note:

Default: - No client token

The opaque string specified in the request to ensure idempotent creation.



27
28
29
# File 'efs/access_point_options.rb', line 27

def client_token
  @client_token
end

#create_aclAWSCDK::EFS::Acl? (readonly)

Note:

Default: - None. The directory specified by path must exist.

Specifies the POSIX IDs and permissions to apply when creating the access point's root directory.

If the root directory specified by path does not exist, EFS creates the root directory and applies the permissions specified here. If the specified path does not exist, you must specify create_acl.

Returns:



36
37
38
# File 'efs/access_point_options.rb', line 36

def create_acl
  @create_acl
end

#pathString? (readonly)

Note:

Default: '/'

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.

Returns:

  • (String, nil)


41
42
43
# File 'efs/access_point_options.rb', line 41

def path
  @path
end

#posix_userAWSCDK::EFS::PosixUser? (readonly)

Note:

Default: - user identity not enforced

The full POSIX identity, including the user ID, group ID, and any secondary group IDs, on the access point that is used for all file system operations performed by NFS clients using the access point.

Specify this to enforce a user identity using an access point.

Returns:

See Also:

  • [Enforcing a User Identity Using an Access Point](https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html)


49
50
51
# File 'efs/access_point_options.rb', line 49

def posix_user
  @posix_user
end

Class Method Details

.jsii_propertiesObject



51
52
53
54
55
56
57
58
# File 'efs/access_point_options.rb', line 51

def self.jsii_properties
  {
    :client_token => "clientToken",
    :create_acl => "createAcl",
    :path => "path",
    :posix_user => "posixUser",
  }
end

Instance Method Details

#to_jsiiObject



60
61
62
63
64
65
66
67
68
69
# File 'efs/access_point_options.rb', line 60

def to_jsii
  result = {}
  result.merge!({
    "clientToken" => @client_token,
    "createAcl" => @create_acl,
    "path" => @path,
    "posixUser" => @posix_user,
  })
  result.compact
end