如何获取AWS WAF详细信息列表

时间:2019-11-13 15:58:57

标签: java amazon-web-services amazon-waf

我正在尝试从我的AWS账户中获取WAF列表。但我总是得到空值。

AWSWAF client = AWSWAFClientBuilder.standard().withRegion(Regions.US_EAST_1)
            .withCredentials(new StaticCredentialsProvider(awsCredentials)).build();
    ListWebACLsRequest request = new ListWebACLsRequest();
    ListWebACLsResult response = client.listWebACLs(request);
    System.out.println("Response " + response);
    List<WebACLSummary> webACLSummary = response.getWebACLs();
    System.out.println(" webACLSummary "+webACLSummary);
    webACLSummary.forEach(webACL -> {
        System.out.println("Web ACL " + webACL.getName() + " ACLID " + webACL.getWebACLId());
    });

响应:

Response {WebACLs: []} 
 webACLSummary []

但是在我的AWS区域中,我有“ AWS WAF”,我的代码中没有任何内容。

0 个答案:

没有答案
相关问题