vpc#
Exec module for managing EC2 Virtual Private Gateways.
- async idem_aws.exec.aws.ec2.vpc.get(hub, ctx, name, resource_id: str = None, default: bool = None, filters: List = None) Dict [source]#
Get a VPC resource from AWS
- Parameters:
name (str) – The name of the Idem state
resource_id (str, Optional) – ID of the VPC
default (bool, Optional) – Indicate whether the VPC is the default VPC
filters (list[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_vpcs
- Returns:
Returns VPC in present format
- Return type:
Dict[str, Any]
Examples
Calling this exec module function from the cli with filters
idem exec aws.ec2.vpc.get name="my_resource"
Using in a state:
my_unmanaged_resource: exec.run: - path: aws.ec2.vpc.get - kwargs: name: my_resource
- async idem_aws.exec.aws.ec2.vpc.list_(hub, ctx, name: str = None, filters: List = None, default: bool = None) Dict [source]#
Get a list of VPC resources from AWS
- Parameters:
name (str, Optional) – The name of the Idem state
default (bool, Optional) – Indicate whether the VPC is the default VPC
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_vpcs
- Returns:
Returns VPC in present format
- Return type:
Dict[str, Any]
Examples
Calling this exec module function from the cli with filters
idem exec aws.ec2.vpc.get name="my_resource"
Using in a state:
my_unmanaged_resource: exec.run: - path: aws.ec2.vpc.get - kwargs: name: my_resource