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
29 changes: 14 additions & 15 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12666,15 +12666,15 @@ components:
- GCP
- AZURE
CloudInventoryCloudProviderRequestType:
description: JSON:API type for upsert sync configuration requests.
description: Always `cloud_provider`.
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.
description: AWS settings for the S3 bucket Storage Management reads inventory reports from.
properties:
aws_account_id:
description: AWS account ID that owns the inventory bucket.
Expand All @@ -12689,7 +12689,7 @@ components:
example: us-east-1
type: string
destination_prefix:
description: Optional object key prefix for inventory files. Use `/` or omit for the entire bucket.
description: Object key prefix where inventory reports are written. Omit or set to `/` when reports are written at the bucket root.
example: logs/
type: string
required:
Expand All @@ -12698,7 +12698,7 @@ components:
- destination_bucket_region
type: object
CloudInventorySyncConfigAttributes:
description: Attributes for a cloud inventory sync configuration. Values beyond `id` may be omitted immediately after upsert.
description: Attributes for a Storage Management configuration. Fields other than `id` may be empty in the response immediately after a create or update; subsequent reads return the full configuration.
properties:
aws_account_id:
description: AWS account ID for the inventory bucket.
Expand Down Expand Up @@ -12753,7 +12753,7 @@ components:
example: reader@my-gcp-project.iam.gserviceaccount.com
type: string
prefix:
description: Object key prefix or `/` when the entire bucket is synced.
description: Object key prefix where inventory reports are written. Returns `/` when reports are written at the bucket root.
example: logs/
readOnly: true
type: string
Expand Down Expand Up @@ -12834,28 +12834,28 @@ components:
- service_account_email
type: object
CloudInventorySyncConfigResourceType:
description: JSON:API type for sync configuration resources.
description: Always `sync_configs`.
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.
description: Storage Management configuration returned after a create or update. Additional read-only fields appear on list and get responses.
properties:
data:
$ref: "#/components/schemas/CloudInventorySyncConfigResponseData"
required:
- data
type: object
CloudInventorySyncConfigResponseData:
description: JSON:API data object for a sync configuration.
description: Storage Management configuration data.
properties:
attributes:
$ref: "#/components/schemas/CloudInventorySyncConfigAttributes"
id:
description: Unique identifier for the recurring sync configuration.
description: Unique identifier for this Storage Management configuration.
example: abc123
type: string
type:
Expand Down Expand Up @@ -81037,7 +81037,7 @@ components:
type: object
UpsertCloudInventorySyncConfigRequestAttributes:
description: |-
Provider-specific configuration. Include the object that matches `data.id` (`aws`, `gcp`, or `azure`).
Settings for the cloud provider specified in `data.id`. Include only the matching provider object (`aws`, `gcp`, or `azure`).
properties:
aws:
$ref: "#/components/schemas/CloudInventorySyncConfigAWSRequestAttributes"
Expand All @@ -81047,7 +81047,7 @@ components:
$ref: "#/components/schemas/CloudInventorySyncConfigGCPRequestAttributes"
type: object
UpsertCloudInventorySyncConfigRequestData:
description: JSON:API data envelope for an upsert sync configuration request.
description: Storage Management configuration data for the create or update request.
properties:
attributes:
$ref: "#/components/schemas/UpsertCloudInventorySyncConfigRequestAttributes"
Expand Down Expand Up @@ -91978,8 +91978,7 @@ paths:
/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.
Enable Storage Management for an S3 bucket, GCS bucket, or Azure container by registering the destination that holds its inventory reports. Set `data.id` to the cloud provider (`aws`, `gcp`, or `azure`) and provide the matching settings under data.attributes. Calling this endpoint with the same provider replaces the existing configuration.
operationId: UpsertSyncConfig
requestBody:
content:
Expand Down Expand Up @@ -92017,7 +92016,7 @@ paths:
$ref: "#/components/responses/ForbiddenResponse"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Create or update a sync configuration
summary: Enable Storage Management for a bucket
tags:
- Cloud Inventory Sync Configs
x-codegen-request-body-name: body
Expand Down Expand Up @@ -135346,7 +135345,7 @@ tags:
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.
Enable Storage Management for S3 buckets, GCS buckets, and Azure containers. Each configuration registers the destination that holds inventory reports for the storage being monitored.
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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Create or update a sync configuration returns "OK" response
// Enable Storage Management for a bucket returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void setApiClient(ApiClient apiClient) {
}

