Skip to main content

coding_agent_policy_orgs

Creates, updates, deletes, gets or lists a coding_agent_policy_orgs resource.

Overview

Namecoding_agent_policy_orgs
TypeResource
Idgithub.copilot.coding_agent_policy_orgs

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
add_organizations_to_enterprise_coding_agent_policyinsertenterpriseEnables Copilot cloud agent for the specified organizations within the enterprise.

The enterprise's coding agent policy must be set to enabled_for_selected_orgs before
using this endpoint. Organizations can be specified by login or matched via custom properties.

Only organizations that have Copilot enabled and belong to the enterprise will be affected.

Only enterprise owners can add organizations to the coding agent policy.

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:enterprise scopes to use this endpoint.
remove_organizations_from_enterprise_coding_agent_policydeleteenterpriseDisables Copilot cloud agent for the specified organizations within the enterprise.

The enterprise's coding agent policy must be set to enabled_for_selected_orgs before
using this endpoint. Organizations can be specified by login or matched via custom properties.

Only organizations that have Copilot enabled and belong to the enterprise will be affected.

Only enterprise owners can remove organizations from the coding agent policy.

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:enterprise scopes to use this endpoint.

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.

NameDatatypeDescription
enterprisestringThe slug version of the enterprise name.

INSERT examples

Enables Copilot cloud agent for the specified organizations within the enterprise.

The enterprise's coding agent policy must be set to enabled_for_selected_orgs before
using this endpoint. Organizations can be specified by login or matched via custom properties.

Only organizations that have Copilot enabled and belong to the enterprise will be affected.

Only enterprise owners can add organizations to the coding agent policy.

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:enterprise scopes to use this endpoint.

INSERT INTO github.copilot.coding_agent_policy_orgs (
organizations,
custom_properties,
enterprise
)
SELECT
'{{ organizations }}',
'{{ custom_properties }}',
'{{ enterprise }}'
;

DELETE examples

Disables Copilot cloud agent for the specified organizations within the enterprise.

The enterprise's coding agent policy must be set to enabled_for_selected_orgs before
using this endpoint. Organizations can be specified by login or matched via custom properties.

Only organizations that have Copilot enabled and belong to the enterprise will be affected.

Only enterprise owners can remove organizations from the coding agent policy.

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:enterprise scopes to use this endpoint.

DELETE FROM github.copilot.coding_agent_policy_orgs
WHERE enterprise = '{{ enterprise }}' --required
;