regex_pattern_set#
- async idem_aws.exec.aws.wafv2.regex_pattern_set.get(hub, ctx, name: str, resource_id: str, scope: str) Dict[str, Any] [source]#
Function for getting the wafv2 regular expression pattern set with name, Id and scope
Returns the state of a wafv2 regular expression pattern set
- Parameters:
name (str) – The name of the regex pattern set.
resource_id (str) – An identifier of the resource in the provider. Defaults to None.
scope (str) – Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows: CLI - Specify the Region when you use the CloudFront scope: –scope=CLOUDFRONT –region=us-east-1. API and SDKs - For all calls, use the Region endpoint us-east-1.
- Returns
Dict[bool, list, dict or None]:
- result(bool):
Whether the result of the function has been successful (
True
) or not (False
).- comment(list):
A list of messages.
- ret(dict or None):
The WAFV2 regular expression pattern set in “present” format.
Examples
Calling this exec module function from the cli:
idem exec aws.wafv2.regex_pattern_set.get name="idem_name" resource_id="resource_id" scope="REGIONAL"
Calling this exec module function from within a state module in pure python:
async def state_function(hub, ctx, name, resource_id, **kwargs): ret = await hub.exec.aws.wafv2.regex_pattern_set.get( ctx, name=name, resource_id=resource_id, scope="REGIONAL" )
- async idem_aws.exec.aws.wafv2.regex_pattern_set.list_(hub, ctx, name: str, scope: str) Dict [source]#
Fetch a list of WAFV2 regex pattern sets
- Parameters:
name (str) – The name of the Idem state.
scope (str) – Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows: CLI - Specify the Region when you use the CloudFront scope: –scope=CLOUDFRONT –region=us-east-1. API and SDKs - For all calls, use the Region endpoint us-east-1.
- Returns
Dict[bool, list, dict or None]:
- result(bool):
Whether the result of the function has been successful (
True
) or not (False
).- comment(list):
A list of messages.
- ret(list or None):
List of WAFV2 regular expression pattern sets in “present” format.
Examples
Calling this exec module function from the cli:
idem exec aws.wafv2.regex_pattern_set.list scope="REGIONAL"
Calling this exec module function from within a state module in pure python:
async def state_function(hub, ctx, name, resource_id, **kwargs): ret = await hub.exec.aws.wafv2.regex_pattern_set.list( ctx, scope="REGIONAL" )