/**
* Create or update a sync configuration.
* Enable Storage Management for a bucket.
*
* <p>See {@link #upsertSyncConfigWithHttpInfo}.
*
Expand All @@ -59,7 +59,7 @@ public CloudInventorySyncConfigResponse upsertSyncConfig(
}

/**
* Create or update a sync configuration.
* Enable Storage Management for a bucket.
*
* <p>See {@link #upsertSyncConfigWithHttpInfoAsync}.
*
Expand All @@ -76,9 +76,11 @@ public CompletableFuture<CloudInventorySyncConfigResponse> upsertSyncConfigAsync
}

/**
* Create or update a cloud inventory sync configuration. Specify the cloud provider in <code>
* data.id</code> and provider-specific settings under <code>data.attributes</code>. This endpoint
* uses an upsert model.
* Enable Storage Management for an S3 bucket, GCS bucket, or Azure container by registering the
* destination that holds its inventory reports. Set <code>data.id</code> to the cloud provider (
* <code>aws</code>, <code>gcp</code>, or <code>azure</code>) and provide the matching settings
* under data.attributes. Calling this endpoint with the same provider replaces the existing
* configuration.
*
* @param body (required)
* @return ApiResponse&lt;CloudInventorySyncConfigResponse&gt;
Expand Down Expand Up @@ -135,7 +137,7 @@ public ApiResponse<CloudInventorySyncConfigResponse> upsertSyncConfigWithHttpInf
}

/**
* Create or update a sync configuration.
* Enable Storage Management for a bucket.
*
* <p>See {@link #upsertSyncConfigWithHttpInfo}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.HashSet;
import java.util.Set;

/** JSON:API type for upsert sync configuration requests. */
/** Always <code>cloud_provider</code>. */
@JsonSerialize(
using =
CloudInventoryCloudProviderRequestType.CloudInventoryCloudProviderRequestTypeSerializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.Map;
import java.util.Objects;

/** AWS settings for the customer bucket that stores inventory reports. */
/** AWS settings for the S3 bucket Storage Management reads inventory reports from. */
@JsonPropertyOrder({
CloudInventorySyncConfigAWSRequestAttributes.JSON_PROPERTY_AWS_ACCOUNT_ID,
CloudInventorySyncConfigAWSRequestAttributes.JSON_PROPERTY_DESTINATION_BUCKET_NAME,
Expand Down Expand Up @@ -122,8 +122,8 @@ public CloudInventorySyncConfigAWSRequestAttributes destinationPrefix(String des
}

/**
* Optional object key prefix for inventory files. Use <code>/</code> or omit for the entire
* bucket.
* Object key prefix where inventory reports are written. Omit or set to <code>/</code> when
* reports are written at the bucket root.
*
* @return destinationPrefix
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
import java.util.Objects;

/**
* Attributes for a cloud inventory sync configuration. Values beyond <code>id</code> may be omitted
* immediately after upsert.
* Attributes for a Storage Management configuration. Fields other than <code>id</code> may be empty
* in the response immediately after a create or update; subsequent reads return the full
* configuration.
*/
@JsonPropertyOrder({
CloudInventorySyncConfigAttributes.JSON_PROPERTY_AWS_ACCOUNT_ID,
Expand Down Expand Up @@ -373,7 +374,8 @@ public void setGcpServiceAccountEmail(String gcpServiceAccountEmail) {
}

/**
* Object key prefix or <code>/</code> when the entire bucket is synced.
* Object key prefix where inventory reports are written. Returns <code>/</code> when reports are
* written at the bucket root.
*
* @return prefix
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.HashSet;
import java.util.Set;

/** JSON:API type for sync configuration resources. */
/** Always <code>sync_configs</code>. */
@JsonSerialize(
using =
CloudInventorySyncConfigResourceType.CloudInventorySyncConfigResourceTypeSerializer.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import java.util.Objects;

/**
* Response containing the upserted sync configuration. Additional read-only fields appear on list
* and get.
* Storage Management configuration returned after a create or update. Additional read-only fields
* appear on list and get responses.
*/
@JsonPropertyOrder({CloudInventorySyncConfigResponse.JSON_PROPERTY_DATA})
@jakarta.annotation.Generated(
Expand All @@ -46,7 +46,7 @@ public CloudInventorySyncConfigResponse data(CloudInventorySyncConfigResponseDat
}

/**
* JSON:API data object for a sync configuration.
* Storage Management configuration data.
*
* @return data
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.Map;
import java.util.Objects;

/** JSON:API data object for a sync configuration. */
/** Storage Management configuration data. */
@JsonPropertyOrder({
CloudInventorySyncConfigResponseData.JSON_PROPERTY_ATTRIBUTES,
CloudInventorySyncConfigResponseData.JSON_PROPERTY_ID,
Expand Down Expand Up @@ -60,8 +60,9 @@ public CloudInventorySyncConfigResponseData attributes(
}

/**
* Attributes for a cloud inventory sync configuration. Values beyond <code>id</code> may be
* omitted immediately after upsert.
* Attributes for a Storage Management configuration. Fields other than <code>id</code> may be
* empty in the response immediately after a create or update; subsequent reads return the full
* configuration.
*
* @return attributes
*/
Expand All @@ -81,7 +82,7 @@ public CloudInventorySyncConfigResponseData id(String id) {
}

/**
* Unique identifier for the recurring sync configuration.
* Unique identifier for this Storage Management configuration.
*
* @return id
*/
Expand All @@ -102,7 +103,7 @@ public CloudInventorySyncConfigResponseData type(CloudInventorySyncConfigResourc
}

/**
* JSON:API type for sync configuration resources.
* Always <code>sync_configs</code>.
*
* @return type
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public UpsertCloudInventorySyncConfigRequest data(
}

/**
* JSON:API data envelope for an upsert sync configuration request.
* Storage Management configuration data for the create or update request.
*
* @return data
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import java.util.Objects;

/**
* Provider-specific configuration. Include the object that matches <code>data.id</code> (<code>aws
* </code>, <code>gcp</code>, or <code>azure</code>).
* Settings for the cloud provider specified in <code>data.id</code>. Include only the matching
* provider object (<code>aws</code>, <code>gcp</code>, or <code>azure</code>).
*/
@JsonPropertyOrder({
UpsertCloudInventorySyncConfigRequestAttributes.JSON_PROPERTY_AWS,
Expand Down Expand Up @@ -46,7 +46,7 @@ public UpsertCloudInventorySyncConfigRequestAttributes aws(
}

/**
* AWS settings for the customer bucket that stores inventory reports.
* AWS settings for the S3 bucket Storage Management reads inventory reports from.
*
* @return aws
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.Map;
import java.util.Objects;

/** JSON:API data envelope for an upsert sync configuration request. */
/** Storage Management configuration data for the create or update request. */
@JsonPropertyOrder({
UpsertCloudInventorySyncConfigRequestData.JSON_PROPERTY_ATTRIBUTES,
UpsertCloudInventorySyncConfigRequestData.JSON_PROPERTY_ID,
Expand Down Expand Up @@ -61,8 +61,8 @@ public UpsertCloudInventorySyncConfigRequestData attributes(
}

/**
* Provider-specific configuration. Include the object that matches <code>data.id</code> (<code>
* aws</code>, <code>gcp</code>, or <code>azure</code>).
* Settings for the cloud provider specified in <code>data.id</code>. Include only the matching
* provider object (<code>aws</code>, <code>gcp</code>, or <code>azure</code>).
*
* @return attributes
*/
Expand Down Expand Up @@ -109,7 +109,7 @@ public UpsertCloudInventorySyncConfigRequestData type(
}

/**
* JSON:API type for upsert sync configuration requests.
* Always <code>cloud_provider</code>.
*
* @return type
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@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.
Enable Storage Management for S3 buckets, GCS buckets, and Azure
containers. Each configuration registers the destination that holds
inventory reports for the storage being monitored.

Background:
Given a valid "apiKeyAuth" key in the system
Expand All @@ -12,11 +13,11 @@ Feature: Cloud Inventory Sync Configs
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
Scenario: Enable Storage Management for a bucket 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
Scenario: Enable Storage Management for a bucket returns "OK" response
When the request is sent
Then the response status is 200 OK
Loading