Exec module for managing Elastic Load Balancer V2 target groups

async, ctx, name: str, resource_id: str = None, load_balancer_arn: str = None) Dict[source]#

Pass required params to get a target group resource.


Users can specify one of the following to filter the results: the ARN of the load balancer, name of the target group, or the ARN of the given target group.

Order of precedence of input params while performing search: resource_id, load_balancer_arn and finally name. If resource_id is not None, regardless whether the 2 other values are None or not, search always is done by resource_id only.

  • name (str) – The name of the AWS ELBv2 Target Group. This name must be unique per region per account.

  • resource_id (str, Optional) – AWS ELBv2 Target Group ARN to identify the resource.

  • load_balancer_arn (str, Optional) – The Amazon Resource Name (ARN) of the load balancer.


Using in a state:

    - path: aws.elbv2.target_group.get
    - kwargs:
        resource_id: resource_id
        name: name
        load_balancer_arn: load_balancer_arn

Calling this exec function from the cli with resource_id

idem exec aws.elbv2.target_group.get resource_id="resource_id" name="name" load_balancer_arn="load_balancer_arn"

Calling this exec module function from within a state module in pure python

async def state_function(hub, ctx, resource_id, **kwargs):
    ret = await, resource_id=resource_id, name=name load_balancer_arn=load_balancer_arn)