File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Grab current IP allow list settings for an enterprise.
2+ # This includes:
3+ # - The IP allow list entries
4+ # - The IP allow list enabled setting
5+ # - The IP allow list for GitHub Apps enabled setting
6+
7+ query GetEnterpriseIPAllowList {
8+ enterprise (slug : " ENTERPRISE_SLUG" ) {
9+ owner_id : id
10+ enterprise_slug : slug
11+ enterprise_owner_info : ownerInfo {
12+ is_ip_allow_list_enabled : ipAllowListEnabledSetting
13+ is_ip_allow_list_for_github_apps_enabled : ipAllowListForInstalledAppsEnabledSetting
14+ ipAllowListEntries (first : 100 ) {
15+ nodes {
16+ ip_allow_list_entry_id : id
17+ ip_allow_list_entry_name : name
18+ ip_allow_list_entry_value : allowListValue
19+ ip_allow_list_entry_created : createdAt
20+ is_ip_allow_list_entry_active : isActive
21+ }
22+ }
23+ }
24+ }
25+ }
Original file line number Diff line number Diff line change 1+ # This query is used to add an IP address to the IP allow list.
2+ # This can be used on both organizations and enterprise accounts.
3+ #
4+ # The `OWNER_ID` is the ID of the organization or enterprise account. You can
5+ # get the ID of an organization or enterprise account by executing either of
6+ # the following queries and referring to the value from `owner_id` field:
7+ #
8+ # - organizations: https://github.com/github/platform-samples/blob/master/graphql/queries/org-get-ip-allow-list.graphql
9+ # - enterprise accounts: https://github.com/github/platform-samples/blob/master/graphql/queries/enterprise-get-ip-allow-list.graphql
10+
11+ mutation AddIPAddressToIPAllowList {
12+ createIpAllowListEntry (
13+ input : {
14+ clientMutationId : " true"
15+ ownerId : " OWNER_ID"
16+ name : " DESCRIPTION_OF_IP_ADDRESS"
17+ allowListValue : " IP_ADDRESS"
18+ isActive : true
19+ }
20+ ) {
21+ clientMutationId
22+ ipAllowListEntry {
23+ ip_allow_list_entry_id : id
24+ ip_allow_list_entry_name : name
25+ ip_allow_list_entry_ip_address : allowListValue
26+ ip_allow_list_entry_created : createdAt
27+ ip_allow_list_entry_updated : updatedAt
28+ is_ip_allow_list_entry_active : isActive
29+ }
30+ }
31+ }
Original file line number Diff line number Diff line change 1+ # This query is used to disable the IP allow list feature.
2+ # This can be used on both organizations and enterprise accounts.
3+ #
4+ # The `OWNER_ID` is the ID of the organization or enterprise account. You can
5+ # get the ID of an organization or enterprise account by executing either of
6+ # the following queries and referring to the value from `owner_id` field:
7+ #
8+ # - organizations: https://github.com/github/platform-samples/blob/master/graphql/queries/org-get-ip-allow-list.graphql
9+ # - enterprise accounts: https://github.com/github/platform-samples/blob/master/graphql/queries/enterprise-get-ip-allow-list.graphql
10+
11+ mutation EnableIPAllowList {
12+ updateIpAllowListEnabledSetting (
13+ input : {
14+ clientMutationId : " true"
15+ ownerId : " OWNER_ID"
16+ settingValue : DISABLED
17+ }
18+ ) {
19+ clientMutationId
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ # This query is used to enable the IP allow list feature.
2+ # This can be used on both organizations and enterprise accounts.
3+ #
4+ # The `OWNER_ID` is the ID of the organization or enterprise account. You can
5+ # get the ID of an organization or enterprise account by executing either of
6+ # the following queries and referring to the value from `owner_id` field:
7+ #
8+ # - organizations: https://github.com/github/platform-samples/blob/master/graphql/queries/org-get-ip-allow-list.graphql
9+ # - enterprise accounts: https://github.com/github/platform-samples/blob/master/graphql/queries/enterprise-get-ip-allow-list.graphql
10+
11+ mutation EnableIPAllowList {
12+ updateIpAllowListEnabledSetting (
13+ input : {
14+ clientMutationId : " true"
15+ ownerId : " OWNER_ID"
16+ settingValue : ENABLED
17+ }
18+ ) {
19+ clientMutationId
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ # This query is used to remove an IP allow list entry from the IP allow list.
2+ # This can be used on both organizations and enterprise accounts.
3+ #
4+ # The `IP_ENTRY_ID` is the ID of the IP allow list entry. You can
5+ # get the ID for this by executing either of the following queries
6+ # and referring to the value from `ip_allow_list_entry_id` field:
7+ #
8+ # - organizations: https://github.com/github/platform-samples/blob/master/graphql/queries/org-get-ip-allow-list.graphql
9+ # - enterprise accounts: https://github.com/github/platform-samples/blob/master/graphql/queries/enterprise-get-ip-allow-list.graphql
10+
11+ mutation DeleteIPAddressFromIPAllowList {
12+ deleteIpAllowListEntry (
13+ input : { clientMutationId : " true" , ipAllowListEntryId : " IP_ENTRY_ID" }
14+ ) {
15+ clientMutationId
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ # Grab current IP allow list settings for an organization.
2+ # This includes:
3+ # - The IP allow list entries
4+ # - The IP allow list enabled setting
5+ # - The IP allow list for GitHub Apps enabled setting
6+
7+ query GetOrganizationIPAllowList {
8+ organization (login : " ORGANIZATION_SLUG" ) {
9+ owner_id : id
10+ organization_slug : login
11+ is_ip_allow_list_enabled : ipAllowListEnabledSetting
12+ is_ip_allow_list_for_github_apps_enabled : ipAllowListForInstalledAppsEnabledSetting
13+ ipAllowListEntries (first : 100 ) {
14+ totalCount
15+ nodes {
16+ ip_allow_list_entry_id : id
17+ ip_allow_list_entry_name : name
18+ ip_allow_list_entry_ip_address : allowListValue
19+ ip_allow_list_entry_created : createdAt
20+ is_ip_allow_list_entry_active : isActive
21+ }
22+ }
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments