Skip to content

Commit 2094fc3

Browse files
author
cibot
committed
Definitions Update assets_query
1 parent 9ce3480 commit 2094fc3

File tree

3 files changed

+85
-6
lines changed

3 files changed

+85
-6
lines changed

alsdkdefs/apis/assets_query/assets_query.v1.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,43 @@ paths:
367367
$ref: 'responses.yaml#/NotFound'
368368
"503":
369369
$ref: 'responses.yaml#/UnavailableError'
370+
/assets_query/v1/{account_id}/asset_groups:
371+
parameters:
372+
- $ref: 'parameters.yaml#/UrlParamAccountId'
373+
get:
374+
operationId: list_asset_groups
375+
summary: List Asset Groups (Preview)
376+
description: |-
377+
**Disclaimer: This endpoint is currently under development. The request parameters, response format
378+
or the endpoint itself may be changed or removed at any time without notice.**
379+
380+
List asset groups for given account.
381+
tags:
382+
- Queries
383+
x-codeSamples:
384+
- lang: Shell
385+
label: List Asset Groups
386+
source: |-
387+
curl "https://api.cloudinsight.alertlogic.com/assets_query/v1/19000001/asset_groups" \
388+
-H "x-aims-auth-token: $TOKEN" -H "accept: application/json"
389+
responses:
390+
"200":
391+
description: OK
392+
content:
393+
application/json:
394+
schema:
395+
$ref: 'schemas.yaml#/ListAssetGroupsResponse'
396+
examples:
397+
Topology Preview Example:
398+
$ref: 'examples.yaml#/ListAssetGroupsExample'
399+
"401":
400+
$ref: 'responses.yaml#/Unauthorized'
401+
"403":
402+
$ref: 'responses.yaml#/Forbidden'
403+
"503":
404+
$ref: 'responses.yaml#/UnavailableError'
405+
security:
406+
- x-aims-auth-token: []
370407
/assets_query/v1/{account_id}/deployments/{deployment_id}/assets:
371408
parameters:
372409
- $ref: 'parameters.yaml#/UrlParamAccountId'

alsdkdefs/apis/assets_query/examples.yaml

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3162,15 +3162,15 @@ QueryTopologyOverviewExample:
31623162
standard: 1
31633163
vpc: 1
31643164
assets:
3165-
- - region/aws/us-east-1
3166-
- "/aws/us-east-1/vpc/vpc-1"
3165+
- - region:/aws/us-east-1
3166+
- vpc:/aws/us-east-1/vpc/vpc-1
31673167
- subnet:/aws/us-east-1/subnet/subnet-1a-web
31683168
- host:/aws/us-east-1/host/web-1a-1
3169-
- - region/aws/us-east-1
3170-
- "/aws/us-east-1/vpc/vpc-1"
3169+
- - region:/aws/us-east-1
3170+
- vpc:/aws/us-east-1/vpc/vpc-1
31713171
- subnet:/aws/us-east-1/subnet/subnet-2
31723172
- host:/aws/us-east-1/host/alertlogic-ids-1
3173-
- - region/aws/us-west-2
3173+
- - region:/aws/us-west-2
31743174
-
31753175
-
31763176
-
@@ -3179,7 +3179,8 @@ QueryTopologyOverviewExample:
31793179
alertlogic_agent: false
31803180
alertlogic_appliance: true
31813181
created_on: 1427317669928
3182-
key: "/aws/us-east-1/host/web-1a-1"
3182+
groups: ["PCI assets"]
3183+
key: "/aws/us-east-1/host/alertlogic-ids-1"
31833184
state: running
31843185
threat_level: 2
31853186
threatiness: 2
@@ -3201,6 +3202,7 @@ QueryTopologyOverviewExample:
32013202
type: image
32023203
region/aws/us-east-1:
32033204
created_on: 1427317669194
3205+
groups: ["PCI assets"]
32043206
key: "/aws/us-east-1"
32053207
threat_level: 3
32063208
threatiness: 22
@@ -3220,12 +3222,14 @@ QueryTopologyOverviewExample:
32203222
subnet:/aws/us-east-1/subnet/subnet-2:
32213223
alertlogic_security: true
32223224
created_on: 1427317669627
3225+
groups: ["PCI assets"]
32233226
key: "/aws/us-east-1/subnet/subnet-2"
32243227
threat_level: 1
32253228
threatiness: 4
32263229
type: subnet
32273230
vpc:/aws/us-east-1/vpc/vpc-1:
32283231
created_on: 1427317669270
3232+
groups: ["PCI assets"]
32293233
key: "/aws/us-east-1/vpc/vpc-1"
32303234
threat_level: 3
32313235
threatiness: 22
@@ -4114,3 +4118,28 @@ QueryRemediationItemsMultipleDeploymentsGroupByAuditIdExample:
41144118
info: 0
41154119
low: 0
41164120
medium: 0
4121+
ListAssetGroupsExample:
4122+
value:
4123+
groups:
4124+
- type: asset-group
4125+
scopes:
4126+
- include:
4127+
- deployment.name:US Production
4128+
asset_types:
4129+
- host
4130+
key: Production assets
4131+
description: Production assets
4132+
criticality: 1
4133+
created_on: 1600724524156
4134+
- type: asset-group
4135+
scopes:
4136+
- include:
4137+
- deployment:any
4138+
- host.private_ip_addresses::cidr_match:192.168.0.0/16
4139+
asset_types:
4140+
- host
4141+
key: cidr-assets
4142+
description: Hosts in 192.168.0.0/16
4143+
criticality: 1
4144+
created_on: 1600724524178
4145+
count: 2

alsdkdefs/apis/assets_query/schemas.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,3 +630,16 @@ ConcludeRemediationsRequestBody:
630630
$ref: '#/VulnerabilityIds'
631631
required:
632632
- operation
633+
ListAssetGroupsResponse:
634+
title: List Asset Groups response
635+
type: object
636+
properties:
637+
groups:
638+
type: array
639+
description: An array group objects. Each element in the array is an asset group.
640+
items:
641+
type: object
642+
description: Group object.
643+
count:
644+
type: integer
645+
description: The count of `groups` in the response.

0 commit comments

Comments
 (0)