diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index f783b46d7a..898e13c106 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -62663,6 +62663,254 @@ components:
required:
- data
type: object
+ GitHubCostsCloudCostMetricsIntegrationDataflowResponse:
+ description: >-
+ GitHub costs for Actions, Packages, Copilot, storage, and other billed products, estimated from list prices and usage, including discounts when available. Used by [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/). Requires an enterprise or organization on GitHub's enhanced billing platform; without it this dataflow collects no data. This dataflow is always on and cannot be turned off, which is why it appears in responses only.
+ properties:
+ enabled:
+ description: Whether Datadog collects this data. Always `true`, because this collection cannot be turned off.
+ example: true
+ readOnly: true
+ type: boolean
+ status:
+ $ref: "#/components/schemas/IntegrationAccountDataflowStatus"
+ type: object
+ GitHubCostsIntegrationAccountAuthenticationRequest:
+ description: Authentication for creating the GitHub Costs integration account. Exactly one method is set.
+ oneOf:
+ - $ref: "#/components/schemas/GitHubCostsIntegrationAccountBearerTokenAuthRequest"
+ GitHubCostsIntegrationAccountAuthenticationResponse:
+ description: Authentication configured on the GitHub Costs integration account.
+ oneOf:
+ - $ref: "#/components/schemas/GitHubCostsIntegrationAccountBearerTokenAuthResponse"
+ GitHubCostsIntegrationAccountAuthenticationUpdate:
+ description: Authentication for updating the GitHub Costs integration account. Exactly one method is set.
+ oneOf:
+ - $ref: "#/components/schemas/GitHubCostsIntegrationAccountBearerTokenAuthUpdate"
+ GitHubCostsIntegrationAccountBearerTokenAuthRequest:
+ additionalProperties: false
+ description: >-
+ Bearer token authentication. For an enterprise, use a personal access token (classic) from an Enterprise Admin with the `manage_billing:enterprise` and `read:org` scopes. For an organization, use a fine-grained personal access token created by an organization owner, with the organization as resource owner and read-only `Administration` permission.
+ properties:
+ auth_type:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountBearerTokenAuthType"
+ token:
+ description: Secret token used to authenticate with GitHub.
+ example: your-token
+ type: string
+ writeOnly: true
+ required:
+ - auth_type
+ - token
+ type: object
+ GitHubCostsIntegrationAccountBearerTokenAuthResponse:
+ description: The bearer token authentication method configured on the account.
+ properties:
+ auth_type:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountBearerTokenAuthType"
+ required:
+ - auth_type
+ type: object
+ GitHubCostsIntegrationAccountBearerTokenAuthType:
+ default: bearer_token
+ description: The authentication method type.
+ enum:
+ - bearer_token
+ example: bearer_token
+ type: string
+ x-enum-varnames:
+ - BEARER_TOKEN
+ GitHubCostsIntegrationAccountBearerTokenAuthUpdate:
+ additionalProperties: false
+ description: >-
+ Bearer token authentication. For an enterprise, use a personal access token (classic) from an Enterprise Admin with the `manage_billing:enterprise` and `read:org` scopes. For an organization, use a fine-grained personal access token created by an organization owner, with the organization as resource owner and read-only `Administration` permission. Only the fields provided are changed; omit `token` to keep the stored one.
+ properties:
+ auth_type:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountBearerTokenAuthType"
+ token:
+ description: Secret token used to authenticate with GitHub.
+ example: your-token
+ type: string
+ writeOnly: true
+ required:
+ - auth_type
+ type: object
+ GitHubCostsIntegrationAccountCreateAttributes:
+ description: Writable attributes used to create a GitHub Costs integration account.
+ properties:
+ authentication:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountAuthenticationRequest"
+ name:
+ description: Human-readable name of the GitHub Costs integration account.
+ example: github-costs-acme
+ type: string
+ settings:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountSettingsRequest"
+ required:
+ - name
+ - authentication
+ - settings
+ type: object
+ GitHubCostsIntegrationAccountCreateData:
+ description: Data envelope for creating a GitHub Costs integration account.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountCreateAttributes"
+ type:
+ $ref: "#/components/schemas/IntegrationAccountType"
+ required:
+ - type
+ - attributes
+ type: object
+ GitHubCostsIntegrationAccountCreateRequest:
+ description: Request payload to create a GitHub Costs integration account.
+ properties:
+ data:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountCreateData"
+ required:
+ - data
+ type: object
+ GitHubCostsIntegrationAccountResponse:
+ description: Response payload for a single GitHub Costs integration account.
+ properties:
+ data:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountResponseData"
+ required:
+ - data
+ type: object
+ GitHubCostsIntegrationAccountResponseAttributes:
+ description: Attributes of a GitHub Costs integration account returned in responses.
+ properties:
+ authentication:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountAuthenticationResponse"
+ dataflows:
+ $ref: "#/components/schemas/GitHubCostsIntegrationDataflowsResponse"
+ name:
+ description: Human-readable name of the GitHub Costs integration account.
+ example: github-costs-acme
+ type: string
+ settings:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountSettingsResponse"
+ required:
+ - name
+ - settings
+ type: object
+ GitHubCostsIntegrationAccountResponseData:
+ description: Data envelope of a GitHub Costs integration account, including server-assigned identity.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountResponseAttributes"
+ id:
+ description: Server-generated unique identifier of the GitHub Costs integration account.
+ example: 4b7c2e1a-6f3d-4e8b-9a52-1d0c8f7e3b64
+ readOnly: true
+ type: string
+ type:
+ $ref: "#/components/schemas/IntegrationAccountType"
+ required:
+ - id
+ - attributes
+ - type
+ type: object
+ GitHubCostsIntegrationAccountSettingsRequest:
+ additionalProperties: false
+ description: Settings for creating the GitHub Costs integration account.
+ properties:
+ enterprise_name:
+ description: >-
+ Your GitHub enterprise slug, found on the enterprise settings page (e.g. enterprise-name), or an organization login (e.g. organization-name). An enterprise already covers every organization it owns.
+ example: acme
+ type: string
+ tags:
+ description: Comma-separated tags added to the collected costs, for example `env:prod,team:example`.
+ example: "env:prod,team:finops"
+ type: string
+ required:
+ - enterprise_name
+ type: object
+ GitHubCostsIntegrationAccountSettingsResponse:
+ description: Settings configured on the GitHub Costs integration account.
+ properties:
+ enterprise_name:
+ description: >-
+ Your GitHub enterprise slug, found on the enterprise settings page (e.g. enterprise-name), or an organization login (e.g. organization-name). An enterprise already covers every organization it owns.
+ example: acme
+ type: string
+ tags:
+ description: Comma-separated tags added to the collected costs, for example `env:prod,team:example`.
+ example: "env:prod,team:finops"
+ type: string
+ required:
+ - enterprise_name
+ type: object
+ GitHubCostsIntegrationAccountSettingsUpdate:
+ additionalProperties: false
+ description: Settings for updating the GitHub Costs integration account. Only the fields provided are changed.
+ properties:
+ enterprise_name:
+ description: >-
+ Your GitHub enterprise slug, found on the enterprise settings page (e.g. enterprise-name), or an organization login (e.g. organization-name). An enterprise already covers every organization it owns.
+ example: acme
+ type: string
+ tags:
+ description: Comma-separated tags added to the collected costs, for example `env:prod,team:example`.
+ example: "env:prod,team:finops"
+ type: string
+ type: object
+ GitHubCostsIntegrationAccountUpdateAttributes:
+ description: >-
+ Writable attributes used to update a GitHub Costs integration account. Every field is optional; only the fields provided are changed.
+ properties:
+ authentication:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountAuthenticationUpdate"
+ name:
+ description: Human-readable name of the GitHub Costs integration account.
+ example: github-costs-acme
+ type: string
+ settings:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountSettingsUpdate"
+ type: object
+ GitHubCostsIntegrationAccountUpdateData:
+ description: Data envelope for updating a GitHub Costs integration account.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountUpdateAttributes"
+ id:
+ description: Unique identifier of the GitHub Costs integration account to update.
+ example: 4b7c2e1a-6f3d-4e8b-9a52-1d0c8f7e3b64
+ type: string
+ type:
+ $ref: "#/components/schemas/IntegrationAccountType"
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ GitHubCostsIntegrationAccountUpdateRequest:
+ description: Request payload to update a GitHub Costs integration account.
+ properties:
+ data:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountUpdateData"
+ required:
+ - data
+ type: object
+ GitHubCostsIntegrationAccountsResponse:
+ description: Response payload for a list of GitHub Costs integration accounts.
+ properties:
+ data:
+ description: List of GitHub Costs integration accounts.
+ items:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountResponseData"
+ type: array
+ required:
+ - data
+ type: object
+ GitHubCostsIntegrationDataflowsResponse:
+ description: Data Datadog collects from GitHub Costs, keyed by dataflow id.
+ properties:
+ github-cloud-cost-metrics:
+ $ref: "#/components/schemas/GitHubCostsCloudCostMetricsIntegrationDataflowResponse"
+ type: object
GitHubOIDCClaimPatterns:
additionalProperties: false
description: |-
@@ -197416,6 +197664,244 @@ paths:
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/integration-interfaces/github-costs/accounts:
+ get:
+ description: List GitHub Costs integration accounts.
+ operationId: ListGitHubCostsIntegrationAccounts
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ - attributes:
+ authentication:
+ auth_type: bearer_token
+ dataflows:
+ github-cloud-cost-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-06-25T08:30:50Z"
+ name: github-costs-acme
+ settings:
+ enterprise_name: acme
+ tags: "env:prod,team:finops"
+ id: 4b7c2e1a-6f3d-4e8b-9a52-1d0c8f7e3b64
+ type: integration-account
+ schema:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountsResponse"
+ description: OK
+ "400":
+ $ref: "#/components/responses/BadRequestResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: List GitHub Costs integration accounts
+ tags:
+ - GitHub Costs Integration
+ "x-permission":
+ operator: OR
+ permissions:
+ - integrations_read
+ 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/).
+ post:
+ description: Create a GitHub Costs integration account.
+ operationId: CreateGitHubCostsIntegrationAccount
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountCreateRequest"
+ required: true
+ responses:
+ "201":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ authentication:
+ auth_type: bearer_token
+ dataflows:
+ github-cloud-cost-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-06-25T08:30:50Z"
+ name: github-costs-acme
+ settings:
+ enterprise_name: acme
+ tags: "env:prod,team:finops"
+ id: 4b7c2e1a-6f3d-4e8b-9a52-1d0c8f7e3b64
+ type: integration-account
+ schema:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountResponse"
+ description: Created
+ "400":
+ $ref: "#/components/responses/BadRequestResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "422":
+ $ref: "#/components/responses/UnprocessableEntityResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Create a GitHub Costs integration account
+ tags:
+ - GitHub Costs Integration
+ x-codegen-request-body-name: body
+ "x-permission":
+ operator: OR
+ permissions:
+ - manage_integrations
+ 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/integration-interfaces/github-costs/accounts/{account_id}:
+ delete:
+ description: Delete a GitHub Costs integration account.
+ operationId: DeleteGitHubCostsIntegrationAccount
+ parameters:
+ - $ref: "#/components/parameters/IntegrationAccountIdParameter"
+ responses:
+ "200":
+ description: OK
+ "400":
+ $ref: "#/components/responses/BadRequestResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Delete a GitHub Costs integration account
+ tags:
+ - GitHub Costs Integration
+ "x-permission":
+ operator: OR
+ permissions:
+ - manage_integrations
+ 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/).
+ get:
+ description: Get a GitHub Costs integration account.
+ operationId: GetGitHubCostsIntegrationAccount
+ parameters:
+ - $ref: "#/components/parameters/IntegrationAccountIdParameter"
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ authentication:
+ auth_type: bearer_token
+ dataflows:
+ github-cloud-cost-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-06-25T08:30:50Z"
+ name: github-costs-acme
+ settings:
+ enterprise_name: acme
+ tags: "env:prod,team:finops"
+ id: 4b7c2e1a-6f3d-4e8b-9a52-1d0c8f7e3b64
+ type: integration-account
+ schema:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountResponse"
+ description: OK
+ "400":
+ $ref: "#/components/responses/BadRequestResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Get a GitHub Costs integration account
+ tags:
+ - GitHub Costs Integration
+ "x-permission":
+ operator: OR
+ permissions:
+ - integrations_read
+ 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/).
+ patch:
+ description: Update a GitHub Costs integration account. Only the fields provided are changed.
+ operationId: UpdateGitHubCostsIntegrationAccount
+ parameters:
+ - $ref: "#/components/parameters/IntegrationAccountIdParameter"
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountUpdateRequest"
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ authentication:
+ auth_type: bearer_token
+ dataflows:
+ github-cloud-cost-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-06-25T08:30:50Z"
+ name: github-costs-acme
+ settings:
+ enterprise_name: acme
+ tags: "env:prod,team:finops"
+ id: 4b7c2e1a-6f3d-4e8b-9a52-1d0c8f7e3b64
+ type: integration-account
+ schema:
+ $ref: "#/components/schemas/GitHubCostsIntegrationAccountResponse"
+ description: OK
+ "400":
+ $ref: "#/components/responses/BadRequestResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "422":
+ $ref: "#/components/responses/UnprocessableEntityResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Update a GitHub Costs integration account
+ tags:
+ - GitHub Costs Integration
+ x-codegen-request-body-name: body
+ "x-permission":
+ operator: OR
+ permissions:
+ - manage_integrations
+ 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/integration-interfaces/snowflake/accounts:
get:
description: List Snowflake integration accounts.
@@ -272012,6 +272498,15 @@ tags:
externalDocs:
url: https://docs.datadoghq.com/integrations/google_cloud_platform
name: GCP Integration
+ - description: |-
+ Manage your Datadog GitHub Costs integration accounts and account resources
+ directly through the Datadog API. See the
+ [GitHub Costs integration page](https://docs.datadoghq.com/integrations/github-costs/) for
+ more information.
+ externalDocs:
+ description: GitHub Costs integration.
+ url: https://docs.datadoghq.com/integrations/github-costs/
+ name: GitHub Costs Integration
- description: |-
Configure your [Datadog Google Chat integration](https://docs.datadoghq.com/integrations/google-hangouts-chat/)
directly through the Datadog API.
diff --git a/examples/v2/github-costs-integration/CreateGitHubCostsIntegrationAccount.py b/examples/v2/github-costs-integration/CreateGitHubCostsIntegrationAccount.py
new file mode 100644
index 0000000000..092aa8df86
--- /dev/null
+++ b/examples/v2/github-costs-integration/CreateGitHubCostsIntegrationAccount.py
@@ -0,0 +1,52 @@
+"""
+Create a GitHub Costs integration account returns "Created" response
+"""
+
+from os import environ
+from datadog_api_client import ApiClient, Configuration
+from datadog_api_client.v2.api.git_hub_costs_integration_api import GitHubCostsIntegrationApi
+from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_request import (
+ GitHubCostsIntegrationAccountBearerTokenAuthRequest,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_type import (
+ GitHubCostsIntegrationAccountBearerTokenAuthType,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_create_attributes import (
+ GitHubCostsIntegrationAccountCreateAttributes,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_create_data import (
+ GitHubCostsIntegrationAccountCreateData,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_create_request import (
+ GitHubCostsIntegrationAccountCreateRequest,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_settings_request import (
+ GitHubCostsIntegrationAccountSettingsRequest,
+)
+from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+body = GitHubCostsIntegrationAccountCreateRequest(
+ data=GitHubCostsIntegrationAccountCreateData(
+ attributes=GitHubCostsIntegrationAccountCreateAttributes(
+ authentication=GitHubCostsIntegrationAccountBearerTokenAuthRequest(
+ auth_type=GitHubCostsIntegrationAccountBearerTokenAuthType.BEARER_TOKEN,
+ token="your-token",
+ ),
+ name="github-costs-acme",
+ settings=GitHubCostsIntegrationAccountSettingsRequest(
+ enterprise_name="acme",
+ tags="env:prod,team:finops",
+ ),
+ ),
+ type=IntegrationAccountType.INTEGRATION_ACCOUNT,
+ ),
+)
+
+configuration = Configuration()
+configuration.access_token = environ["DD_BEARER_TOKEN"]
+configuration.unstable_operations["create_git_hub_costs_integration_account"] = True
+with ApiClient(configuration) as api_client:
+ api_instance = GitHubCostsIntegrationApi(api_client)
+ response = api_instance.create_git_hub_costs_integration_account(body=body)
+
+ print(response)
diff --git a/examples/v2/github-costs-integration/DeleteGitHubCostsIntegrationAccount.py b/examples/v2/github-costs-integration/DeleteGitHubCostsIntegrationAccount.py
new file mode 100644
index 0000000000..53b3f94956
--- /dev/null
+++ b/examples/v2/github-costs-integration/DeleteGitHubCostsIntegrationAccount.py
@@ -0,0 +1,16 @@
+"""
+Delete a GitHub Costs integration account returns "OK" response
+"""
+
+from os import environ
+from datadog_api_client import ApiClient, Configuration
+from datadog_api_client.v2.api.git_hub_costs_integration_api import GitHubCostsIntegrationApi
+
+configuration = Configuration()
+configuration.access_token = environ["DD_BEARER_TOKEN"]
+configuration.unstable_operations["delete_git_hub_costs_integration_account"] = True
+with ApiClient(configuration) as api_client:
+ api_instance = GitHubCostsIntegrationApi(api_client)
+ api_instance.delete_git_hub_costs_integration_account(
+ account_id="account_id",
+ )
diff --git a/examples/v2/github-costs-integration/GetGitHubCostsIntegrationAccount.py b/examples/v2/github-costs-integration/GetGitHubCostsIntegrationAccount.py
new file mode 100644
index 0000000000..da5980e24c
--- /dev/null
+++ b/examples/v2/github-costs-integration/GetGitHubCostsIntegrationAccount.py
@@ -0,0 +1,18 @@
+"""
+Get a GitHub Costs integration account returns "OK" response
+"""
+
+from os import environ
+from datadog_api_client import ApiClient, Configuration
+from datadog_api_client.v2.api.git_hub_costs_integration_api import GitHubCostsIntegrationApi
+
+configuration = Configuration()
+configuration.access_token = environ["DD_BEARER_TOKEN"]
+configuration.unstable_operations["get_git_hub_costs_integration_account"] = True
+with ApiClient(configuration) as api_client:
+ api_instance = GitHubCostsIntegrationApi(api_client)
+ response = api_instance.get_git_hub_costs_integration_account(
+ account_id="account_id",
+ )
+
+ print(response)
diff --git a/examples/v2/github-costs-integration/ListGitHubCostsIntegrationAccounts.py b/examples/v2/github-costs-integration/ListGitHubCostsIntegrationAccounts.py
new file mode 100644
index 0000000000..d23870e32b
--- /dev/null
+++ b/examples/v2/github-costs-integration/ListGitHubCostsIntegrationAccounts.py
@@ -0,0 +1,16 @@
+"""
+List GitHub Costs integration accounts returns "OK" response
+"""
+
+from os import environ
+from datadog_api_client import ApiClient, Configuration
+from datadog_api_client.v2.api.git_hub_costs_integration_api import GitHubCostsIntegrationApi
+
+configuration = Configuration()
+configuration.access_token = environ["DD_BEARER_TOKEN"]
+configuration.unstable_operations["list_git_hub_costs_integration_accounts"] = True
+with ApiClient(configuration) as api_client:
+ api_instance = GitHubCostsIntegrationApi(api_client)
+ response = api_instance.list_git_hub_costs_integration_accounts()
+
+ print(response)
diff --git a/examples/v2/github-costs-integration/UpdateGitHubCostsIntegrationAccount.py b/examples/v2/github-costs-integration/UpdateGitHubCostsIntegrationAccount.py
new file mode 100644
index 0000000000..b443a8ac46
--- /dev/null
+++ b/examples/v2/github-costs-integration/UpdateGitHubCostsIntegrationAccount.py
@@ -0,0 +1,53 @@
+"""
+Update a GitHub Costs integration account returns "OK" response
+"""
+
+from os import environ
+from datadog_api_client import ApiClient, Configuration
+from datadog_api_client.v2.api.git_hub_costs_integration_api import GitHubCostsIntegrationApi
+from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_type import (
+ GitHubCostsIntegrationAccountBearerTokenAuthType,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_update import (
+ GitHubCostsIntegrationAccountBearerTokenAuthUpdate,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_settings_update import (
+ GitHubCostsIntegrationAccountSettingsUpdate,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_update_attributes import (
+ GitHubCostsIntegrationAccountUpdateAttributes,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_update_data import (
+ GitHubCostsIntegrationAccountUpdateData,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_update_request import (
+ GitHubCostsIntegrationAccountUpdateRequest,
+)
+from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+body = GitHubCostsIntegrationAccountUpdateRequest(
+ data=GitHubCostsIntegrationAccountUpdateData(
+ attributes=GitHubCostsIntegrationAccountUpdateAttributes(
+ authentication=GitHubCostsIntegrationAccountBearerTokenAuthUpdate(
+ auth_type=GitHubCostsIntegrationAccountBearerTokenAuthType.BEARER_TOKEN,
+ token="your-token",
+ ),
+ name="github-costs-acme",
+ settings=GitHubCostsIntegrationAccountSettingsUpdate(
+ enterprise_name="acme",
+ tags="env:prod,team:finops",
+ ),
+ ),
+ id="4b7c2e1a-6f3d-4e8b-9a52-1d0c8f7e3b64",
+ type=IntegrationAccountType.INTEGRATION_ACCOUNT,
+ ),
+)
+
+configuration = Configuration()
+configuration.access_token = environ["DD_BEARER_TOKEN"]
+configuration.unstable_operations["update_git_hub_costs_integration_account"] = True
+with ApiClient(configuration) as api_client:
+ api_instance = GitHubCostsIntegrationApi(api_client)
+ response = api_instance.update_git_hub_costs_integration_account(account_id="account_id", body=body)
+
+ print(response)
diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py
index 9755f40f34..4020a7cbd7 100644
--- a/src/datadog_api_client/configuration.py
+++ b/src/datadog_api_client/configuration.py
@@ -736,6 +736,11 @@ def __init__(
"v2.get_elastic_cloud_integration_account": False,
"v2.list_elastic_cloud_integration_accounts": False,
"v2.update_elastic_cloud_integration_account": False,
+ "v2.create_git_hub_costs_integration_account": False,
+ "v2.delete_git_hub_costs_integration_account": False,
+ "v2.get_git_hub_costs_integration_account": False,
+ "v2.list_git_hub_costs_integration_accounts": False,
+ "v2.update_git_hub_costs_integration_account": False,
"v2.create_snowflake_integration_account": False,
"v2.delete_snowflake_integration_account": False,
"v2.get_snowflake_integration_account": False,
diff --git a/src/datadog_api_client/v2/api/git_hub_costs_integration_api.py b/src/datadog_api_client/v2/api/git_hub_costs_integration_api.py
new file mode 100644
index 0000000000..9eefa24184
--- /dev/null
+++ b/src/datadog_api_client/v2/api/git_hub_costs_integration_api.py
@@ -0,0 +1,224 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Any, Dict
+
+from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
+from datadog_api_client.configuration import Configuration
+from datadog_api_client.v2.model.git_hub_costs_integration_accounts_response import (
+ GitHubCostsIntegrationAccountsResponse,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_response import GitHubCostsIntegrationAccountResponse
+from datadog_api_client.v2.model.git_hub_costs_integration_account_create_request import (
+ GitHubCostsIntegrationAccountCreateRequest,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_update_request import (
+ GitHubCostsIntegrationAccountUpdateRequest,
+)
+
+
+class GitHubCostsIntegrationApi:
+ """
+ Manage your Datadog GitHub Costs integration accounts and account resources
+ directly through the Datadog API. See the
+ `GitHub Costs integration page `_ for
+ more information.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient(Configuration())
+ self.api_client = api_client
+
+ self._create_git_hub_costs_integration_account_endpoint = _Endpoint(
+ settings={
+ "response_type": (GitHubCostsIntegrationAccountResponse,),
+ "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
+ "endpoint_path": "/api/v2/integration-interfaces/github-costs/accounts",
+ "operation_id": "create_git_hub_costs_integration_account",
+ "http_method": "POST",
+ "version": "v2",
+ },
+ params_map={
+ "body": {
+ "required": True,
+ "openapi_types": (GitHubCostsIntegrationAccountCreateRequest,),
+ "location": "body",
+ },
+ },
+ headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
+ api_client=api_client,
+ )
+
+ self._delete_git_hub_costs_integration_account_endpoint = _Endpoint(
+ settings={
+ "response_type": None,
+ "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
+ "endpoint_path": "/api/v2/integration-interfaces/github-costs/accounts/{account_id}",
+ "operation_id": "delete_git_hub_costs_integration_account",
+ "http_method": "DELETE",
+ "version": "v2",
+ },
+ params_map={
+ "account_id": {
+ "required": True,
+ "openapi_types": (str,),
+ "attribute": "account_id",
+ "location": "path",
+ },
+ },
+ headers_map={
+ "accept": ["*/*"],
+ },
+ api_client=api_client,
+ )
+
+ self._get_git_hub_costs_integration_account_endpoint = _Endpoint(
+ settings={
+ "response_type": (GitHubCostsIntegrationAccountResponse,),
+ "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
+ "endpoint_path": "/api/v2/integration-interfaces/github-costs/accounts/{account_id}",
+ "operation_id": "get_git_hub_costs_integration_account",
+ "http_method": "GET",
+ "version": "v2",
+ },
+ params_map={
+ "account_id": {
+ "required": True,
+ "openapi_types": (str,),
+ "attribute": "account_id",
+ "location": "path",
+ },
+ },
+ headers_map={
+ "accept": ["application/json"],
+ },
+ api_client=api_client,
+ )
+
+ self._list_git_hub_costs_integration_accounts_endpoint = _Endpoint(
+ settings={
+ "response_type": (GitHubCostsIntegrationAccountsResponse,),
+ "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
+ "endpoint_path": "/api/v2/integration-interfaces/github-costs/accounts",
+ "operation_id": "list_git_hub_costs_integration_accounts",
+ "http_method": "GET",
+ "version": "v2",
+ },
+ params_map={},
+ headers_map={
+ "accept": ["application/json"],
+ },
+ api_client=api_client,
+ )
+
+ self._update_git_hub_costs_integration_account_endpoint = _Endpoint(
+ settings={
+ "response_type": (GitHubCostsIntegrationAccountResponse,),
+ "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
+ "endpoint_path": "/api/v2/integration-interfaces/github-costs/accounts/{account_id}",
+ "operation_id": "update_git_hub_costs_integration_account",
+ "http_method": "PATCH",
+ "version": "v2",
+ },
+ params_map={
+ "account_id": {
+ "required": True,
+ "openapi_types": (str,),
+ "attribute": "account_id",
+ "location": "path",
+ },
+ "body": {
+ "required": True,
+ "openapi_types": (GitHubCostsIntegrationAccountUpdateRequest,),
+ "location": "body",
+ },
+ },
+ headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
+ api_client=api_client,
+ )
+
+ def create_git_hub_costs_integration_account(
+ self,
+ body: GitHubCostsIntegrationAccountCreateRequest,
+ ) -> GitHubCostsIntegrationAccountResponse:
+ """Create a GitHub Costs integration account.
+
+ Create a GitHub Costs integration account.
+
+ :type body: GitHubCostsIntegrationAccountCreateRequest
+ :rtype: GitHubCostsIntegrationAccountResponse
+ """
+ kwargs: Dict[str, Any] = {}
+ kwargs["body"] = body
+
+ return self._create_git_hub_costs_integration_account_endpoint.call_with_http_info(**kwargs)
+
+ def delete_git_hub_costs_integration_account(
+ self,
+ account_id: str,
+ ) -> None:
+ """Delete a GitHub Costs integration account.
+
+ Delete a GitHub Costs integration account.
+
+ :param account_id: Unique identifier of the integration account.
+ :type account_id: str
+ :rtype: None
+ """
+ kwargs: Dict[str, Any] = {}
+ kwargs["account_id"] = account_id
+
+ return self._delete_git_hub_costs_integration_account_endpoint.call_with_http_info(**kwargs)
+
+ def get_git_hub_costs_integration_account(
+ self,
+ account_id: str,
+ ) -> GitHubCostsIntegrationAccountResponse:
+ """Get a GitHub Costs integration account.
+
+ Get a GitHub Costs integration account.
+
+ :param account_id: Unique identifier of the integration account.
+ :type account_id: str
+ :rtype: GitHubCostsIntegrationAccountResponse
+ """
+ kwargs: Dict[str, Any] = {}
+ kwargs["account_id"] = account_id
+
+ return self._get_git_hub_costs_integration_account_endpoint.call_with_http_info(**kwargs)
+
+ def list_git_hub_costs_integration_accounts(
+ self,
+ ) -> GitHubCostsIntegrationAccountsResponse:
+ """List GitHub Costs integration accounts.
+
+ List GitHub Costs integration accounts.
+
+ :rtype: GitHubCostsIntegrationAccountsResponse
+ """
+ kwargs: Dict[str, Any] = {}
+ return self._list_git_hub_costs_integration_accounts_endpoint.call_with_http_info(**kwargs)
+
+ def update_git_hub_costs_integration_account(
+ self,
+ account_id: str,
+ body: GitHubCostsIntegrationAccountUpdateRequest,
+ ) -> GitHubCostsIntegrationAccountResponse:
+ """Update a GitHub Costs integration account.
+
+ Update a GitHub Costs integration account. Only the fields provided are changed.
+
+ :param account_id: Unique identifier of the integration account.
+ :type account_id: str
+ :type body: GitHubCostsIntegrationAccountUpdateRequest
+ :rtype: GitHubCostsIntegrationAccountResponse
+ """
+ kwargs: Dict[str, Any] = {}
+ kwargs["account_id"] = account_id
+
+ kwargs["body"] = body
+
+ return self._update_git_hub_costs_integration_account_endpoint.call_with_http_info(**kwargs)
diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py
index 10452dce22..abe9ab66b2 100644
--- a/src/datadog_api_client/v2/apis/__init__.py
+++ b/src/datadog_api_client/v2/apis/__init__.py
@@ -67,6 +67,7 @@
from datadog_api_client.v2.api.fleet_automation_api import FleetAutomationApi
from datadog_api_client.v2.api.forms_api import FormsApi
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
+from datadog_api_client.v2.api.git_hub_costs_integration_api import GitHubCostsIntegrationApi
from datadog_api_client.v2.api.google_chat_integration_api import GoogleChatIntegrationApi
from datadog_api_client.v2.api.governance_console_api import GovernanceConsoleApi
from datadog_api_client.v2.api.high_availability_multi_region_api import HighAvailabilityMultiRegionApi
@@ -228,6 +229,7 @@
"FleetAutomationApi",
"FormsApi",
"GCPIntegrationApi",
+ "GitHubCostsIntegrationApi",
"GoogleChatIntegrationApi",
"GovernanceConsoleApi",
"HighAvailabilityMultiRegionApi",
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_cloud_cost_metrics_integration_dataflow_response.py b/src/datadog_api_client/v2/model/git_hub_costs_cloud_cost_metrics_integration_dataflow_response.py
new file mode 100644
index 0000000000..95aa6ca08f
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_cloud_cost_metrics_integration_dataflow_response.py
@@ -0,0 +1,58 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.integration_account_dataflow_status import IntegrationAccountDataflowStatus
+
+
+class GitHubCostsCloudCostMetricsIntegrationDataflowResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.integration_account_dataflow_status import IntegrationAccountDataflowStatus
+
+ return {
+ "enabled": (bool,),
+ "status": (IntegrationAccountDataflowStatus,),
+ }
+
+ attribute_map = {
+ "enabled": "enabled",
+ "status": "status",
+ }
+ read_only_vars = {
+ "enabled",
+ "status",
+ }
+
+ def __init__(
+ self_,
+ enabled: Union[bool, UnsetType] = unset,
+ status: Union[IntegrationAccountDataflowStatus, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ GitHub costs for Actions, Packages, Copilot, storage, and other billed products, estimated from list prices and usage, including discounts when available. Used by `Cloud Cost Management `_. Requires an enterprise or organization on GitHub's enhanced billing platform; without it this dataflow collects no data. This dataflow is always on and cannot be turned off, which is why it appears in responses only.
+
+ :param enabled: Whether Datadog collects this data. Always ``true`` , because this collection cannot be turned off.
+ :type enabled: bool, optional
+
+ :param status: Read-only collection status of a dataflow.
+ :type status: IntegrationAccountDataflowStatus, optional
+ """
+ if enabled is not unset:
+ kwargs["enabled"] = enabled
+ if status is not unset:
+ kwargs["status"] = status
+ super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_authentication_request.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_authentication_request.py
new file mode 100644
index 0000000000..0b7947146f
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_authentication_request.py
@@ -0,0 +1,43 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+
+from datadog_api_client.model_utils import (
+ ModelComposed,
+ cached_property,
+)
+
+
+class GitHubCostsIntegrationAccountAuthenticationRequest(ModelComposed):
+ def __init__(self, **kwargs):
+ """
+ Authentication for creating the GitHub Costs integration account. Exactly one method is set.
+
+ :param auth_type: The authentication method type.
+ :type auth_type: GitHubCostsIntegrationAccountBearerTokenAuthType
+
+ :param token: Secret token used to authenticate with GitHub.
+ :type token: str
+ """
+ super().__init__(kwargs)
+
+ @cached_property
+ def _composed_schemas(_):
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error because the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_request import (
+ GitHubCostsIntegrationAccountBearerTokenAuthRequest,
+ )
+
+ return {
+ "oneOf": [
+ GitHubCostsIntegrationAccountBearerTokenAuthRequest,
+ ],
+ }
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_authentication_response.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_authentication_response.py
new file mode 100644
index 0000000000..e38017d65b
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_authentication_response.py
@@ -0,0 +1,40 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+
+from datadog_api_client.model_utils import (
+ ModelComposed,
+ cached_property,
+)
+
+
+class GitHubCostsIntegrationAccountAuthenticationResponse(ModelComposed):
+ def __init__(self, **kwargs):
+ """
+ Authentication configured on the GitHub Costs integration account.
+
+ :param auth_type: The authentication method type.
+ :type auth_type: GitHubCostsIntegrationAccountBearerTokenAuthType
+ """
+ super().__init__(kwargs)
+
+ @cached_property
+ def _composed_schemas(_):
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error because the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_response import (
+ GitHubCostsIntegrationAccountBearerTokenAuthResponse,
+ )
+
+ return {
+ "oneOf": [
+ GitHubCostsIntegrationAccountBearerTokenAuthResponse,
+ ],
+ }
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_authentication_update.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_authentication_update.py
new file mode 100644
index 0000000000..7d21c071e3
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_authentication_update.py
@@ -0,0 +1,43 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+
+from datadog_api_client.model_utils import (
+ ModelComposed,
+ cached_property,
+)
+
+
+class GitHubCostsIntegrationAccountAuthenticationUpdate(ModelComposed):
+ def __init__(self, **kwargs):
+ """
+ Authentication for updating the GitHub Costs integration account. Exactly one method is set.
+
+ :param auth_type: The authentication method type.
+ :type auth_type: GitHubCostsIntegrationAccountBearerTokenAuthType
+
+ :param token: Secret token used to authenticate with GitHub.
+ :type token: str, optional
+ """
+ super().__init__(kwargs)
+
+ @cached_property
+ def _composed_schemas(_):
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error because the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_update import (
+ GitHubCostsIntegrationAccountBearerTokenAuthUpdate,
+ )
+
+ return {
+ "oneOf": [
+ GitHubCostsIntegrationAccountBearerTokenAuthUpdate,
+ ],
+ }
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_bearer_token_auth_request.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_bearer_token_auth_request.py
new file mode 100644
index 0000000000..0ed06a6db7
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_bearer_token_auth_request.py
@@ -0,0 +1,54 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_type import (
+ GitHubCostsIntegrationAccountBearerTokenAuthType,
+ )
+
+
+class GitHubCostsIntegrationAccountBearerTokenAuthRequest(ModelNormal):
+ @cached_property
+ def additional_properties_type(_):
+ return None
+
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_type import (
+ GitHubCostsIntegrationAccountBearerTokenAuthType,
+ )
+
+ return {
+ "auth_type": (GitHubCostsIntegrationAccountBearerTokenAuthType,),
+ "token": (str,),
+ }
+
+ attribute_map = {
+ "auth_type": "auth_type",
+ "token": "token",
+ }
+
+ def __init__(self_, auth_type: GitHubCostsIntegrationAccountBearerTokenAuthType, token: str, **kwargs):
+ """
+ Bearer token authentication. For an enterprise, use a personal access token (classic) from an Enterprise Admin with the ``manage_billing:enterprise`` and ``read:org`` scopes. For an organization, use a fine-grained personal access token created by an organization owner, with the organization as resource owner and read-only ``Administration`` permission.
+
+ :param auth_type: The authentication method type.
+ :type auth_type: GitHubCostsIntegrationAccountBearerTokenAuthType
+
+ :param token: Secret token used to authenticate with GitHub.
+ :type token: str
+ """
+ super().__init__(kwargs)
+
+ self_.auth_type = auth_type
+ self_.token = token
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_bearer_token_auth_response.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_bearer_token_auth_response.py
new file mode 100644
index 0000000000..2e597a1f22
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_bearer_token_auth_response.py
@@ -0,0 +1,44 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_type import (
+ GitHubCostsIntegrationAccountBearerTokenAuthType,
+ )
+
+
+class GitHubCostsIntegrationAccountBearerTokenAuthResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_type import (
+ GitHubCostsIntegrationAccountBearerTokenAuthType,
+ )
+
+ return {
+ "auth_type": (GitHubCostsIntegrationAccountBearerTokenAuthType,),
+ }
+
+ attribute_map = {
+ "auth_type": "auth_type",
+ }
+
+ def __init__(self_, auth_type: GitHubCostsIntegrationAccountBearerTokenAuthType, **kwargs):
+ """
+ The bearer token authentication method configured on the account.
+
+ :param auth_type: The authentication method type.
+ :type auth_type: GitHubCostsIntegrationAccountBearerTokenAuthType
+ """
+ super().__init__(kwargs)
+
+ self_.auth_type = auth_type
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_bearer_token_auth_type.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_bearer_token_auth_type.py
new file mode 100644
index 0000000000..ad84f1bc69
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_bearer_token_auth_type.py
@@ -0,0 +1,37 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+
+from datadog_api_client.model_utils import (
+ ModelSimple,
+ cached_property,
+)
+
+from typing import ClassVar
+
+
+class GitHubCostsIntegrationAccountBearerTokenAuthType(ModelSimple):
+ """
+ The authentication method type.
+
+ :param value: If omitted defaults to "bearer_token". Must be one of ["bearer_token"].
+ :type value: str
+ """
+
+ allowed_values = {
+ "bearer_token",
+ }
+ BEARER_TOKEN: ClassVar["GitHubCostsIntegrationAccountBearerTokenAuthType"]
+
+ @cached_property
+ def openapi_types(_):
+ return {
+ "value": (str,),
+ }
+
+
+GitHubCostsIntegrationAccountBearerTokenAuthType.BEARER_TOKEN = GitHubCostsIntegrationAccountBearerTokenAuthType(
+ "bearer_token"
+)
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_bearer_token_auth_update.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_bearer_token_auth_update.py
new file mode 100644
index 0000000000..f49735c7fe
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_bearer_token_auth_update.py
@@ -0,0 +1,62 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_type import (
+ GitHubCostsIntegrationAccountBearerTokenAuthType,
+ )
+
+
+class GitHubCostsIntegrationAccountBearerTokenAuthUpdate(ModelNormal):
+ @cached_property
+ def additional_properties_type(_):
+ return None
+
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_type import (
+ GitHubCostsIntegrationAccountBearerTokenAuthType,
+ )
+
+ return {
+ "auth_type": (GitHubCostsIntegrationAccountBearerTokenAuthType,),
+ "token": (str,),
+ }
+
+ attribute_map = {
+ "auth_type": "auth_type",
+ "token": "token",
+ }
+
+ def __init__(
+ self_,
+ auth_type: GitHubCostsIntegrationAccountBearerTokenAuthType,
+ token: Union[str, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ Bearer token authentication. For an enterprise, use a personal access token (classic) from an Enterprise Admin with the ``manage_billing:enterprise`` and ``read:org`` scopes. For an organization, use a fine-grained personal access token created by an organization owner, with the organization as resource owner and read-only ``Administration`` permission. Only the fields provided are changed; omit ``token`` to keep the stored one.
+
+ :param auth_type: The authentication method type.
+ :type auth_type: GitHubCostsIntegrationAccountBearerTokenAuthType
+
+ :param token: Secret token used to authenticate with GitHub.
+ :type token: str, optional
+ """
+ if token is not unset:
+ kwargs["token"] = token
+ super().__init__(kwargs)
+
+ self_.auth_type = auth_type
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_create_attributes.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_create_attributes.py
new file mode 100644
index 0000000000..db72786d9e
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_create_attributes.py
@@ -0,0 +1,73 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_authentication_request import (
+ GitHubCostsIntegrationAccountAuthenticationRequest,
+ )
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_settings_request import (
+ GitHubCostsIntegrationAccountSettingsRequest,
+ )
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_request import (
+ GitHubCostsIntegrationAccountBearerTokenAuthRequest,
+ )
+
+
+class GitHubCostsIntegrationAccountCreateAttributes(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_authentication_request import (
+ GitHubCostsIntegrationAccountAuthenticationRequest,
+ )
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_settings_request import (
+ GitHubCostsIntegrationAccountSettingsRequest,
+ )
+
+ return {
+ "authentication": (GitHubCostsIntegrationAccountAuthenticationRequest,),
+ "name": (str,),
+ "settings": (GitHubCostsIntegrationAccountSettingsRequest,),
+ }
+
+ attribute_map = {
+ "authentication": "authentication",
+ "name": "name",
+ "settings": "settings",
+ }
+
+ def __init__(
+ self_,
+ authentication: Union[
+ GitHubCostsIntegrationAccountAuthenticationRequest, GitHubCostsIntegrationAccountBearerTokenAuthRequest
+ ],
+ name: str,
+ settings: GitHubCostsIntegrationAccountSettingsRequest,
+ **kwargs,
+ ):
+ """
+ Writable attributes used to create a GitHub Costs integration account.
+
+ :param authentication: Authentication for creating the GitHub Costs integration account. Exactly one method is set.
+ :type authentication: GitHubCostsIntegrationAccountAuthenticationRequest
+
+ :param name: Human-readable name of the GitHub Costs integration account.
+ :type name: str
+
+ :param settings: Settings for creating the GitHub Costs integration account.
+ :type settings: GitHubCostsIntegrationAccountSettingsRequest
+ """
+ super().__init__(kwargs)
+
+ self_.authentication = authentication
+ self_.name = name
+ self_.settings = settings
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_create_data.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_create_data.py
new file mode 100644
index 0000000000..9564dfac78
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_create_data.py
@@ -0,0 +1,54 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_create_attributes import (
+ GitHubCostsIntegrationAccountCreateAttributes,
+ )
+ from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+
+class GitHubCostsIntegrationAccountCreateData(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_create_attributes import (
+ GitHubCostsIntegrationAccountCreateAttributes,
+ )
+ from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+ return {
+ "attributes": (GitHubCostsIntegrationAccountCreateAttributes,),
+ "type": (IntegrationAccountType,),
+ }
+
+ attribute_map = {
+ "attributes": "attributes",
+ "type": "type",
+ }
+
+ def __init__(
+ self_, attributes: GitHubCostsIntegrationAccountCreateAttributes, type: IntegrationAccountType, **kwargs
+ ):
+ """
+ Data envelope for creating a GitHub Costs integration account.
+
+ :param attributes: Writable attributes used to create a GitHub Costs integration account.
+ :type attributes: GitHubCostsIntegrationAccountCreateAttributes
+
+ :param type: The type of the integration account resource. Always ``integration-account``.
+ :type type: IntegrationAccountType
+ """
+ super().__init__(kwargs)
+
+ self_.attributes = attributes
+ self_.type = type
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_create_request.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_create_request.py
new file mode 100644
index 0000000000..32c1dde6a4
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_create_request.py
@@ -0,0 +1,44 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_create_data import (
+ GitHubCostsIntegrationAccountCreateData,
+ )
+
+
+class GitHubCostsIntegrationAccountCreateRequest(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_create_data import (
+ GitHubCostsIntegrationAccountCreateData,
+ )
+
+ return {
+ "data": (GitHubCostsIntegrationAccountCreateData,),
+ }
+
+ attribute_map = {
+ "data": "data",
+ }
+
+ def __init__(self_, data: GitHubCostsIntegrationAccountCreateData, **kwargs):
+ """
+ Request payload to create a GitHub Costs integration account.
+
+ :param data: Data envelope for creating a GitHub Costs integration account.
+ :type data: GitHubCostsIntegrationAccountCreateData
+ """
+ super().__init__(kwargs)
+
+ self_.data = data
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_response.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_response.py
new file mode 100644
index 0000000000..d50d1f8fae
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_response.py
@@ -0,0 +1,44 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_response_data import (
+ GitHubCostsIntegrationAccountResponseData,
+ )
+
+
+class GitHubCostsIntegrationAccountResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_response_data import (
+ GitHubCostsIntegrationAccountResponseData,
+ )
+
+ return {
+ "data": (GitHubCostsIntegrationAccountResponseData,),
+ }
+
+ attribute_map = {
+ "data": "data",
+ }
+
+ def __init__(self_, data: GitHubCostsIntegrationAccountResponseData, **kwargs):
+ """
+ Response payload for a single GitHub Costs integration account.
+
+ :param data: Data envelope of a GitHub Costs integration account, including server-assigned identity.
+ :type data: GitHubCostsIntegrationAccountResponseData
+ """
+ super().__init__(kwargs)
+
+ self_.data = data
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_response_attributes.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_response_attributes.py
new file mode 100644
index 0000000000..7f3faed159
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_response_attributes.py
@@ -0,0 +1,92 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_authentication_response import (
+ GitHubCostsIntegrationAccountAuthenticationResponse,
+ )
+ from datadog_api_client.v2.model.git_hub_costs_integration_dataflows_response import (
+ GitHubCostsIntegrationDataflowsResponse,
+ )
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_settings_response import (
+ GitHubCostsIntegrationAccountSettingsResponse,
+ )
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_response import (
+ GitHubCostsIntegrationAccountBearerTokenAuthResponse,
+ )
+
+
+class GitHubCostsIntegrationAccountResponseAttributes(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_authentication_response import (
+ GitHubCostsIntegrationAccountAuthenticationResponse,
+ )
+ from datadog_api_client.v2.model.git_hub_costs_integration_dataflows_response import (
+ GitHubCostsIntegrationDataflowsResponse,
+ )
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_settings_response import (
+ GitHubCostsIntegrationAccountSettingsResponse,
+ )
+
+ return {
+ "authentication": (GitHubCostsIntegrationAccountAuthenticationResponse,),
+ "dataflows": (GitHubCostsIntegrationDataflowsResponse,),
+ "name": (str,),
+ "settings": (GitHubCostsIntegrationAccountSettingsResponse,),
+ }
+
+ attribute_map = {
+ "authentication": "authentication",
+ "dataflows": "dataflows",
+ "name": "name",
+ "settings": "settings",
+ }
+
+ def __init__(
+ self_,
+ name: str,
+ settings: GitHubCostsIntegrationAccountSettingsResponse,
+ authentication: Union[
+ GitHubCostsIntegrationAccountAuthenticationResponse,
+ GitHubCostsIntegrationAccountBearerTokenAuthResponse,
+ UnsetType,
+ ] = unset,
+ dataflows: Union[GitHubCostsIntegrationDataflowsResponse, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ Attributes of a GitHub Costs integration account returned in responses.
+
+ :param authentication: Authentication configured on the GitHub Costs integration account.
+ :type authentication: GitHubCostsIntegrationAccountAuthenticationResponse, optional
+
+ :param dataflows: Data Datadog collects from GitHub Costs, keyed by dataflow id.
+ :type dataflows: GitHubCostsIntegrationDataflowsResponse, optional
+
+ :param name: Human-readable name of the GitHub Costs integration account.
+ :type name: str
+
+ :param settings: Settings configured on the GitHub Costs integration account.
+ :type settings: GitHubCostsIntegrationAccountSettingsResponse
+ """
+ if authentication is not unset:
+ kwargs["authentication"] = authentication
+ if dataflows is not unset:
+ kwargs["dataflows"] = dataflows
+ super().__init__(kwargs)
+
+ self_.name = name
+ self_.settings = settings
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_response_data.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_response_data.py
new file mode 100644
index 0000000000..b6f7971a5a
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_response_data.py
@@ -0,0 +1,67 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_response_attributes import (
+ GitHubCostsIntegrationAccountResponseAttributes,
+ )
+ from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+
+class GitHubCostsIntegrationAccountResponseData(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_response_attributes import (
+ GitHubCostsIntegrationAccountResponseAttributes,
+ )
+ from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+ return {
+ "attributes": (GitHubCostsIntegrationAccountResponseAttributes,),
+ "id": (str,),
+ "type": (IntegrationAccountType,),
+ }
+
+ attribute_map = {
+ "attributes": "attributes",
+ "id": "id",
+ "type": "type",
+ }
+ read_only_vars = {
+ "id",
+ }
+
+ def __init__(
+ self_,
+ attributes: GitHubCostsIntegrationAccountResponseAttributes,
+ id: str,
+ type: IntegrationAccountType,
+ **kwargs,
+ ):
+ """
+ Data envelope of a GitHub Costs integration account, including server-assigned identity.
+
+ :param attributes: Attributes of a GitHub Costs integration account returned in responses.
+ :type attributes: GitHubCostsIntegrationAccountResponseAttributes
+
+ :param id: Server-generated unique identifier of the GitHub Costs integration account.
+ :type id: str
+
+ :param type: The type of the integration account resource. Always ``integration-account``.
+ :type type: IntegrationAccountType
+ """
+ super().__init__(kwargs)
+
+ self_.attributes = attributes
+ self_.id = id
+ self_.type = type
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_settings_request.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_settings_request.py
new file mode 100644
index 0000000000..9d2eb8a511
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_settings_request.py
@@ -0,0 +1,47 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+class GitHubCostsIntegrationAccountSettingsRequest(ModelNormal):
+ @cached_property
+ def additional_properties_type(_):
+ return None
+
+ @cached_property
+ def openapi_types(_):
+ return {
+ "enterprise_name": (str,),
+ "tags": (str,),
+ }
+
+ attribute_map = {
+ "enterprise_name": "enterprise_name",
+ "tags": "tags",
+ }
+
+ def __init__(self_, enterprise_name: str, tags: Union[str, UnsetType] = unset, **kwargs):
+ """
+ Settings for creating the GitHub Costs integration account.
+
+ :param enterprise_name: Your GitHub enterprise slug, found on the enterprise settings page (e.g. enterprise-name), or an organization login (e.g. organization-name). An enterprise already covers every organization it owns.
+ :type enterprise_name: str
+
+ :param tags: Comma-separated tags added to the collected costs, for example ``env:prod,team:example``.
+ :type tags: str, optional
+ """
+ if tags is not unset:
+ kwargs["tags"] = tags
+ super().__init__(kwargs)
+
+ self_.enterprise_name = enterprise_name
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_settings_response.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_settings_response.py
new file mode 100644
index 0000000000..f25924140f
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_settings_response.py
@@ -0,0 +1,43 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+class GitHubCostsIntegrationAccountSettingsResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ return {
+ "enterprise_name": (str,),
+ "tags": (str,),
+ }
+
+ attribute_map = {
+ "enterprise_name": "enterprise_name",
+ "tags": "tags",
+ }
+
+ def __init__(self_, enterprise_name: str, tags: Union[str, UnsetType] = unset, **kwargs):
+ """
+ Settings configured on the GitHub Costs integration account.
+
+ :param enterprise_name: Your GitHub enterprise slug, found on the enterprise settings page (e.g. enterprise-name), or an organization login (e.g. organization-name). An enterprise already covers every organization it owns.
+ :type enterprise_name: str
+
+ :param tags: Comma-separated tags added to the collected costs, for example ``env:prod,team:example``.
+ :type tags: str, optional
+ """
+ if tags is not unset:
+ kwargs["tags"] = tags
+ super().__init__(kwargs)
+
+ self_.enterprise_name = enterprise_name
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_settings_update.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_settings_update.py
new file mode 100644
index 0000000000..9a303d8277
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_settings_update.py
@@ -0,0 +1,47 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+class GitHubCostsIntegrationAccountSettingsUpdate(ModelNormal):
+ @cached_property
+ def additional_properties_type(_):
+ return None
+
+ @cached_property
+ def openapi_types(_):
+ return {
+ "enterprise_name": (str,),
+ "tags": (str,),
+ }
+
+ attribute_map = {
+ "enterprise_name": "enterprise_name",
+ "tags": "tags",
+ }
+
+ def __init__(self_, enterprise_name: Union[str, UnsetType] = unset, tags: Union[str, UnsetType] = unset, **kwargs):
+ """
+ Settings for updating the GitHub Costs integration account. Only the fields provided are changed.
+
+ :param enterprise_name: Your GitHub enterprise slug, found on the enterprise settings page (e.g. enterprise-name), or an organization login (e.g. organization-name). An enterprise already covers every organization it owns.
+ :type enterprise_name: str, optional
+
+ :param tags: Comma-separated tags added to the collected costs, for example ``env:prod,team:example``.
+ :type tags: str, optional
+ """
+ if enterprise_name is not unset:
+ kwargs["enterprise_name"] = enterprise_name
+ if tags is not unset:
+ kwargs["tags"] = tags
+ super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_update_attributes.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_update_attributes.py
new file mode 100644
index 0000000000..4c7dad7347
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_update_attributes.py
@@ -0,0 +1,79 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_authentication_update import (
+ GitHubCostsIntegrationAccountAuthenticationUpdate,
+ )
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_settings_update import (
+ GitHubCostsIntegrationAccountSettingsUpdate,
+ )
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_update import (
+ GitHubCostsIntegrationAccountBearerTokenAuthUpdate,
+ )
+
+
+class GitHubCostsIntegrationAccountUpdateAttributes(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_authentication_update import (
+ GitHubCostsIntegrationAccountAuthenticationUpdate,
+ )
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_settings_update import (
+ GitHubCostsIntegrationAccountSettingsUpdate,
+ )
+
+ return {
+ "authentication": (GitHubCostsIntegrationAccountAuthenticationUpdate,),
+ "name": (str,),
+ "settings": (GitHubCostsIntegrationAccountSettingsUpdate,),
+ }
+
+ attribute_map = {
+ "authentication": "authentication",
+ "name": "name",
+ "settings": "settings",
+ }
+
+ def __init__(
+ self_,
+ authentication: Union[
+ GitHubCostsIntegrationAccountAuthenticationUpdate,
+ GitHubCostsIntegrationAccountBearerTokenAuthUpdate,
+ UnsetType,
+ ] = unset,
+ name: Union[str, UnsetType] = unset,
+ settings: Union[GitHubCostsIntegrationAccountSettingsUpdate, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ Writable attributes used to update a GitHub Costs integration account. Every field is optional; only the fields provided are changed.
+
+ :param authentication: Authentication for updating the GitHub Costs integration account. Exactly one method is set.
+ :type authentication: GitHubCostsIntegrationAccountAuthenticationUpdate, optional
+
+ :param name: Human-readable name of the GitHub Costs integration account.
+ :type name: str, optional
+
+ :param settings: Settings for updating the GitHub Costs integration account. Only the fields provided are changed.
+ :type settings: GitHubCostsIntegrationAccountSettingsUpdate, optional
+ """
+ if authentication is not unset:
+ kwargs["authentication"] = authentication
+ if name is not unset:
+ kwargs["name"] = name
+ if settings is not unset:
+ kwargs["settings"] = settings
+ super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_update_data.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_update_data.py
new file mode 100644
index 0000000000..9842252ca2
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_update_data.py
@@ -0,0 +1,64 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_update_attributes import (
+ GitHubCostsIntegrationAccountUpdateAttributes,
+ )
+ from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+
+class GitHubCostsIntegrationAccountUpdateData(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_update_attributes import (
+ GitHubCostsIntegrationAccountUpdateAttributes,
+ )
+ from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+ return {
+ "attributes": (GitHubCostsIntegrationAccountUpdateAttributes,),
+ "id": (str,),
+ "type": (IntegrationAccountType,),
+ }
+
+ attribute_map = {
+ "attributes": "attributes",
+ "id": "id",
+ "type": "type",
+ }
+
+ def __init__(
+ self_,
+ attributes: GitHubCostsIntegrationAccountUpdateAttributes,
+ id: str,
+ type: IntegrationAccountType,
+ **kwargs,
+ ):
+ """
+ Data envelope for updating a GitHub Costs integration account.
+
+ :param attributes: Writable attributes used to update a GitHub Costs integration account. Every field is optional; only the fields provided are changed.
+ :type attributes: GitHubCostsIntegrationAccountUpdateAttributes
+
+ :param id: Unique identifier of the GitHub Costs integration account to update.
+ :type id: str
+
+ :param type: The type of the integration account resource. Always ``integration-account``.
+ :type type: IntegrationAccountType
+ """
+ super().__init__(kwargs)
+
+ self_.attributes = attributes
+ self_.id = id
+ self_.type = type
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_account_update_request.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_update_request.py
new file mode 100644
index 0000000000..0a0b83c97d
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_account_update_request.py
@@ -0,0 +1,44 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_update_data import (
+ GitHubCostsIntegrationAccountUpdateData,
+ )
+
+
+class GitHubCostsIntegrationAccountUpdateRequest(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_update_data import (
+ GitHubCostsIntegrationAccountUpdateData,
+ )
+
+ return {
+ "data": (GitHubCostsIntegrationAccountUpdateData,),
+ }
+
+ attribute_map = {
+ "data": "data",
+ }
+
+ def __init__(self_, data: GitHubCostsIntegrationAccountUpdateData, **kwargs):
+ """
+ Request payload to update a GitHub Costs integration account.
+
+ :param data: Data envelope for updating a GitHub Costs integration account.
+ :type data: GitHubCostsIntegrationAccountUpdateData
+ """
+ super().__init__(kwargs)
+
+ self_.data = data
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_accounts_response.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_accounts_response.py
new file mode 100644
index 0000000000..09ca865d67
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_accounts_response.py
@@ -0,0 +1,44 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import List, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_response_data import (
+ GitHubCostsIntegrationAccountResponseData,
+ )
+
+
+class GitHubCostsIntegrationAccountsResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_integration_account_response_data import (
+ GitHubCostsIntegrationAccountResponseData,
+ )
+
+ return {
+ "data": ([GitHubCostsIntegrationAccountResponseData],),
+ }
+
+ attribute_map = {
+ "data": "data",
+ }
+
+ def __init__(self_, data: List[GitHubCostsIntegrationAccountResponseData], **kwargs):
+ """
+ Response payload for a list of GitHub Costs integration accounts.
+
+ :param data: List of GitHub Costs integration accounts.
+ :type data: [GitHubCostsIntegrationAccountResponseData]
+ """
+ super().__init__(kwargs)
+
+ self_.data = data
diff --git a/src/datadog_api_client/v2/model/git_hub_costs_integration_dataflows_response.py b/src/datadog_api_client/v2/model/git_hub_costs_integration_dataflows_response.py
new file mode 100644
index 0000000000..feae3546b4
--- /dev/null
+++ b/src/datadog_api_client/v2/model/git_hub_costs_integration_dataflows_response.py
@@ -0,0 +1,50 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.git_hub_costs_cloud_cost_metrics_integration_dataflow_response import (
+ GitHubCostsCloudCostMetricsIntegrationDataflowResponse,
+ )
+
+
+class GitHubCostsIntegrationDataflowsResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.git_hub_costs_cloud_cost_metrics_integration_dataflow_response import (
+ GitHubCostsCloudCostMetricsIntegrationDataflowResponse,
+ )
+
+ return {
+ "github_cloud_cost_metrics": (GitHubCostsCloudCostMetricsIntegrationDataflowResponse,),
+ }
+
+ attribute_map = {
+ "github_cloud_cost_metrics": "github-cloud-cost-metrics",
+ }
+
+ def __init__(
+ self_,
+ github_cloud_cost_metrics: Union[GitHubCostsCloudCostMetricsIntegrationDataflowResponse, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ Data Datadog collects from GitHub Costs, keyed by dataflow id.
+
+ :param github_cloud_cost_metrics: GitHub costs for Actions, Packages, Copilot, storage, and other billed products, estimated from list prices and usage, including discounts when available. Used by `Cloud Cost Management `_. Requires an enterprise or organization on GitHub's enhanced billing platform; without it this dataflow collects no data. This dataflow is always on and cannot be turned off, which is why it appears in responses only.
+ :type github_cloud_cost_metrics: GitHubCostsCloudCostMetricsIntegrationDataflowResponse, optional
+ """
+ if github_cloud_cost_metrics is not unset:
+ kwargs["github_cloud_cost_metrics"] = github_cloud_cost_metrics
+ super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py
index b0d9271981..0068fa4f66 100644
--- a/src/datadog_api_client/v2/models/__init__.py
+++ b/src/datadog_api_client/v2/models/__init__.py
@@ -4878,6 +4878,70 @@
from datadog_api_client.v2.model.git_hub_cloud_auth_persona_mappings_response import (
GitHubCloudAuthPersonaMappingsResponse,
)
+from datadog_api_client.v2.model.git_hub_costs_cloud_cost_metrics_integration_dataflow_response import (
+ GitHubCostsCloudCostMetricsIntegrationDataflowResponse,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_authentication_request import (
+ GitHubCostsIntegrationAccountAuthenticationRequest,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_authentication_response import (
+ GitHubCostsIntegrationAccountAuthenticationResponse,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_authentication_update import (
+ GitHubCostsIntegrationAccountAuthenticationUpdate,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_request import (
+ GitHubCostsIntegrationAccountBearerTokenAuthRequest,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_response import (
+ GitHubCostsIntegrationAccountBearerTokenAuthResponse,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_type import (
+ GitHubCostsIntegrationAccountBearerTokenAuthType,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_bearer_token_auth_update import (
+ GitHubCostsIntegrationAccountBearerTokenAuthUpdate,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_create_attributes import (
+ GitHubCostsIntegrationAccountCreateAttributes,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_create_data import (
+ GitHubCostsIntegrationAccountCreateData,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_create_request import (
+ GitHubCostsIntegrationAccountCreateRequest,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_response import GitHubCostsIntegrationAccountResponse
+from datadog_api_client.v2.model.git_hub_costs_integration_account_response_attributes import (
+ GitHubCostsIntegrationAccountResponseAttributes,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_response_data import (
+ GitHubCostsIntegrationAccountResponseData,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_settings_request import (
+ GitHubCostsIntegrationAccountSettingsRequest,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_settings_response import (
+ GitHubCostsIntegrationAccountSettingsResponse,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_settings_update import (
+ GitHubCostsIntegrationAccountSettingsUpdate,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_update_attributes import (
+ GitHubCostsIntegrationAccountUpdateAttributes,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_update_data import (
+ GitHubCostsIntegrationAccountUpdateData,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_account_update_request import (
+ GitHubCostsIntegrationAccountUpdateRequest,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_accounts_response import (
+ GitHubCostsIntegrationAccountsResponse,
+)
+from datadog_api_client.v2.model.git_hub_costs_integration_dataflows_response import (
+ GitHubCostsIntegrationDataflowsResponse,
+)
from datadog_api_client.v2.model.git_hub_oidc_claim_patterns import GitHubOIDCClaimPatterns
from datadog_api_client.v2.model.github_app import GithubApp
from datadog_api_client.v2.model.github_app_github_app_id import GithubAppGithubAppId
@@ -17274,6 +17338,28 @@
"GitHubCloudAuthPersonaMappingResponse",
"GitHubCloudAuthPersonaMappingType",
"GitHubCloudAuthPersonaMappingsResponse",
+ "GitHubCostsCloudCostMetricsIntegrationDataflowResponse",
+ "GitHubCostsIntegrationAccountAuthenticationRequest",
+ "GitHubCostsIntegrationAccountAuthenticationResponse",
+ "GitHubCostsIntegrationAccountAuthenticationUpdate",
+ "GitHubCostsIntegrationAccountBearerTokenAuthRequest",
+ "GitHubCostsIntegrationAccountBearerTokenAuthResponse",
+ "GitHubCostsIntegrationAccountBearerTokenAuthType",
+ "GitHubCostsIntegrationAccountBearerTokenAuthUpdate",
+ "GitHubCostsIntegrationAccountCreateAttributes",
+ "GitHubCostsIntegrationAccountCreateData",
+ "GitHubCostsIntegrationAccountCreateRequest",
+ "GitHubCostsIntegrationAccountResponse",
+ "GitHubCostsIntegrationAccountResponseAttributes",
+ "GitHubCostsIntegrationAccountResponseData",
+ "GitHubCostsIntegrationAccountSettingsRequest",
+ "GitHubCostsIntegrationAccountSettingsResponse",
+ "GitHubCostsIntegrationAccountSettingsUpdate",
+ "GitHubCostsIntegrationAccountUpdateAttributes",
+ "GitHubCostsIntegrationAccountUpdateData",
+ "GitHubCostsIntegrationAccountUpdateRequest",
+ "GitHubCostsIntegrationAccountsResponse",
+ "GitHubCostsIntegrationDataflowsResponse",
"GitHubOIDCClaimPatterns",
"GithubApp",
"GithubAppGithubAppId",
diff --git a/tests/v2/features/github_costs_integration.feature b/tests/v2/features/github_costs_integration.feature
new file mode 100644
index 0000000000..e5eef2a6a1
--- /dev/null
+++ b/tests/v2/features/github_costs_integration.feature
@@ -0,0 +1,148 @@
+@endpoint(github-costs-integration) @endpoint(github-costs-integration-v2)
+Feature: GitHub Costs Integration
+ Manage your Datadog GitHub Costs integration accounts and account
+ resources directly through the Datadog API. See the [GitHub Costs
+ integration page](https://docs.datadoghq.com/integrations/github-costs/)
+ for more information.
+
+ Background:
+ Given a valid "apiKeyAuth" key in the system
+ And a valid "appKeyAuth" key in the system
+ And an instance of "GitHubCostsIntegration" API
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Create a GitHub Costs integration account returns "Bad Request" response
+ Given operation "CreateGitHubCostsIntegrationAccount" enabled
+ And new "CreateGitHubCostsIntegrationAccount" request
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "name": "github-costs-acme", "settings": {"enterprise_name": "acme", "tags": "env:prod,team:finops"}}, "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Create a GitHub Costs integration account returns "Created" response
+ Given operation "CreateGitHubCostsIntegrationAccount" enabled
+ And new "CreateGitHubCostsIntegrationAccount" request
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "name": "github-costs-acme", "settings": {"enterprise_name": "acme", "tags": "env:prod,team:finops"}}, "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 201 Created
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Create a GitHub Costs integration account returns "Not Found" response
+ Given operation "CreateGitHubCostsIntegrationAccount" enabled
+ And new "CreateGitHubCostsIntegrationAccount" request
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "name": "github-costs-acme", "settings": {"enterprise_name": "acme", "tags": "env:prod,team:finops"}}, "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Create a GitHub Costs integration account returns "The server cannot process the request because it contains invalid data." response
+ Given operation "CreateGitHubCostsIntegrationAccount" enabled
+ And new "CreateGitHubCostsIntegrationAccount" request
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "name": "github-costs-acme", "settings": {"enterprise_name": "acme", "tags": "env:prod,team:finops"}}, "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 422 The server cannot process the request because it contains invalid data.
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Delete a GitHub Costs integration account returns "Bad Request" response
+ Given operation "DeleteGitHubCostsIntegrationAccount" enabled
+ And new "DeleteGitHubCostsIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Delete a GitHub Costs integration account returns "Not Found" response
+ Given operation "DeleteGitHubCostsIntegrationAccount" enabled
+ And new "DeleteGitHubCostsIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Delete a GitHub Costs integration account returns "OK" response
+ Given operation "DeleteGitHubCostsIntegrationAccount" enabled
+ And new "DeleteGitHubCostsIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Get a GitHub Costs integration account returns "Bad Request" response
+ Given operation "GetGitHubCostsIntegrationAccount" enabled
+ And new "GetGitHubCostsIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Get a GitHub Costs integration account returns "Not Found" response
+ Given operation "GetGitHubCostsIntegrationAccount" enabled
+ And new "GetGitHubCostsIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Get a GitHub Costs integration account returns "OK" response
+ Given operation "GetGitHubCostsIntegrationAccount" enabled
+ And new "GetGitHubCostsIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: List GitHub Costs integration accounts returns "Bad Request" response
+ Given operation "ListGitHubCostsIntegrationAccounts" enabled
+ And new "ListGitHubCostsIntegrationAccounts" request
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: List GitHub Costs integration accounts returns "Not Found" response
+ Given operation "ListGitHubCostsIntegrationAccounts" enabled
+ And new "ListGitHubCostsIntegrationAccounts" request
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: List GitHub Costs integration accounts returns "OK" response
+ Given operation "ListGitHubCostsIntegrationAccounts" enabled
+ And new "ListGitHubCostsIntegrationAccounts" request
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Update a GitHub Costs integration account returns "Bad Request" response
+ Given operation "UpdateGitHubCostsIntegrationAccount" enabled
+ And new "UpdateGitHubCostsIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "name": "github-costs-acme", "settings": {"enterprise_name": "acme", "tags": "env:prod,team:finops"}}, "id": "4b7c2e1a-6f3d-4e8b-9a52-1d0c8f7e3b64", "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Update a GitHub Costs integration account returns "Not Found" response
+ Given operation "UpdateGitHubCostsIntegrationAccount" enabled
+ And new "UpdateGitHubCostsIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "name": "github-costs-acme", "settings": {"enterprise_name": "acme", "tags": "env:prod,team:finops"}}, "id": "4b7c2e1a-6f3d-4e8b-9a52-1d0c8f7e3b64", "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Update a GitHub Costs integration account returns "OK" response
+ Given operation "UpdateGitHubCostsIntegrationAccount" enabled
+ And new "UpdateGitHubCostsIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "name": "github-costs-acme", "settings": {"enterprise_name": "acme", "tags": "env:prod,team:finops"}}, "id": "4b7c2e1a-6f3d-4e8b-9a52-1d0c8f7e3b64", "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Update a GitHub Costs integration account returns "The server cannot process the request because it contains invalid data." response
+ Given operation "UpdateGitHubCostsIntegrationAccount" enabled
+ And new "UpdateGitHubCostsIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "name": "github-costs-acme", "settings": {"enterprise_name": "acme", "tags": "env:prod,team:finops"}}, "id": "4b7c2e1a-6f3d-4e8b-9a52-1d0c8f7e3b64", "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 422 The server cannot process the request because it contains invalid data.
diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json
index ecd54435b6..133753fd66 100644
--- a/tests/v2/features/undo.json
+++ b/tests/v2/features/undo.json
@@ -4310,6 +4310,43 @@
"type": "idempotent"
}
},
+ "ListGitHubCostsIntegrationAccounts": {
+ "tag": "GitHub Costs Integration",
+ "undo": {
+ "type": "safe"
+ }
+ },
+ "CreateGitHubCostsIntegrationAccount": {
+ "tag": "GitHub Costs Integration",
+ "undo": {
+ "operationId": "DeleteGitHubCostsIntegrationAccount",
+ "parameters": [
+ {
+ "name": "account_id",
+ "source": "data.id"
+ }
+ ],
+ "type": "unsafe"
+ }
+ },
+ "DeleteGitHubCostsIntegrationAccount": {
+ "tag": "GitHub Costs Integration",
+ "undo": {
+ "type": "idempotent"
+ }
+ },
+ "GetGitHubCostsIntegrationAccount": {
+ "tag": "GitHub Costs Integration",
+ "undo": {
+ "type": "safe"
+ }
+ },
+ "UpdateGitHubCostsIntegrationAccount": {
+ "tag": "GitHub Costs Integration",
+ "undo": {
+ "type": "idempotent"
+ }
+ },
"ListSnowflakeIntegrationAccounts": {
"tag": "Snowflake Integration",
"undo": {