ci_github_accounts
Creates, updates, deletes, gets or lists a ci_github_accounts resource.
Overview
| Name | ci_github_accounts |
| Type | Resource |
| Id | datadog.software_delivery.ci_github_accounts |
Fields
The following fields are returned by SELECT queries:
- list_ciapp_git_hub_accounts
| Name | Datatype | Description |
|---|---|---|
id | string | The account's unique identifier, in the form <host>/<account name> (for example github.com/datadog). (example: github.com/datadog) |
attributes | object | Attributes describing a GitHub account's CI Visibility opt-in status. |
type | string | JSON:API type for the GitHub account resource. The value must always be ci_github_account. (ci_github_account) (example: ci_github_account) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_ciapp_git_hub_accounts | select | Retrieve the list of GitHub accounts (organizations or users) available to this Datadog organization<br />through its GitHub App installation, along with each account's and repository's CI Visibility opt-in status. | ||
update_ciapp_git_hub_account | update | data | Enable or disable CI Visibility for a GitHub account, one of its repositories, or both in the same request.<br />The account (and, optionally, repository) are identified by name. Account-level and repository-level<br />changes are independent and may both be supplied in the same request. At least one of enabled or<br />repository.enabled must be provided. If the account name matches installations on more than one host,<br />host must be supplied to disambiguate, otherwise a 409 is returned. Returns a 404 if the CI Visibility<br />GitHub integration is not enabled for this organization, or if the given account or repository cannot be<br />found by name. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
SELECT examples
- list_ciapp_git_hub_accounts
Retrieve the list of GitHub accounts (organizations or users) available to this Datadog organization<br />through its GitHub App installation, along with each account's and repository's CI Visibility opt-in status.
SELECT
id,
attributes,
type
FROM datadog.software_delivery.ci_github_accounts
;
UPDATE examples
- update_ciapp_git_hub_account
Enable or disable CI Visibility for a GitHub account, one of its repositories, or both in the same request.<br />The account (and, optionally, repository) are identified by name. Account-level and repository-level<br />changes are independent and may both be supplied in the same request. At least one of enabled or<br />repository.enabled must be provided. If the account name matches installations on more than one host,<br />host must be supplied to disambiguate, otherwise a 409 is returned. Returns a 404 if the CI Visibility<br />GitHub integration is not enabled for this organization, or if the given account or repository cannot be<br />found by name.
UPDATE datadog.software_delivery.ci_github_accounts
SET
data = '{{ data }}'
WHERE
data = '{{ data }}' --required
RETURNING
data;