billing

Update a cost center

Changed on

Updates an existing cost center. Enterprise owners and billing managers can update any cost center, and organization owners can update cost centers associated with resources they administer. A custom role holder with fine-grained write access to enterprise billing can also update cost centers. An installation access token for a GitHub App installed on the enterprise with write access to enterprise billing can update any cost center in the enterprise.

patch/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}

Request

  • Base URL: https://api.github.com
  • URL: https://api.github.com/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}
  • Auth: none declared

Path parameters

enterprisestring required

The slug version of the enterprise name

cost_center_idstring required

The unique identifier of the cost center

Request body

OR

Response

Response when updating a cost center

idstring required

ID of the cost center.

namestring required

Name of the cost center.

azure_subscriptionstring nullable

Azure subscription ID associated with the cost center. Only present for cost centers linked to Azure subscriptions.

state'active' | 'deleted'

State of the cost center.

ai_credit_pool_enabledboolean

Whether the cost center draws from the AI credit pool.

This can only be enabled for cost centers that contain only user or team resources.

  • false — no cap; the cost center draws from the shared enterprise pool.
  • true — the cost center is capped at an amount derived from its members' license entitlements.

Changes

  • 2022-11-289e668dd7bb04Revision changes
    • info

      added subschema #1 subschema #2 to the request body anyOf list

    • info

      the request property became optional

    • info

      added the non-success response with the status

  • 2022-11-28eccf40a54a3cRevision changes
    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status