volume#

Exec module for managing EC2 Volumes

async idem_aws.exec.aws.ec2.volume.get(hub, ctx, name: str, resource_id: str = None, filters: List = None, tags: Dict[str, str] = None) Dict[source]#

Get a single Volume from AWS. If more than one resource is found, the first resource returned from AWS will be used. The function returns None when no resource is found.

Parameters:
  • resource_id (str, Optional) – Volume ID of the volume.

  • filters (list, Optional) – One or more filters: for example, tag :<key>, tag-key. A complete list of filters can be found at https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.describe_volumes

  • tags (dict, Optional) –

    The dict of tags to filter by in the format {tag-key: tag-value} . For example, to find all resources that have a tag with the key “Owner” and the value “TeamA” , specify {Owner: TeamA}

    • Key (str):

      The key name for the tag to be used to filter by.

    • Value(str):

      The value associated with this tag to filter by.

async idem_aws.exec.aws.ec2.volume.list_(hub, ctx, name: str = None, filters: List = None, tags: Dict[str, str] = None) Dict[source]#

Fetch a list of volumes from AWS. The function returns empty list when no resource is found.

Parameters:
  • name (str) – The name of the Idem state.

  • filters (list, Optional) – One or more filters: for example, tag :<key>, tag-key. A complete list of filters can be found at https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.describe_volumes

  • tags (dict, Optional) –

    The dict of tags to filter by in the format {tag-key: tag-value} . For example, to find all resources that have a tag with the key “Owner” and the value “TeamA” , specify {Owner: TeamA}

    • Key (str):

      The key name for the tag to be used to filter by.

    • Value(str):

      The value associated with this tag to filter by.