虚拟私有云 VPC-查询安全组资源实例:请求示例

时间:2024-09-04 09:19:05

请求示例

  • 查询安全组资源实例,action为filter时请求体。

    POST https://{Endpoint}/v2.0/{project_id}/security-groups/resource_instances/action
    
    {
      "offset" : "0",
      "limit" : "100",
      "action" : "filter",
      "matches" : [ {
        "key" : "resource_name",
        "value" : "resource1"
      } ],
      "tags" : [ {
        "key" : "key1",
        "values" : [ "*value1", "value2" ]
      } ]
    }
  • example-2:action为count时请求体

    POST https://{Endpoint}/v2.0/{project_id}/security-groups/resource_instances/action
    
    {
      "action" : "count",
      "tags" : [ {
        "key" : "key1",
        "values" : [ "value1", "value2" ]
      }, {
        "key" : "key2",
        "values" : [ "value1", "value2" ]
      } ],
      "matches" : [ {
        "key" : "resource_name",
        "value" : "resource1"
      } ]
    }
support.huaweicloud.com/api-vpc/ListSecurityGroupsByTags.html