Skip to content

Commit 9103b9b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit cde65b5 of spec repo
1 parent 6fd0722 commit 9103b9b

21 files changed

Lines changed: 1444 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 303 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12652,6 +12652,219 @@ components:
1265212652
type: string
1265312653
x-enum-varnames:
1265412654
- CLOUD_CONFIGURATION
12655+
CloudInventoryCloudProviderId:
12656+
description: |-
12657+
Cloud provider for this sync configuration (`aws`, `gcp`, or `azure`). For requests, must match the provider block supplied under `attributes`.
12658+
enum:
12659+
- aws
12660+
- gcp
12661+
- azure
12662+
example: aws
12663+
type: string
12664+
x-enum-varnames:
12665+
- AWS
12666+
- GCP
12667+
- AZURE
12668+
CloudInventoryCloudProviderRequestType:
12669+
description: JSON:API type for upsert sync configuration requests.
12670+
enum:
12671+
- cloud_provider
12672+
example: cloud_provider
12673+
type: string
12674+
x-enum-varnames:
12675+
- CLOUD_PROVIDER
12676+
CloudInventorySyncConfigAWSRequestAttributes:
12677+
description: AWS settings for the customer bucket that stores inventory reports.
12678+
properties:
12679+
aws_account_id:
12680+
description: AWS account ID that owns the inventory bucket.
12681+
example: "123456789012"
12682+
type: string
12683+
destination_bucket_name:
12684+
description: Name of the S3 bucket containing inventory files.
12685+
example: my-inventory-bucket
12686+
type: string
12687+
destination_bucket_region:
12688+
description: AWS Region of the inventory bucket.
12689+
example: us-east-1
12690+
type: string
12691+
destination_prefix:
12692+
description: Optional object key prefix for inventory files. Use `/` or omit for the entire bucket.
12693+
example: logs/
12694+
type: string
12695+
required:
12696+
- aws_account_id
12697+
- destination_bucket_name
12698+
- destination_bucket_region
12699+
type: object
12700+
CloudInventorySyncConfigAttributes:
12701+
description: Attributes for a cloud inventory sync configuration. Values beyond `id` may be omitted immediately after upsert.
12702+
properties:
12703+
aws_account_id:
12704+
description: AWS account ID for the inventory bucket.
12705+
example: "123456789012"
12706+
type: string
12707+
aws_bucket_name:
12708+
description: AWS S3 bucket name for inventory files.
12709+
example: my-inventory-bucket
12710+
type: string
12711+
aws_region:
12712+
description: AWS Region for the inventory bucket.
12713+
example: us-east-1
12714+
type: string
12715+
azure_client_id:
12716+
description: Azure AD application (client) ID.
12717+
example: 11111111-1111-1111-1111-111111111111
12718+
type: string
12719+
azure_container_name:
12720+
description: Azure blob container name.
12721+
example: inventory-container
12722+
type: string
12723+
azure_storage_account_name:
12724+
description: Azure storage account name.
12725+
example: mystorageaccount
12726+
type: string
12727+
azure_tenant_id:
12728+
description: Azure AD tenant ID.
12729+
example: 22222222-2222-2222-2222-222222222222
12730+
type: string
12731+
cloud_provider:
12732+
$ref: "#/components/schemas/CloudInventoryCloudProviderId"
12733+
error:
12734+
description: Human-readable error detail when sync is unhealthy.
12735+
example: ""
12736+
readOnly: true
12737+
type: string
12738+
error_code:
12739+
description: Machine-readable error code when sync is unhealthy.
12740+
example: ""
12741+
readOnly: true
12742+
type: string
12743+
gcp_bucket_name:
12744+
description: GCS bucket name for inventory files Datadog reads.
12745+
example: my-inventory-reports
12746+
type: string
12747+
gcp_project_id:
12748+
description: GCP project ID.
12749+
example: my-gcp-project
12750+
type: string
12751+
gcp_service_account_email:
12752+
description: Service account email for bucket access.
12753+
example: reader@my-gcp-project.iam.gserviceaccount.com
12754+
type: string
12755+
prefix:
12756+
description: Object key prefix or `/` when the entire bucket is synced.
12757+
example: logs/
12758+
readOnly: true
12759+
type: string
12760+
required:
12761+
- aws_bucket_name
12762+
- aws_account_id
12763+
- aws_region
12764+
- azure_storage_account_name
12765+
- azure_container_name
12766+
- azure_client_id
12767+
- azure_tenant_id
12768+
- gcp_bucket_name
12769+
- gcp_project_id
12770+
- gcp_service_account_email
12771+
- cloud_provider
12772+
- prefix
12773+
- error
12774+
- error_code
12775+
type: object
12776+
CloudInventorySyncConfigAzureRequestAttributes:
12777+
description: Azure settings for the storage account and container with inventory data.
12778+
properties:
12779+
client_id:
12780+
description: Azure AD application (client) ID used for access.
12781+
example: 11111111-1111-1111-1111-111111111111
12782+
type: string
12783+
container:
12784+
description: Blob container name.
12785+
example: inventory-container
12786+
type: string
12787+
resource_group:
12788+
description: Resource group containing the storage account.
12789+
example: my-resource-group
12790+
type: string
12791+
storage_account:
12792+
description: Storage account name.
12793+
example: mystorageaccount
12794+
type: string
12795+
subscription_id:
12796+
description: Azure subscription ID.
12797+
example: 33333333-3333-3333-3333-333333333333
12798+
type: string
12799+
tenant_id:
12800+
description: Azure AD tenant ID.
12801+
example: 22222222-2222-2222-2222-222222222222
12802+
type: string
12803+
required:
12804+
- client_id
12805+
- tenant_id
12806+
- subscription_id
12807+
- resource_group
12808+
- storage_account
12809+
- container
12810+
type: object
12811+
CloudInventorySyncConfigGCPRequestAttributes:
12812+
description: GCP settings for buckets involved in inventory reporting.
12813+
properties:
12814+
destination_bucket_name:
12815+
description: GCS bucket name where Datadog reads inventory reports.
12816+
example: my-inventory-reports
12817+
type: string
12818+
project_id:
12819+
description: GCP project ID for the inventory destination bucket.
12820+
example: my-gcp-project
12821+
type: string
12822+
service_account_email:
12823+
description: Service account email used to read the destination bucket.
12824+
example: reader@my-gcp-project.iam.gserviceaccount.com
12825+
type: string
12826+
source_bucket_name:
12827+
description: GCS bucket name that inventory reports are generated for.
12828+
example: my-monitored-bucket
12829+
type: string
12830+
required:
12831+
- project_id
12832+
- destination_bucket_name
12833+
- source_bucket_name
12834+
- service_account_email
12835+
type: object
12836+
CloudInventorySyncConfigResourceType:
12837+
description: JSON:API type for sync configuration resources.
12838+
enum:
12839+
- sync_configs
12840+
example: sync_configs
12841+
type: string
12842+
x-enum-varnames:
12843+
- SYNC_CONFIGS
12844+
CloudInventorySyncConfigResponse:
12845+
description: Response containing the upserted sync configuration. Additional read-only fields appear on list and get.
12846+
properties:
12847+
data:
12848+
$ref: "#/components/schemas/CloudInventorySyncConfigResponseData"
12849+
required:
12850+
- data
12851+
type: object
12852+
CloudInventorySyncConfigResponseData:
12853+
description: JSON:API data object for a sync configuration.
12854+
properties:
12855+
attributes:
12856+
$ref: "#/components/schemas/CloudInventorySyncConfigAttributes"
12857+
id:
12858+
description: Unique identifier for the recurring sync configuration.
12859+
example: abc123
12860+
type: string
12861+
type:
12862+
$ref: "#/components/schemas/CloudInventorySyncConfigResourceType"
12863+
required:
12864+
- id
12865+
- type
12866+
- attributes
12867+
type: object
1265512868
CloudWorkloadSecurityAgentPoliciesListResponse:
1265612869
description: "Response object that includes a list of Agent policies"
1265712870
properties:
@@ -80681,6 +80894,39 @@ components:
8068180894
meta:
8068280895
$ref: "#/components/schemas/KindResponseMeta"
8068380896
type: object
80897+
UpsertCloudInventorySyncConfigRequest:
80898+
description: Request body for creating or updating a cloud inventory sync configuration.
80899+
properties:
80900+
data:
80901+
$ref: "#/components/schemas/UpsertCloudInventorySyncConfigRequestData"
80902+
required:
80903+
- data
80904+
type: object
80905+
UpsertCloudInventorySyncConfigRequestAttributes:
80906+
description: |-
80907+
Provider-specific configuration. Include the object that matches `data.id` (`aws`, `gcp`, or `azure`).
80908+
properties:
80909+
aws:
80910+
$ref: "#/components/schemas/CloudInventorySyncConfigAWSRequestAttributes"
80911+
azure:
80912+
$ref: "#/components/schemas/CloudInventorySyncConfigAzureRequestAttributes"
80913+
gcp:
80914+
$ref: "#/components/schemas/CloudInventorySyncConfigGCPRequestAttributes"
80915+
type: object
80916+
UpsertCloudInventorySyncConfigRequestData:
80917+
description: JSON:API data envelope for an upsert sync configuration request.
80918+
properties:
80919+
attributes:
80920+
$ref: "#/components/schemas/UpsertCloudInventorySyncConfigRequestAttributes"
80921+
id:
80922+
$ref: "#/components/schemas/CloudInventoryCloudProviderId"
80923+
type:
80924+
$ref: "#/components/schemas/CloudInventoryCloudProviderRequestType"
80925+
required:
80926+
- type
80927+
- id
80928+
- attributes
80929+
type: object
8068480930
Urgency:
8068580931
description: Specifies the level of urgency for a routing rule (low, high, or dynamic).
8068680932
enum:
@@ -82895,6 +83141,7 @@ components:
8289583141
apm_service_catalog_read: View service catalog and service definitions.
8289683142
apm_service_catalog_write: Add, modify, and delete service catalog definitions when those definitions are maintained by Datadog.
8289783143
appsec_vm_read: View infrastructure, application code, and library vulnerability findings.
83144+
aws_configurations_manage: Manage AWS integration account configurations and related integration settings.
8289883145
billing_read: View your organization's billing information.
8289983146
bits_investigations_read: View Bits AI investigations.
8290083147
bits_investigations_write: Create and manage Bits AI investigations.
@@ -91595,6 +91842,59 @@ paths:
9159591842
operator: OR
9159691843
permissions:
9159791844
- security_monitoring_filters_write
91845+
/api/v2/cloudinventoryservice/syncconfigs:
91846+
put:
91847+
description: |-
91848+
Create or update a cloud inventory sync configuration. Specify the cloud provider in `data.id`
91849+
and provider-specific settings under `data.attributes`. This endpoint uses an upsert model.
91850+
operationId: UpsertSyncConfig
91851+
requestBody:
91852+
content:
91853+
application/json:
91854+
examples:
91855+
default:
91856+
summary: AWS inventory bucket
91857+
value:
91858+
data:
91859+
attributes:
91860+
aws:
91861+
aws_account_id: "123456789012"
91862+
destination_bucket_name: my-inventory-bucket
91863+
destination_bucket_region: us-east-1
91864+
destination_prefix: logs/
91865+
id: aws
91866+
type: cloud_provider
91867+
schema:
91868+
$ref: "#/components/schemas/UpsertCloudInventorySyncConfigRequest"
91869+
required: true
91870+
responses:
91871+
"200":
91872+
content:
91873+
application/json:
91874+
schema:
91875+
$ref: "#/components/schemas/CloudInventorySyncConfigResponse"
91876+
description: OK
91877+
"400":
91878+
content:
91879+
application/json:
91880+
schema:
91881+
$ref: "#/components/schemas/JSONAPIErrorResponse"
91882+
description: Bad Request
91883+
"403":
91884+
$ref: "#/components/responses/ForbiddenResponse"
91885+
"429":
91886+
$ref: "#/components/responses/TooManyRequestsResponse"
91887+
summary: Create or update a sync configuration
91888+
tags:
91889+
- Cloud Inventory Sync Configs
91890+
x-codegen-request-body-name: body
91891+
"x-permission":
91892+
operator: OR
91893+
permissions:
91894+
- aws_configurations_manage
91895+
x-unstable: |-
91896+
**Note**: This endpoint is in preview and is subject to change.
91897+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
9159891898
/api/v2/code-coverage/branch/summary:
9159991899
post:
9160091900
description: |-
@@ -134830,6 +135130,9 @@ tags:
134830135130
- description: |-
134831135131
The Cloud Cost Management API allows you to set up, edit, and delete Cloud Cost Management accounts for AWS, Azure, and Google Cloud. You can query your cost data by using the [Metrics endpoint](https://docs.datadoghq.com/api/latest/metrics/#query-timeseries-data-across-multiple-products) and the `cloud_cost` data source. For more information, see the [Cloud Cost Management documentation](https://docs.datadoghq.com/cloud_cost_management/).
134832135132
name: Cloud Cost Management
135133+
- description: |-
135134+
Configure cloud inventory file synchronization from your cloud storage to Datadog.
135135+
name: Cloud Inventory Sync Configs
134833135136
- description: |-
134834135137
The Cloud Network Monitoring API allows you to fetch aggregated connections and DNS traffic with their attributes. See the [Cloud Network Monitoring page](https://docs.datadoghq.com/network_monitoring/cloud_network_monitoring/) and [DNS Monitoring page](https://docs.datadoghq.com/network_monitoring/dns/) for more information.
134835135138
name: Cloud Network Monitoring
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* Create or update a sync configuration returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.upsertSyncConfig"] = true;
9+
const apiInstance = new v2.CloudInventorySyncConfigsApi(configuration);
10+
11+
const params: v2.CloudInventorySyncConfigsApiUpsertSyncConfigRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
aws: {
16+
awsAccountId: "123456789012",
17+
destinationBucketName: "my-inventory-bucket",
18+
destinationBucketRegion: "us-east-1",
19+
destinationPrefix: "logs/",
20+
},
21+
azure: {
22+
clientId: "11111111-1111-1111-1111-111111111111",
23+
container: "inventory-container",
24+
resourceGroup: "my-resource-group",
25+
storageAccount: "mystorageaccount",
26+
subscriptionId: "33333333-3333-3333-3333-333333333333",
27+
tenantId: "22222222-2222-2222-2222-222222222222",
28+
},
29+
gcp: {
30+
destinationBucketName: "my-inventory-reports",
31+
projectId: "my-gcp-project",
32+
serviceAccountEmail: "reader@my-gcp-project.iam.gserviceaccount.com",
33+
sourceBucketName: "my-monitored-bucket",
34+
},
35+
},
36+
id: "aws",
37+
type: "cloud_provider",
38+
},
39+
},
40+
};
41+
42+
apiInstance
43+
.upsertSyncConfig(params)
44+
.then((data: v2.CloudInventorySyncConfigResponse) => {
45+
console.log(
46+
"API called successfully. Returned data: " + JSON.stringify(data)
47+
);
48+
})
49+
.catch((error: any) => console.error(error));

0 commit comments

Comments
 (0)