简体   繁体   English

不等于 boto3 过滤器

[英]Not equal boto3 filter

I want to describe security groups which don't have a default as a group name!我想描述没有默认组名的安全组!

SGresponse = client.describe_security_groups(  
    Filters=[
        {
            'Name': 'vpc-id',
            'Values': [vpcids]
         },
         {
        'Name': 'group-name',
        'Values': default
        }
     ]
 )

There is no such negation in Boto3 filters unfortunatly.不幸的是,Boto3 过滤器中没有这样的否定。

You will have to loop on the results and remove the security groups that you don't need yourself.您将不得不循环结果并删除您自己不需要的安全组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM