Class: AWSCDK::ECS::CfnTaskDefinition::EFSVolumeConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/cfn_task_definition.rb

Overview

This parameter is specified when you're using an Amazon Elastic File System file system for task storage.

For more information, see Amazon EFS volumes in the Amazon Elastic Container Service Developer Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filesystem_id:, authorization_config: nil, root_directory: nil, transit_encryption: nil, transit_encryption_port: nil) ⇒ EFSVolumeConfigurationProperty

Returns a new instance of EFSVolumeConfigurationProperty.

Parameters:

  • filesystem_id (String)

    The Amazon EFS file system ID to use.

  • authorization_config (AWSCDK::IResolvable, AWSCDK::ECS::CfnTaskDefinition::AuthorizationConfigProperty, nil) (defaults to: nil)

    The authorization configuration details for the Amazon EFS file system.

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

    The directory within the Amazon EFS file system to mount as the root directory inside the host.

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

    Determines whether to use encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.

  • transit_encryption_port (Numeric, nil) (defaults to: nil)

    The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server.



1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
# File 'ecs/cfn_task_definition.rb', line 1669

def initialize(filesystem_id:, authorization_config: nil, root_directory: nil, transit_encryption: nil, transit_encryption_port: nil)
  @filesystem_id = filesystem_id
  Jsii::Type.check_type(@filesystem_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "filesystemId")
  @authorization_config = authorization_config.is_a?(Hash) ? ::AWSCDK::ECS::CfnTaskDefinition::AuthorizationConfigProperty.new(**authorization_config.transform_keys(&:to_sym)) : authorization_config
  Jsii::Type.check_type(@authorization_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuVGFza0RlZmluaXRpb24uQXV0aG9yaXphdGlvbkNvbmZpZ1Byb3BlcnR5In1dfX0=")), "authorizationConfig") unless @authorization_config.nil?
  @root_directory = root_directory
  Jsii::Type.check_type(@root_directory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "rootDirectory") unless @root_directory.nil?
  @transit_encryption = transit_encryption
  Jsii::Type.check_type(@transit_encryption, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "transitEncryption") unless @transit_encryption.nil?
  @transit_encryption_port = transit_encryption_port
  Jsii::Type.check_type(@transit_encryption_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "transitEncryptionPort") unless @transit_encryption_port.nil?
end

Instance Attribute Details

#authorization_configAWSCDK::IResolvable, ... (readonly)

The authorization configuration details for the Amazon EFS file system.



1691
1692
1693
# File 'ecs/cfn_task_definition.rb', line 1691

def authorization_config
  @authorization_config
end

#filesystem_idString (readonly)

The Amazon EFS file system ID to use.



1686
1687
1688
# File 'ecs/cfn_task_definition.rb', line 1686

def filesystem_id
  @filesystem_id
end

#root_directoryString? (readonly)

The directory within the Amazon EFS file system to mount as the root directory inside the host.

If this parameter is omitted, the root of the Amazon EFS volume will be used. Specifying / will have the same effect as omitting this parameter.

If an EFS access point is specified in the authorization_config , the root directory parameter must either be omitted or set to / which will enforce the path set on the EFS access point.



1700
1701
1702
# File 'ecs/cfn_task_definition.rb', line 1700

def root_directory
  @root_directory
end

#transit_encryptionString? (readonly)

Determines whether to use encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.

Transit encryption must be turned on if Amazon EFS IAM authorization is used. If this parameter is omitted, the default value of DISABLED is used. For more information, see Encrypting data in transit in the Amazon Elastic File System User Guide .



1707
1708
1709
# File 'ecs/cfn_task_definition.rb', line 1707

def transit_encryption
  @transit_encryption
end

#transit_encryption_portNumeric? (readonly)

The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server.

If you do not specify a transit encryption port, it will use the port selection strategy that the Amazon EFS mount helper uses. For more information, see EFS mount helper in the Amazon Elastic File System User Guide .



1714
1715
1716
# File 'ecs/cfn_task_definition.rb', line 1714

def transit_encryption_port
  @transit_encryption_port
end

Class Method Details

.jsii_propertiesObject



1716
1717
1718
1719
1720
1721
1722
1723
1724
# File 'ecs/cfn_task_definition.rb', line 1716

def self.jsii_properties
  {
    :filesystem_id => "filesystemId",
    :authorization_config => "authorizationConfig",
    :root_directory => "rootDirectory",
    :transit_encryption => "transitEncryption",
    :transit_encryption_port => "transitEncryptionPort",
  }
end

Instance Method Details

#to_jsiiObject



1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
# File 'ecs/cfn_task_definition.rb', line 1726

def to_jsii
  result = {}
  result.merge!({
    "filesystemId" => @filesystem_id,
    "authorizationConfig" => @authorization_config,
    "rootDirectory" => @root_directory,
    "transitEncryption" => @transit_encryption,
    "transitEncryptionPort" => @transit_encryption_port,
  })
  result.compact
end