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
248 changes: 248 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,82 @@ components:
required:
- role_name
type: object
AWSCcmConfig:
description: AWS Cloud Cost Management config.
properties:
data_export_configs:
description: List of data export configurations for Cost and Usage Reports.
items:
$ref: '#/components/schemas/DataExportConfig'
type: array
required:
- data_export_configs
type: object
AWSCcmConfigRequest:
description: AWS CCM Config Create/Update Request body.
properties:
data:
$ref: '#/components/schemas/AWSCcmConfigRequestData'
required:
- data
type: object
AWSCcmConfigRequestAttributes:
description: AWS CCM Config attributes for Create/Update requests.
properties:
ccm_config:
$ref: '#/components/schemas/AWSCcmConfig'
required:
- ccm_config
type: object
AWSCcmConfigRequestData:
description: AWS CCM Config Create/Update Request data.
properties:
attributes:
$ref: '#/components/schemas/AWSCcmConfigRequestAttributes'
type:
$ref: '#/components/schemas/AWSCcmConfigType'
required:
- attributes
- type
type: object
AWSCcmConfigResponse:
description: AWS CCM Config response body.
properties:
data:
$ref: '#/components/schemas/AWSCcmConfigResponseData'
required:
- data
type: object
AWSCcmConfigResponseAttributes:
description: AWS CCM Config response attributes.
properties:
data_export_configs:
description: List of data export configurations for Cost and Usage Reports.
items:
$ref: '#/components/schemas/DataExportConfig'
type: array
type: object
AWSCcmConfigResponseData:
description: AWS CCM Config response data.
properties:
attributes:
$ref: '#/components/schemas/AWSCcmConfigResponseAttributes'
id:
$ref: '#/components/schemas/AWSAccountConfigID'
type:
$ref: '#/components/schemas/AWSCcmConfigType'
required:
- type
type: object
AWSCcmConfigType:
default: ccm_config
description: AWS CCM Config resource type.
enum:
- ccm_config
example: ccm_config
type: string
x-enum-varnames:
- CCM_CONFIG
AWSCredentials:
description: The definition of `AWSCredentials` object.
oneOf:
Expand Down Expand Up @@ -16811,6 +16887,37 @@ components:
example: canceled
type: string
type: object
DataExportConfig:
description: AWS Cost and Usage Report data export configuration.
properties:
bucket_name:
description: Name of the S3 bucket where the Cost and Usage Report is stored.
example: billing
type: string
bucket_region:
description: AWS region of the S3 bucket.
example: us-east-1
type: string
report_name:
description: Name of the Cost and Usage Report.
example: cost-and-usage-report
type: string
report_prefix:
description: S3 prefix where the Cost and Usage Report is stored.
example: reports
type: string
report_type:
description: Type of the Cost and Usage Report. Currently only `CUR2.0`
is supported.
example: CUR2.0
type: string
required:
- report_name
- report_prefix
- report_type
- bucket_name
- bucket_region
type: object
DataRelationshipsTeams:
description: Associates teams with this schedule in a data structure.
properties:
Expand Down Expand Up @@ -72421,6 +72528,147 @@ paths:
operator: OR
permissions:
- aws_configuration_edit
/api/v2/integration/aws/accounts/{aws_account_config_id}/ccm_config:
delete:
description: 'Delete the Cloud Cost Management config for an AWS Account Integration
Config using Cost and Usage Report

(CUR) 2.0 by config ID.'
operationId: DeleteAWSAccountCCMConfig
parameters:
- $ref: '#/components/parameters/AWSAccountConfigIDPathParameter'
responses:
'204':
description: No Content
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Delete AWS CCM config
tags:
- AWS Integration
x-permission:
operator: OR
permissions:
- aws_configuration_edit
x-unstable: '**Note**: This endpoint is in preview and may be subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
get:
description: 'Get the Cloud Cost Management config for an AWS Account Integration
Config using Cost and Usage Report

(CUR) 2.0 by config ID.'
operationId: GetAWSAccountCCMConfig
parameters:
- $ref: '#/components/parameters/AWSAccountConfigIDPathParameter'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AWSCcmConfigResponse'
description: AWS CCM Config object
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get AWS CCM config
tags:
- AWS Integration
x-permission:
operator: OR
permissions:
- aws_configuration_read
x-unstable: '**Note**: This endpoint is in preview and may be subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
patch:
description: 'Update the Cloud Cost Management config for an AWS Account Integration
Config using Cost and Usage Report

