Skip to main content

org_network_configurations

Creates, updates, deletes, gets or lists an org_network_configurations resource.

Overview

Nameorg_network_configurations
TypeResource
Idgithub.hosted_compute.org_network_configurations

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idstringThe unique identifier of the network configuration. (example: 123ABC456DEF789)
namestringThe name of the network configuration. (example: my-network-configuration)
compute_servicestringThe hosted compute service the network configuration supports. (none, actions, codespaces)
created_onstring (date-time)The time at which the network configuration was created, in ISO 8601 format. (example: 2024-04-26T11:31:07Z)
failover_network_enabledbooleanIndicates whether the failover network resource is enabled.
failover_network_settings_idsarrayThe unique identifier of each failover network settings in the configuration. (example: 123ABC456DEF789)
network_settings_idsarrayThe unique identifier of each network settings in the configuration. (example: 123ABC456DEF789)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_network_configuration_for_orgselectorg, network_configuration_idGets a hosted compute network configuration configured in an organization.

OAuth app tokens and personal access tokens (classic) need the read:network_configurations scope to use this endpoint.
list_network_configurations_for_orgselectorgper_page, pageLists all hosted compute network configurations configured in an organization.

OAuth app tokens and personal access tokens (classic) need the read:network_configurations scope to use this endpoint.
create_network_configuration_for_orginsertorg, name, network_settings_idsCreates a hosted compute network configuration for an organization.

OAuth app tokens and personal access tokens (classic) need the write:network_configurations scope to use this endpoint.
update_network_configuration_for_orgupdateorg, network_configuration_idUpdates a hosted compute network configuration for an organization.

OAuth app tokens and personal access tokens (classic) need the write:network_configurations scope to use this endpoint.
delete_network_configuration_from_orgdeleteorg, network_configuration_idDeletes a hosted compute network configuration from an organization.

OAuth app tokens and personal access tokens (classic) need the write:network_configurations scope 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
network_configuration_idstringUnique identifier of the hosted compute network configuration.
orgstringThe organization name. The name is not case sensitive.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

Gets a hosted compute network configuration configured in an organization.

OAuth app tokens and personal access tokens (classic) need the read:network_configurations scope to use this endpoint.

SELECT
id,
name,
compute_service,
created_on,
failover_network_enabled,
failover_network_settings_ids,
network_settings_ids
FROM github.hosted_compute.org_network_configurations
WHERE org = '{{ org }}' -- required
AND network_configuration_id = '{{ network_configuration_id }}' -- required
;

INSERT examples

Creates a hosted compute network configuration for an organization.

OAuth app tokens and personal access tokens (classic) need the write:network_configurations scope to use this endpoint.

INSERT INTO github.hosted_compute.org_network_configurations (
name,
compute_service,
network_settings_ids,
failover_network_settings_ids,
failover_network_enabled,
org
)
SELECT
'{{ name }}' /* required */,
'{{ compute_service }}',
'{{ network_settings_ids }}' /* required */,
'{{ failover_network_settings_ids }}',
{{ failover_network_enabled }},
'{{ org }}'
RETURNING
id,
name,
compute_service,
created_on,
failover_network_enabled,
failover_network_settings_ids,
network_settings_ids
;

UPDATE examples

Updates a hosted compute network configuration for an organization.

OAuth app tokens and personal access tokens (classic) need the write:network_configurations scope to use this endpoint.

UPDATE github.hosted_compute.org_network_configurations
SET
name = '{{ name }}',
compute_service = '{{ compute_service }}',
network_settings_ids = '{{ network_settings_ids }}',
failover_network_settings_ids = '{{ failover_network_settings_ids }}',
failover_network_enabled = {{ failover_network_enabled }}
WHERE
org = '{{ org }}' --required
AND network_configuration_id = '{{ network_configuration_id }}' --required
RETURNING
id,
name,
compute_service,
created_on,
failover_network_enabled,
failover_network_settings_ids,
network_settings_ids;

DELETE examples

Deletes a hosted compute network configuration from an organization.

OAuth app tokens and personal access tokens (classic) need the write:network_configurations scope to use this endpoint.

DELETE FROM github.hosted_compute.org_network_configurations
WHERE org = '{{ org }}' --required
AND network_configuration_id = '{{ network_configuration_id }}' --required
;