You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// ListConsumedLicenses collect information about the number of consumed licenses and a collection with all the users with consumed enterprise licenses.
93
121
//
94
122
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/licensing?apiVersion=2022-11-28#list-enterprise-consumed-licenses
@@ -136,3 +164,67 @@ func (s *EnterpriseService) GetLicenseSyncStatus(ctx context.Context, enterprise
136
164
137
165
returnsyncStatus, resp, nil
138
166
}
167
+
168
+
// ListVisualStudioSubscriptions gets a list of Visual Studio subscriptions for an enterprise.
169
+
//
170
+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/licensing?apiVersion=2022-11-28#get-a-list-of-visual-studio-subscriptions-for-the-enterprise
171
+
//
172
+
//meta:operation GET /enterprises/{enterprise}/visual-studio-subscriptions
// AddOrUpdateVisualStudioSubscriptionAssignment adds or updates a manual match between a user and a Visual Studio subscription.
195
+
//
196
+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/licensing?apiVersion=2022-11-28#add-or-update-a-visual-studio-subscription-user-match
197
+
//
198
+
//meta:operation PUT /enterprises/{enterprise}/visual-studio-subscriptions/{visual_studio_subscription_id}
req, err:=s.client.NewRequest(ctx, "PUT", u, body)
203
+
iferr!=nil {
204
+
returnnil, nil, err
205
+
}
206
+
207
+
varassignment*VisualStudioSubscriptionAssignment
208
+
resp, err:=s.client.Do(req, &assignment)
209
+
iferr!=nil {
210
+
returnnil, resp, err
211
+
}
212
+
213
+
returnassignment, resp, nil
214
+
}
215
+
216
+
// DeleteVisualStudioSubscriptionAssignment deletes a manual match between a user and a Visual Studio subscription.
217
+
//
218
+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/licensing?apiVersion=2022-11-28#delete-a-visual-studio-subscription-user-match
0 commit comments