Skip to content

Commit b7e4871

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Clarify Storage Management for cloud inventory syncconfigs OpenAPI (#4029)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent feba006 commit b7e4871

17 files changed

Lines changed: 59 additions & 77 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12687,15 +12687,15 @@ components:
1268712687
- GCP
1268812688
- AZURE
1268912689
CloudInventoryCloudProviderRequestType:
12690-
description: JSON:API type for upsert sync configuration requests.
12690+
description: Always `cloud_provider`.
1269112691
enum:
1269212692
- cloud_provider
1269312693
example: cloud_provider
1269412694
type: string
1269512695
x-enum-varnames:
1269612696
- CLOUD_PROVIDER
1269712697
CloudInventorySyncConfigAWSRequestAttributes:
12698-
description: AWS settings for the customer bucket that stores inventory reports.
12698+
description: AWS settings for the S3 bucket Storage Management reads inventory reports from.
1269912699
properties:
1270012700
aws_account_id:
1270112701
description: AWS account ID that owns the inventory bucket.
@@ -12710,7 +12710,7 @@ components:
1271012710
example: us-east-1
1271112711
type: string
1271212712
destination_prefix:
12713-
description: Optional object key prefix for inventory files. Use `/` or omit for the entire bucket.
12713+
description: Object key prefix where inventory reports are written. Omit or set to `/` when reports are written at the bucket root.
1271412714
example: logs/
1271512715
type: string
1271612716
required:
@@ -12719,7 +12719,7 @@ components:
1271912719
- destination_bucket_region
1272012720
type: object
1272112721
CloudInventorySyncConfigAttributes:
12722-
description: Attributes for a cloud inventory sync configuration. Values beyond `id` may be omitted immediately after upsert.
12722+
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.
1272312723
properties:
1272412724
aws_account_id:
1272512725
description: AWS account ID for the inventory bucket.
@@ -12774,7 +12774,7 @@ components:
1277412774
example: reader@my-gcp-project.iam.gserviceaccount.com
1277512775
type: string
1277612776
prefix:
12777-
description: Object key prefix or `/` when the entire bucket is synced.
12777+
description: Object key prefix where inventory reports are written. Returns `/` when reports are written at the bucket root.
1277812778
example: logs/
1277912779
readOnly: true
1278012780
type: string
@@ -12855,28 +12855,28 @@ components:
1285512855
- service_account_email
1285612856
type: object
1285712857
CloudInventorySyncConfigResourceType:
12858-
description: JSON:API type for sync configuration resources.
12858+
description: Always `sync_configs`.
1285912859
enum:
1286012860
- sync_configs
1286112861
example: sync_configs
1286212862
type: string
1286312863
x-enum-varnames:
1286412864
- SYNC_CONFIGS
1286512865
CloudInventorySyncConfigResponse:
12866-
description: Response containing the upserted sync configuration. Additional read-only fields appear on list and get.
12866+
description: Storage Management configuration returned after a create or update. Additional read-only fields appear on list and get responses.
1286712867
properties:
1286812868
data:
1286912869
$ref: "#/components/schemas/CloudInventorySyncConfigResponseData"
1287012870
required:
1287112871
- data
1287212872
type: object
1287312873
CloudInventorySyncConfigResponseData:
12874-
description: JSON:API data object for a sync configuration.
12874+
description: Storage Management configuration data.
1287512875
properties:
1287612876
attributes:
1287712877
$ref: "#/components/schemas/CloudInventorySyncConfigAttributes"
1287812878
id:
12879-
description: Unique identifier for the recurring sync configuration.
12879+
description: Unique identifier for this Storage Management configuration.
1288012880
example: abc123
1288112881
type: string
1288212882
type:
@@ -81461,7 +81461,7 @@ components:
8146181461
type: object
8146281462
UpsertCloudInventorySyncConfigRequestAttributes:
8146381463
description: |-
81464-
Provider-specific configuration. Include the object that matches `data.id` (`aws`, `gcp`, or `azure`).
81464+
Settings for the cloud provider specified in `data.id`. Include only the matching provider object (`aws`, `gcp`, or `azure`).
8146581465
properties:
8146681466
aws:
8146781467
$ref: "#/components/schemas/CloudInventorySyncConfigAWSRequestAttributes"
@@ -81471,7 +81471,7 @@ components:
8147181471
$ref: "#/components/schemas/CloudInventorySyncConfigGCPRequestAttributes"
8147281472
type: object
8147381473
UpsertCloudInventorySyncConfigRequestData:
81474-
description: JSON:API data envelope for an upsert sync configuration request.
81474+
description: Storage Management configuration data for the create or update request.
8147581475
properties:
8147681476
attributes:
8147781477
$ref: "#/components/schemas/UpsertCloudInventorySyncConfigRequestAttributes"
@@ -94241,8 +94241,7 @@ paths:
9424194241
/api/v2/cloudinventoryservice/syncconfigs:
9424294242
put:
9424394243
description: |-
94244-
Create or update a cloud inventory sync configuration. Specify the cloud provider in `data.id`
94245-
and provider-specific settings under `data.attributes`. This endpoint uses an upsert model.
94244+
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.
9424694245
operationId: UpsertSyncConfig
9424794246
requestBody:
9424894247
content:
@@ -94290,17 +94289,14 @@ paths:
9429094289
$ref: "#/components/responses/ForbiddenResponse"
9429194290
"429":
9429294291
$ref: "#/components/responses/TooManyRequestsResponse"
94293-
summary: Create or update a sync configuration
94292+
summary: Enable Storage Management for a bucket
9429494293
tags:
94295-
- Cloud Inventory Sync Configs
94294+
- Storage Management
9429694295
x-codegen-request-body-name: body
9429794296
"x-permission":
9429894297
operator: OR
9429994298
permissions:
9430094299
- aws_configurations_manage
94301-
x-unstable: |-
94302-
**Note**: This endpoint is in preview and is subject to change.
94303-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
9430494300
/api/v2/code-coverage/branch/summary:
9430594301
post:
9430694302
description: |-
@@ -145968,9 +145964,6 @@ tags:
145968145964
- description: |-
145969145965
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/).
145970145966
name: Cloud Cost Management
145971-
- description: |-
145972-
Configure cloud inventory file synchronization from your cloud storage to Datadog.
145973-
name: Cloud Inventory Sync Configs
145974145967
- description: |-
145975145968
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.
145976145969
name: Cloud Network Monitoring
@@ -146354,6 +146347,9 @@ tags:
146354146347
name: Static Analysis
146355146348
- description: Manage your status pages and communicate service disruptions to stakeholders via Datadog's API. See the [Status Pages documentation](https://docs.datadoghq.com/incident_response/status_pages/) for more information.
146356146349
name: Status Pages
146350+
- description: |-
146351+
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.
146352+
name: Storage Management
146357146353
- description: |-
146358146354
Synthetic tests use simulated requests and actions so you can monitor the availability and performance of systems and applications. Datadog supports the following types of synthetic tests:
146359146355
- [API tests](https://docs.datadoghq.com/synthetics/api_tests/)

api/datadog/configuration.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,6 @@ func NewConfiguration() *Configuration {
755755
"v2.MuteSecurityFindings": false,
756756
"v2.RunHistoricalJob": false,
757757
"v2.SearchSecurityMonitoringHistsignals": false,
758-
"v2.UpsertSyncConfig": false,
759758
"v2.GetCodeCoverageBranchSummary": false,
760759
"v2.GetCodeCoverageCommitSummary": false,
761760
"v2.CreateDashboardSecureEmbed": false,

api/datadogV2/api_cloud_inventory_sync_configs.go renamed to api/datadogV2/api_storage_management.go

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,25 @@ package datadogV2
66

77
import (
88
_context "context"
9-
_fmt "fmt"
10-
_log "log"
119
_nethttp "net/http"
1210
_neturl "net/url"
1311

1412
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
1513
)
1614

17-
// CloudInventorySyncConfigsApi service type
18-
type CloudInventorySyncConfigsApi datadog.Service
15+
// StorageManagementApi service type
16+
type StorageManagementApi datadog.Service
1917

20-
// UpsertSyncConfig Create or update a sync configuration.
21-
// Create or update a cloud inventory sync configuration. Specify the cloud provider in `data.id`
22-
// and provider-specific settings under `data.attributes`. This endpoint uses an upsert model.
23-
func (a *CloudInventorySyncConfigsApi) UpsertSyncConfig(ctx _context.Context, body UpsertCloudInventorySyncConfigRequest) (CloudInventorySyncConfigResponse, *_nethttp.Response, error) {
18+
// UpsertSyncConfig Enable Storage Management for a bucket.
19+
// 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.
20+
func (a *StorageManagementApi) UpsertSyncConfig(ctx _context.Context, body UpsertCloudInventorySyncConfigRequest) (CloudInventorySyncConfigResponse, *_nethttp.Response, error) {
2421
var (
2522
localVarHTTPMethod = _nethttp.MethodPut
2623
localVarPostBody interface{}
2724
localVarReturnValue CloudInventorySyncConfigResponse
2825
)
2926

30-
operationId := "v2.UpsertSyncConfig"
31-
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
32-
if !isOperationEnabled {
33-
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
34-
}
35-
if isOperationEnabled && a.Client.Cfg.Debug {
36-
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
37-
}
38-
39-
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CloudInventorySyncConfigsApi.UpsertSyncConfig")
27+
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.StorageManagementApi.UpsertSyncConfig")
4028
if err != nil {
4129
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
4230
}
@@ -116,9 +104,9 @@ func (a *CloudInventorySyncConfigsApi) UpsertSyncConfig(ctx _context.Context, bo
116104
return localVarReturnValue, localVarHTTPResponse, nil
117105
}
118106

119-
// NewCloudInventorySyncConfigsApi Returns NewCloudInventorySyncConfigsApi.
120-
func NewCloudInventorySyncConfigsApi(client *datadog.APIClient) *CloudInventorySyncConfigsApi {
121-
return &CloudInventorySyncConfigsApi{
107+
// NewStorageManagementApi Returns NewStorageManagementApi.
108+
func NewStorageManagementApi(client *datadog.APIClient) *StorageManagementApi {
109+
return &StorageManagementApi{
122110
Client: client,
123111
}
124112
}

api/datadogV2/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@
214214
// - [CloudCostManagementApi.ValidateBudget]
215215
// - [CloudCostManagementApi.ValidateCsvBudget]
216216
// - [CloudCostManagementApi.ValidateQuery]
217-
// - [CloudInventorySyncConfigsApi.UpsertSyncConfig]
218217
// - [CloudNetworkMonitoringApi.GetAggregatedConnections]
219218
// - [CloudNetworkMonitoringApi.GetAggregatedDns]
220219
// - [CloudflareIntegrationApi.CreateCloudflareAccount]
@@ -924,6 +923,7 @@
924923
// - [StatusPagesApi.UpdateDegradation]
925924
// - [StatusPagesApi.UpdateMaintenance]
926925
// - [StatusPagesApi.UpdateStatusPage]
926+
// - [StorageManagementApi.UpsertSyncConfig]
927927
// - [SyntheticsApi.AbortTestFileMultipartUpload]
928928
// - [SyntheticsApi.AddTestToSyntheticsDowntime]
929929
// - [SyntheticsApi.CompleteTestFileMultipartUpload]

api/datadogV2/model_cloud_inventory_cloud_provider_request_type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
1111
)
1212

13-
// CloudInventoryCloudProviderRequestType JSON:API type for upsert sync configuration requests.
13+
// CloudInventoryCloudProviderRequestType Always `cloud_provider`.
1414
type CloudInventoryCloudProviderRequestType string
1515

1616
// List of CloudInventoryCloudProviderRequestType.

api/datadogV2/model_cloud_inventory_sync_config_attributes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
1111
)
1212

13-
// CloudInventorySyncConfigAttributes Attributes for a cloud inventory sync configuration. Values beyond `id` may be omitted immediately after upsert.
13+
// CloudInventorySyncConfigAttributes 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.
1414
type CloudInventorySyncConfigAttributes struct {
1515
// AWS account ID for the inventory bucket.
1616
AwsAccountId string `json:"aws_account_id"`
@@ -38,7 +38,7 @@ type CloudInventorySyncConfigAttributes struct {
3838
GcpProjectId string `json:"gcp_project_id"`
3939
// Service account email for bucket access.
4040
GcpServiceAccountEmail string `json:"gcp_service_account_email"`
41-
// Object key prefix or `/` when the entire bucket is synced.
41+
// Object key prefix where inventory reports are written. Returns `/` when reports are written at the bucket root.
4242
Prefix string `json:"prefix"`
4343
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
4444
UnparsedObject map[string]interface{} `json:"-"`

api/datadogV2/model_cloud_inventory_sync_config_aws_request_attributes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import (
1010
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
1111
)
1212

13-
// CloudInventorySyncConfigAWSRequestAttributes AWS settings for the customer bucket that stores inventory reports.
13+
// CloudInventorySyncConfigAWSRequestAttributes AWS settings for the S3 bucket Storage Management reads inventory reports from.
1414
type CloudInventorySyncConfigAWSRequestAttributes struct {
1515
// AWS account ID that owns the inventory bucket.
1616
AwsAccountId string `json:"aws_account_id"`
1717
// Name of the S3 bucket containing inventory files.
1818
DestinationBucketName string `json:"destination_bucket_name"`
1919
// AWS Region of the inventory bucket.
2020
DestinationBucketRegion string `json:"destination_bucket_region"`
21-
// Optional object key prefix for inventory files. Use `/` or omit for the entire bucket.
21+
// Object key prefix where inventory reports are written. Omit or set to `/` when reports are written at the bucket root.
2222
DestinationPrefix *string `json:"destination_prefix,omitempty"`
2323
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
2424
UnparsedObject map[string]interface{} `json:"-"`

api/datadogV2/model_cloud_inventory_sync_config_resource_type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
1111
)
1212

13-
// CloudInventorySyncConfigResourceType JSON:API type for sync configuration resources.
13+
// CloudInventorySyncConfigResourceType Always `sync_configs`.
1414
type CloudInventorySyncConfigResourceType string
1515

1616
// List of CloudInventorySyncConfigResourceType.

api/datadogV2/model_cloud_inventory_sync_config_response.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
1111
)
1212

13-
// CloudInventorySyncConfigResponse Response containing the upserted sync configuration. Additional read-only fields appear on list and get.
13+
// CloudInventorySyncConfigResponse Storage Management configuration returned after a create or update. Additional read-only fields appear on list and get responses.
1414
type CloudInventorySyncConfigResponse struct {
15-
// JSON:API data object for a sync configuration.
15+
// Storage Management configuration data.
1616
Data CloudInventorySyncConfigResponseData `json:"data"`
1717
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1818
UnparsedObject map[string]interface{} `json:"-"`

api/datadogV2/model_cloud_inventory_sync_config_response_data.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import (
1010
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
1111
)
1212

13-
// CloudInventorySyncConfigResponseData JSON:API data object for a sync configuration.
13+
// CloudInventorySyncConfigResponseData Storage Management configuration data.
1414
type CloudInventorySyncConfigResponseData struct {
15-
// Attributes for a cloud inventory sync configuration. Values beyond `id` may be omitted immediately after upsert.
15+
// 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.
1616
Attributes CloudInventorySyncConfigAttributes `json:"attributes"`
17-
// Unique identifier for the recurring sync configuration.
17+
// Unique identifier for this Storage Management configuration.
1818
Id string `json:"id"`
19-
// JSON:API type for sync configuration resources.
19+
// Always `sync_configs`.
2020
Type CloudInventorySyncConfigResourceType `json:"type"`
2121
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
2222
UnparsedObject map[string]interface{} `json:"-"`

0 commit comments

Comments
 (0)