Documentation ¶
Index ¶
- Constants
- func WithOdataErrorUnlessStatusCode(codes ...int) autorest.RespondDecorator
- type AADObject
- type ManagementClient
- type PasswordCredential
- type PasswordCredentialsListResult
- type PasswordCredentialsUpdateParameters
- type ServicePrincipal
- type ServicePrincipalCreateParameters
- type ServicePrincipalListResult
- type ServicePrincipalsClient
- func (client ServicePrincipalsClient) Create(parameters ServicePrincipalCreateParameters, cancel <-chan struct{}) (result ServicePrincipal, err error)
- func (client ServicePrincipalsClient) CreatePreparer(parameters ServicePrincipalCreateParameters, cancel <-chan struct{}) (*http.Request, error)
- func (client ServicePrincipalsClient) CreateResponder(resp *http.Response) (result ServicePrincipal, err error)
- func (client ServicePrincipalsClient) CreateSender(req *http.Request) (*http.Response, error)
- func (client ServicePrincipalsClient) List(filter string) (result ServicePrincipalListResult, err error)
- func (client ServicePrincipalsClient) ListPasswordCredentials(objectId string) (result PasswordCredentialsListResult, err error)
- func (client ServicePrincipalsClient) ListPasswordCredentialsPreparer(objectId string) (*http.Request, error)
- func (client ServicePrincipalsClient) ListPasswordCredentialsResponder(resp *http.Response) (result PasswordCredentialsListResult, err error)
- func (client ServicePrincipalsClient) ListPasswordCredentialsSender(req *http.Request) (*http.Response, error)
- func (client ServicePrincipalsClient) ListPreparer(filter string) (*http.Request, error)
- func (client ServicePrincipalsClient) ListResponder(resp *http.Response) (result ServicePrincipalListResult, err error)
- func (client ServicePrincipalsClient) ListSender(req *http.Request) (*http.Response, error)
- func (client ServicePrincipalsClient) UpdatePasswordCredentials(objectId string, parameters PasswordCredentialsUpdateParameters) (result autorest.Response, err error)
- func (client ServicePrincipalsClient) UpdatePasswordCredentialsPreparer(objectId string, parameters PasswordCredentialsUpdateParameters) (*http.Request, error)
- func (client ServicePrincipalsClient) UpdatePasswordCredentialsResponder(resp *http.Response) (result autorest.Response, err error)
- func (client ServicePrincipalsClient) UpdatePasswordCredentialsSender(req *http.Request) (*http.Response, error)
- type UsersClient
- func (client UsersClient) GetCurrentUser() (result AADObject, err error)
- func (client UsersClient) GetCurrentUserPreparer() (*http.Request, error)
- func (client UsersClient) GetCurrentUserResponder(resp *http.Response) (result AADObject, err error)
- func (client UsersClient) GetCurrentUserSender(req *http.Request) (*http.Response, error)
Constants ¶
const (
// APIVersion is the version of the Active Directory API
APIVersion = "1.6"
)
Variables ¶
This section is empty.
Functions ¶
func WithOdataErrorUnlessStatusCode ¶
func WithOdataErrorUnlessStatusCode(codes ...int) autorest.RespondDecorator
WithOdataErrorUnlessStatusCode returns a RespondDecorator that emits an azure.RequestError by reading the response body unless the response HTTP status code is among the set passed.
If there is a chance service may return responses other than the Azure error format and the response cannot be parsed into an error, a decoding error will be returned containing the response body. In any case, the Responder will return an error if the status code is not satisfied.
If this Responder returns an error, the response body will be replaced with an in-memory reader, which needs no further closing.
NOTE(axw) this function is based on go-autorest/autorest/azure.WithErrorUnlessStatusCode. The only difference is that we extract "odata.error", instead of "error", from the response body; and we do not extract the message, which is in a different format for odata.error, and irrelevant to us.
Types ¶
type AADObject ¶
type AADObject struct { autorest.Response `json:"-"` ObjectID string `json:"objectId"` ObjectType string `json:"objectType"` DisplayName string `json:"displayName"` UserPrincipalName string `json:"userPrincipalName"` Mail string `json:"mail"` MailEnabled bool `json:"mailEnabled"` SecurityEnabled bool `json:"securityEnabled"` SignInName string `json:"signInName"` ServicePrincipalNames []string `json:"servicePrincipalNames"` UserType string `json:"userType"` }
type ManagementClient ¶
func NewManagementClient ¶
func NewManagementClient(baseURI string) ManagementClient
type PasswordCredential ¶
type PasswordCredentialsListResult ¶
type PasswordCredentialsListResult struct { autorest.Response `json:"-"` Value []PasswordCredential `json:"value,omitempty"` }
type PasswordCredentialsUpdateParameters ¶
type PasswordCredentialsUpdateParameters struct {
Value []PasswordCredential `json:"value,omitempty"`
}
type ServicePrincipal ¶
type ServicePrincipalCreateParameters ¶
type ServicePrincipalCreateParameters struct { ApplicationID string `json:"appId,omitempty"` AccountEnabled bool `json:"accountEnabled,omitempty"` PasswordCredentials []PasswordCredential `json:"passwordCredentials,omitempty"` }
type ServicePrincipalListResult ¶
type ServicePrincipalListResult struct { autorest.Response `json:"-"` Value []ServicePrincipal `json:"value,omitempty"` }
type ServicePrincipalsClient ¶
type ServicePrincipalsClient struct {
ManagementClient
}
func (ServicePrincipalsClient) Create ¶
func (client ServicePrincipalsClient) Create(parameters ServicePrincipalCreateParameters, cancel <-chan struct{}) (result ServicePrincipal, err error)
func (ServicePrincipalsClient) CreatePreparer ¶
func (client ServicePrincipalsClient) CreatePreparer(parameters ServicePrincipalCreateParameters, cancel <-chan struct{}) (*http.Request, error)
func (ServicePrincipalsClient) CreateResponder ¶
func (client ServicePrincipalsClient) CreateResponder(resp *http.Response) (result ServicePrincipal, err error)
func (ServicePrincipalsClient) CreateSender ¶
func (ServicePrincipalsClient) List ¶
func (client ServicePrincipalsClient) List(filter string) (result ServicePrincipalListResult, err error)
func (ServicePrincipalsClient) ListPasswordCredentials ¶
func (client ServicePrincipalsClient) ListPasswordCredentials(objectId string) (result PasswordCredentialsListResult, err error)
func (ServicePrincipalsClient) ListPasswordCredentialsPreparer ¶
func (client ServicePrincipalsClient) ListPasswordCredentialsPreparer(objectId string) (*http.Request, error)
func (ServicePrincipalsClient) ListPasswordCredentialsResponder ¶
func (client ServicePrincipalsClient) ListPasswordCredentialsResponder(resp *http.Response) (result PasswordCredentialsListResult, err error)
func (ServicePrincipalsClient) ListPasswordCredentialsSender ¶
func (ServicePrincipalsClient) ListPreparer ¶
func (client ServicePrincipalsClient) ListPreparer(filter string) (*http.Request, error)
func (ServicePrincipalsClient) ListResponder ¶
func (client ServicePrincipalsClient) ListResponder(resp *http.Response) (result ServicePrincipalListResult, err error)
func (ServicePrincipalsClient) ListSender ¶
func (ServicePrincipalsClient) UpdatePasswordCredentials ¶
func (client ServicePrincipalsClient) UpdatePasswordCredentials(objectId string, parameters PasswordCredentialsUpdateParameters) (result autorest.Response, err error)
func (ServicePrincipalsClient) UpdatePasswordCredentialsPreparer ¶
func (client ServicePrincipalsClient) UpdatePasswordCredentialsPreparer(objectId string, parameters PasswordCredentialsUpdateParameters) (*http.Request, error)
func (ServicePrincipalsClient) UpdatePasswordCredentialsResponder ¶
func (ServicePrincipalsClient) UpdatePasswordCredentialsSender ¶
type UsersClient ¶
type UsersClient struct {
ManagementClient
}
func (UsersClient) GetCurrentUser ¶
func (client UsersClient) GetCurrentUser() (result AADObject, err error)
func (UsersClient) GetCurrentUserPreparer ¶
func (client UsersClient) GetCurrentUserPreparer() (*http.Request, error)
func (UsersClient) GetCurrentUserResponder ¶
func (client UsersClient) GetCurrentUserResponder(resp *http.Response) (result AADObject, err error)