Skip to content

Commit ca82a3c

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

17 files changed

Lines changed: 60 additions & 67 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/)

docs/datadog_api_client.v2.api.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,6 @@ datadog\_api\_client.v2.api.cloud\_cost\_management\_api module
151151
:members:
152152
:show-inheritance:
153153

154-
datadog\_api\_client.v2.api.cloud\_inventory\_sync\_configs\_api module
155-
-----------------------------------------------------------------------
156-
157-
.. automodule:: datadog_api_client.v2.api.cloud_inventory_sync_configs_api
158-
:members:
159-
:show-inheritance:
160-
161154
datadog\_api\_client.v2.api.cloud\_network\_monitoring\_api module
162155
------------------------------------------------------------------
163156

@@ -725,6 +718,13 @@ datadog\_api\_client.v2.api.status\_pages\_api module
725718
:members:
726719
:show-inheritance:
727720

721+
datadog\_api\_client.v2.api.storage\_management\_api module
722+
-----------------------------------------------------------
723+
724+
.. automodule:: datadog_api_client.v2.api.storage_management_api
725+
:members:
726+
:show-inheritance:
727+
728728
datadog\_api\_client.v2.api.synthetics\_api module
729729
--------------------------------------------------
730730

examples/v2/cloud-inventory-sync-configs/UpsertSyncConfig.py renamed to examples/v2/storage-management/UpsertSyncConfig.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
2-
Create or update a sync configuration returns "OK" response
2+
Enable Storage Management for a bucket returns "OK" response
33
"""
44

55
from datadog_api_client import ApiClient, Configuration
6-
from datadog_api_client.v2.api.cloud_inventory_sync_configs_api import CloudInventorySyncConfigsApi
6+
from datadog_api_client.v2.api.storage_management_api import StorageManagementApi
77
from datadog_api_client.v2.model.cloud_inventory_cloud_provider_id import CloudInventoryCloudProviderId
88
from datadog_api_client.v2.model.cloud_inventory_cloud_provider_request_type import (
99
CloudInventoryCloudProviderRequestType,
@@ -55,9 +55,8 @@
5555
)
5656

5757
configuration = Configuration()
58-
configuration.unstable_operations["upsert_sync_config"] = True
5958
with ApiClient(configuration) as api_client:
60-
api_instance = CloudInventorySyncConfigsApi(api_client)
59+
api_instance = StorageManagementApi(api_client)
6160
response = api_instance.upsert_sync_config(body=body)
6261

6362
print(response)

src/datadog_api_client/configuration.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@ def __init__(
348348
"v2.mute_security_findings": False,
349349
"v2.run_historical_job": False,
350350
"v2.search_security_monitoring_histsignals": False,
351-
"v2.upsert_sync_config": False,
352351
"v2.get_code_coverage_branch_summary": False,
353352
"v2.get_code_coverage_commit_summary": False,
354353
"v2.create_dashboard_secure_embed": False,

src/datadog_api_client/v2/api/cloud_inventory_sync_configs_api.py renamed to src/datadog_api_client/v2/api/storage_management_api.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
from datadog_api_client.v2.model.upsert_cloud_inventory_sync_config_request import UpsertCloudInventorySyncConfigRequest
1212

1313

14-
class CloudInventorySyncConfigsApi:
14+
class StorageManagementApi:
1515
"""
16-
Configure cloud inventory file synchronization from your cloud storage to Datadog.
16+
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.
1717
"""
1818

1919
def __init__(self, api_client=None):
@@ -45,10 +45,9 @@ def upsert_sync_config(
4545
self,
4646
body: UpsertCloudInventorySyncConfigRequest,
4747
) -> CloudInventorySyncConfigResponse:
48-
"""Create or update a sync configuration.
48+
"""Enable Storage Management for a bucket.
4949
50-
Create or update a cloud inventory sync configuration. Specify the cloud provider in ``data.id``
51-
and provider-specific settings under ``data.attributes``. This endpoint uses an upsert model.
50+
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.
5251
5352
:type body: UpsertCloudInventorySyncConfigRequest
5453
:rtype: CloudInventorySyncConfigResponse

src/datadog_api_client/v2/apis/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from datadog_api_client.v2.api.change_management_api import ChangeManagementApi
2323
from datadog_api_client.v2.api.cloud_authentication_api import CloudAuthenticationApi
2424
from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi
25-
from datadog_api_client.v2.api.cloud_inventory_sync_configs_api import CloudInventorySyncConfigsApi
2625
from datadog_api_client.v2.api.cloud_network_monitoring_api import CloudNetworkMonitoringApi
2726
from datadog_api_client.v2.api.cloudflare_integration_api import CloudflareIntegrationApi
2827
from datadog_api_client.v2.api.code_coverage_api import CodeCoverageApi
@@ -101,6 +100,7 @@
101100
from datadog_api_client.v2.api.spans_metrics_api import SpansMetricsApi
102101
from datadog_api_client.v2.api.static_analysis_api import StaticAnalysisApi
103102
from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
103+
from datadog_api_client.v2.api.storage_management_api import StorageManagementApi
104104
from datadog_api_client.v2.api.synthetics_api import SyntheticsApi
105105
from datadog_api_client.v2.api.teams_api import TeamsApi
106106
from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi
@@ -135,7 +135,6 @@
135135
"ChangeManagementApi",
136136
"CloudAuthenticationApi",
137137
"CloudCostManagementApi",
138-
"CloudInventorySyncConfigsApi",
139138
"CloudNetworkMonitoringApi",
140139
"CloudflareIntegrationApi",
141140
"CodeCoverageApi",
@@ -214,6 +213,7 @@
214213
"SpansMetricsApi",
215214
"StaticAnalysisApi",
216215
"StatusPagesApi",
216+
"StorageManagementApi",
217217
"SyntheticsApi",
218218
"TeamsApi",
219219
"TestOptimizationApi",

src/datadog_api_client/v2/model/cloud_inventory_cloud_provider_request_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
class CloudInventoryCloudProviderRequestType(ModelSimple):
1616
"""
17-
JSON:API type for upsert sync configuration requests.
17+
Always `cloud_provider`.
1818
1919
:param value: If omitted defaults to "cloud_provider". Must be one of ["cloud_provider"].
2020
:type value: str

