diff --git a/.apigentools-info b/.apigentools-info index e3bd32c9e0d8..ffdeea58670c 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-10-17 14:49:41.353030", - "spec_repo_commit": "a9d493f5" + "regenerated": "2023-10-18 20:16:44.113785", + "spec_repo_commit": "a1e5664c" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-10-17 14:49:41.367377", - "spec_repo_commit": "a9d493f5" + "regenerated": "2023-10-18 20:16:44.132808", + "spec_repo_commit": "a1e5664c" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 58a515c094de..9d5748eacf23 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -3441,6 +3441,117 @@ components: $ref: '#/components/schemas/ConfluentResourceResponseData' type: array type: object + Container: + description: Container object. + properties: + attributes: + $ref: '#/components/schemas/ContainerAttributes' + id: + description: Container ID. + type: string + type: + $ref: '#/components/schemas/ContainerType' + type: object + ContainerAttributes: + description: Attributes for a container. + properties: + container_id: + description: The ID of the container. + type: string + created_at: + description: Time the container was created. + type: string + host: + description: Hostname of the host running the container. + type: string + image_digest: + description: Digest of the compressed image manifest. + nullable: true + type: string + image_name: + description: Name of the associated container image. + type: string + image_tags: + description: List of image tags associated with the container image. + items: + type: string + nullable: true + type: array + name: + description: Name of the container. + type: string + started_at: + description: Time the container was started. + type: string + state: + description: State of the container. This depends on the container runtime. + type: string + tags: + description: List of tags associated with the container. + items: + type: string + type: array + type: object + ContainerGroup: + description: Container group object. + properties: + attributes: + $ref: '#/components/schemas/ContainerGroupAttributes' + id: + description: Container Group ID. + type: string + relationships: + $ref: '#/components/schemas/ContainerGroupRelationships' + type: + $ref: '#/components/schemas/ContainerGroupType' + type: object + ContainerGroupAttributes: + description: Attributes for a container group. + properties: + count: + description: Number of containers in the group. + format: int64 + type: integer + tags: + description: Tags from the group name parsed in key/value format. + type: object + type: object + ContainerGroupRelationships: + description: Relationships to containers inside a container group. + properties: + containers: + $ref: '#/components/schemas/ContainerGroupRelationshipsLink' + type: object + ContainerGroupRelationshipsData: + description: Links data. + items: + description: A link data. + type: string + type: array + ContainerGroupRelationshipsLink: + description: Relationships to Containers inside a Container Group. + properties: + data: + $ref: '#/components/schemas/ContainerGroupRelationshipsData' + links: + $ref: '#/components/schemas/ContainerGroupRelationshipsLinks' + type: object + ContainerGroupRelationshipsLinks: + description: Links attributes. + properties: + related: + description: Link to related containers. + type: string + type: object + ContainerGroupType: + default: container_group + description: Type of container group. + enum: + - container_group + example: container_group + type: string + x-enum-varnames: + - CONTAINER_GROUP ContainerImage: description: Container Image object. properties: @@ -3751,6 +3862,96 @@ components: description: Link to current page. type: string type: object + ContainerItem: + description: Possible Container models. + oneOf: + - $ref: '#/components/schemas/Container' + - $ref: '#/components/schemas/ContainerGroup' + ContainerMeta: + description: Response metadata object. + properties: + pagination: + $ref: '#/components/schemas/ContainerMetaPage' + type: object + ContainerMetaPage: + description: Paging attributes. + properties: + cursor: + description: The cursor used to get the current results, if any. + type: string + limit: + description: Number of results returned + format: int32 + maximum: 10000 + minimum: 0 + type: integer + next_cursor: + description: The cursor used to get the next results, if any. + type: string + prev_cursor: + description: The cursor used to get the previous results, if any. + nullable: true + type: string + total: + description: Total number of records that match the query. + format: int64 + type: integer + type: + $ref: '#/components/schemas/ContainerMetaPageType' + type: object + ContainerMetaPageType: + default: cursor_limit + description: Type of Container pagination. + enum: + - cursor_limit + example: cursor_limit + type: string + x-enum-varnames: + - CURSOR_LIMIT + ContainerType: + default: container + description: Type of container. + enum: + - container + example: container + type: string + x-enum-varnames: + - CONTAINER + ContainersResponse: + description: List of containers. + properties: + data: + description: Array of Container objects. + items: + $ref: '#/components/schemas/ContainerItem' + type: array + links: + $ref: '#/components/schemas/ContainersResponseLinks' + meta: + $ref: '#/components/schemas/ContainerMeta' + type: object + ContainersResponseLinks: + description: Pagination links. + properties: + first: + description: Link to the first page. + type: string + last: + description: Link to the last page. + nullable: true + type: string + next: + description: Link to the next page. + nullable: true + type: string + prev: + description: Link to previous page. + nullable: true + type: string + self: + description: Link to current page. + type: string + type: object ContentEncoding: description: HTTP header used to compress the media-type. enum: @@ -19814,6 +20015,86 @@ paths: x-unstable: '**Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/containers: + get: + description: Get all containers for your organization. + operationId: ListContainers + parameters: + - description: Comma-separated list of tags to filter containers by. + example: env:prod,short_image:cassandra + in: query + name: filter[tags] + required: false + schema: + type: string + - description: Comma-separated list of tags to group containers by. + example: datacenter,cluster + in: query + name: group_by + required: false + schema: + type: string + - description: Attribute to sort containers by. + example: started_at + in: query + name: sort + required: false + schema: + type: string + - description: Maximum number of results returned. + in: query + name: page[size] + required: false + schema: + default: 1000 + format: int32 + maximum: 10000 + minimum: 1 + type: integer + - description: 'String to query the next page of results. + + This key is provided with each valid response from the API in `meta.pagination.next_cursor`.' + in: query + name: page[cursor] + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ContainersResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get All Containers + tags: + - Containers + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.pagination.next_cursor + limitParam: page[size] + resultsPath: data + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/current_user/application_keys: get: description: List all application keys available for current user @@ -29384,6 +29665,8 @@ tags: - description: The Container Images API allows you to query Container Image data for your organization. name: Container Images +- description: The Containers API allows you to query container data for your organization. + name: Containers - description: 'Interact with your dashboard lists through the API to organize, find, and share all of your dashboards with your team and diff --git a/cassettes/v2/Containers_24604017/Get-All-Container-groups-returns-OK-response_1264594663/frozen.json b/cassettes/v2/Containers_24604017/Get-All-Container-groups-returns-OK-response_1264594663/frozen.json new file mode 100644 index 000000000000..a0cc124f1151 --- /dev/null +++ b/cassettes/v2/Containers_24604017/Get-All-Container-groups-returns-OK-response_1264594663/frozen.json @@ -0,0 +1 @@ +"2023-10-16T15:58:19.882Z" diff --git a/cassettes/v2/Containers_24604017/Get-All-Container-groups-returns-OK-response_1264594663/recording.har b/cassettes/v2/Containers_24604017/Get-All-Container-groups-returns-OK-response_1264594663/recording.har new file mode 100644 index 000000000000..8929a6e9b6c5 --- /dev/null +++ b/cassettes/v2/Containers_24604017/Get-All-Container-groups-returns-OK-response_1264594663/recording.har @@ -0,0 +1,62 @@ +{ + "log": { + "_recordingName": "Containers/Get All Container groups returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "71dc56312331609d91f0308dcb79adeb", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 526, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [ + { + "name": "group_by", + "value": "short_image" + } + ], + "url": "https://api.datadoghq.com/api/v2/containers?group_by=short_image" + }, + "response": { + "bodySize": 28078, + "content": { + "mimeType": "application/json", + "size": 28078, + "text": "{\"data\": [{\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 123, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}, {\"type\": \"container_group\", \"id\": \"test_id\", \"attributes\": {\"count\": 1, \"tags\": {\"short_image\": \"test_short_image\"}}, \"relationships\": {\"containers\": {\"links\": {\"related\": \"test_related\"}, \"data\": []}}}], \"meta\": {\"pagination\": {\"cursor\": \"\", \"prev_cursor\": null, \"next_cursor\": \"\", \"limit\": 100, \"type\": \"cursor_limit\", \"total\": 0}}, \"links\": {\"self\": \"https://api.datadoghq.com/api/v2/containers?group_by=short_image\", \"last\": null, \"next\": null, \"prev\": null, \"first\": \"https://api.datadoghq.com/api/v2/containers?group_by=short_image&page[size]=100\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2023-10-16T15:58:19.891Z", + "time": 1084 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Containers_24604017/Get-All-Containers-returns-OK-response-with-pagination_386015098/frozen.json b/cassettes/v2/Containers_24604017/Get-All-Containers-returns-OK-response-with-pagination_386015098/frozen.json new file mode 100644 index 000000000000..8709f66e0eb2 --- /dev/null +++ b/cassettes/v2/Containers_24604017/Get-All-Containers-returns-OK-response-with-pagination_386015098/frozen.json @@ -0,0 +1 @@ +"2023-10-16T16:01:59.143Z" diff --git a/cassettes/v2/Containers_24604017/Get-All-Containers-returns-OK-response-with-pagination_386015098/recording.har b/cassettes/v2/Containers_24604017/Get-All-Containers-returns-OK-response-with-pagination_386015098/recording.har new file mode 100644 index 000000000000..850b8f4de719 --- /dev/null +++ b/cassettes/v2/Containers_24604017/Get-All-Containers-returns-OK-response-with-pagination_386015098/recording.har @@ -0,0 +1,115 @@ +{ + "log": { + "_recordingName": "Containers/Get All Containers returns \"OK\" response with pagination", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "fcdd0bd27680ec8e0170c1daa2cab42f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 522, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [ + { + "name": "page", + "value": { + "size": "2" + } + } + ], + "url": "https://api.datadoghq.com/api/v2/containers?page%5Bsize%5D=2" + }, + "response": { + "bodySize": 4663, + "content": { + "mimeType": "application/json", + "size": 4663, + "text": "{\"data\":[{\"type\":\"container\",\"id\":\"15e90400bf66f26f4e7d3098406c30e11e2bc921\",\"attributes\":{\"name\":\"go-sample-app-modebeige_0\",\"created_at\":\"2023-10-12T13:46:51\",\"started_at\":\"2023-10-12T13:46:51\",\"state\":\"running\",\"container_id\":\"22f5bcc1-492a-435c-6d45-889e\",\"host\":\"compute-0-6c2718cc-dfd1-4768-9237-08132d11122f\",\"image_name\":\"\",\"image_tags\":null,\"image_digest\":null,\"tags\":[\"app_guid:c3e77ef9-1248-4ef8-aa75-9bf063ad1512\",\"app_id:c3e77ef9-1248-4ef8-aa75-9bf063ad1512\",\"app_instance_guid:22f5bcc1-492a-435c-6d45-889e\",\"app_instance_index:0\",\"app_name:go-sample-app-modebeige\",\"bosh_address:10.0.4.8\",\"bosh_az:us-central1-f\",\"bosh_deployment:cf-df4d3b7647b663c19610\",\"bosh_id:6c2718cc-dfd1-4768-9237-08132d11122f\",\"bosh_index:0\",\"bosh_ip:10.0.4.8\",\"bosh_job:compute\",\"bosh_name:compute\",\"cf-df4d3b7647b663c19610\",\"cf-df4d3b7647b663c19610-compute\",\"cloudfoundry\",\"compute\",\"container_name:go-sample-app-modebeige_0\",\"created_at:2023-10-09t08:30:42z\",\"deployment:cf-df4d3b7647b663c19610\",\"director:p-bosh\",\"env:pcf-modebeige\",\"foo:bar\",\"host:compute-0-6c2718cc-dfd1-4768-9237-08132d11122f\",\"id:6c2718cc-dfd1-4768-9237-08132d11122f\",\"index:0\",\"index:6c2718cc-dfd1-4768-9237-08132d11122f\",\"instance-id:3340011639055189196\",\"instance-type:n1-highmem-2\",\"instance_group:compute\",\"internal-hostname:vm-6dd9ae88-c203-463e-580e-26a7b561b870.c.cf-platform-engineering-cipp2.internal\",\"ip:10.0.4.8\",\"job:compute\",\"label_key:label_value\",\"metadata_key:metadata_value\",\"name:compute/6c2718cc-dfd1-4768-9237-08132d11122f\",\"numeric_project_id:946413340424\",\"org_id:9f4bffd9-6234-49dd-bc4e-d0282a7cf333\",\"org_name:Org 1\",\"p-bosh\",\"p-bosh-cf-df4d3b7647b663c19610\",\"p-bosh-cf-df4d3b7647b663c19610-compute\",\"pcf-modebeige\",\"project:cf-platform-engineering-cipp2\",\"service:go-sample-app-modebeige\",\"sidecar_count:1\",\"sidecar_present:true\",\"space_id:6c41b5e8-8ed8-465f-902a-48e03b465ffe\",\"space_name:Space 1\",\"user_data:_server_:_name_:_vm-6dd9ae88-c203-463e-580e-26a7b561b870_registry_:_endpoint_:_://:_:0_dns_:_nameserver_:_8.8.8.8\",\"version:1.0.0\",\"zone:us-central1-f\"]}},{\"type\":\"container\",\"id\":\"15e90400f5a7fd8072ebcc2e7eadb58c7acf1fe6\",\"attributes\":{\"name\":\"python-sample-app-modebeige_0\",\"created_at\":\"2023-10-12T13:46:51\",\"started_at\":\"2023-10-12T13:46:51\",\"state\":\"running\",\"container_id\":\"288bdf1c-ee25-43a2-6470-11e0\",\"host\":\"compute-0-6c2718cc-dfd1-4768-9237-08132d11122f\",\"image_name\":\"\",\"image_tags\":null,\"image_digest\":null,\"tags\":[\"app_guid:3d575664-cced-4000-b2fd-2ab4199722c7\",\"app_id:3d575664-cced-4000-b2fd-2ab4199722c7\",\"app_instance_guid:288bdf1c-ee25-43a2-6470-11e0\",\"app_instance_index:0\",\"app_name:python-sample-app-modebeige\",\"bosh_address:10.0.4.8\",\"bosh_az:us-central1-f\",\"bosh_deployment:cf-df4d3b7647b663c19610\",\"bosh_id:6c2718cc-dfd1-4768-9237-08132d11122f\",\"bosh_index:0\",\"bosh_ip:10.0.4.8\",\"bosh_job:compute\",\"bosh_name:compute\",\"cf-df4d3b7647b663c19610\",\"cf-df4d3b7647b663c19610-compute\",\"cloudfoundry\",\"compute\",\"container_name:python-sample-app-modebeige_0\",\"created_at:2023-10-09t08:30:42z\",\"deployment:cf-df4d3b7647b663c19610\",\"director:p-bosh\",\"env:pcf-modebeige\",\"foo:bar\",\"host:compute-0-6c2718cc-dfd1-4768-9237-08132d11122f\",\"id:6c2718cc-dfd1-4768-9237-08132d11122f\",\"index:0\",\"index:6c2718cc-dfd1-4768-9237-08132d11122f\",\"instance-id:3340011639055189196\",\"instance-type:n1-highmem-2\",\"instance_group:compute\",\"internal-hostname:vm-6dd9ae88-c203-463e-580e-26a7b561b870.c.cf-platform-engineering-cipp2.internal\",\"ip:10.0.4.8\",\"job:compute\",\"label_key:label_value\",\"metadata_key:metadata_value\",\"name:compute/6c2718cc-dfd1-4768-9237-08132d11122f\",\"numeric_project_id:946413340424\",\"org_id:9f4bffd9-6234-49dd-bc4e-d0282a7cf333\",\"org_name:Org 1\",\"p-bosh\",\"p-bosh-cf-df4d3b7647b663c19610\",\"p-bosh-cf-df4d3b7647b663c19610-compute\",\"pcf-modebeige\",\"project:cf-platform-engineering-cipp2\",\"service:python-sample-app-modebeige\",\"sidecar_count:1\",\"sidecar_present:true\",\"space_id:6c41b5e8-8ed8-465f-902a-48e03b465ffe\",\"space_name:Space 1\",\"user_data:_server_:_name_:_vm-6dd9ae88-c203-463e-580e-26a7b561b870_registry_:_endpoint_:_://:_:0_dns_:_nameserver_:_8.8.8.8\",\"version:1.0.0\",\"zone:us-central1-f\"]}}],\"meta\":{\"pagination\":{\"cursor\":\"\",\"prev_cursor\":null,\"next_cursor\":\"c3RhcnRlZDoxNjk3MTE4NDExMDAwLjAwMDAwMHxpZC5yYXc6Mjg4YmRmMWMtZWUyNS00M2EyLTY0NzAtMTFlMA==\",\"limit\":2,\"type\":\"cursor_limit\",\"total\":10}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/containers?page%5Bsize%5D=2\",\"last\":null,\"next\":\"https://api.datadoghq.com/api/v2/containers?page[cursor]=c3RhcnRlZDoxNjk3MTE4NDExMDAwLjAwMDAwMHxpZC5yYXc6Mjg4YmRmMWMtZWUyNS00M2EyLTY0NzAtMTFlMA==&page[size]=2\",\"prev\":null,\"first\":\"https://api.datadoghq.com/api/v2/containers?page[size]=2\"}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 653, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2023-10-16T16:01:59.153Z", + "time": 492 + }, + { + "_id": "0907a899864434539bb619daf9428f81", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 632, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [ + { + "name": "page", + "value": { + "cursor": "c3RhcnRlZDoxNjk3MTE4NDExMDAwLjAwMDAwMHxpZC5yYXc6Mjg4YmRmMWMtZWUyNS00M2EyLTY0NzAtMTFlMA==", + "size": "2" + } + } + ], + "url": "https://api.datadoghq.com/api/v2/containers?page%5Bsize%5D=2&page%5Bcursor%5D=c3RhcnRlZDoxNjk3MTE4NDExMDAwLjAwMDAwMHxpZC5yYXc6Mjg4YmRmMWMtZWUyNS00M2EyLTY0NzAtMTFlMA%3D%3D" + }, + "response": { + "bodySize": 4861, + "content": { + "mimeType": "application/json", + "size": 4861, + "text": "{\"data\":[{\"type\":\"container\",\"id\":\"15e90400d72ce956da898384526fb3411a96ac48\",\"attributes\":{\"name\":\"java-sample-app-modebeige_0\",\"created_at\":\"2023-10-12T13:46:51\",\"started_at\":\"2023-10-12T13:46:51\",\"state\":\"running\",\"container_id\":\"5b2a80d0-da17-4e9b-4260-d0e1\",\"host\":\"compute-0-6c2718cc-dfd1-4768-9237-08132d11122f\",\"image_name\":\"\",\"image_tags\":null,\"image_digest\":null,\"tags\":[\"app_guid:cda17465-f9b8-4577-b53a-57a161a1326b\",\"app_id:cda17465-f9b8-4577-b53a-57a161a1326b\",\"app_instance_guid:5b2a80d0-da17-4e9b-4260-d0e1\",\"app_instance_index:0\",\"app_name:java-sample-app-modebeige\",\"bosh_address:10.0.4.8\",\"bosh_az:us-central1-f\",\"bosh_deployment:cf-df4d3b7647b663c19610\",\"bosh_id:6c2718cc-dfd1-4768-9237-08132d11122f\",\"bosh_index:0\",\"bosh_ip:10.0.4.8\",\"bosh_job:compute\",\"bosh_name:compute\",\"cf-df4d3b7647b663c19610\",\"cf-df4d3b7647b663c19610-compute\",\"cloudfoundry\",\"compute\",\"container_name:java-sample-app-modebeige_0\",\"created_at:2023-10-09t08:30:42z\",\"deployment:cf-df4d3b7647b663c19610\",\"director:p-bosh\",\"env:pcf-modebeige\",\"foo:bar\",\"host:compute-0-6c2718cc-dfd1-4768-9237-08132d11122f\",\"id:6c2718cc-dfd1-4768-9237-08132d11122f\",\"index:0\",\"index:6c2718cc-dfd1-4768-9237-08132d11122f\",\"instance-id:3340011639055189196\",\"instance-type:n1-highmem-2\",\"instance_group:compute\",\"internal-hostname:vm-6dd9ae88-c203-463e-580e-26a7b561b870.c.cf-platform-engineering-cipp2.internal\",\"ip:10.0.4.8\",\"job:compute\",\"label_key:label_value\",\"metadata_key:metadata_value\",\"name:compute/6c2718cc-dfd1-4768-9237-08132d11122f\",\"numeric_project_id:946413340424\",\"org_id:9f4bffd9-6234-49dd-bc4e-d0282a7cf333\",\"org_name:Org 1\",\"p-bosh\",\"p-bosh-cf-df4d3b7647b663c19610\",\"p-bosh-cf-df4d3b7647b663c19610-compute\",\"pcf-modebeige\",\"project:cf-platform-engineering-cipp2\",\"service:java-sample-app-modebeige\",\"sidecar_count:1\",\"sidecar_present:true\",\"space_id:6c41b5e8-8ed8-465f-902a-48e03b465ffe\",\"space_name:Space 1\",\"user_data:_server_:_name_:_vm-6dd9ae88-c203-463e-580e-26a7b561b870_registry_:_endpoint_:_://:_:0_dns_:_nameserver_:_8.8.8.8\",\"version:1.0.0\",\"zone:us-central1-f\"]}}],\"meta\":{\"pagination\":{\"cursor\":\"c3RhcnRlZDoxNjk3MTE4NDExMDAwLjAwMDAwMHxpZC5yYXc6Mjg4YmRmMWMtZWUyNS00M2EyLTY0NzAtMTFlMA==\",\"prev_cursor\":null,\"next_cursor\":\"c3RhcnRlZDoxNjk3MTE4NDExMDAwLjAwMDAwMHxpZC5yYXc6ODY4OWY2ODUtZTQ0MS00ODJjLTYwNDMtNWQ5ZA==\",\"limit\":2,\"type\":\"cursor_limit\",\"total\":10}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/containers?page%5Bsize%5D=2&page%5Bcursor%5D=c3RhcnRlZDoxNjk3MTE4NDExMDAwLjAwMDAwMHxpZC5yYXc6Mjg4YmRmMWMtZWUyNS00M2EyLTY0NzAtMTFlMA%3D%3D\",\"last\":null,\"next\":\"https://api.datadoghq.com/api/v2/containers?page[cursor]=c3RhcnRlZDoxNjk3MTE4NDExMDAwLjAwMDAwMHxpZC5yYXc6ODY4OWY2ODUtZTQ0MS00ODJjLTYwNDMtNWQ5ZA==&page[size]=2\",\"prev\":null,\"first\":\"https://api.datadoghq.com/api/v2/containers?page[size]=2\"}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 653, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2023-10-16T16:01:59.655Z", + "time": 1127 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Containers_24604017/Get-All-Containers-returns-OK-response_595949014/frozen.json b/cassettes/v2/Containers_24604017/Get-All-Containers-returns-OK-response_595949014/frozen.json new file mode 100644 index 000000000000..9f38bae3edb1 --- /dev/null +++ b/cassettes/v2/Containers_24604017/Get-All-Containers-returns-OK-response_595949014/frozen.json @@ -0,0 +1 @@ +"2023-10-16T15:45:21.038Z" diff --git a/cassettes/v2/Containers_24604017/Get-All-Containers-returns-OK-response_595949014/recording.har b/cassettes/v2/Containers_24604017/Get-All-Containers-returns-OK-response_595949014/recording.har new file mode 100644 index 000000000000..36dbdd1eca96 --- /dev/null +++ b/cassettes/v2/Containers_24604017/Get-All-Containers-returns-OK-response_595949014/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Containers/Get All Containers returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "4a1b23dbe6efdc2cf52a0e7c18a1b944", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 505, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/containers" + }, + "response": { + "bodySize": 21111, + "content": { + "mimeType": "application/json", + "size": 21111, + "text": "{\"data\":[{\"type\":\"container\",\"id\":\"15e90400bf66f26f4e7d3098406c30e11e2bc921\",\"attributes\":{\"name\":\"test_name\",\"created_at\":\"2023-10-12T13:46:51\",\"started_at\":\"2023-10-12T13:46:51\",\"state\":\"running\",\"container_id\":\"22f5bcc1-492a-435c-6d45-889e\",\"host\":\"compute-0-6c2718cc-dfd1-4768-9237-08132d11122f\",\"image_name\":\"\",\"image_tags\":null,\"image_digest\":null,\"tags\":[\"app_guid:c3e77ef9-1248-4ef8-aa75-9bf063ad1512\",\"app_id:c3e77ef9-1248-4ef8-aa75-9bf063ad1512\",\"app_instance_guid:22f5bcc1-492a-435c-6d45-889e\",\"app_instance_index:0\",\"app_name:go-sample-app-modebeige\",\"bosh_address:10.0.4.8\",\"bosh_az:us-central1-f\",\"bosh_deployment:cf-df4d3b7647b663c19610\",\"bosh_id:6c2718cc-dfd1-4768-9237-08132d11122f\",\"bosh_index:0\",\"bosh_ip:10.0.4.8\",\"bosh_job:compute\",\"bosh_name:compute\",\"cf-df4d3b7647b663c19610\",\"cf-df4d3b7647b663c19610-compute\",\"cloudfoundry\",\"compute\",\"container_name:go-sample-app-modebeige_0\",\"created_at:2023-10-09t08:30:42z\",\"deployment:cf-df4d3b7647b663c19610\",\"director:p-bosh\",\"env:pcf-modebeige\",\"foo:bar\",\"host:compute-0-6c2718cc-dfd1-4768-9237-08132d11122f\",\"id:6c2718cc-dfd1-4768-9237-08132d11122f\",\"index:0\",\"index:6c2718cc-dfd1-4768-9237-08132d11122f\",\"instance-id:3340011639055189196\",\"instance-type:n1-highmem-2\",\"instance_group:compute\",\"internal-hostname:vm-6dd9ae88-c203-463e-580e-26a7b561b870.c.cf-platform-engineering-cipp2.internal\",\"ip:10.0.4.8\",\"job:compute\",\"label_key:label_value\",\"metadata_key:metadata_value\",\"name:compute/6c2718cc-dfd1-4768-9237-08132d11122f\",\"numeric_project_id:946413340424\",\"org_id:9f4bffd9-6234-49dd-bc4e-d0282a7cf333\",\"org_name:Org 1\",\"p-bosh\",\"p-bosh-cf-df4d3b7647b663c19610\",\"p-bosh-cf-df4d3b7647b663c19610-compute\",\"pcf-modebeige\",\"project:cf-platform-engineering-cipp2\",\"service:go-sample-app-modebeige\",\"sidecar_count:1\",\"sidecar_present:true\",\"space_id:6c41b5e8-8ed8-465f-902a-48e03b465ffe\",\"space_name:Space 1\",\"user_data:_server_:_name_:_vm-6dd9ae88-c203-463e-580e-26a7b561b870_registry_:_endpoint_:_://:_:0_dns_:_nameserver_:_8.8.8.8\",\"version:1.0.0\",\"zone:us-central1-f\"]}},{\"type\":\"container\",\"id\":\"15e90400f5a7fd8072ebcc2e7eadb58c7acf1fe6\",\"attributes\":{\"name\":\"python-sample-app-modebeige_0\",\"created_at\":\"2023-10-12T13:46:51\",\"started_at\":\"2023-10-12T13:46:51\",\"state\":\"running\",\"container_id\":\"288bdf1c-ee25-43a2-6470-11e0\",\"host\":\"compute-0-6c2718cc-dfd1-4768-9237-08132d11122f\",\"image_name\":\"\",\"image_tags\":null,\"image_digest\":null,\"tags\":[\"app_guid:3d575664-cced-4000-b2fd-2ab4199722c7\",\"app_id:3d575664-cced-4000-b2fd-2ab4199722c7\",\"app_instance_guid:288bdf1c-ee25-43a2-6470-11e0\",\"app_instance_index:0\",\"app_name:python-sample-app-modebeige\",\"bosh_address:10.0.4.8\",\"bosh_az:us-central1-f\",\"bosh_deployment:cf-df4d3b7647b663c19610\",\"bosh_id:6c2718cc-dfd1-4768-9237-08132d11122f\",\"bosh_index:0\",\"bosh_ip:10.0.4.8\",\"bosh_job:compute\",\"bosh_name:compute\",\"cf-df4d3b7647b663c19610\",\"cf-df4d3b7647b663c19610-compute\",\"cloudfoundry\",\"compute\",\"container_name:python-sample-app-modebeige_0\",\"created_at:2023-10-09t08:30:42z\",\"deployment:cf-df4d3b7647b663c19610\",\"director:p-bosh\",\"env:pcf-modebeige\",\"foo:bar\",\"host:compute-0-6c2718cc-dfd1-4768-9237-08132d11122f\",\"id:6c2718cc-dfd1-4768-9237-08132d11122f\",\"index:0\",\"index:6c2718cc-dfd1-4768-9237-08132d11122f\",\"instance-id:3340011639055189196\",\"instance-type:n1-highmem-2\",\"instance_group:compute\",\"internal-hostname:vm-6dd9ae88-c203-463e-580e-26a7b561b870.c.cf-platform-engineering-cipp2.internal\",\"ip:10.0.4.8\",\"job:compute\",\"label_key:label_value\",\"metadata_key:metadata_value\",\"name:compute/6c2718cc-dfd1-4768-9237-08132d11122f\",\"numeric_project_id:946413340424\",\"org_id:9f4bffd9-6234-49dd-bc4e-d0282a7cf333\",\"org_name:Org 1\",\"p-bosh\",\"p-bosh-cf-df4d3b7647b663c19610\",\"p-bosh-cf-df4d3b7647b663c19610-compute\",\"pcf-modebeige\",\"project:cf-platform-engineering-cipp2\",\"service:python-sample-app-modebeige\",\"sidecar_count:1\",\"sidecar_present:true\",\"space_id:6c41b5e8-8ed8-465f-902a-48e03b465ffe\",\"space_name:Space 1\",\"user_data:_server_:_name_:_vm-6dd9ae88-c203-463e-580e-26a7b561b870_registry_:_endpoint_:_://:_:0_dns_:_nameserver_:_8.8.8.8\",\"version:1.0.0\",\"zone:us-central1-f\"]}}],\"meta\":{\"pagination\":{\"cursor\":\"\",\"prev_cursor\":null,\"next_cursor\":\"c3RhcnRlZDoxNjk3NDY2MDI4MDAwLjAwMDAwMHxpZC5yYXc6M2U0MTU3ZjgtZjdmNC00OTdjLTRmNWMtMzk0Zg==\",\"limit\":1000,\"type\":\"cursor_limit\",\"total\":10}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/containers\",\"last\":null,\"next\":\"https://api.datadoghq.com/api/v2/containers?page[cursor]=c3RhcnRlZDoxNjk3NDY2MDI4MDAwLjAwMDAwMHxpZC5yYXc6M2U0MTU3ZjgtZjdmNC00OTdjLTRmNWMtMzk0Zg==&page[size]=1000\",\"prev\":null,\"first\":\"https://api.datadoghq.com/api/v2/containers?page[size]=1000\"}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2023-10-16T15:45:21.046Z", + "time": 579 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/containers/ListContainers.ts b/examples/v2/containers/ListContainers.ts new file mode 100644 index 000000000000..029b923ffc6d --- /dev/null +++ b/examples/v2/containers/ListContainers.ts @@ -0,0 +1,18 @@ +/** + * Get All Containers returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listContainers"] = true; +const apiInstance = new v2.ContainersApi(configuration); + +apiInstance + .listContainers() + .then((data: v2.ContainersResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/containers/ListContainers_2175733917.ts b/examples/v2/containers/ListContainers_2175733917.ts new file mode 100644 index 000000000000..b0e8b27a8f9c --- /dev/null +++ b/examples/v2/containers/ListContainers_2175733917.ts @@ -0,0 +1,22 @@ +/** + * Get All Container groups returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listContainers"] = true; +const apiInstance = new v2.ContainersApi(configuration); + +const params: v2.ContainersApiListContainersRequest = { + groupBy: "short_image", +}; + +apiInstance + .listContainers(params) + .then((data: v2.ContainersResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/containers/ListContainers_931009654.ts b/examples/v2/containers/ListContainers_931009654.ts new file mode 100644 index 000000000000..6a8387422455 --- /dev/null +++ b/examples/v2/containers/ListContainers_931009654.ts @@ -0,0 +1,23 @@ +/** + * Get All Containers returns "OK" response with pagination + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listContainers"] = true; +const apiInstance = new v2.ContainersApi(configuration); + +const params: v2.ContainersApiListContainersRequest = { + pageSize: 2, +}; + +(async () => { + try { + for await (const item of apiInstance.listContainersWithPagination(params)) { + console.log(item); + } + } catch (error) { + console.error(error); + } +})(); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index c9b115794a32..d9ca34b40cb1 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -2737,6 +2737,29 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "ContainerImagesResponse", }, + "v2.ListContainers": { + "filterTags": { + "type": "string", + "format": "", + }, + "groupBy": { + "type": "string", + "format": "", + }, + "sort": { + "type": "string", + "format": "", + }, + "pageSize": { + "type": "number", + "format": "int32", + }, + "pageCursor": { + "type": "string", + "format": "", + }, + "operationResponseType": "ContainersResponse", + }, "v2.DeleteDashboardListItems": { "dashboardListId": { "type": "number", diff --git a/features/v2/containers.feature b/features/v2/containers.feature new file mode 100644 index 000000000000..42625b9e039c --- /dev/null +++ b/features/v2/containers.feature @@ -0,0 +1,36 @@ +@endpoint(containers) @endpoint(containers-v2) +Feature: Containers + The Containers API allows you to query container data for your + organization. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Containers" API + And operation "ListContainers" enabled + And new "ListContainers" request + + @replay-only @team:DataDog/processes + Scenario: Get All Container groups returns "OK" response + Given request contains "group_by" parameter with value "short_image" + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.count" is equal to 123 + + @generated @skip @team:DataDog/processes + Scenario: Get All Containers returns "Bad Request" response + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/processes + Scenario: Get All Containers returns "OK" response + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.name" is equal to "test_name" + + @replay-only @skip-validation @team:DataDog/processes @with-pagination + Scenario: Get All Containers returns "OK" response with pagination + Given request contains "page[size]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items diff --git a/features/v2/undo.json b/features/v2/undo.json index 60e785f3bdf5..58eb5421deff 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -237,6 +237,12 @@ "type": "safe" } }, + "ListContainers": { + "tag": "Containers", + "undo": { + "type": "safe" + } + }, "ListCurrentUserApplicationKeys": { "tag": "Key Management", "undo": { diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index fd9b0151d102..aa94edde76bf 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -215,6 +215,7 @@ export function createConfiguration( conf.backoffMultiplier || 2, { "v2.listContainerImages": false, + "v2.listContainers": false, "v2.listEvents": false, "v2.searchEvents": false, "v2.createIncident": false, diff --git a/packages/datadog-api-client-v2/apis/ContainersApi.ts b/packages/datadog-api-client-v2/apis/ContainersApi.ts new file mode 100644 index 000000000000..87b4bc1847d8 --- /dev/null +++ b/packages/datadog-api-client-v2/apis/ContainersApi.ts @@ -0,0 +1,279 @@ +import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { ContainerItem } from "../models/ContainerItem"; +import { ContainersResponse } from "../models/ContainersResponse"; + +export class ContainersApiRequestFactory extends BaseAPIRequestFactory { + public async listContainers( + filterTags?: string, + groupBy?: string, + sort?: string, + pageSize?: number, + pageCursor?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listContainers'"); + if (!_config.unstableOperations["v2.listContainers"]) { + throw new Error("Unstable operation 'listContainers' is disabled"); + } + + // Path Params + const localVarPath = "/api/v2/containers"; + + // Make Request Context + const requestContext = _config + .getServer("v2.ContainersApi.listContainers") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (filterTags !== undefined) { + requestContext.setQueryParam( + "filter[tags]", + ObjectSerializer.serialize(filterTags, "string", "") + ); + } + if (groupBy !== undefined) { + requestContext.setQueryParam( + "group_by", + ObjectSerializer.serialize(groupBy, "string", "") + ); + } + if (sort !== undefined) { + requestContext.setQueryParam( + "sort", + ObjectSerializer.serialize(sort, "string", "") + ); + } + if (pageSize !== undefined) { + requestContext.setQueryParam( + "page[size]", + ObjectSerializer.serialize(pageSize, "number", "int32") + ); + } + if (pageCursor !== undefined) { + requestContext.setQueryParam( + "page[cursor]", + ObjectSerializer.serialize(pageCursor, "string", "") + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class ContainersApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listContainers + * @throws ApiException if the response code was not in [200, 299] + */ + public async listContainers( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: ContainersResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ContainersResponse" + ) as ContainersResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 403 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.info(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ContainersResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ContainersResponse", + "" + ) as ContainersResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface ContainersApiListContainersRequest { + /** + * Comma-separated list of tags to filter containers by. + * @type string + */ + filterTags?: string; + /** + * Comma-separated list of tags to group containers by. + * @type string + */ + groupBy?: string; + /** + * Attribute to sort containers by. + * @type string + */ + sort?: string; + /** + * Maximum number of results returned. + * @type number + */ + pageSize?: number; + /** + * String to query the next page of results. + * This key is provided with each valid response from the API in `meta.pagination.next_cursor`. + * @type string + */ + pageCursor?: string; +} + +export class ContainersApi { + private requestFactory: ContainersApiRequestFactory; + private responseProcessor: ContainersApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: ContainersApiRequestFactory, + responseProcessor?: ContainersApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new ContainersApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new ContainersApiResponseProcessor(); + } + + /** + * Get all containers for your organization. + * @param param The request object + */ + public listContainers( + param: ContainersApiListContainersRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.listContainers( + param.filterTags, + param.groupBy, + param.sort, + param.pageSize, + param.pageCursor, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listContainers(responseContext); + }); + }); + } + + /** + * Provide a paginated version of listContainers returning a generator with all the items. + */ + public async *listContainersWithPagination( + param: ContainersApiListContainersRequest = {}, + options?: Configuration + ): AsyncGenerator { + let pageSize = 1000; + if (param.pageSize !== undefined) { + pageSize = param.pageSize; + } + param.pageSize = pageSize; + while (true) { + const requestContext = await this.requestFactory.listContainers( + param.filterTags, + param.groupBy, + param.sort, + param.pageSize, + param.pageCursor, + options + ); + const responseContext = await this.configuration.httpApi.send( + requestContext + ); + + const response = await this.responseProcessor.listContainers( + responseContext + ); + const responseData = response.data; + if (responseData === undefined) { + break; + } + const results = responseData; + for (const item of results) { + yield item; + } + if (results.length < pageSize) { + break; + } + const cursorMeta = response.meta; + if (cursorMeta === undefined) { + break; + } + const cursorMetaPagination = cursorMeta.pagination; + if (cursorMetaPagination === undefined) { + break; + } + const cursorMetaPaginationNextCursor = cursorMetaPagination.nextCursor; + if (cursorMetaPaginationNextCursor === undefined) { + break; + } + + param.pageCursor = cursorMetaPaginationNextCursor; + } + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 60212e548b34..211414b56629 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -71,6 +71,11 @@ export { ContainerImagesApi, } from "./apis/ContainerImagesApi"; +export { + ContainersApiListContainersRequest, + ContainersApi, +} from "./apis/ContainersApi"; + export { DashboardListsApiCreateDashboardListItemsRequest, DashboardListsApiDeleteDashboardListItemsRequest, @@ -584,6 +589,14 @@ export { ConfluentResourceResponseAttributes } from "./models/ConfluentResourceR export { ConfluentResourceResponseData } from "./models/ConfluentResourceResponseData"; export { ConfluentResourcesResponse } from "./models/ConfluentResourcesResponse"; export { ConfluentResourceType } from "./models/ConfluentResourceType"; +export { Container } from "./models/Container"; +export { ContainerAttributes } from "./models/ContainerAttributes"; +export { ContainerGroup } from "./models/ContainerGroup"; +export { ContainerGroupAttributes } from "./models/ContainerGroupAttributes"; +export { ContainerGroupRelationships } from "./models/ContainerGroupRelationships"; +export { ContainerGroupRelationshipsLink } from "./models/ContainerGroupRelationshipsLink"; +export { ContainerGroupRelationshipsLinks } from "./models/ContainerGroupRelationshipsLinks"; +export { ContainerGroupType } from "./models/ContainerGroupType"; export { ContainerImage } from "./models/ContainerImage"; export { ContainerImageAttributes } from "./models/ContainerImageAttributes"; export { ContainerImageFlavor } from "./models/ContainerImageFlavor"; @@ -601,6 +614,13 @@ export { ContainerImagesResponse } from "./models/ContainerImagesResponse"; export { ContainerImagesResponseLinks } from "./models/ContainerImagesResponseLinks"; export { ContainerImageType } from "./models/ContainerImageType"; export { ContainerImageVulnerabilities } from "./models/ContainerImageVulnerabilities"; +export { ContainerItem } from "./models/ContainerItem"; +export { ContainerMeta } from "./models/ContainerMeta"; +export { ContainerMetaPage } from "./models/ContainerMetaPage"; +export { ContainerMetaPageType } from "./models/ContainerMetaPageType"; +export { ContainersResponse } from "./models/ContainersResponse"; +export { ContainersResponseLinks } from "./models/ContainersResponseLinks"; +export { ContainerType } from "./models/ContainerType"; export { ContentEncoding } from "./models/ContentEncoding"; export { CostByOrg } from "./models/CostByOrg"; export { CostByOrgAttributes } from "./models/CostByOrgAttributes"; diff --git a/packages/datadog-api-client-v2/models/Container.ts b/packages/datadog-api-client-v2/models/Container.ts new file mode 100644 index 000000000000..04759a0294c8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/Container.ts @@ -0,0 +1,59 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ContainerAttributes } from "./ContainerAttributes"; +import { ContainerType } from "./ContainerType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Container object. + */ +export class Container { + /** + * Attributes for a container. + */ + "attributes"?: ContainerAttributes; + /** + * Container ID. + */ + "id"?: string; + /** + * Type of container. + */ + "type"?: ContainerType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ContainerAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "ContainerType", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return Container.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ContainerAttributes.ts b/packages/datadog-api-client-v2/models/ContainerAttributes.ts new file mode 100644 index 000000000000..86e14b724205 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainerAttributes.ts @@ -0,0 +1,113 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for a container. + */ +export class ContainerAttributes { + /** + * The ID of the container. + */ + "containerId"?: string; + /** + * Time the container was created. + */ + "createdAt"?: string; + /** + * Hostname of the host running the container. + */ + "host"?: string; + /** + * Digest of the compressed image manifest. + */ + "imageDigest"?: string; + /** + * Name of the associated container image. + */ + "imageName"?: string; + /** + * List of image tags associated with the container image. + */ + "imageTags"?: Array; + /** + * Name of the container. + */ + "name"?: string; + /** + * Time the container was started. + */ + "startedAt"?: string; + /** + * State of the container. This depends on the container runtime. + */ + "state"?: string; + /** + * List of tags associated with the container. + */ + "tags"?: Array; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + containerId: { + baseName: "container_id", + type: "string", + }, + createdAt: { + baseName: "created_at", + type: "string", + }, + host: { + baseName: "host", + type: "string", + }, + imageDigest: { + baseName: "image_digest", + type: "string", + }, + imageName: { + baseName: "image_name", + type: "string", + }, + imageTags: { + baseName: "image_tags", + type: "Array", + }, + name: { + baseName: "name", + type: "string", + }, + startedAt: { + baseName: "started_at", + type: "string", + }, + state: { + baseName: "state", + type: "string", + }, + tags: { + baseName: "tags", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ContainerAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ContainerGroup.ts b/packages/datadog-api-client-v2/models/ContainerGroup.ts new file mode 100644 index 000000000000..83fe4b798139 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainerGroup.ts @@ -0,0 +1,68 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ContainerGroupAttributes } from "./ContainerGroupAttributes"; +import { ContainerGroupRelationships } from "./ContainerGroupRelationships"; +import { ContainerGroupType } from "./ContainerGroupType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Container group object. + */ +export class ContainerGroup { + /** + * Attributes for a container group. + */ + "attributes"?: ContainerGroupAttributes; + /** + * Container Group ID. + */ + "id"?: string; + /** + * Relationships to containers inside a container group. + */ + "relationships"?: ContainerGroupRelationships; + /** + * Type of container group. + */ + "type"?: ContainerGroupType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ContainerGroupAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + relationships: { + baseName: "relationships", + type: "ContainerGroupRelationships", + }, + type: { + baseName: "type", + type: "ContainerGroupType", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ContainerGroup.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ContainerGroupAttributes.ts b/packages/datadog-api-client-v2/models/ContainerGroupAttributes.ts new file mode 100644 index 000000000000..300bebf9dc65 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainerGroupAttributes.ts @@ -0,0 +1,50 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for a container group. + */ +export class ContainerGroupAttributes { + /** + * Number of containers in the group. + */ + "count"?: number; + /** + * Tags from the group name parsed in key/value format. + */ + "tags"?: any; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + count: { + baseName: "count", + type: "number", + format: "int64", + }, + tags: { + baseName: "tags", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ContainerGroupAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ContainerGroupRelationships.ts b/packages/datadog-api-client-v2/models/ContainerGroupRelationships.ts new file mode 100644 index 000000000000..3d456426c456 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainerGroupRelationships.ts @@ -0,0 +1,42 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ContainerGroupRelationshipsLink } from "./ContainerGroupRelationshipsLink"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationships to containers inside a container group. + */ +export class ContainerGroupRelationships { + /** + * Relationships to Containers inside a Container Group. + */ + "containers"?: ContainerGroupRelationshipsLink; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + containers: { + baseName: "containers", + type: "ContainerGroupRelationshipsLink", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ContainerGroupRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ContainerGroupRelationshipsLink.ts b/packages/datadog-api-client-v2/models/ContainerGroupRelationshipsLink.ts new file mode 100644 index 000000000000..ea8634a7a20b --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainerGroupRelationshipsLink.ts @@ -0,0 +1,50 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ContainerGroupRelationshipsLinks } from "./ContainerGroupRelationshipsLinks"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationships to Containers inside a Container Group. + */ +export class ContainerGroupRelationshipsLink { + /** + * Links data. + */ + "data"?: Array; + /** + * Links attributes. + */ + "links"?: ContainerGroupRelationshipsLinks; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + }, + links: { + baseName: "links", + type: "ContainerGroupRelationshipsLinks", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ContainerGroupRelationshipsLink.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ContainerGroupRelationshipsLinks.ts b/packages/datadog-api-client-v2/models/ContainerGroupRelationshipsLinks.ts new file mode 100644 index 000000000000..2de16d54bc26 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainerGroupRelationshipsLinks.ts @@ -0,0 +1,41 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Links attributes. + */ +export class ContainerGroupRelationshipsLinks { + /** + * Link to related containers. + */ + "related"?: string; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + related: { + baseName: "related", + type: "string", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ContainerGroupRelationshipsLinks.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ContainerGroupType.ts b/packages/datadog-api-client-v2/models/ContainerGroupType.ts new file mode 100644 index 000000000000..2d1bba86a306 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainerGroupType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Type of container group. + */ + +export type ContainerGroupType = typeof CONTAINER_GROUP | UnparsedObject; +export const CONTAINER_GROUP = "container_group"; diff --git a/packages/datadog-api-client-v2/models/ContainerItem.ts b/packages/datadog-api-client-v2/models/ContainerItem.ts new file mode 100644 index 000000000000..0db605169448 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainerItem.ts @@ -0,0 +1,15 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { Container } from "./Container"; +import { ContainerGroup } from "./ContainerGroup"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Possible Container models. + */ + +export type ContainerItem = Container | ContainerGroup | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/ContainerMeta.ts b/packages/datadog-api-client-v2/models/ContainerMeta.ts new file mode 100644 index 000000000000..820d63b5b9cf --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainerMeta.ts @@ -0,0 +1,42 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ContainerMetaPage } from "./ContainerMetaPage"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response metadata object. + */ +export class ContainerMeta { + /** + * Paging attributes. + */ + "pagination"?: ContainerMetaPage; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + pagination: { + baseName: "pagination", + type: "ContainerMetaPage", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ContainerMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ContainerMetaPage.ts b/packages/datadog-api-client-v2/models/ContainerMetaPage.ts new file mode 100644 index 000000000000..db24bce7eaab --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainerMetaPage.ts @@ -0,0 +1,84 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ContainerMetaPageType } from "./ContainerMetaPageType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Paging attributes. + */ +export class ContainerMetaPage { + /** + * The cursor used to get the current results, if any. + */ + "cursor"?: string; + /** + * Number of results returned + */ + "limit"?: number; + /** + * The cursor used to get the next results, if any. + */ + "nextCursor"?: string; + /** + * The cursor used to get the previous results, if any. + */ + "prevCursor"?: string; + /** + * Total number of records that match the query. + */ + "total"?: number; + /** + * Type of Container pagination. + */ + "type"?: ContainerMetaPageType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + cursor: { + baseName: "cursor", + type: "string", + }, + limit: { + baseName: "limit", + type: "number", + format: "int32", + }, + nextCursor: { + baseName: "next_cursor", + type: "string", + }, + prevCursor: { + baseName: "prev_cursor", + type: "string", + }, + total: { + baseName: "total", + type: "number", + format: "int64", + }, + type: { + baseName: "type", + type: "ContainerMetaPageType", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ContainerMetaPage.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ContainerMetaPageType.ts b/packages/datadog-api-client-v2/models/ContainerMetaPageType.ts new file mode 100644 index 000000000000..498f026e5ffc --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainerMetaPageType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Type of Container pagination. + */ + +export type ContainerMetaPageType = typeof CURSOR_LIMIT | UnparsedObject; +export const CURSOR_LIMIT = "cursor_limit"; diff --git a/packages/datadog-api-client-v2/models/ContainerType.ts b/packages/datadog-api-client-v2/models/ContainerType.ts new file mode 100644 index 000000000000..a952b7b028ee --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainerType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Type of container. + */ + +export type ContainerType = typeof CONTAINER | UnparsedObject; +export const CONTAINER = "container"; diff --git a/packages/datadog-api-client-v2/models/ContainersResponse.ts b/packages/datadog-api-client-v2/models/ContainersResponse.ts new file mode 100644 index 000000000000..113303f1dae3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainersResponse.ts @@ -0,0 +1,60 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ContainerItem } from "./ContainerItem"; +import { ContainerMeta } from "./ContainerMeta"; +import { ContainersResponseLinks } from "./ContainersResponseLinks"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * List of containers. + */ +export class ContainersResponse { + /** + * Array of Container objects. + */ + "data"?: Array; + /** + * Pagination links. + */ + "links"?: ContainersResponseLinks; + /** + * Response metadata object. + */ + "meta"?: ContainerMeta; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + }, + links: { + baseName: "links", + type: "ContainersResponseLinks", + }, + meta: { + baseName: "meta", + type: "ContainerMeta", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ContainersResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ContainersResponseLinks.ts b/packages/datadog-api-client-v2/models/ContainersResponseLinks.ts new file mode 100644 index 000000000000..f4e9b7b44e49 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ContainersResponseLinks.ts @@ -0,0 +1,73 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Pagination links. + */ +export class ContainersResponseLinks { + /** + * Link to the first page. + */ + "first"?: string; + /** + * Link to the last page. + */ + "last"?: string; + /** + * Link to the next page. + */ + "next"?: string; + /** + * Link to previous page. + */ + "prev"?: string; + /** + * Link to current page. + */ + "self"?: string; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + first: { + baseName: "first", + type: "string", + }, + last: { + baseName: "last", + type: "string", + }, + next: { + baseName: "next", + type: "string", + }, + prev: { + baseName: "prev", + type: "string", + }, + self: { + baseName: "self", + type: "string", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ContainersResponseLinks.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 43fd4d128b9e..6823d3fd6720 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -130,6 +130,13 @@ import { ConfluentResourceResponse } from "./ConfluentResourceResponse"; import { ConfluentResourceResponseAttributes } from "./ConfluentResourceResponseAttributes"; import { ConfluentResourceResponseData } from "./ConfluentResourceResponseData"; import { ConfluentResourcesResponse } from "./ConfluentResourcesResponse"; +import { Container } from "./Container"; +import { ContainerAttributes } from "./ContainerAttributes"; +import { ContainerGroup } from "./ContainerGroup"; +import { ContainerGroupAttributes } from "./ContainerGroupAttributes"; +import { ContainerGroupRelationships } from "./ContainerGroupRelationships"; +import { ContainerGroupRelationshipsLink } from "./ContainerGroupRelationshipsLink"; +import { ContainerGroupRelationshipsLinks } from "./ContainerGroupRelationshipsLinks"; import { ContainerImage } from "./ContainerImage"; import { ContainerImageAttributes } from "./ContainerImageAttributes"; import { ContainerImageFlavor } from "./ContainerImageFlavor"; @@ -143,6 +150,10 @@ import { ContainerImageMetaPage } from "./ContainerImageMetaPage"; import { ContainerImageVulnerabilities } from "./ContainerImageVulnerabilities"; import { ContainerImagesResponse } from "./ContainerImagesResponse"; import { ContainerImagesResponseLinks } from "./ContainerImagesResponseLinks"; +import { ContainerMeta } from "./ContainerMeta"; +import { ContainerMetaPage } from "./ContainerMetaPage"; +import { ContainersResponse } from "./ContainersResponse"; +import { ContainersResponseLinks } from "./ContainersResponseLinks"; import { CostByOrg } from "./CostByOrg"; import { CostByOrgAttributes } from "./CostByOrgAttributes"; import { CostByOrgResponse } from "./CostByOrgResponse"; @@ -1000,9 +1011,12 @@ const enumsMap: { [key: string]: any[] } = { CloudflareAccountType: ["cloudflare-accounts"], ConfluentAccountType: ["confluent-cloud-accounts"], ConfluentResourceType: ["confluent-cloud-resources"], + ContainerGroupType: ["container_group"], ContainerImageGroupType: ["container_image_group"], ContainerImageMetaPageType: ["cursor_limit"], ContainerImageType: ["container_image"], + ContainerMetaPageType: ["cursor_limit"], + ContainerType: ["container"], ContentEncoding: ["identity", "gzip", "deflate"], CostByOrgType: ["cost_by_org"], DashboardType: [ @@ -1541,6 +1555,13 @@ const typeMap: { [index: string]: any } = { ConfluentResourceResponseAttributes: ConfluentResourceResponseAttributes, ConfluentResourceResponseData: ConfluentResourceResponseData, ConfluentResourcesResponse: ConfluentResourcesResponse, + Container: Container, + ContainerAttributes: ContainerAttributes, + ContainerGroup: ContainerGroup, + ContainerGroupAttributes: ContainerGroupAttributes, + ContainerGroupRelationships: ContainerGroupRelationships, + ContainerGroupRelationshipsLink: ContainerGroupRelationshipsLink, + ContainerGroupRelationshipsLinks: ContainerGroupRelationshipsLinks, ContainerImage: ContainerImage, ContainerImageAttributes: ContainerImageAttributes, ContainerImageFlavor: ContainerImageFlavor, @@ -1555,6 +1576,10 @@ const typeMap: { [index: string]: any } = { ContainerImageVulnerabilities: ContainerImageVulnerabilities, ContainerImagesResponse: ContainerImagesResponse, ContainerImagesResponseLinks: ContainerImagesResponseLinks, + ContainerMeta: ContainerMeta, + ContainerMetaPage: ContainerMetaPage, + ContainersResponse: ContainersResponse, + ContainersResponseLinks: ContainersResponseLinks, CostByOrg: CostByOrg, CostByOrgAttributes: CostByOrgAttributes, CostByOrgResponse: CostByOrgResponse, @@ -2388,6 +2413,7 @@ const oneOfMap: { [index: string]: string[] } = { CIAppGroupByMissing: ["string", "number"], CIAppGroupByTotal: ["boolean", "string", "number"], ContainerImageItem: ["ContainerImage", "ContainerImageGroup"], + ContainerItem: ["Container", "ContainerGroup"], DowntimeMonitorIdentifier: [ "DowntimeMonitorIdentifierId", "DowntimeMonitorIdentifierTags",