Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
303 changes: 303 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12652,6 +12652,219 @@ components:
type: string
x-enum-varnames:
- CLOUD_CONFIGURATION
CloudInventoryCloudProviderId:
description: |-
Cloud provider for this sync configuration (`aws`, `gcp`, or `azure`). For requests, must match the provider block supplied under `attributes`.
enum:
- aws
- gcp
- azure
example: aws
type: string
x-enum-varnames:
- AWS
- GCP
- AZURE
CloudInventoryCloudProviderRequestType:
description: JSON:API type for upsert sync configuration requests.
enum:
- cloud_provider
example: cloud_provider
type: string
x-enum-varnames:
- CLOUD_PROVIDER
CloudInventorySyncConfigAWSRequestAttributes:
description: AWS settings for the customer bucket that stores inventory reports.
properties:
aws_account_id:
description: AWS account ID that owns the inventory bucket.
example: "123456789012"
type: string
destination_bucket_name:
description: Name of the S3 bucket containing inventory files.
example: my-inventory-bucket
type: string
destination_bucket_region:
description: AWS Region of the inventory bucket.
example: us-east-1
type: string
destination_prefix:
description: Optional object key prefix for inventory files. Use `/` or omit for the entire bucket.
example: logs/
type: string
required:
- aws_account_id
- destination_bucket_name
- destination_bucket_region
type: object
CloudInventorySyncConfigAttributes:
description: Attributes for a cloud inventory sync configuration. Values beyond `id` may be omitted immediately after upsert.
properties:
aws_account_id:
description: AWS account ID for the inventory bucket.
example: "123456789012"
type: string
aws_bucket_name:
description: AWS S3 bucket name for inventory files.
example: my-inventory-bucket
type: string
aws_region:
description: AWS Region for the inventory bucket.
example: us-east-1
type: string
azure_client_id:
description: Azure AD application (client) ID.
example: 11111111-1111-1111-1111-111111111111
type: string
azure_container_name:
description: Azure blob container name.
example: inventory-container
type: string
azure_storage_account_name:
description: Azure storage account name.
example: mystorageaccount
type: string
azure_tenant_id:
description: Azure AD tenant ID.
example: 22222222-2222-2222-2222-222222222222
type: string
cloud_provider:
$ref: "#/components/schemas/CloudInventoryCloudProviderId"
error:
description: Human-readable error detail when sync is unhealthy.
example: ""
readOnly: true
type: string
error_code:
description: Machine-readable error code when sync is unhealthy.
example: ""
readOnly: true
type: string
gcp_bucket_name:
description: GCS bucket name for inventory files Datadog reads.
example: my-inventory-reports
type: string
gcp_project_id:
description: GCP project ID.
example: my-gcp-project
type: string
gcp_service_account_email:
description: Service account email for bucket access.
example: reader@my-gcp-project.iam.gserviceaccount.com
type: string
prefix:
description: Object key prefix or `/` when the entire bucket is synced.
example: logs/
readOnly: true
type: string
required:
- aws_bucket_name
- aws_account_id
- aws_region
- azure_storage_account_name
- azure_container_name
- azure_client_id
- azure_tenant_id
- gcp_bucket_name
- gcp_project_id
- gcp_service_account_email
- cloud_provider
- prefix
- error
- error_code
type: object
CloudInventorySyncConfigAzureRequestAttributes:
description: Azure settings for the storage account and container with inventory data.
properties:
client_id:
description: Azure AD application (client) ID used for access.
example: 11111111-1111-1111-1111-111111111111
type: string
container:
description: Blob container name.
example: inventory-container
type: string
resource_group:
description: Resource group containing the storage account.
example: my-resource-group
type: string
storage_account:
description: Storage account name.
example: mystorageaccount
type: string
subscription_id:
description: Azure subscription ID.
example: 33333333-3333-3333-3333-333333333333
type: string
tenant_id:
description: Azure AD tenant ID.
example: 22222222-2222-2222-2222-222222222222
type: string
required:
- client_id
- tenant_id
- subscription_id
- resource_group
- storage_account
- container
type: object
CloudInventorySyncConfigGCPRequestAttributes:
description: GCP settings for buckets involved in inventory reporting.
properties:
destination_bucket_name:
description: GCS bucket name where Datadog reads inventory reports.
example: my-inventory-reports
type: string
project_id:
description: GCP project ID for the inventory destination bucket.
example: my-gcp-project
type: string
service_account_email:
description: Service account email used to read the destination bucket.
example: reader@my-gcp-project.iam.gserviceaccount.com
type: string
source_bucket_name:
description: GCS bucket name that inventory reports are generated for.
example: my-monitored-bucket
type: string
required:
- project_id
- destination_bucket_name
- source_bucket_name
- service_account_email
type: object
CloudInventorySyncConfigResourceType:
description: JSON:API type for sync configuration resources.
enum:
- sync_configs
example: sync_configs
type: string
x-enum-varnames:
- SYNC_CONFIGS
CloudInventorySyncConfigResponse:
description: Response containing the upserted sync configuration. Additional read-only fields appear on list and get.
properties:
data:
$ref: "#/components/schemas/CloudInventorySyncConfigResponseData"
required:
- data
type: object
CloudInventorySyncConfigResponseData:
description: JSON:API data object for a sync configuration.
properties:
attributes:
$ref: "#/components/schemas/CloudInventorySyncConfigAttributes"
id:
description: Unique identifier for the recurring sync configuration.
example: abc123
type: string
type:
$ref: "#/components/schemas/CloudInventorySyncConfigResourceType"
required:
- id
- type
- attributes
type: object
CloudWorkloadSecurityAgentPoliciesListResponse:
description: "Response object that includes a list of Agent policies"
properties:
Expand Down Expand Up @@ -80681,6 +80894,39 @@ components:
meta:
$ref: "#/components/schemas/KindResponseMeta"
type: object
UpsertCloudInventorySyncConfigRequest:
description: Request body for creating or updating a cloud inventory sync configuration.
properties:
data:
$ref: "#/components/schemas/UpsertCloudInventorySyncConfigRequestData"
required:
- data
type: object
UpsertCloudInventorySyncConfigRequestAttributes:
description: |-
Provider-specific configuration. Include the object that matches `data.id` (`aws`, `gcp`, or `azure`).
properties:
aws:
$ref: "#/components/schemas/CloudInventorySyncConfigAWSRequestAttributes"
azure:
$ref: "#/components/schemas/CloudInventorySyncConfigAzureRequestAttributes"
gcp:
$ref: "#/components/schemas/CloudInventorySyncConfigGCPRequestAttributes"
type: object
UpsertCloudInventorySyncConfigRequestData:
description: JSON:API data envelope for an upsert sync configuration request.
properties:
attributes:
$ref: "#/components/schemas/UpsertCloudInventorySyncConfigRequestAttributes"
id:
$ref: "#/components/schemas/CloudInventoryCloudProviderId"
type:
$ref: "#/components/schemas/CloudInventoryCloudProviderRequestType"
required:
- type
- id
- attributes
type: object
Urgency:
description: Specifies the level of urgency for a routing rule (low, high, or dynamic).
enum:
Expand Down Expand Up @@ -82895,6 +83141,7 @@ components:
apm_service_catalog_read: View service catalog and service definitions.
apm_service_catalog_write: Add, modify, and delete service catalog definitions when those definitions are maintained by Datadog.
appsec_vm_read: View infrastructure, application code, and library vulnerability findings.
aws_configurations_manage: Manage AWS integration account configurations and related integration settings.
billing_read: View your organization's billing information.
bits_investigations_read: View Bits AI investigations.
bits_investigations_write: Create and manage Bits AI investigations.
Expand Down Expand Up @@ -91595,6 +91842,59 @@ paths:
operator: OR
permissions:
- security_monitoring_filters_write
/api/v2/cloudinventoryservice/syncconfigs:
put:
description: |-
Create or update a cloud inventory sync configuration. Specify the cloud provider in `data.id`
and provider-specific settings under `data.attributes`. This endpoint uses an upsert model.
operationId: UpsertSyncConfig
requestBody:
content:
application/json:
examples:
default:
summary: AWS inventory bucket
value:
data:
attributes:
aws:
aws_account_id: "123456789012"
destination_bucket_name: my-inventory-bucket
destination_bucket_region: us-east-1
destination_prefix: logs/
id: aws
type: cloud_provider
schema:
$ref: "#/components/schemas/UpsertCloudInventorySyncConfigRequest"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/CloudInventorySyncConfigResponse"
description: OK
"400":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Bad Request
"403":
$ref: "#/components/responses/ForbiddenResponse"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Create or update a sync configuration
tags:
- Cloud Inventory Sync Configs
x-codegen-request-body-name: body
"x-permission":
operator: OR
permissions:
- aws_configurations_manage
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/code-coverage/branch/summary:
post:
description: |-
Expand Down Expand Up @@ -134830,6 +135130,9 @@ tags:
- description: |-
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/).
name: Cloud Cost Management
- description: |-
Configure cloud inventory file synchronization from your cloud storage to Datadog.
name: Cloud Inventory Sync Configs
- description: |-
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.
name: Cloud Network Monitoring
Expand Down
22 changes: 22 additions & 0 deletions features/v2/cloud_inventory_sync_configs.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@endpoint(cloud-inventory-sync-configs) @endpoint(cloud-inventory-sync-configs-v2)
Feature: Cloud Inventory Sync Configs
Configure cloud inventory file synchronization from your cloud storage to
Datadog.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "CloudInventorySyncConfigs" API
And operation "UpsertSyncConfig" enabled
And new "UpsertSyncConfig" request
And body with value {"data": {"attributes": {"aws": {"aws_account_id": "123456789012", "destination_bucket_name": "my-inventory-bucket", "destination_bucket_region": "us-east-1", "destination_prefix": "logs/"}, "azure": {"client_id": "11111111-1111-1111-1111-111111111111", "container": "inventory-container", "resource_group": "my-resource-group", "storage_account": "mystorageaccount", "subscription_id": "33333333-3333-3333-3333-333333333333", "tenant_id": "22222222-2222-2222-2222-222222222222"}, "gcp": {"destination_bucket_name": "my-inventory-reports", "project_id": "my-gcp-project", "service_account_email": "reader@my-gcp-project.iam.gserviceaccount.com", "source_bucket_name": "my-monitored-bucket"}}, "id": "aws", "type": "cloud_provider"}}

