security_group_rule#
Exec module for managing EC2 security groups.
- async idem_aws.exec.aws.ec2.security_group_rule.get(hub, ctx, resource_id: str) Dict [source]#
Get a SecurityGroup resource from AWS. Supply one of the inputs as the filter.
- Parameters:
resource_id (str) – ID of the security group.
- Returns:
Returns security group in present format
- Return type:
Dict[str, Any]
Examples
Calling this exec module function from the cli
idem exec aws.ec2.security_group.get resource_id="my_resource"
Using in a state:
my_unmanaged_resource: exec.run: - path: aws.ec2.security_group.get - kwargs: resource_id: my_resource
- async idem_aws.exec.aws.ec2.security_group_rule.list_(hub, ctx, name: str = None, filters: List = None) Dict [source]#
Get a list of SecurityGroup resources from AWS. Supply one of the inputs as the filter.
- Parameters:
name (str, Optional) – The name of the Idem state.
filters (list[str, str], 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_security_groups
- Returns:
Returns security group list in present format
- Return type:
Dict[str, Any]
Examples
Calling this exec module function from the cli with filters
idem exec aws.ec2.security_group.list filters=[{'name': 'name', 'values': ['resource-name']}]
Using in a state:
my_unmanaged_resource: exec.run: - path: aws.ec2.security_group.list - kwargs: filters: - name: 'name' values: ['resource-name']