vendor: update all dependencies to latest versions
This commit is contained in:
+57
-19
@@ -14,9 +14,8 @@ package graphrbac
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,8 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ApplicationsClient is the composite Swagger specification for Azure Active
|
||||
// Directory Graph RBAC management client.
|
||||
// ApplicationsClient is the the Graph RBAC Management Client
|
||||
type ApplicationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -36,8 +34,7 @@ func NewApplicationsClient(tenantID string) ApplicationsClient {
|
||||
return NewApplicationsClientWithBaseURI(DefaultBaseURI, tenantID)
|
||||
}
|
||||
|
||||
// NewApplicationsClientWithBaseURI creates an instance of the
|
||||
// ApplicationsClient client.
|
||||
// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client.
|
||||
func NewApplicationsClientWithBaseURI(baseURI string, tenantID string) ApplicationsClient {
|
||||
return ApplicationsClient{NewWithBaseURI(baseURI, tenantID)}
|
||||
}
|
||||
@@ -308,6 +305,51 @@ func (client ApplicationsClient) ListResponder(resp *http.Response) (result Appl
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ApplicationsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan Application, <-chan error) {
|
||||
resultChan := make(chan Application)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.OdataNextLink != nil {
|
||||
list, err = client.ListNext(*list.OdataNextLink)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListKeyCredentials get the keyCredentials associated with an application.
|
||||
//
|
||||
// applicationObjectID is application object ID.
|
||||
@@ -436,8 +478,7 @@ func (client ApplicationsClient) ListNextResponder(resp *http.Response) (result
|
||||
return
|
||||
}
|
||||
|
||||
// ListPasswordCredentials get the passwordCredentials associated with an
|
||||
// application.
|
||||
// ListPasswordCredentials get the passwordCredentials associated with an application.
|
||||
//
|
||||
// applicationObjectID is application object ID.
|
||||
func (client ApplicationsClient) ListPasswordCredentials(applicationObjectID string) (result PasswordCredentialListResult, err error) {
|
||||
@@ -503,8 +544,7 @@ func (client ApplicationsClient) ListPasswordCredentialsResponder(resp *http.Res
|
||||
|
||||
// Patch update an existing application.
|
||||
//
|
||||
// applicationObjectID is application object ID. parameters is parameters to
|
||||
// update an existing application.
|
||||
// applicationObjectID is application object ID. parameters is parameters to update an existing application.
|
||||
func (client ApplicationsClient) Patch(applicationObjectID string, parameters ApplicationUpdateParameters) (result autorest.Response, err error) {
|
||||
req, err := client.PatchPreparer(applicationObjectID, parameters)
|
||||
if err != nil {
|
||||
@@ -567,11 +607,10 @@ func (client ApplicationsClient) PatchResponder(resp *http.Response) (result aut
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateKeyCredentials update the keyCredentials associated with an
|
||||
// application.
|
||||
// UpdateKeyCredentials update the keyCredentials associated with an application.
|
||||
//
|
||||
// applicationObjectID is application object ID. parameters is parameters to
|
||||
// update the keyCredentials of an existing application.
|
||||
// applicationObjectID is application object ID. parameters is parameters to update the keyCredentials of an existing
|
||||
// application.
|
||||
func (client ApplicationsClient) UpdateKeyCredentials(applicationObjectID string, parameters KeyCredentialsUpdateParameters) (result autorest.Response, err error) {
|
||||
req, err := client.UpdateKeyCredentialsPreparer(applicationObjectID, parameters)
|
||||
if err != nil {
|
||||
@@ -634,11 +673,10 @@ func (client ApplicationsClient) UpdateKeyCredentialsResponder(resp *http.Respon
|
||||
return
|
||||
}
|
||||
|
||||
// UpdatePasswordCredentials update passwordCredentials associated with an
|
||||
// application.
|
||||
// UpdatePasswordCredentials update passwordCredentials associated with an application.
|
||||
//
|
||||
// applicationObjectID is application object ID. parameters is parameters to
|
||||
// update passwordCredentials of an existing application.
|
||||
// applicationObjectID is application object ID. parameters is parameters to update passwordCredentials of an existing
|
||||
// application.
|
||||
func (client ApplicationsClient) UpdatePasswordCredentials(applicationObjectID string, parameters PasswordCredentialsUpdateParameters) (result autorest.Response, err error) {
|
||||
req, err := client.UpdatePasswordCredentialsPreparer(applicationObjectID, parameters)
|
||||
if err != nil {
|
||||
|
||||
+4
-6
@@ -1,7 +1,6 @@
|
||||
// Package graphrbac implements the Azure ARM Graphrbac service API version .
|
||||
// Package graphrbac implements the Azure ARM Graphrbac service API version 1.6.
|
||||
//
|
||||
// Composite Swagger specification for Azure Active Directory Graph RBAC
|
||||
// management client.
|
||||
// The Graph RBAC Management Client
|
||||
package graphrbac
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
@@ -18,9 +17,8 @@ package graphrbac
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
package graphrbac
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
"github.com/Azure/go-autorest/autorest/azure"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// DomainsClient is the the Graph RBAC Management Client
|
||||
type DomainsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewDomainsClient creates an instance of the DomainsClient client.
|
||||
func NewDomainsClient(tenantID string) DomainsClient {
|
||||
return NewDomainsClientWithBaseURI(DefaultBaseURI, tenantID)
|
||||
}
|
||||
|
||||
// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client.
|
||||
func NewDomainsClientWithBaseURI(baseURI string, tenantID string) DomainsClient {
|
||||
return DomainsClient{NewWithBaseURI(baseURI, tenantID)}
|
||||
}
|
||||
|
||||
// Get gets a specific domain in the current tenant.
|
||||
//
|
||||
// domainName is name of the domain.
|
||||
func (client DomainsClient) Get(domainName string) (result Domain, err error) {
|
||||
req, err := client.GetPreparer(domainName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "Get", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.GetSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "Get", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.GetResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "Get", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GetPreparer prepares the Get request.
|
||||
func (client DomainsClient) GetPreparer(domainName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"domainName": autorest.Encode("path", domainName),
|
||||
"tenantID": autorest.Encode("path", client.TenantID),
|
||||
}
|
||||
|
||||
const APIVersion = "1.6"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/{tenantID}/domains/{domainName}", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// GetSender sends the Get request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client DomainsClient) GetSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// GetResponder handles the response to the Get request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client DomainsClient) GetResponder(resp *http.Response) (result Domain, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// List gets a list of domains for the current tenant.
|
||||
//
|
||||
// filter is the filter to apply to the operation.
|
||||
func (client DomainsClient) List(filter string) (result DomainListResult, err error) {
|
||||
req, err := client.ListPreparer(filter)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "List", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "List", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "List", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client DomainsClient) ListPreparer(filter string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"tenantID": autorest.Encode("path", client.TenantID),
|
||||
}
|
||||
|
||||
const APIVersion = "1.6"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
if len(filter) > 0 {
|
||||
queryParameters["$filter"] = autorest.Encode("query", filter)
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/{tenantID}/domains", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListSender sends the List request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client DomainsClient) ListSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListResponder handles the response to the List request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client DomainsClient) ListResponder(resp *http.Response) (result DomainListResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
+100
-15
@@ -14,9 +14,8 @@ package graphrbac
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,8 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// GroupsClient is the composite Swagger specification for Azure Active
|
||||
// Directory Graph RBAC management client.
|
||||
// GroupsClient is the the Graph RBAC Management Client
|
||||
type GroupsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -43,8 +41,8 @@ func NewGroupsClientWithBaseURI(baseURI string, tenantID string) GroupsClient {
|
||||
|
||||
// AddMember add a member to a group.
|
||||
//
|
||||
// groupObjectID is the object ID of the group to which to add the member.
|
||||
// parameters is the URL of the member object, such as
|
||||
// groupObjectID is the object ID of the group to which to add the member. parameters is the URL of the member object,
|
||||
// such as
|
||||
// https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd.
|
||||
func (client GroupsClient) AddMember(groupObjectID string, parameters GroupAddMemberParameters) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
@@ -379,6 +377,51 @@ func (client GroupsClient) GetGroupMembersResponder(resp *http.Response) (result
|
||||
return
|
||||
}
|
||||
|
||||
// GetGroupMembersComplete gets all elements from the list without paging.
|
||||
func (client GroupsClient) GetGroupMembersComplete(objectID string, cancel <-chan struct{}) (<-chan AADObject, <-chan error) {
|
||||
resultChan := make(chan AADObject)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.GetGroupMembers(objectID)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.OdataNextLink != nil {
|
||||
list, err = client.GetGroupMembersNext(*list.OdataNextLink)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// GetGroupMembersNext gets the members of a group.
|
||||
//
|
||||
// nextLink is next link for the list operation.
|
||||
@@ -443,11 +486,9 @@ func (client GroupsClient) GetGroupMembersNextResponder(resp *http.Response) (re
|
||||
return
|
||||
}
|
||||
|
||||
// GetMemberGroups gets a collection of object IDs of groups of which the
|
||||
// specified group is a member.
|
||||
// GetMemberGroups gets a collection of object IDs of groups of which the specified group is a member.
|
||||
//
|
||||
// objectID is the object ID of the group for which to get group membership.
|
||||
// parameters is group filtering parameters.
|
||||
// objectID is the object ID of the group for which to get group membership. parameters is group filtering parameters.
|
||||
func (client GroupsClient) GetMemberGroups(objectID string, parameters GroupGetMemberGroupsParameters) (result GroupGetMemberGroupsResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: parameters,
|
||||
@@ -517,8 +558,8 @@ func (client GroupsClient) GetMemberGroupsResponder(resp *http.Response) (result
|
||||
return
|
||||
}
|
||||
|
||||
// IsMemberOf checks whether the specified user, group, contact, or service
|
||||
// principal is a direct or transitive member of the specified group.
|
||||
// IsMemberOf checks whether the specified user, group, contact, or service principal is a direct or transitive member
|
||||
// of the specified group.
|
||||
//
|
||||
// parameters is the check group membership parameters.
|
||||
func (client GroupsClient) IsMemberOf(parameters CheckGroupMembershipParameters) (result CheckGroupMembershipResult, err error) {
|
||||
@@ -656,6 +697,51 @@ func (client GroupsClient) ListResponder(resp *http.Response) (result GroupListR
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client GroupsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan ADGroup, <-chan error) {
|
||||
resultChan := make(chan ADGroup)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.OdataNextLink != nil {
|
||||
list, err = client.ListNext(*list.OdataNextLink)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListNext gets a list of groups for the current tenant.
|
||||
//
|
||||
// nextLink is next link for the list operation.
|
||||
@@ -722,8 +808,7 @@ func (client GroupsClient) ListNextResponder(resp *http.Response) (result GroupL
|
||||
|
||||
// RemoveMember remove a member from a group.
|
||||
//
|
||||
// groupObjectID is the object ID of the group from which to remove the member.
|
||||
// memberObjectID is member object id
|
||||
// groupObjectID is the object ID of the group from which to remove the member. memberObjectID is member object id
|
||||
func (client GroupsClient) RemoveMember(groupObjectID string, memberObjectID string) (result autorest.Response, err error) {
|
||||
req, err := client.RemoveMemberPreparer(groupObjectID, memberObjectID)
|
||||
if err != nil {
|
||||
|
||||
+140
-68
@@ -14,28 +14,45 @@ package graphrbac
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
"github.com/Azure/go-autorest/autorest/date"
|
||||
)
|
||||
|
||||
// UserType enumerates the values for user type.
|
||||
type UserType string
|
||||
|
||||
const (
|
||||
// Guest specifies the guest state for user type.
|
||||
Guest UserType = "Guest"
|
||||
// Member specifies the member state for user type.
|
||||
Member UserType = "Member"
|
||||
)
|
||||
|
||||
// AADObject is the properties of an Active Directory object.
|
||||
type AADObject struct {
|
||||
autorest.Response `json:"-"`
|
||||
ObjectID *string `json:"objectId,omitempty"`
|
||||
ObjectType *string `json:"objectType,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
UserPrincipalName *string `json:"userPrincipalName,omitempty"`
|
||||
Mail *string `json:"mail,omitempty"`
|
||||
MailEnabled *bool `json:"mailEnabled,omitempty"`
|
||||
SecurityEnabled *bool `json:"securityEnabled,omitempty"`
|
||||
SignInName *string `json:"signInName,omitempty"`
|
||||
ServicePrincipalNames *[]string `json:"servicePrincipalNames,omitempty"`
|
||||
UserType *string `json:"userType,omitempty"`
|
||||
autorest.Response `json:"-"`
|
||||
ObjectID *string `json:"objectId,omitempty"`
|
||||
ObjectType *string `json:"objectType,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
UserPrincipalName *string `json:"userPrincipalName,omitempty"`
|
||||
Mail *string `json:"mail,omitempty"`
|
||||
MailEnabled *bool `json:"mailEnabled,omitempty"`
|
||||
MailNickname *string `json:"mailNickname,omitempty"`
|
||||
SecurityEnabled *bool `json:"securityEnabled,omitempty"`
|
||||
SignInName *string `json:"signInName,omitempty"`
|
||||
ServicePrincipalNames *[]string `json:"servicePrincipalNames,omitempty"`
|
||||
UserType *string `json:"userType,omitempty"`
|
||||
UsageLocation *string `json:"usageLocation,omitempty"`
|
||||
AppID *string `json:"appId,omitempty"`
|
||||
AppPermissions *[]string `json:"appPermissions,omitempty"`
|
||||
AvailableToOtherTenants *bool `json:"availableToOtherTenants,omitempty"`
|
||||
IdentifierUris *[]string `json:"identifierUris,omitempty"`
|
||||
ReplyUrls *[]string `json:"replyUrls,omitempty"`
|
||||
Homepage *string `json:"homepage,omitempty"`
|
||||
}
|
||||
|
||||
// ADGroup is active Directory group information.
|
||||
@@ -60,18 +77,20 @@ type Application struct {
|
||||
IdentifierUris *[]string `json:"identifierUris,omitempty"`
|
||||
ReplyUrls *[]string `json:"replyUrls,omitempty"`
|
||||
Homepage *string `json:"homepage,omitempty"`
|
||||
Oauth2AllowImplicitFlow *bool `json:"oauth2AllowImplicitFlow,omitempty"`
|
||||
}
|
||||
|
||||
// ApplicationCreateParameters is request parameters for creating a new
|
||||
// application.
|
||||
// ApplicationCreateParameters is request parameters for creating a new application.
|
||||
type ApplicationCreateParameters struct {
|
||||
AvailableToOtherTenants *bool `json:"availableToOtherTenants,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
Homepage *string `json:"homepage,omitempty"`
|
||||
IdentifierUris *[]string `json:"identifierUris,omitempty"`
|
||||
ReplyUrls *[]string `json:"replyUrls,omitempty"`
|
||||
KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"`
|
||||
PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"`
|
||||
AvailableToOtherTenants *bool `json:"availableToOtherTenants,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
Homepage *string `json:"homepage,omitempty"`
|
||||
IdentifierUris *[]string `json:"identifierUris,omitempty"`
|
||||
ReplyUrls *[]string `json:"replyUrls,omitempty"`
|
||||
KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"`
|
||||
PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"`
|
||||
Oauth2AllowImplicitFlow *bool `json:"oauth2AllowImplicitFlow,omitempty"`
|
||||
RequiredResourceAccess *[]RequiredResourceAccess `json:"requiredResourceAccess,omitempty"`
|
||||
}
|
||||
|
||||
// ApplicationListResult is application list operation result.
|
||||
@@ -81,20 +100,20 @@ type ApplicationListResult struct {
|
||||
OdataNextLink *string `json:"odata.nextLink,omitempty"`
|
||||
}
|
||||
|
||||
// ApplicationUpdateParameters is request parameters for updating an existing
|
||||
// application.
|
||||
// ApplicationUpdateParameters is request parameters for updating an existing application.
|
||||
type ApplicationUpdateParameters struct {
|
||||
AvailableToOtherTenants *bool `json:"availableToOtherTenants,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
Homepage *string `json:"homepage,omitempty"`
|
||||
IdentifierUris *[]string `json:"identifierUris,omitempty"`
|
||||
ReplyUrls *[]string `json:"replyUrls,omitempty"`
|
||||
KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"`
|
||||
PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"`
|
||||
AvailableToOtherTenants *bool `json:"availableToOtherTenants,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
Homepage *string `json:"homepage,omitempty"`
|
||||
IdentifierUris *[]string `json:"identifierUris,omitempty"`
|
||||
ReplyUrls *[]string `json:"replyUrls,omitempty"`
|
||||
KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"`
|
||||
PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"`
|
||||
Oauth2AllowImplicitFlow *bool `json:"oauth2AllowImplicitFlow,omitempty"`
|
||||
RequiredResourceAccess *[]RequiredResourceAccess `json:"requiredResourceAccess,omitempty"`
|
||||
}
|
||||
|
||||
// CheckGroupMembershipParameters is request parameters for IsMemberOf API
|
||||
// call.
|
||||
// CheckGroupMembershipParameters is request parameters for IsMemberOf API call.
|
||||
type CheckGroupMembershipParameters struct {
|
||||
GroupID *string `json:"groupId,omitempty"`
|
||||
MemberID *string `json:"memberId,omitempty"`
|
||||
@@ -106,21 +125,34 @@ type CheckGroupMembershipResult struct {
|
||||
Value *bool `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// Domain is active Directory Domain information.
|
||||
type Domain struct {
|
||||
autorest.Response `json:"-"`
|
||||
AuthenticationType *string `json:"authenticationType,omitempty"`
|
||||
IsDefault *bool `json:"isDefault,omitempty"`
|
||||
IsVerified *bool `json:"isVerified,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// DomainListResult is server response for Get tenant domains API call.
|
||||
type DomainListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Domain `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// ErrorMessage is active Directory error message.
|
||||
type ErrorMessage struct {
|
||||
Message *string `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// GetObjectsParameters is request parameters for the GetObjectsByObjectIds
|
||||
// API.
|
||||
// GetObjectsParameters is request parameters for the GetObjectsByObjectIds API.
|
||||
type GetObjectsParameters struct {
|
||||
ObjectIds *[]string `json:"objectIds,omitempty"`
|
||||
Types *[]string `json:"types,omitempty"`
|
||||
IncludeDirectoryObjectReferences *bool `json:"includeDirectoryObjectReferences,omitempty"`
|
||||
}
|
||||
|
||||
// GetObjectsResult is the response to an Active Directory object inquiry API
|
||||
// request.
|
||||
// GetObjectsResult is the response to an Active Directory object inquiry API request.
|
||||
type GetObjectsResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]AADObject `json:"value,omitempty"`
|
||||
@@ -132,8 +164,7 @@ type GraphError struct {
|
||||
*OdataError `json:"odata.error,omitempty"`
|
||||
}
|
||||
|
||||
// GroupAddMemberParameters is request parameters for adding a member to a
|
||||
// group.
|
||||
// GroupAddMemberParameters is request parameters for adding a member to a group.
|
||||
type GroupAddMemberParameters struct {
|
||||
URL *string `json:"url,omitempty"`
|
||||
}
|
||||
@@ -146,8 +177,7 @@ type GroupCreateParameters struct {
|
||||
SecurityEnabled *bool `json:"securityEnabled,omitempty"`
|
||||
}
|
||||
|
||||
// GroupGetMemberGroupsParameters is request parameters for GetMemberGroups API
|
||||
// call.
|
||||
// GroupGetMemberGroupsParameters is request parameters for GetMemberGroups API call.
|
||||
type GroupGetMemberGroupsParameters struct {
|
||||
SecurityEnabledOnly *bool `json:"securityEnabledOnly,omitempty"`
|
||||
}
|
||||
@@ -181,8 +211,7 @@ type KeyCredentialListResult struct {
|
||||
Value *[]KeyCredential `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// KeyCredentialsUpdateParameters is request parameters for a KeyCredentials
|
||||
// update operation
|
||||
// KeyCredentialsUpdateParameters is request parameters for a KeyCredentials update operation
|
||||
type KeyCredentialsUpdateParameters struct {
|
||||
Value *[]KeyCredential `json:"value,omitempty"`
|
||||
}
|
||||
@@ -207,8 +236,7 @@ type PasswordCredentialListResult struct {
|
||||
Value *[]PasswordCredential `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// PasswordCredentialsUpdateParameters is request parameters for a
|
||||
// PasswordCredentials update operation.
|
||||
// PasswordCredentialsUpdateParameters is request parameters for a PasswordCredentials update operation.
|
||||
type PasswordCredentialsUpdateParameters struct {
|
||||
Value *[]PasswordCredential `json:"value,omitempty"`
|
||||
}
|
||||
@@ -219,6 +247,22 @@ type PasswordProfile struct {
|
||||
ForceChangePasswordNextLogin *bool `json:"forceChangePasswordNextLogin,omitempty"`
|
||||
}
|
||||
|
||||
// RequiredResourceAccess is specifies the set of OAuth 2.0 permission scopes and app roles under the specified
|
||||
// resource that an application requires access to. The specified OAuth 2.0 permission scopes may be requested by
|
||||
// client applications (through the requiredResourceAccess collection) when calling a resource application. The
|
||||
// requiredResourceAccess property of the Application entity is a collection of ReqiredResourceAccess.
|
||||
type RequiredResourceAccess struct {
|
||||
ResourceAccess *[]ResourceAccess `json:"resourceAccess,omitempty"`
|
||||
ResourceAppID *string `json:"resourceAppId,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceAccess is specifies an OAuth 2.0 permission scope or an app role that an application requires. The
|
||||
// resourceAccess property of the RequiredResourceAccess type is a collection of ResourceAccess.
|
||||
type ResourceAccess struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// ServicePrincipal is active Directory service principal information.
|
||||
type ServicePrincipal struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -229,8 +273,7 @@ type ServicePrincipal struct {
|
||||
ServicePrincipalNames *[]string `json:"servicePrincipalNames,omitempty"`
|
||||
}
|
||||
|
||||
// ServicePrincipalCreateParameters is request parameters for creating a new
|
||||
// service principal.
|
||||
// ServicePrincipalCreateParameters is request parameters for creating a new service principal.
|
||||
type ServicePrincipalCreateParameters struct {
|
||||
AppID *string `json:"appId,omitempty"`
|
||||
AccountEnabled *bool `json:"accountEnabled,omitempty"`
|
||||
@@ -238,39 +281,63 @@ type ServicePrincipalCreateParameters struct {
|
||||
PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"`
|
||||
}
|
||||
|
||||
// ServicePrincipalListResult is server response for get tenant service
|
||||
// principals API call.
|
||||
// ServicePrincipalListResult is server response for get tenant service principals API call.
|
||||
type ServicePrincipalListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]ServicePrincipal `json:"value,omitempty"`
|
||||
OdataNextLink *string `json:"odata.nextLink,omitempty"`
|
||||
}
|
||||
|
||||
// SignInName is contains information about a sign-in name of a local account user in an Azure Active Directory B2C
|
||||
// tenant.
|
||||
type SignInName struct {
|
||||
Type *string `json:"type,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// User is active Directory user information.
|
||||
type User struct {
|
||||
autorest.Response `json:"-"`
|
||||
ObjectID *string `json:"objectId,omitempty"`
|
||||
ObjectType *string `json:"objectType,omitempty"`
|
||||
UserPrincipalName *string `json:"userPrincipalName,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
SignInName *string `json:"signInName,omitempty"`
|
||||
Mail *string `json:"mail,omitempty"`
|
||||
MailNickname *string `json:"mailNickname,omitempty"`
|
||||
ImmutableID *string `json:"immutableId,omitempty"`
|
||||
UsageLocation *string `json:"usageLocation,omitempty"`
|
||||
GivenName *string `json:"givenName,omitempty"`
|
||||
Surname *string `json:"surname,omitempty"`
|
||||
UserType UserType `json:"userType,omitempty"`
|
||||
AccountEnabled *bool `json:"accountEnabled,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
UserPrincipalName *string `json:"userPrincipalName,omitempty"`
|
||||
MailNickname *string `json:"mailNickname,omitempty"`
|
||||
Mail *string `json:"mail,omitempty"`
|
||||
ObjectID *string `json:"objectId,omitempty"`
|
||||
ObjectType *string `json:"objectType,omitempty"`
|
||||
SignInNames *[]SignInName `json:"signInNames,omitempty"`
|
||||
}
|
||||
|
||||
// UserCreateParameters is request parameters for creating a new work or school
|
||||
// account user.
|
||||
// UserBase is
|
||||
type UserBase struct {
|
||||
ImmutableID *string `json:"immutableId,omitempty"`
|
||||
UsageLocation *string `json:"usageLocation,omitempty"`
|
||||
GivenName *string `json:"givenName,omitempty"`
|
||||
Surname *string `json:"surname,omitempty"`
|
||||
UserType UserType `json:"userType,omitempty"`
|
||||
}
|
||||
|
||||
// UserCreateParameters is request parameters for creating a new work or school account user.
|
||||
type UserCreateParameters struct {
|
||||
ImmutableID *string `json:"immutableId,omitempty"`
|
||||
UsageLocation *string `json:"usageLocation,omitempty"`
|
||||
GivenName *string `json:"givenName,omitempty"`
|
||||
Surname *string `json:"surname,omitempty"`
|
||||
UserType UserType `json:"userType,omitempty"`
|
||||
AccountEnabled *bool `json:"accountEnabled,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
PasswordProfile *PasswordProfile `json:"passwordProfile,omitempty"`
|
||||
UserPrincipalName *string `json:"userPrincipalName,omitempty"`
|
||||
MailNickname *string `json:"mailNickname,omitempty"`
|
||||
ImmutableID *string `json:"immutableId,omitempty"`
|
||||
Mail *string `json:"mail,omitempty"`
|
||||
}
|
||||
|
||||
// UserGetMemberGroupsParameters is request parameters for GetMemberGroups API
|
||||
// call.
|
||||
// UserGetMemberGroupsParameters is request parameters for GetMemberGroups API call.
|
||||
type UserGetMemberGroupsParameters struct {
|
||||
SecurityEnabledOnly *bool `json:"securityEnabledOnly,omitempty"`
|
||||
}
|
||||
@@ -288,11 +355,16 @@ type UserListResult struct {
|
||||
OdataNextLink *string `json:"odata.nextLink,omitempty"`
|
||||
}
|
||||
|
||||
// UserUpdateParameters is request parameters for updating an existing work or
|
||||
// school account user.
|
||||
// UserUpdateParameters is request parameters for updating an existing work or school account user.
|
||||
type UserUpdateParameters struct {
|
||||
AccountEnabled *bool `json:"accountEnabled,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
PasswordProfile *PasswordProfile `json:"passwordProfile,omitempty"`
|
||||
MailNickname *string `json:"mailNickname,omitempty"`
|
||||
ImmutableID *string `json:"immutableId,omitempty"`
|
||||
UsageLocation *string `json:"usageLocation,omitempty"`
|
||||
GivenName *string `json:"givenName,omitempty"`
|
||||
Surname *string `json:"surname,omitempty"`
|
||||
UserType UserType `json:"userType,omitempty"`
|
||||
AccountEnabled *bool `json:"accountEnabled,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
PasswordProfile *PasswordProfile `json:"passwordProfile,omitempty"`
|
||||
UserPrincipalName *string `json:"userPrincipalName,omitempty"`
|
||||
MailNickname *string `json:"mailNickname,omitempty"`
|
||||
}
|
||||
|
||||
+50
-9
@@ -14,9 +14,8 @@ package graphrbac
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,8 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ObjectsClient is the composite Swagger specification for Azure Active
|
||||
// Directory Graph RBAC management client.
|
||||
// ObjectsClient is the the Graph RBAC Management Client
|
||||
type ObjectsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -102,8 +100,7 @@ func (client ObjectsClient) GetCurrentUserResponder(resp *http.Response) (result
|
||||
return
|
||||
}
|
||||
|
||||
// GetObjectsByObjectIds gets AD group membership for the specified AD object
|
||||
// IDs.
|
||||
// GetObjectsByObjectIds gets AD group membership for the specified AD object IDs.
|
||||
//
|
||||
// parameters is objects filtering parameters.
|
||||
func (client ObjectsClient) GetObjectsByObjectIds(parameters GetObjectsParameters) (result GetObjectsResult, err error) {
|
||||
@@ -174,8 +171,52 @@ func (client ObjectsClient) GetObjectsByObjectIdsResponder(resp *http.Response)
|
||||
return
|
||||
}
|
||||
|
||||
// GetObjectsByObjectIdsNext gets AD group membership for the specified AD
|
||||
// object IDs.
|
||||
// GetObjectsByObjectIdsComplete gets all elements from the list without paging.
|
||||
func (client ObjectsClient) GetObjectsByObjectIdsComplete(parameters GetObjectsParameters, cancel <-chan struct{}) (<-chan AADObject, <-chan error) {
|
||||
resultChan := make(chan AADObject)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.GetObjectsByObjectIds(parameters)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.OdataNextLink != nil {
|
||||
list, err = client.GetObjectsByObjectIdsNext(*list.OdataNextLink)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// GetObjectsByObjectIdsNext gets AD group membership for the specified AD object IDs.
|
||||
//
|
||||
// nextLink is next link for the list operation.
|
||||
func (client ObjectsClient) GetObjectsByObjectIdsNext(nextLink string) (result GetObjectsResult, err error) {
|
||||
|
||||
+59
-24
@@ -14,9 +14,8 @@ package graphrbac
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,20 +24,17 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ServicePrincipalsClient is the composite Swagger specification for Azure
|
||||
// Active Directory Graph RBAC management client.
|
||||
// ServicePrincipalsClient is the the Graph RBAC Management Client
|
||||
type ServicePrincipalsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewServicePrincipalsClient creates an instance of the
|
||||
// ServicePrincipalsClient client.
|
||||
// NewServicePrincipalsClient creates an instance of the ServicePrincipalsClient client.
|
||||
func NewServicePrincipalsClient(tenantID string) ServicePrincipalsClient {
|
||||
return NewServicePrincipalsClientWithBaseURI(DefaultBaseURI, tenantID)
|
||||
}
|
||||
|
||||
// NewServicePrincipalsClientWithBaseURI creates an instance of the
|
||||
// ServicePrincipalsClient client.
|
||||
// NewServicePrincipalsClientWithBaseURI creates an instance of the ServicePrincipalsClient client.
|
||||
func NewServicePrincipalsClientWithBaseURI(baseURI string, tenantID string) ServicePrincipalsClient {
|
||||
return ServicePrincipalsClient{NewWithBaseURI(baseURI, tenantID)}
|
||||
}
|
||||
@@ -308,11 +304,54 @@ func (client ServicePrincipalsClient) ListResponder(resp *http.Response) (result
|
||||
return
|
||||
}
|
||||
|
||||
// ListKeyCredentials get the keyCredentials associated with the specified
|
||||
// service principal.
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ServicePrincipalsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan ServicePrincipal, <-chan error) {
|
||||
resultChan := make(chan ServicePrincipal)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.OdataNextLink != nil {
|
||||
list, err = client.ListNext(*list.OdataNextLink)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListKeyCredentials get the keyCredentials associated with the specified service principal.
|
||||
//
|
||||
// objectID is the object ID of the service principal for which to get
|
||||
// keyCredentials.
|
||||
// objectID is the object ID of the service principal for which to get keyCredentials.
|
||||
func (client ServicePrincipalsClient) ListKeyCredentials(objectID string) (result KeyCredentialListResult, err error) {
|
||||
req, err := client.ListKeyCredentialsPreparer(objectID)
|
||||
if err != nil {
|
||||
@@ -438,8 +477,7 @@ func (client ServicePrincipalsClient) ListNextResponder(resp *http.Response) (re
|
||||
return
|
||||
}
|
||||
|
||||
// ListPasswordCredentials gets the passwordCredentials associated with a
|
||||
// service principal.
|
||||
// ListPasswordCredentials gets the passwordCredentials associated with a service principal.
|
||||
//
|
||||
// objectID is the object ID of the service principal.
|
||||
func (client ServicePrincipalsClient) ListPasswordCredentials(objectID string) (result PasswordCredentialListResult, err error) {
|
||||
@@ -503,12 +541,10 @@ func (client ServicePrincipalsClient) ListPasswordCredentialsResponder(resp *htt
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateKeyCredentials update the keyCredentials associated with a service
|
||||
// principal.
|
||||
// UpdateKeyCredentials update the keyCredentials associated with a service principal.
|
||||
//
|
||||
// objectID is the object ID for which to get service principal information.
|
||||
// parameters is parameters to update the keyCredentials of an existing service
|
||||
// principal.
|
||||
// objectID is the object ID for which to get service principal information. parameters is parameters to update the
|
||||
// keyCredentials of an existing service principal.
|
||||
func (client ServicePrincipalsClient) UpdateKeyCredentials(objectID string, parameters KeyCredentialsUpdateParameters) (result autorest.Response, err error) {
|
||||
req, err := client.UpdateKeyCredentialsPreparer(objectID, parameters)
|
||||
if err != nil {
|
||||
@@ -571,11 +607,10 @@ func (client ServicePrincipalsClient) UpdateKeyCredentialsResponder(resp *http.R
|
||||
return
|
||||
}
|
||||
|
||||
// UpdatePasswordCredentials updates the passwordCredentials associated with a
|
||||
// service principal.
|
||||
// UpdatePasswordCredentials updates the passwordCredentials associated with a service principal.
|
||||
//
|
||||
// objectID is the object ID of the service principal. parameters is parameters
|
||||
// to update the passwordCredentials of an existing service principal.
|
||||
// objectID is the object ID of the service principal. parameters is parameters to update the passwordCredentials of an
|
||||
// existing service principal.
|
||||
func (client ServicePrincipalsClient) UpdatePasswordCredentials(objectID string, parameters PasswordCredentialsUpdateParameters) (result autorest.Response, err error) {
|
||||
req, err := client.UpdatePasswordCredentialsPreparer(objectID, parameters)
|
||||
if err != nil {
|
||||
|
||||
+53
-13
@@ -14,9 +14,8 @@ package graphrbac
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,8 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// UsersClient is the composite Swagger specification for Azure Active
|
||||
// Directory Graph RBAC management client.
|
||||
// UsersClient is the the Graph RBAC Management Client
|
||||
type UsersClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -182,8 +180,7 @@ func (client UsersClient) DeleteResponder(resp *http.Response) (result autorest.
|
||||
|
||||
// Get gets user information from the directory.
|
||||
//
|
||||
// upnOrObjectID is the object ID or principal name of the user for which to
|
||||
// get information.
|
||||
// upnOrObjectID is the object ID or principal name of the user for which to get information.
|
||||
func (client UsersClient) Get(upnOrObjectID string) (result User, err error) {
|
||||
req, err := client.GetPreparer(upnOrObjectID)
|
||||
if err != nil {
|
||||
@@ -245,11 +242,9 @@ func (client UsersClient) GetResponder(resp *http.Response) (result User, err er
|
||||
return
|
||||
}
|
||||
|
||||
// GetMemberGroups gets a collection that contains the object IDs of the groups
|
||||
// of which the user is a member.
|
||||
// GetMemberGroups gets a collection that contains the object IDs of the groups of which the user is a member.
|
||||
//
|
||||
// objectID is the object ID of the user for which to get group membership.
|
||||
// parameters is user filtering parameters.
|
||||
// objectID is the object ID of the user for which to get group membership. parameters is user filtering parameters.
|
||||
func (client UsersClient) GetMemberGroups(objectID string, parameters UserGetMemberGroupsParameters) (result UserGetMemberGroupsResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: parameters,
|
||||
@@ -385,6 +380,51 @@ func (client UsersClient) ListResponder(resp *http.Response) (result UserListRes
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client UsersClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan User, <-chan error) {
|
||||
resultChan := make(chan User)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.OdataNextLink != nil {
|
||||
list, err = client.ListNext(*list.OdataNextLink)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListNext gets a list of users for the current tenant.
|
||||
//
|
||||
// nextLink is next link for the list operation.
|
||||
@@ -451,8 +491,8 @@ func (client UsersClient) ListNextResponder(resp *http.Response) (result UserLis
|
||||
|
||||
// Update updates a user.
|
||||
//
|
||||
// upnOrObjectID is the object ID or principal name of the user to update.
|
||||
// parameters is parameters to update an existing user.
|
||||
// upnOrObjectID is the object ID or principal name of the user to update. parameters is parameters to update an
|
||||
// existing user.
|
||||
func (client UsersClient) Update(upnOrObjectID string, parameters UserUpdateParameters) (result autorest.Response, err error) {
|
||||
req, err := client.UpdatePreparer(upnOrObjectID, parameters)
|
||||
if err != nil {
|
||||
|
||||
+4
-5
@@ -14,16 +14,15 @@ package graphrbac
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
// UserAgent returns the UserAgent string to use when sending http.Requests.
|
||||
func UserAgent() string {
|
||||
return "Azure-SDK-For-Go/v10.1.0-beta arm-graphrbac/"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-graphrbac/1.6"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.1.0-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user