@generated @skip @team:DataDog/storage-management
Scenario: Create or update a sync configuration returns "Bad Request" response
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/storage-management
Scenario: Create or update a sync configuration returns "OK" response
When the request is sent
Then the response status is 200 OK
6 changes: 6 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,12 @@
"type": "idempotent"
}
},
"UpsertSyncConfig": {
"tag": "Cloud Inventory Sync Configs",
"undo": {
"type": "idempotent"
}
},
"GetCodeCoverageBranchSummary": {
"tag": "Code Coverage",
"undo": {
Expand Down
1 change: 1 addition & 0 deletions packages/datadog-api-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ apiInstance
| CI Visibility Tests | @datadog/datadog-api-client-ci-visibility-tests | [README.md](../../services/ci-visibility-tests/README.md) |
| Cloud Authentication | @datadog/datadog-api-client-cloud-authentication | [README.md](../../services/cloud-authentication/README.md) |
| Cloud Cost Management | @datadog/datadog-api-client-cloud-cost-management | [README.md](../../services/cloud-cost-management/README.md) |
| Cloud Inventory Sync Configs | @datadog/datadog-api-client-cloud-inventory-sync-configs | [README.md](../../services/cloud-inventory-sync-configs/README.md) |
| Cloud Network Monitoring | @datadog/datadog-api-client-cloud-network-monitoring | [README.md](../../services/cloud-network-monitoring/README.md) |
| Cloudflare Integration | @datadog/datadog-api-client-cloudflare-integration | [README.md](../../services/cloudflare-integration/README.md) |
| Code Coverage | @datadog/datadog-api-client-code-coverage | [README.md](../../services/code-coverage/README.md) |
Expand Down
7 changes: 7 additions & 0 deletions private/bdd_runner/src/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5873,6 +5873,13 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
"SecurityMonitoringApi.V2.GetSecretsRules": {
operationResponseType: "SecretRuleArray",
},
"CloudInventorySyncConfigsApi.V2.UpsertSyncConfig": {
body: {
type: "UpsertCloudInventorySyncConfigRequest",
format: "",
},
operationResponseType: "CloudInventorySyncConfigResponse",
},
"CodeCoverageApi.V2.GetCodeCoverageBranchSummary": {
body: {
type: "BranchCoverageSummaryRequest",
Expand Down
1 change: 1 addition & 0 deletions services/cloud_inventory_sync_configs/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
Loading
Loading