security_group#

Exec module for managing EC2 security groups.

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

Get a SecurityGroup resource from AWS. Supply one of the inputs as the filter.

Parameters:
Returns:

Returns security group 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.get name="my_resource" filters=[{'name': 'name', 'values': ['resource-name']}]

Using in a state:

my_unmanaged_resource:
  exec.run:
    - path: aws.ec2.security_group.get
    - kwargs:
        name: my_resource
        filters:
            - name: 'name'
              values: ['resource-name']
async idem_aws.exec.aws.ec2.security_group.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:
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 name="my_resource" filters=[{'name': 'name', 'values': ['resource-name']}]

Using in a state:

my_unmanaged_resource:
  exec.run:
    - path: aws.ec2.security_group.list
    - kwargs:
        name: my_resource
        filters:
            - name: 'name'
              values: ['resource-name']