listResourcesForWebACL method

Future<ListResourcesForWebACLResponse> listResourcesForWebACL({
  1. required String webACLArn,
  2. ResourceType? resourceType,
})
Retrieves an array of the Amazon Resource Names (ARNs) for the regional resources that are associated with the specified web ACL. If you want the list of AWS CloudFront resources, use the AWS CloudFront call ListDistributionsByWebACLId.

May throw WAFInternalErrorException. May throw WAFNonexistentItemException. May throw WAFInvalidParameterException. May throw WAFInvalidOperationException.

Parameter webACLArn : The Amazon Resource Name (ARN) of the Web ACL.

Parameter resourceType : Used for web ACLs that are scoped for regional applications. A regional application can be an Application Load Balancer (ALB), an API Gateway REST API, or an AppSync GraphQL API.

Implementation

Future<ListResourcesForWebACLResponse> listResourcesForWebACL({
  required String webACLArn,
  ResourceType? resourceType,
}) async {
  ArgumentError.checkNotNull(webACLArn, 'webACLArn');
  _s.validateStringLength(
    'webACLArn',
    webACLArn,
    20,
    2048,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSWAF_20190729.ListResourcesForWebACL'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'WebACLArn': webACLArn,
      if (resourceType != null) 'ResourceType': resourceType.toValue(),
    },
  );

  return ListResourcesForWebACLResponse.fromJson(jsonResponse.body);
}