@@ -104,18 +104,19 @@ info:
104104 Assets supports queries with filters more complex than equality. The operator (special
105105 character(s)) is placed immediately after the equals sign in the query string parameter.
106106
107- | Operation | Character(s) | Format | Example |
108- |-----------------------|--------------|----------------------|------------------------------|
109- | Greater than | `>` | String or number | `x.y=>5`, `x.y=>Gryffindor` |
110- | Less than | `<` | String or number | `x.y=<5`, `x.y=<Slytherin` |
111- | Not equal | `!` | Scalar | `x.name=!Draco` |
112- | Is not | `!!` | Scalar | `x.name=!!Draco` |
113- | Is null | `$null` | None | `x.name=$null` |
114- | Is one of | `@` or `<<` | Comma separated list | `x.name=@Harry,Ron,Hermione` |
115- | List contains | `>>` | Scalar | `x.parents=>>Lilly` |
116- | List does not contain | `!>>` | Scalar | `x.parents=!>>Lilly` |
117- | String contains | `%` | String | `x.name=%Percival` |
118- | Regex Match | `~` | String | `x.name=~neighbou?r` |
107+ | Operation | Character(s) | Format | Example |
108+ |-----------------------|----------------|----------------------|----------------------------------|
109+ | Greater than | `>` | String or number | `x.y=>5`, `x.y=>Gryffindor` |
110+ | Less than | `<` | String or number | `x.y=<5`, `x.y=<Slytherin` |
111+ | Not equal | `!` | Scalar | `x.name=!Draco` |
112+ | Is not | `!!` | Scalar | `x.name=!!Draco` |
113+ | Is null | `$null` | None | `x.name=$null` |
114+ | Is one of | `@` or `<<` | Comma separated list | `x.name=@Harry,Ron,Hermione` |
115+ | List contains | `>>` | Scalar | `x.parents=>>Lilly` |
116+ | List does not contain | `!>>` | Scalar | `x.parents=!>>Lilly` |
117+ | String contains | `%` | String | `x.name=%Percival` |
118+ | Regex Match | `~` | String | `x.name=~neighbou?r` |
119+ | CIDR IP matching | `:cidr_match:` | String | `x.ip=:cidr_match:192.168.0.0/16`|
119120
120121 There is no way to escape these special characters.
121122
@@ -325,6 +326,11 @@ paths:
325326 source : |-
326327 curl "https://api.cloudinsight.alertlogic.com/assets_query/v1/12345678/assets?asset_types=r:region&r..vpc=false" \
327328 -H "x-aims-auth-token: $TOKEN" -H "accept: application/json"
329+ - lang : Shell
330+ label : Get account hosts that private IP address match given CIDR block
331+ source : |-
332+ curl "https://api.cloudinsight.alertlogic.com/assets_query/v1/12345678/assets?asset_types=h:host&h.private_ip_addresses=:cidr_match:192.168.0.0/16" \
333+ -H "x-aims-auth-token: $TOKEN" -H "accept: application/json"
328334 responses :
329335 " 200 " :
330336 description : OK
@@ -347,6 +353,8 @@ paths:
347353 $ref : ' examples.yaml#/QueryAssetsAssetTypesVPCSubnetHostInRegionExample'
348354 asset_types=region & not related to a vpc :
349355 $ref : ' examples.yaml#/QueryAssetsAssetTypesRegionNotRelatedToAVpcExample'
356+ asset_types=host & ip_addresses match CIDR 192.168.0.0/16 :
357+ $ref : ' examples.yaml#/QueryAssetsAssetTypesHostCIDRMatchExample'
350358 topo_chain=false :
351359 $ref : ' examples.yaml#/QueryAssetsTopoChainFalseExample'
352360 " 400 " :
@@ -419,6 +427,11 @@ paths:
419427 source : |-
420428 curl "https://api.cloudinsight.alertlogic.com/assets_query/v1/12345678/deployments/844581E6-4018-4DA8-8CF9-0D7C49EF171B/assets?asset_types=r:region&r..vpc=false" \
421429 -H "x-aims-auth-token: $TOKEN" -H "accept: application/json"
430+ - lang : Shell
431+ label : Get account hosts that private IP address match given CIDR block
432+ source : |-
433+ curl "https://api.cloudinsight.alertlogic.com/assets_query/v1/12345678/deployments/844581E6-4018-4DA8-8CF9-0D7C49EF171B/assets?asset_types=h:host&h.private_ip_addresses=:cidr_match:192.168.0.0/16" \
434+ -H "x-aims-auth-token: $TOKEN" -H "accept: application/json"
422435 responses :
423436 " 200 " :
424437 description : OK
@@ -441,6 +454,8 @@ paths:
441454 $ref : ' examples.yaml#/QueryAssetsAssetTypesVPCSubnetHostInRegionExample'
442455 asset_types=region & not related to a vpc :
443456 $ref : ' examples.yaml#/QueryAssetsAssetTypesRegionNotRelatedToAVpcExample'
457+ asset_types=host & ip_addresses match CIDR 192.168.0.0/16 :
458+ $ref : ' examples.yaml#/QueryAssetsAssetTypesHostCIDRMatchExample'
444459 topo_chain=false :
445460 $ref : ' examples.yaml#/QueryAssetsTopoChainFalseExample'
446461 " 400 " :
0 commit comments