placement_group#
Exec module for managing EC2 placement groups.
- async idem_aws.exec.aws.ec2.placement_group.get(hub, ctx, name, resource_id: str = None, filters: List = None) Dict [source]#
Get an EC2 placement group resource from AWS. Supply one of the inputs as the filter.
Get a placement group by either resource_id (GroupName) or filters.
- Parameters:
name (str) – The name of the Idem state and the GroupName of the placement group.
resource_id (str, Optional) – AWS placement group group name to identify the resource.
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_placement_groups
- Request Syntax:
$ idem exec aws.ec2.placement_group.get name=string resouce_id=string filters=list
- Returns:
Dict
Examples
$ idem exec aws.ec2.placement_group.get name=idem_placement_group_name $ idem exec aws.ec2.placement_group.get name=null resource_id=my_placement_group $ idem exec aws.ec2.placement_group.get name=null filters="[{'name': 'group-name', 'values':['my_placement_group']}]"
- async idem_aws.exec.aws.ec2.placement_group.list_(hub, ctx, name: str = None, filters: List = None) Dict [source]#
Get a list of EC2 placement group resources from AWS. Supply one of the inputs as the filter.
Get a list of placement groups by idem name (group name) or filters.
- Parameters:
name (str, Optional) – 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_placement_groups
- Request Syntax:
$ idem exec aws.ec2.placement_group.get name=string filters=list
- Returns:
Dict
Examples
$ idem exec aws.ec2.placement_group.get name=idem_placement_group_name $ idem exec aws.ec2.placement_group.get name=null filters="[{'name': 'group-name', 'values':['my_placement_group']}]"