boto3_efs¶
Connection module for Amazon EFS using boto3.¶
Renamed from
boto_efstoboto3_efsand rewritten to use the boto3efsclient APIs directly viasaltext.boto3.utils.boto3mod. The legacy boto2 code path (object-style access, retry loops) has been removed.
- depends:
boto3 >= 1.28.0
botocore >= 1.31.0
- configuration:
This module accepts explicit EFS credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More Information available at:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html
If IAM roles are not used you need to specify them either in the minion’s config file or as a profile. For example, to specify them in the minion’s config file:
efs.keyid: GKTADJGHEIQSXMKKRBJ08H
efs.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
A region may also be specified in the configuration:
efs.region: us-east-1
It’s also possible to specify key, keyid and region via a profile, either as a passed in dict, or as a string to pull from pillars or minion config:
myprofile:
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
region: us-east-1
Added in version 1.0.0.
- saltext.boto3.modules.boto3_efs.create_file_system(name, performance_mode='generalPurpose', keyid=None, key=None, profile=None, region=None, creation_token=None, **kwargs)[source]¶
Creates a new, empty file system.
- name (str):
(string) - The name for the new file system
- performance_mode (str):
(string) - The PerformanceMode of the file system. Can be either generalPurpose or maxIO
- creation_token (str):
(string) - A unique name to be used as reference when creating an EFS. This will ensure idempotency. Set to name if not specified otherwise
- keyid (str, optional):
The AWS access key ID.
- key (str, optional):
The AWS secret access key.
- profile (str, optional):
The profile to use for AWS credentials.
- region (str, optional):
The AWS region where the EFS file system is to be created.
- creation_token (str, optional):
The creation token for the EFS file system. If not specified, it will default to the name.
**kwargs(optional):Additional parameters that are passed to the boto3 client method.
CLI Example:
salt 'my-minion' boto3_efs.create_file_system efs-name generalPurpose
- saltext.boto3.modules.boto3_efs.create_mount_target(filesystemid, subnetid, ipaddress=None, securitygroups=None, keyid=None, key=None, profile=None, region=None, **kwargs)[source]¶
Creates a mount target for a file system.
- filesystemid (str):
ID of the file system for which to create the mount target.
- subnetid (str):
ID of the subnet to add the mount target in.
- ipaddress (str, optional):
Valid IPv4 address within the address range of the specified subnet.
- securitygroups (list[str], optional):
Up to five VPC security group IDs.
- keyid (str, optional):
The AWS access key ID.
- key (str, optional):
The AWS secret access key.
- profile (str, optional):
The profile to use for AWS credentials.
- region (str, optional):
The AWS region where the EFS file system is located.
**kwargs(optional):Additional parameters that are passed to the boto3 client method.
CLI Example:
salt 'my-minion' boto3_efs.create_mount_target filesystemid subnetid
- saltext.boto3.modules.boto3_efs.create_tags(filesystemid, tags, keyid=None, key=None, profile=None, region=None, **kwargs)[source]¶
Creates or overwrites tags associated with a file system.
- filesystemid (str):
ID of the file system for whose tags will be modified.
- tags (dict):
The tags to add to the file system
- keyid (str, optional):
The AWS access key ID.
- key (str, optional):
The AWS secret access key.
- profile (str, optional):
The profile to use for AWS credentials.
- region (str, optional):
The AWS region where the EFS file system is located.
**kwargs(optional):Additional parameters that are passed to the boto3 client method.
CLI Example:
salt 'my-minion' boto3_efs.create_tags
- saltext.boto3.modules.boto3_efs.delete_file_system(filesystemid, keyid=None, key=None, profile=None, region=None, **kwargs)[source]¶
Deletes a file system, permanently severing access to its contents.
- filesystemid (str):
ID of the file system to delete.
- keyid (str, optional):
The AWS access key ID.
- key (str, optional):
The AWS secret access key.
- profile (str, optional):
The profile to use for AWS credentials.
- region (str, optional):
The AWS region where the EFS file system is located.
**kwargs(optional):Additional parameters that are passed to the boto3 client method.
CLI Example:
salt 'my-minion' boto3_efs.delete_file_system filesystemid
- saltext.boto3.modules.boto3_efs.delete_mount_target(mounttargetid, keyid=None, key=None, profile=None, region=None, **kwargs)[source]¶
Deletes the specified mount target.
- mounttargetid (str):
ID of the mount target to delete.
- keyid (str, optional):
The AWS access key ID.
- key (str, optional):
The AWS secret access key.
- profile (str, optional):
The profile to use for AWS credentials.
- region (str, optional):
The AWS region where the EFS mount target is located.
**kwargs(optional):Additional parameters that are passed to the boto3 client method.
CLI Example:
salt 'my-minion' boto3_efs.delete_mount_target mounttargetid
- saltext.boto3.modules.boto3_efs.delete_tags(filesystemid, tags, keyid=None, key=None, profile=None, region=None, **kwargs)[source]¶
Deletes the specified tags from a file system.
- filesystemid (str):
ID of the file system for whose tags will be removed.
- tags (list[str]):
The tag keys to delete from the file system.
- keyid (str, optional):
The AWS access key ID.
- key (str, optional):
The AWS secret access key.
- profile (str, optional):
The profile to use for AWS credentials.
- region (str, optional):
The AWS region where the EFS file system is located.
**kwargs(optional):Additional parameters that are passed to the boto3 client method.
CLI Example:
salt 'my-minion' boto3_efs.delete_tags
- saltext.boto3.modules.boto3_efs.get_file_systems(filesystemid=None, keyid=None, key=None, profile=None, region=None, creation_token=None, **kwargs)[source]¶
Get all EFS properties or a specific instance property if filesystemid is specified.
- filesystemid (str, optional):
ID of the file system to retrieve properties.
- creation_token (str, optional):
A unique token that identifies an EFS.
- keyid (str, optional):
The AWS access key ID.
- key (str, optional):
The AWS secret access key.
- profile (str, optional):
The profile to use for AWS credentials.
- region (str, optional):
The AWS region where the EFS file system is located.
**kwargs(optional):Additional parameters that are passed to the boto3 client method.
CLI Example:
salt 'my-minion' boto3_efs.get_file_systems efs-id
- saltext.boto3.modules.boto3_efs.get_mount_targets(filesystemid=None, mounttargetid=None, keyid=None, key=None, profile=None, region=None, **kwargs)[source]¶
Get all the EFS mount point properties for a specific filesystemid or the properties for a specific mounttargetid.
- filesystemid (str, optional):
ID of the file system whose mount targets to list.
- mounttargetid (str, optional):
ID of the mount target to have its properties returned.
- keyid (str, optional):
The AWS access key ID.
- key (str, optional):
The AWS secret access key.
- profile (str, optional):
The profile to use for AWS credentials.
- region (str, optional):
The AWS region where the EFS file system is located.
**kwargs(optional):Additional parameters that are passed to the boto3 client method.
CLI Example:
salt 'my-minion' boto3_efs.get_mount_targets
- saltext.boto3.modules.boto3_efs.get_tags(filesystemid, keyid=None, key=None, profile=None, region=None, **kwargs)[source]¶
Return the tags associated with an EFS instance.
- filesystemid (str):
ID of the file system whose tags to list.
- keyid (str, optional):
The AWS access key ID.
- key (str, optional):
The AWS secret access key.
- profile (str, optional):
The profile to use for AWS credentials.
- region (str, optional):
The AWS region where the EFS file system is located.
**kwargs(optional):Additional parameters that are passed to the boto3 client method.
CLI Example:
salt 'my-minion' boto3_efs.get_tags efs-id
- saltext.boto3.modules.boto3_efs.set_security_groups(mounttargetid, securitygroup, keyid=None, key=None, profile=None, region=None, **kwargs)[source]¶
Modifies the set of security groups in effect for a mount target.
- mounttargetid (str):
ID of the mount target whose security groups will be modified
- securitygroup (list[str]):
List of no more than 5 VPC security group IDs.
- keyid (str, optional):
The AWS access key ID.
- key (str, optional):
The AWS secret access key.
- profile (str, optional):
The profile to use for AWS credentials.
- region (str, optional):
The AWS region where the EFS file system is located.
**kwargs(optional):Additional parameters that are passed to the boto3 client method.
CLI Example:
salt 'my-minion' boto3_efs.set_security_groups my-mount-target-id my-sec-group