pcf.particle.aws.efs package¶
Submodules¶
pcf.particle.aws.efs.efs_instance module¶
-
class
pcf.particle.aws.efs.efs_instance.
EFSInstance
(particle_definition, session=None)¶ Bases:
pcf.core.aws_resource.AWSResource
This is the implementation of Amazon’s Elastic File System.
-
RETURN_PARAM_FILTER
= {'CreationToken', 'Encrypted', 'FileSystemId', 'KmsKeyId', 'Name', 'OwnerId', 'PerformanceMode'}¶
-
START_PARAM_FILTER
= {'CreationToken', 'Encrypted', 'KmsKeyId', 'PerformanceMode'}¶
-
UNIQUE_KEYS
= ['aws_resource.custom_config.instance_name']¶
-
_describe_file_systems
()¶ Uses instance_name as a filter for boto3 describe_file_systems()
Returns: boto3 describe_file_systems() response
-
_set_unique_keys
()¶ Logic that sets keys from state definition that are used to uniquely identify the S3 Bucket
-
_start
()¶ Calls boto3 create_file_system https://boto3.readthedocs.io/en/latest/reference/services/efs.html#EFS.Client.create_file_system :returns: boto3 create_file_system() response
-
_stop
()¶ Elastic File System does not have a stopped state so calls terminate
-
_terminate
()¶ Calls boto3 delete_file_system
Returns: response of boto3 delete_file_system
-
_update
()¶ Logic that updates the particle. This is implemented for each individual particle
-
create_mount_target
(subnet_id, **kwargs)¶ Creates a mount target for a file system
Parameters: - subnet_id (string) – ID of the subnet to add the mount target in
- **kwargs – options for boto3 create_mount target
Returns: response of boto3 create_mount_target
Creates or overwrites tags associated with file system :param fs_tags: Array of Tag objects to add, each object is a key-value pair :type fs_tags: list
-
delete_mount_target
(mount_target_id)¶ Deletes the specified mount target
Parameters: mount_target_id (string) – ID of the mount target to delete Returns: response of boto3 delete_mount_target
Deletes the specified tags from a file system
Parameters: tag_keys (list) – List of tag keys to delete
-
describe_mount_targets
()¶ Returns the descriptions of all the current mount targets, or a specific mount target, for the file system
Parameters: - mount_target_id (string) – ID of the mount target that you want to have described
- **kwargs – options for boto3 describe_mount_targets
Returns: response of boto3 describe_mount_targets
Returns the tags associated with the file system
Returns: boto3 describe_tags() response
-
flavor
= 'efs_instance'¶
-
get_status
()¶ Gets current status of the EFS instance :returns: status (dict)
-
is_state_definition_equivalent
()¶ Compares the desired state and current state definitions.
Returns: bool
-
modify_mount_target_security_groups
(mount_target_id, security_groups)¶ Modifies the set of security groups in effect for a mount target
Parameters: - mount_target_id (string) – ID of the mount target whose security groups you want to modify
- security_groups (list) – Array of VPC security group IDs
Returns: reponse of boto3 modify_mount_target_security_groups
-
state_lookup
= {'available': <State.running: 1>, 'creating': <State.pending: 4>, 'deleted': <State.terminated: 3>, 'deleting': <State.pending: 4>}¶
-
sync_state
()¶ Elastic File System implementation of sync state. Calls get status and sets the current state
-