ip_set#

Exec module for managing AWS WAFV2 IPSet resources.

async idem_aws.exec.aws.wafv2.ip_set.get(hub, ctx, name: str, scope: str, resource_id: str)[source]#

Get an IPSets resource from AWS WAFV2.

Get a single IPSet from AWS. The function returns None when no resource is found.

Parameters:
  • name (str) – This is the name of the IPSet in AWS.

  • scope (str) – Specifies whether this is for an Amazon CloudFront distribution or for a regional application. Scope is required to find the resource id for the given IPSet. For regional applications, you can use any of the endpoints in the list. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool. For Amazon CloudFront applications, you must use the API endpoint listed for US East (N. Virginia): us-east-1.

  • resource_id (str) – It is a unique identifier for the ip set in AWS.

Examples

Calling from the CLI:

idem exec aws.wafv2.ip_set.get name= "unmanaged_ipsets" scope="REGIONAL" resource_id="resource_id"

Calling this exec module function from within a state:

my_unmanaged_resource:
  exec.run:
    - path: aws.wafv2.ip_set.get
    - kwargs:
        name: unmanaged-resource-name
        scope: scope-name
        resource_id: aws-resource-id
async idem_aws.exec.aws.wafv2.ip_set.list_(hub, ctx, scope: str)[source]#

Get the list of IPSets resources from AWS WAFV2.

Parameters:

scope (str) – Specifies whether this is for an Amazon CloudFront distribution or for a regional application. Scope is required to find the resource id for the given IPSet. For regional applications, you can use any of the endpoints in the list. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool. For Amazon CloudFront applications, you must use the API endpoint listed for US East (N. Virginia): us-east-1.

Examples

Calling from the CLI:

idem exec aws.wafv2.ip_set.list scope="REGIONAL"

Calling this exec module function from within a state:

my_unmanaged_resource:
  exec.run:
    - path: aws.wafv2.ip_set.list
    - kwargs:
        scope: scope-name