Package org.azd.graph.groups
Class GroupsRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.graph.groups.GroupsRequestBuilder
Provides functionality to work with Graph Groups Api.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the query parameters.static class
Represents the query parameters.static class
Request configuration object for the query parameters.static class
Request configuration object for the query parameters.Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter
-
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer
-
Constructor Summary
ConstructorDescriptionGroupsRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(GraphGroupCreationContext groupCreationContext) Create a new Azure DevOps group or materialize an existing AAD group.create
(GraphGroupCreationContext groupCreationContext, Consumer<GroupsRequestBuilder.RequestConfiguration> requestConfiguration) Create a new Azure DevOps group or materialize an existing AAD group.createAsync
(GraphGroupCreationContext groupCreationContext) Create a new Azure DevOps group or materialize an existing AAD group.createAsync
(GraphGroupCreationContext groupCreationContext, Consumer<GroupsRequestBuilder.RequestConfiguration> requestConfiguration) Create a new Azure DevOps group or materialize an existing AAD group.Removes an Azure DevOps group from all of its parent groups.deleteAsync
(String groupDescriptor) Removes an Azure DevOps group from all of its parent groups.Get a group by its descriptor.Get a group by its descriptor.list()
Gets a list of all groups in the current scope (usually organization or account).list
(Consumer<GroupsRequestBuilder.ListRequestConfiguration> requestConfiguration) Gets a list of all groups in the current scope (usually organization or account).Gets a list of all groups in the current scope (usually organization or account).listAsync
(Consumer<GroupsRequestBuilder.ListRequestConfiguration> requestConfiguration) Gets a list of all groups in the current scope (usually organization or account).update
(JsonPatchDocument patchDocument, String groupDescriptor) Update the properties of an Azure DevOps group.updateAsync
(JsonPatchDocument patchDocument, String groupDescriptor) Update the properties of an Azure DevOps group.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
GroupsRequestBuilder
Instantiates a new RequestBuilder instance and sets the default values.- Parameters:
organizationUrl
- Represents organization location request url.accessTokenCredential
- Access token credential object.
-
-
Method Details
-
createAsync
public CompletableFuture<GraphGroup> createAsync(GraphGroupCreationContext groupCreationContext) throws AzDException Create a new Azure DevOps group or materialize an existing AAD group.
The body of the request must be a derived type of GraphGroupCreationContext:GraphGroupVstsCreationContext
Create a new Azure DevOps group that is not backed by an external provider.GraphGroupMailAddressCreationContext
Create a new group using the mail address as a reference to an existing group from an external AD or AAD backed provider.GraphGroupOriginIdCreationContext
Create a new group using the OriginID as a reference to a group from an external AD or AAD backed provider.
Optionally, you can add the newly created group as a member of an existing Azure DevOps group and/or specify a custom storage key for the group.- Parameters:
groupCreationContext
- Request body to create a new group.- Returns:
- Graph group object
GraphGroup
- Throws:
AzDException
- Default Api exception hanlder.
-
createAsync
public CompletableFuture<GraphGroup> createAsync(GraphGroupCreationContext groupCreationContext, Consumer<GroupsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Create a new Azure DevOps group or materialize an existing AAD group.
The body of the request must be a derived type of GraphGroupCreationContext:GraphGroupVstsCreationContext
Create a new Azure DevOps group that is not backed by an external provider.GraphGroupMailAddressCreationContext
Create a new group using the mail address as a reference to an existing group from an external AD or AAD backed provider.GraphGroupOriginIdCreationContext
Create a new group using the OriginID as a reference to a group from an external AD or AAD backed provider.
Optionally, you can add the newly created group as a member of an existing Azure DevOps group and/or specify a custom storage key for the group.- Parameters:
groupCreationContext
- Request body to create a new group.requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- Graph group object
GraphGroup
- Throws:
AzDException
- Default Api exception handler.
-
deleteAsync
Removes an Azure DevOps group from all of its parent groups. The group will still be visible, but membership checks for the group, and all descendants which derive membership through it, will return false.”- Parameters:
groupDescriptor
- The descriptor of the group to delete.- Throws:
AzDException
- Default Api exception handler.
-
getAsync
Get a group by its descriptor. The group will be returned even if it has been deleted from the account or has had all its memberships deleted.- Parameters:
groupDescriptor
- The descriptor of the desired graph group.- Returns:
- Graph group object
GraphGroup
- Throws:
AzDException
- Default Api exception handler.
-
listAsync
Gets a list of all groups in the current scope (usually organization or account). The optional parameters are used to filter down the returned results. Returned results are in no guaranteed order. Since the list of groups may be large, results are returned in pages of groups. If there are more results than can be returned in a single page, the result set will contain a continuation token for retrieval of the next set of results.- Returns:
- Collection of Graph Group
GraphGroups
- Throws:
AzDException
- Default Api exception handler.
-
listAsync
public CompletableFuture<GraphGroups> listAsync(Consumer<GroupsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException Gets a list of all groups in the current scope (usually organization or account). The optional parameters are used to filter down the returned results. Returned results are in no guaranteed order. Since the list of groups may be large, results are returned in pages of groups. If there are more results than can be returned in a single page, the result set will contain a continuation token for retrieval of the next set of results.- Returns:
- Collection of Graph Group
GraphGroups
- Throws:
AzDException
- Default Api exception handler.
-
updateAsync
public CompletableFuture<GraphGroup> updateAsync(JsonPatchDocument patchDocument, String groupDescriptor) throws AzDException Update the properties of an Azure DevOps group. Currently limited to only changing the description and account name.Example:
[ { "op": "replace", "path": "/description", "from": null, "value": "Updated description" } ]
- Parameters:
patchDocument
- Request body to change the description or account name.groupDescriptor
- The descriptor of the group to modify.- Returns:
- Collection of Graph Group
GraphGroups
- Throws:
AzDException
- Default Api exception handler.
-
create
Create a new Azure DevOps group or materialize an existing AAD group.
The body of the request must be a derived type of GraphGroupCreationContext:GraphGroupVstsCreationContext
Create a new Azure DevOps group that is not backed by an external provider.GraphGroupMailAddressCreationContext
Create a new group using the mail address as a reference to an existing group from an external AD or AAD backed provider.GraphGroupOriginIdCreationContext
Create a new group using the OriginID as a reference to a group from an external AD or AAD backed provider.
Optionally, you can add the newly created group as a member of an existing Azure DevOps group and/or specify a custom storage key for the group.- Parameters:
groupCreationContext
- Request body to create a new group.- Returns:
- Graph group object
GraphGroup
- Throws:
AzDException
- Default Api exception hanlder.
-
create
public GraphGroup create(GraphGroupCreationContext groupCreationContext, Consumer<GroupsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Create a new Azure DevOps group or materialize an existing AAD group.
The body of the request must be a derived type of GraphGroupCreationContext:GraphGroupVstsCreationContext
Create a new Azure DevOps group that is not backed by an external provider.GraphGroupMailAddressCreationContext
Create a new group using the mail address as a reference to an existing group from an external AD or AAD backed provider.GraphGroupOriginIdCreationContext
Create a new group using the OriginID as a reference to a group from an external AD or AAD backed provider.
Optionally, you can add the newly created group as a member of an existing Azure DevOps group and/or specify a custom storage key for the group.- Parameters:
groupCreationContext
- Request body to create a new group.requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- Graph group object
GraphGroup
- Throws:
AzDException
- Default Api exception handler.
-
delete
Removes an Azure DevOps group from all of its parent groups. The group will still be visible, but membership checks for the group, and all descendants which derive membership through it, will return false.”- Parameters:
groupDescriptor
- The descriptor of the group to delete.- Throws:
AzDException
- Default Api exception handler.
-
get
Get a group by its descriptor. The group will be returned even if it has been deleted from the account or has had all its memberships deleted.- Parameters:
groupDescriptor
- The descriptor of the desired graph group.- Returns:
- Graph group object
GraphGroup
- Throws:
AzDException
- Default Api exception handler.
-
list
Gets a list of all groups in the current scope (usually organization or account). The optional parameters are used to filter down the returned results. Returned results are in no guaranteed order. Since the list of groups may be large, results are returned in pages of groups. If there are more results than can be returned in a single page, the result set will contain a continuation token for retrieval of the next set of results.- Returns:
- Collection of Graph Group
GraphGroups
- Throws:
AzDException
- Default Api exception handler.
-
list
public GraphGroups list(Consumer<GroupsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException Gets a list of all groups in the current scope (usually organization or account). The optional parameters are used to filter down the returned results. Returned results are in no guaranteed order. Since the list of groups may be large, results are returned in pages of groups. If there are more results than can be returned in a single page, the result set will contain a continuation token for retrieval of the next set of results.- Parameters:
requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- Collection of Graph Group
GraphGroups
- Throws:
AzDException
- Default Api exception handler.
-
update
public GraphGroup update(JsonPatchDocument patchDocument, String groupDescriptor) throws AzDException Update the properties of an Azure DevOps group. Currently limited to only changing the description and account name.Example:
[ { "op": "replace", "path": "/description", "from": null, "value": "Updated description" } ]
- Parameters:
patchDocument
- Request body to change the description or account name.groupDescriptor
- The descriptor of the group to modify.- Returns:
- Collection of Graph Group
GraphGroups
- Throws:
AzDException
- Default Api exception handler.
-