src/datadog_api_client/v2/model/cloud_inventory_sync_config_attributes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(
7878
**kwargs,
7979
):
8080
"""
81-
Attributes for a cloud inventory sync configuration. Values beyond ``id`` may be omitted immediately after upsert.
81+
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.
8282
8383
:param aws_account_id: AWS account ID for the inventory bucket.
8484
:type aws_account_id: str
@@ -119,7 +119,7 @@ def __init__(
119119
:param gcp_service_account_email: Service account email for bucket access.
120120
:type gcp_service_account_email: str
121121
122-
:param prefix: Object key prefix or ``/`` when the entire bucket is synced.
122+
:param prefix: Object key prefix where inventory reports are written. Returns ``/`` when reports are written at the bucket root.
123123
:type prefix: str
124124
"""
125125
super().__init__(kwargs)

src/datadog_api_client/v2/model/cloud_inventory_sync_config_aws_request_attributes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(
3939
**kwargs,
4040
):
4141
"""
42-
AWS settings for the customer bucket that stores inventory reports.
42+
AWS settings for the S3 bucket Storage Management reads inventory reports from.
4343
4444
:param aws_account_id: AWS account ID that owns the inventory bucket.
4545
:type aws_account_id: str
@@ -50,7 +50,7 @@ def __init__(
5050
:param destination_bucket_region: AWS Region of the inventory bucket.
5151
:type destination_bucket_region: str
5252
53-
:param destination_prefix: Optional object key prefix for inventory files. Use ``/`` or omit for the entire bucket.
53+
:param destination_prefix: Object key prefix where inventory reports are written. Omit or set to ``/`` when reports are written at the bucket root.
5454
:type destination_prefix: str, optional
5555
"""
5656
if destination_prefix is not unset:

src/datadog_api_client/v2/model/cloud_inventory_sync_config_resource_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
class CloudInventorySyncConfigResourceType(ModelSimple):
1616
"""
17-
JSON:API type for sync configuration resources.
17+
Always `sync_configs`.
1818
1919
:param value: If omitted defaults to "sync_configs". Must be one of ["sync_configs"].
2020
:type value: str

0 commit comments

Comments
 (0)