azure.graphrbac.operations module¶
-
class
azure.graphrbac.operations.
ObjectsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
ObjectsOperations operations.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An objec model deserializer.
Variables: api_version – Client API version. Constant value: “1.6”.
-
get_current_user
(custom_headers=None, raw=False, **operation_config)[source]¶ Gets the details for the currently logged-in user.
Parameters: - custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: AADObject or ClientRawResponse if raw=true
Return type: AADObject or ClientRawResponse
Raises:
-
get_objects_by_object_ids
(parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Gets AD group membership for the specified AD object IDs.
Parameters: - parameters (GetObjectsParameters) – Objects filtering parameters.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of AADObject
Return type: Raises: CloudError
-
models
= <module 'azure.graphrbac.models' from '/usr/lib/python3.7/site-packages/azure/graphrbac/models/__init__.py'>¶
-
class
azure.graphrbac.operations.
ApplicationsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
ApplicationsOperations operations.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An objec model deserializer.
Variables: api_version – Client API version. Constant value: “1.6”.
-
add_owner
(application_object_id, url, additional_properties=None, custom_headers=None, raw=False, **operation_config)[source]¶ Add an owner to an application.
Parameters: - application_object_id (str) – The object ID of the application to which to add the owner.
- url (str) – A owner object URL, such as “https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd”, where “0b1f9851-1bf0-433f-aec3-cb9272f093dc” is the tenantId and “f260bbc4-c254-447b-94cf-293b5ec434dd” is the objectId of the owner (user, application, servicePrincipal, group) to be added.
- additional_properties (dict[str, object]) – Unmatched properties from the message are deserialized this collection
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises:
-
create
(parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Create a new application.
Parameters: - parameters (ApplicationCreateParameters) – The parameters for creating an application.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: Application or ClientRawResponse if raw=true
Return type: Application or ClientRawResponse
Raises:
-
delete
(application_object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Delete an application.
Parameters: - application_object_id (str) – Application object ID.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises:
-
get
(application_object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Get an application by object ID.
Parameters: - application_object_id (str) – Application object ID.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: Application or ClientRawResponse if raw=true
Return type: Application or ClientRawResponse
Raises:
-
list
(filter=None, custom_headers=None, raw=False, **operation_config)[source]¶ Lists applications by filter parameters.
Parameters: - filter (str) – The filters to apply to the operation.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of Application
Return type: Raises:
-
list_key_credentials
(application_object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Get the keyCredentials associated with an application.
Parameters: - application_object_id (str) – Application object ID.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of KeyCredential
Return type: Raises:
-
list_owners
(application_object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Directory objects that are owners of the application.
The owners are a set of non-admin users who are allowed to modify this object.
Parameters: - application_object_id (str) – The object ID of the application for which to get owners.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of DirectoryObject
Return type: Raises:
-
list_password_credentials
(application_object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Get the passwordCredentials associated with an application.
Parameters: - application_object_id (str) – Application object ID.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of PasswordCredential
Return type: Raises:
-
models
= <module 'azure.graphrbac.models' from '/usr/lib/python3.7/site-packages/azure/graphrbac/models/__init__.py'>¶
-
patch
(application_object_id, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Update an existing application.
Parameters: - application_object_id (str) – Application object ID.
- parameters (ApplicationUpdateParameters) – Parameters to update an existing application.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises:
-
update_key_credentials
(application_object_id, value, custom_headers=None, raw=False, **operation_config)[source]¶ Update the keyCredentials associated with an application.
Parameters: - application_object_id (str) – Application object ID.
- value (list[KeyCredential]) – A collection of KeyCredentials.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises:
-
update_password_credentials
(application_object_id, value, custom_headers=None, raw=False, **operation_config)[source]¶ Update passwordCredentials associated with an application.
Parameters: - application_object_id (str) – Application object ID.
- value (list[PasswordCredential]) – A collection of PasswordCredentials.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises:
-
class
azure.graphrbac.operations.
GroupsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
GroupsOperations operations.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An objec model deserializer.
Variables: api_version – Client API version. Constant value: “1.6”.
-
add_member
(group_object_id, url, additional_properties=None, custom_headers=None, raw=False, **operation_config)[source]¶ Add a member to a group.
Parameters: - group_object_id (str) – The object ID of the group to which to add the member.
- url (str) – A member object URL, such as “https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd”, where “0b1f9851-1bf0-433f-aec3-cb9272f093dc” is the tenantId and “f260bbc4-c254-447b-94cf-293b5ec434dd” is the objectId of the member (user, application, servicePrincipal, group) to be added.
- additional_properties (dict[str, object]) – Unmatched properties from the message are deserialized this collection
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises:
-
create
(parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Create a group in the directory.
Parameters: - parameters (GroupCreateParameters) – The parameters for the group to create.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ADGroup or ClientRawResponse if raw=true
Return type: ADGroup or ClientRawResponse
Raises:
-
delete
(object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Delete a group from the directory.
Parameters: - object_id (str) – The object ID of the group to delete.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises:
-
get
(object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Gets group information from the directory.
Parameters: - object_id (str) – The object ID of the user for which to get group information.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ADGroup or ClientRawResponse if raw=true
Return type: ADGroup or ClientRawResponse
Raises:
-
get_group_members
(object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Gets the members of a group.
Parameters: - object_id (str) – The object ID of the group whose members should be retrieved.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of AADObject
Return type: Raises:
-
get_member_groups
(object_id, security_enabled_only, additional_properties=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets a collection of object IDs of groups of which the specified group is a member.
Parameters: - object_id (str) – The object ID of the group for which to get group membership.
- security_enabled_only (bool) – If true, only membership in security-enabled groups should be checked. Otherwise, membership in all groups should be checked.
- additional_properties (dict[str, object]) – Unmatched properties from the message are deserialized this collection
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of str
Return type: StrPaged[str]
Raises:
-
is_member_of
(parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Checks whether the specified user, group, contact, or service principal is a direct or transitive member of the specified group.
Parameters: - parameters (CheckGroupMembershipParameters) – The check group membership parameters.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: CheckGroupMembershipResult or ClientRawResponse if raw=true
Return type: CheckGroupMembershipResult or ClientRawResponse
Raises:
-
list
(filter=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets list of groups for the current tenant.
Parameters: - filter (str) – The filter to apply to the operation.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of ADGroup
Return type: Raises:
-
models
= <module 'azure.graphrbac.models' from '/usr/lib/python3.7/site-packages/azure/graphrbac/models/__init__.py'>¶
-
remove_member
(group_object_id, member_object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Remove a member from a group.
Parameters: - group_object_id (str) – The object ID of the group from which to remove the member.
- member_object_id (str) – Member object id
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises:
-
class
azure.graphrbac.operations.
ServicePrincipalsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
ServicePrincipalsOperations operations.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An objec model deserializer.
Variables: api_version – Client API version. Constant value: “1.6”.
-
create
(parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Creates a service principal in the directory.
Parameters: - parameters (ServicePrincipalCreateParameters) – Parameters to create a service principal.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ServicePrincipal or ClientRawResponse if raw=true
Return type: ServicePrincipal or ClientRawResponse
Raises:
-
delete
(object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Deletes a service principal from the directory.
Parameters: - object_id (str) – The object ID of the service principal to delete.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises:
-
get
(object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Gets service principal information from the directory.
Parameters: - object_id (str) – The object ID of the service principal to get.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ServicePrincipal or ClientRawResponse if raw=true
Return type: ServicePrincipal or ClientRawResponse
Raises:
-
list
(filter=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets a list of service principals from the current tenant.
Parameters: - filter (str) – The filter to apply to the operation.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of ServicePrincipal
Return type: Raises:
-
list_key_credentials
(object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Get the keyCredentials associated with the specified service principal.
Parameters: - object_id (str) – The object ID of the service principal for which to get keyCredentials.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of KeyCredential
Return type: Raises:
-
list_owners
(object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Directory objects that are owners of this service principal.
The owners are a set of non-admin users who are allowed to modify this object.
Parameters: - object_id (str) – The object ID of the service principal for which to get owners.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of DirectoryObject
Return type: Raises:
-
list_password_credentials
(object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Gets the passwordCredentials associated with a service principal.
Parameters: - object_id (str) – The object ID of the service principal.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of PasswordCredential
Return type: Raises:
-
models
= <module 'azure.graphrbac.models' from '/usr/lib/python3.7/site-packages/azure/graphrbac/models/__init__.py'>¶
-
update_key_credentials
(object_id, value, custom_headers=None, raw=False, **operation_config)[source]¶ Update the keyCredentials associated with a service principal.
Parameters: - object_id (str) – The object ID for which to get service principal information.
- value (list[KeyCredential]) – A collection of KeyCredentials.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises:
-
update_password_credentials
(object_id, value, custom_headers=None, raw=False, **operation_config)[source]¶ Updates the passwordCredentials associated with a service principal.
Parameters: - object_id (str) – The object ID of the service principal.
- value (list[PasswordCredential]) – A collection of PasswordCredentials.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises:
-
class
azure.graphrbac.operations.
UsersOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
UsersOperations operations.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An objec model deserializer.
Variables: api_version – Client API version. Constant value: “1.6”.
-
create
(parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Create a new user.
Parameters: - parameters (UserCreateParameters) – Parameters to create a user.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: User or ClientRawResponse if raw=true
Return type: User or ClientRawResponse
Raises:
-
delete
(upn_or_object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Delete a user.
Parameters: - upn_or_object_id (str) – The object ID or principal name of the user to delete.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises:
-
get
(upn_or_object_id, custom_headers=None, raw=False, **operation_config)[source]¶ Gets user information from the directory.
Parameters: - upn_or_object_id (str) – The object ID or principal name of the user for which to get information.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: User or ClientRawResponse if raw=true
Return type: User or ClientRawResponse
Raises:
-
get_member_groups
(object_id, security_enabled_only, additional_properties=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets a collection that contains the object IDs of the groups of which the user is a member.
Parameters: - object_id (str) – The object ID of the user for which to get group membership.
- security_enabled_only (bool) – If true, only membership in security-enabled groups should be checked. Otherwise, membership in all groups should be checked.
- additional_properties (dict[str, object]) – Unmatched properties from the message are deserialized this collection
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of str
Return type: StrPaged[str]
Raises:
-
list
(filter=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets list of users for the current tenant.
Parameters: - filter (str) – The filter to apply to the operation.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of User
Return type: Raises:
-
models
= <module 'azure.graphrbac.models' from '/usr/lib/python3.7/site-packages/azure/graphrbac/models/__init__.py'>¶
-
update
(upn_or_object_id, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Updates a user.
Parameters: - upn_or_object_id (str) – The object ID or principal name of the user to update.
- parameters (UserUpdateParameters) – Parameters to update an existing user.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises:
-
class
azure.graphrbac.operations.
DomainsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
DomainsOperations operations.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An objec model deserializer.
Variables: api_version – Client API version. Constant value: “1.6”.
-
get
(domain_name, custom_headers=None, raw=False, **operation_config)[source]¶ Gets a specific domain in the current tenant.
Parameters: - domain_name (str) – name of the domain.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: Domain or ClientRawResponse if raw=true
Return type: Domain or ClientRawResponse
Raises: CloudError
-
list
(filter=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets a list of domains for the current tenant.
Parameters: - filter (str) – The filter to apply to the operation.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of Domain
Return type: Raises: CloudError
-
models
= <module 'azure.graphrbac.models' from '/usr/lib/python3.7/site-packages/azure/graphrbac/models/__init__.py'>¶