Skip to content

Commit

Permalink
Add custom cost endpoints to public API documentation (#2595)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec committed Jul 26, 2024
1 parent 278e7bd commit 69c04c5
Show file tree
Hide file tree
Showing 35 changed files with 3,565 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-25 18:59:27.218959",
"spec_repo_commit": "ccf15bee"
"regenerated": "2024-07-26 15:05:45.922448",
"spec_repo_commit": "bdcf730e"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-25 18:59:27.236772",
"spec_repo_commit": "ccf15bee"
"regenerated": "2024-07-26 15:05:45.941135",
"spec_repo_commit": "bdcf730e"
}
}
}
347 changes: 347 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ components:
required: true
schema:
type: string
FileID:
description: File ID.
in: path
name: file_id
required: true
schema:
type: string
GCPSTSServiceAccountID:
description: Your GCP STS enabled service account's unique ID.
in: path
Expand Down Expand Up @@ -5516,6 +5523,234 @@ components:
nullable: true
type: string
type: object
CustomCostGetResponseMeta:
description: Meta for the response from the Get Custom Costs endpoints.
properties:
version:
description: Version of Custom Costs file
type: string
type: object
CustomCostListResponseMeta:
description: Meta for the response from the List Custom Costs endpoints.
properties:
total_filtered_count:
description: Number of Custom Costs files returned by the List Custom Costs
endpoint
format: int64
type: integer
version:
description: Version of Custom Costs file
type: string
type: object
CustomCostUploadResponseMeta:
description: Meta for the response from the Upload Custom Costs endpoints.
properties:
version:
description: Version of Custom Costs file
type: string
type: object
CustomCostsFileGetResponse:
description: Response for Get Custom Costs files.
properties:
data:
$ref: '#/components/schemas/CustomCostsFileMetadataWithContentHighLevel'
meta:
$ref: '#/components/schemas/CustomCostGetResponseMeta'
type: object
CustomCostsFileLineItem:
description: Line item details from a Custom Costs file.
properties:
BilledCost:
description: Total cost in the cost file.
example: 100.5
format: double
type: number
BillingCurrency:
description: Currency used in the Custom Costs file.
example: USD
type: string
ChargeDescription:
description: Description for the line item cost.
example: Monthly usage charge for my service
type: string
ChargePeriodEnd:
description: End date of the usage charge.
example: '2023-02-28'
pattern: ^\d{4}-\d{2}-\d{2}$
type: string
ChargePeriodStart:
description: Start date of the usage charge.
example: '2023-02-01'
pattern: ^\d{4}-\d{2}-\d{2}$
type: string
ProviderName:
description: Name of the provider for the line item.
type: string
Tags:
additionalProperties:
type: string
description: Additional tags for the line item.
type: object
type: object
CustomCostsFileListResponse:
description: Response for List Custom Costs files.
properties:
data:
description: List of Custom Costs files.
items:
$ref: '#/components/schemas/CustomCostsFileMetadataHighLevel'
type: array
meta:
$ref: '#/components/schemas/CustomCostListResponseMeta'
type: object
CustomCostsFileMetadata:
description: Schema of a Custom Costs metadata.
properties:
billed_cost:
description: Total cost in the cost file.
example: 100.5
format: double
type: number
billing_currency:
description: Currency used in the Custom Costs file.
example: USD
type: string
charge_period:
$ref: '#/components/schemas/CustomCostsFileUsageChargePeriod'
name:
description: Name of the Custom Costs file.
example: my_file.json
type: string
provider_names:
description: Providers contained in the Custom Costs file.
items:
description: Name of the provider.
example: my_provider
type: string
type: array
status:
description: Status of the Custom Costs file.
example: active
type: string
uploaded_at:
description: Timestamp, in millisecond, of the upload time of the Custom
Costs file.
example: 1704067200000
format: double
type: number
uploaded_by:
$ref: '#/components/schemas/CustomCostsUser'
type: object
CustomCostsFileMetadataHighLevel:
description: JSON API format for a Custom Costs file.
properties:
attributes:
$ref: '#/components/schemas/CustomCostsFileMetadata'
id:
description: ID of the Custom Costs metadata.
type: string
type:
description: Type of the Custom Costs file metadata.
type: string
type: object
CustomCostsFileMetadataWithContent:
description: Schema of a cost file's metadata.
properties:
billed_cost:
description: Total cost in the cost file.
example: 100.5
format: double
type: number
billing_currency:
description: Currency used in the Custom Costs file.
example: USD
type: string
charge_period:
$ref: '#/components/schemas/CustomCostsFileUsageChargePeriod'
content:
description: Detail of the line items from the Custom Costs file.
items:
$ref: '#/components/schemas/CustomCostsFileLineItem'
type: array
name:
description: Name of the Custom Costs file.
example: my_file.json
type: string
provider_names:
description: Providers contained in the Custom Costs file.
items:
description: Name of a provider.
example: my_provider
type: string
type: array
status:
description: Status of the Custom Costs file.
example: active
type: string
uploaded_at:
description: Timestamp in millisecond of the upload time of the Custom Costs
file.
example: 1704067200000
format: double
type: number
uploaded_by:
$ref: '#/components/schemas/CustomCostsUser'
type: object
CustomCostsFileMetadataWithContentHighLevel:
description: JSON API format of for a Custom Costs file with content.
properties:
attributes:
$ref: '#/components/schemas/CustomCostsFileMetadataWithContent'
id:
description: ID of the Custom Costs metadata.
type: string
type:
description: Type of the Custom Costs file metadata.
type: string
type: object
CustomCostsFileUploadRequest:
description: Request for uploading a Custom Costs file.
items:
$ref: '#/components/schemas/CustomCostsFileLineItem'
type: array
CustomCostsFileUploadResponse:
description: Response for Uploaded Custom Costs files.
properties:
data:
$ref: '#/components/schemas/CustomCostsFileMetadataHighLevel'
meta:
$ref: '#/components/schemas/CustomCostUploadResponseMeta'
type: object
CustomCostsFileUsageChargePeriod:
description: Usage charge period of a Custom Costs file.
properties:
end:
description: End of the usage of the Custom Costs file.
example: 1706745600000
format: double
type: number
start:
description: Start of the usage of the Custom Costs file.
example: 1704067200000
format: double
type: number
type: object
CustomCostsUser:
description: Metadata of the user that has uploaded the Custom Costs file.
properties:
email:
description: The name of the Custom Costs file.
example: email.test@datadohq.com
type: string
icon:
description: The name of the Custom Costs file.
example: icon.png
type: string
name:
description: Name of the user.
example: Test User
type: string
type: object
CustomDestinationAttributeTagsRestrictionListType:
default: ALLOW_LIST
description: 'How `forward_tags_restriction_list` parameter should be interpreted.
Expand Down Expand Up @@ -26224,6 +26459,118 @@ paths:
summary: Update Cloud Cost Management Azure config
tags:
- Cloud Cost Management
/api/v2/cost/custom_costs:
get:
description: List the Custom Costs files.
operationId: ListCustomCostsFiles
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CustomCostsFileListResponse'
description: OK
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- cloud_cost_management_read
summary: List Custom Costs files
tags:
- Cloud Cost Management
put:
description: Upload a Custom Costs file.
operationId: UploadCustomCostsFile
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomCostsFileUploadRequest'
required: true
responses:
'202':
content:
application/json:
schema:
$ref: '#/components/schemas/CustomCostsFileUploadResponse'
description: Accepted
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- cloud_cost_management_write
summary: Upload Custom Costs file
tags:
- Cloud Cost Management
/api/v2/cost/custom_costs/{file_id}:
delete:
description: Delete the specified Custom Costs file.
operationId: DeleteCustomCostsFile
parameters:
- $ref: '#/components/parameters/FileID'
responses:
'204':
description: No Content
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- cloud_cost_management_write
summary: Delete Custom Costs file
tags:
- Cloud Cost Management
get:
description: Fetch the specified Custom Costs file.
operationId: GetCustomCostsFile
parameters:
- $ref: '#/components/parameters/FileID'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CustomCostsFileGetResponse'
description: OK
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- cloud_cost_management_read
summary: Get Custom Costs file
tags:
- Cloud Cost Management
/api/v2/cost/enabled:
get:
description: Get the Cloud Cost Management activity.
Expand Down
Loading

0 comments on commit 69c04c5

Please sign in to comment.