org_network_configurations
Creates, updates, deletes, gets or lists an org_network_configurations resource.
Overview
| Name | org_network_configurations |
| Type | Resource |
| Id | github.hosted_compute.org_network_configurations |
Fields
The following fields are returned by SELECT queries:
- get_network_configuration_for_org
- list_network_configurations_for_org
Response
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the network configuration. (example: 123ABC456DEF789) |
name | string | The name of the network configuration. (example: my-network-configuration) |
compute_service | string | The hosted compute service the network configuration supports. (none, actions, codespaces) |
created_on | string (date-time) | The time at which the network configuration was created, in ISO 8601 format. (example: 2024-04-26T11:31:07Z) |
failover_network_enabled | boolean | Indicates whether the failover network resource is enabled. |
failover_network_settings_ids | array | The unique identifier of each failover network settings in the configuration. (example: 123ABC456DEF789) |
network_settings_ids | array | The unique identifier of each network settings in the configuration. (example: 123ABC456DEF789) |
Response
| Name | Datatype | Description |
|---|---|---|
network_configurations | array | |
total_count | integer |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_network_configuration_for_org | select | org, network_configuration_id | 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. | |
list_network_configurations_for_org | select | org | per_page, page | Lists 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_org | insert | org, name, network_settings_ids | 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. | |
update_network_configuration_for_org | update | org, network_configuration_id | 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. | |
delete_network_configuration_from_org | delete | org, network_configuration_id | 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. |
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 |
|---|---|---|
network_configuration_id | string | Unique identifier of the hosted compute network configuration. |
org | string | The organization name. The name is not case sensitive. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- get_network_configuration_for_org
- list_network_configurations_for_org
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
;
Lists 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.
SELECT
network_configurations,
total_count
FROM github.hosted_compute.org_network_configurations
WHERE org = '{{ org }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
INSERT examples
- create_network_configuration_for_org
- Manifest
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
;
# Description fields are for documentation purposes
- name: org_network_configurations
props:
- name: org
value: "{{ org }}"
description: Required parameter for the org_network_configurations resource.
- name: name
value: "{{ name }}"
description: |
Name of the network configuration. Must be between 1 and 100 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'.
- name: compute_service
value: "{{ compute_service }}"
description: |
The hosted compute service to use for the network configuration.
valid_values: ['none', 'actions']
- name: network_settings_ids
value:
- "{{ network_settings_ids }}"
description: |
A list of identifiers of the network settings resources to use for the network configuration. Exactly one resource identifier must be specified in the list.
- name: failover_network_settings_ids
value:
- "{{ failover_network_settings_ids }}"
description: |
A list of identifiers of the failover network settings resources to use for the network configuration. Exactly one resource identifier must be specified in the list.
- name: failover_network_enabled
value: {{ failover_network_enabled }}
description: |
Indicates whether the failover network resource is enabled.
UPDATE examples
- update_network_configuration_for_org
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
- delete_network_configuration_from_org
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
;