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
38 changes: 17 additions & 21 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12687,15 +12687,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 @@ -12710,7 +12710,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 @@ -12719,7 +12719,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 @@ -12774,7 +12774,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 @@ -12855,28 +12855,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 @@ -81161,7 +81161,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 @@ -81171,7 +81171,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 @@ -93941,8 +93941,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 @@ -93990,17 +93989,14 @@ 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
- Storage Management
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 @@ -145604,9 +145600,6 @@ 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 Expand Up @@ -145988,6 +145981,9 @@ tags:
name: Static Analysis
- 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.
name: Status Pages
- description: |-
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: Storage Management
- description: |-
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:
- [API tests](https://docs.datadoghq.com/synthetics/api_tests/)
Expand Down
14 changes: 7 additions & 7 deletions docs/datadog_api_client.v2.api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,6 @@ datadog\_api\_client.v2.api.cloud\_cost\_management\_api module
:members:
:show-inheritance:

datadog\_api\_client.v2.api.cloud\_inventory\_sync\_configs\_api module
-----------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.api.cloud_inventory_sync_configs_api
:members:
:show-inheritance:

datadog\_api\_client.v2.api.cloud\_network\_monitoring\_api module
------------------------------------------------------------------

Expand Down Expand Up @@ -718,6 +711,13 @@ datadog\_api\_client.v2.api.status\_pages\_api module
:members:
:show-inheritance:

datadog\_api\_client.v2.api.storage\_management\_api module
-----------------------------------------------------------

.. automodule:: datadog_api_client.v2.api.storage_management_api
:members:
:show-inheritance:

datadog\_api\_client.v2.api.synthetics\_api module
--------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
Create or update a sync configuration returns "OK" response
Enable Storage Management for a bucket returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.cloud_inventory_sync_configs_api import CloudInventorySyncConfigsApi
from datadog_api_client.v2.api.storage_management_api import StorageManagementApi
from datadog_api_client.v2.model.cloud_inventory_cloud_provider_id import CloudInventoryCloudProviderId
from datadog_api_client.v2.model.cloud_inventory_cloud_provider_request_type import (
CloudInventoryCloudProviderRequestType,
Expand Down Expand Up @@ -55,9 +55,8 @@
)

configuration = Configuration()
configuration.unstable_operations["upsert_sync_config"] = True
with ApiClient(configuration) as api_client:
api_instance = CloudInventorySyncConfigsApi(api_client)
api_instance = StorageManagementApi(api_client)
response = api_instance.upsert_sync_config(body=body)

print(response)
1 change: 0 additions & 1 deletion src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ def __init__(
"v2.mute_security_findings": False,
"v2.run_historical_job": False,
"v2.search_security_monitoring_histsignals": False,
"v2.upsert_sync_config": False,
"v2.get_code_coverage_branch_summary": False,
"v2.get_code_coverage_commit_summary": False,
"v2.create_dashboard_secure_embed": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
from datadog_api_client.v2.model.upsert_cloud_inventory_sync_config_request import UpsertCloudInventorySyncConfigRequest


class CloudInventorySyncConfigsApi:
class StorageManagementApi:
"""
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.
"""

def __init__(self, api_client=None):
Expand Down Expand Up @@ -45,10 +45,9 @@ def upsert_sync_config(
self,
body: UpsertCloudInventorySyncConfigRequest,
) -> CloudInventorySyncConfigResponse:
"""Create or update a sync configuration.
"""Enable Storage Management for a bucket.

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.

:type body: UpsertCloudInventorySyncConfigRequest
:rtype: CloudInventorySyncConfigResponse
Expand Down
4 changes: 2 additions & 2 deletions src/datadog_api_client/v2/apis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from datadog_api_client.v2.api.change_management_api import ChangeManagementApi
from datadog_api_client.v2.api.cloud_authentication_api import CloudAuthenticationApi
from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi
from datadog_api_client.v2.api.cloud_inventory_sync_configs_api import CloudInventorySyncConfigsApi
from datadog_api_client.v2.api.cloud_network_monitoring_api import CloudNetworkMonitoringApi
from datadog_api_client.v2.api.cloudflare_integration_api import CloudflareIntegrationApi
from datadog_api_client.v2.api.code_coverage_api import CodeCoverageApi
Expand Down Expand Up @@ -100,6 +99,7 @@
from datadog_api_client.v2.api.spans_metrics_api import SpansMetricsApi
from datadog_api_client.v2.api.static_analysis_api import StaticAnalysisApi
from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
from datadog_api_client.v2.api.storage_management_api import StorageManagementApi
from datadog_api_client.v2.api.synthetics_api import SyntheticsApi
from datadog_api_client.v2.api.teams_api import TeamsApi
from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi
Expand Down Expand Up @@ -134,7 +134,6 @@
"ChangeManagementApi",
"CloudAuthenticationApi",
"CloudCostManagementApi",
"CloudInventorySyncConfigsApi",
"CloudNetworkMonitoringApi",
"CloudflareIntegrationApi",
"CodeCoverageApi",
Expand Down Expand Up @@ -212,6 +211,7 @@
"SpansMetricsApi",
"StaticAnalysisApi",
"StatusPagesApi",
"StorageManagementApi",
"SyntheticsApi",
"TeamsApi",
"TestOptimizationApi",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class CloudInventoryCloudProviderRequestType(ModelSimple):
"""
JSON:API type for upsert sync configuration requests.
Always `cloud_provider`.

:param value: If omitted defaults to "cloud_provider". Must be one of ["cloud_provider"].
:type value: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(
**kwargs,
):
"""
Attributes for a cloud inventory sync configuration. Values beyond ``id`` may be omitted immediately after upsert.
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.

:param aws_account_id: AWS account ID for the inventory bucket.
:type aws_account_id: str
Expand Down Expand Up @@ -119,7 +119,7 @@ def __init__(
:param gcp_service_account_email: Service account email for bucket access.
:type gcp_service_account_email: str

:param prefix: Object key prefix or ``/`` when the entire bucket is synced.
:param prefix: Object key prefix where inventory reports are written. Returns ``/`` when reports are written at the bucket root.
:type prefix: str
"""
super().__init__(kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(
**kwargs,
):
"""
AWS settings for the customer bucket that stores inventory reports.
AWS settings for the S3 bucket Storage Management reads inventory reports from.

:param aws_account_id: AWS account ID that owns the inventory bucket.
:type aws_account_id: str
Expand All @@ -50,7 +50,7 @@ def __init__(
:param destination_bucket_region: AWS Region of the inventory bucket.
:type destination_bucket_region: str

:param destination_prefix: Optional object key prefix for inventory files. Use ``/`` or omit for the entire bucket.
:param destination_prefix: Object key prefix where inventory reports are written. Omit or set to ``/`` when reports are written at the bucket root.
:type destination_prefix: str, optional
"""
if destination_prefix is not unset:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class CloudInventorySyncConfigResourceType(ModelSimple):
"""
JSON:API type for sync configuration resources.
Always `sync_configs`.

:param value: If omitted defaults to "sync_configs". Must be one of ["sync_configs"].
:type value: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def openapi_types(_):

def __init__(self_, data: CloudInventorySyncConfigResponseData, **kwargs):
"""
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.

:param data: JSON:API data object for a sync configuration.
:param data: Storage Management configuration data.
:type data: CloudInventorySyncConfigResponseData
"""
super().__init__(kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ def __init__(
**kwargs,
):
"""
JSON:API data object for a sync configuration.
Storage Management configuration data.

:param attributes: Attributes for a cloud inventory sync configuration. Values beyond ``id`` may be omitted immediately after upsert.
:param attributes: 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.
:type attributes: CloudInventorySyncConfigAttributes

:param id: Unique identifier for the recurring sync configuration.
:param id: Unique identifier for this Storage Management configuration.
:type id: str

:param type: JSON:API type for sync configuration resources.
:param type: Always ``sync_configs``.
:type type: CloudInventorySyncConfigResourceType
"""
super().__init__(kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self_, data: UpsertCloudInventorySyncConfigRequestData, **kwargs):
"""
Request body for creating or updating a cloud inventory sync configuration.

:param data: JSON:API data envelope for an upsert sync configuration request.
:param data: Storage Management configuration data for the create or update request.
:type data: UpsertCloudInventorySyncConfigRequestData
"""
super().__init__(kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def __init__(
**kwargs,
):
"""
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`` ).

:param aws: AWS settings for the customer bucket that stores inventory reports.
:param aws: AWS settings for the S3 bucket Storage Management reads inventory reports from.
:type aws: CloudInventorySyncConfigAWSRequestAttributes, optional

:param azure: Azure settings for the storage account and container with inventory data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ def __init__(
**kwargs,
):
"""
JSON:API data envelope for an upsert sync configuration request.
Storage Management configuration data for the create or update request.

:param attributes: Provider-specific configuration. Include the object that matches ``data.id`` ( ``aws`` , ``gcp`` , or ``azure`` ).
:param attributes: Settings for the cloud provider specified in ``data.id``. Include only the matching provider object ( ``aws`` , ``gcp`` , or ``azure`` ).
:type attributes: UpsertCloudInventorySyncConfigRequestAttributes

:param id: Cloud provider for this sync configuration ( ``aws`` , ``gcp`` , or ``azure`` ). For requests, must match the provider block supplied under ``attributes``.
:type id: CloudInventoryCloudProviderId

:param type: JSON:API type for upsert sync configuration requests.
:param type: Always ``cloud_provider``.
:type type: CloudInventoryCloudProviderRequestType
"""
super().__init__(kwargs)
Expand Down
Loading
Loading