(CUR) 2.0 by config ID.'
operationId: UpdateAWSAccountCCMConfig
parameters:
- $ref: '#/components/parameters/AWSAccountConfigIDPathParameter'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AWSCcmConfigRequest'
description: Update a Cloud Cost Management config for an AWS Account Integration
Config.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AWSCcmConfigResponse'
description: AWS CCM Config object
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Update AWS CCM config
tags:
- AWS Integration
x-codegen-request-body-name: body
x-permission:
operator: OR
permissions:
- aws_configuration_edit
x-unstable: '**Note**: This endpoint is in preview and may be subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
post:
description: 'Create the Cloud Cost Management config for an AWS Account Integration
Config using Cost and Usage Report

(CUR) 2.0 by config ID.'
operationId: CreateAWSAccountCCMConfig
parameters:
- $ref: '#/components/parameters/AWSAccountConfigIDPathParameter'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AWSCcmConfigRequest'
description: Create a Cloud Cost Management config for an AWS Account Integration
Config.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AWSCcmConfigResponse'
description: AWS CCM Config object
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'409':
$ref: '#/components/responses/ConflictResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Create AWS CCM config
tags:
- AWS Integration
x-codegen-request-body-name: body
x-permission:
operator: OR
permissions:
- aws_configuration_edit
x-unstable: '**Note**: This endpoint is in preview and may be subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/integration/aws/available_namespaces:
get:
description: Get a list of available AWS CloudWatch namespaces that can send
Expand Down
63 changes: 63 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1712,6 +1712,62 @@ datadog\_api\_client.v2.model.aws\_auth\_config\_role module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.aws\_ccm\_config module
-----------------------------------------------------

.. automodule:: datadog_api_client.v2.model.aws_ccm_config
:members:
:show-inheritance:

datadog\_api\_client.v2.model.aws\_ccm\_config\_request module
--------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.aws_ccm_config_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.aws\_ccm\_config\_request\_attributes module
--------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.aws_ccm_config_request_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.aws\_ccm\_config\_request\_data module
--------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.aws_ccm_config_request_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.aws\_ccm\_config\_response module
---------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.aws_ccm_config_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.aws\_ccm\_config\_response\_attributes module
---------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.aws_ccm_config_response_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.aws\_ccm\_config\_response\_data module
---------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.aws_ccm_config_response_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.aws\_ccm\_config\_type module
-----------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.aws_ccm_config_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.aws\_credentials module
-----------------------------------------------------

Expand Down Expand Up @@ -6591,6 +6647,13 @@ datadog\_api\_client.v2.model.data\_deletion\_response\_meta module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.data\_export\_config module
---------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.data_export_config
:members:
:show-inheritance:

datadog\_api\_client.v2.model.data\_relationships\_teams module
---------------------------------------------------------------

Expand Down
40 changes: 40 additions & 0 deletions examples/v2/aws-integration/CreateAWSAccountCCMConfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"""
Create AWS CCM config returns "AWS CCM Config object" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi
from datadog_api_client.v2.model.aws_ccm_config import AWSCcmConfig
from datadog_api_client.v2.model.aws_ccm_config_request import AWSCcmConfigRequest
from datadog_api_client.v2.model.aws_ccm_config_request_attributes import AWSCcmConfigRequestAttributes
from datadog_api_client.v2.model.aws_ccm_config_request_data import AWSCcmConfigRequestData
from datadog_api_client.v2.model.aws_ccm_config_type import AWSCcmConfigType
from datadog_api_client.v2.model.data_export_config import DataExportConfig

body = AWSCcmConfigRequest(
data=AWSCcmConfigRequestData(
attributes=AWSCcmConfigRequestAttributes(
ccm_config=AWSCcmConfig(
data_export_configs=[
DataExportConfig(
bucket_name="billing",
bucket_region="us-east-1",
report_name="cost-and-usage-report",
report_prefix="reports",
report_type="CUR2.0",
),
],
),
),
type=AWSCcmConfigType.CCM_CONFIG,
),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = AWSIntegrationApi(api_client)
response = api_instance.create_aws_account_ccm_config(
aws_account_config_id="873c7e78-8915-4c7a-a3a7-33a57adf54f4", body=body
)

print(response)
Loading
Loading