ManagementGroupCollection.GetIfExistsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Tries to get details for this resource from the service.
- Request Path: /providers/Microsoft.Management/managementGroups/{groupId}
- Operation Id: ManagementGroups_Get
- Default Api Version: 2021-04-01
- Resource: ManagementGroupResource
public virtual System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.ManagementGroups.ManagementGroupResource>> GetIfExistsAsync (string groupId, Azure.ResourceManager.ManagementGroups.Models.ManagementGroupExpandType? expand = default, bool? recurse = default, string filter = default, string cacheControl = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExistsAsync : string * Nullable<Azure.ResourceManager.ManagementGroups.Models.ManagementGroupExpandType> * Nullable<bool> * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.ManagementGroups.ManagementGroupResource>>
override this.GetIfExistsAsync : string * Nullable<Azure.ResourceManager.ManagementGroups.Models.ManagementGroupExpandType> * Nullable<bool> * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.ManagementGroups.ManagementGroupResource>>
Public Overridable Function GetIfExistsAsync (groupId As String, Optional expand As Nullable(Of ManagementGroupExpandType) = Nothing, Optional recurse As Nullable(Of Boolean) = Nothing, Optional filter As String = Nothing, Optional cacheControl As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of NullableResponse(Of ManagementGroupResource))
Parameters
- groupId
- String
Management Group ID.
- expand
- Nullable<ManagementGroupExpandType>
The $expand=children query string parameter allows clients to request inclusion of children in the response payload. $expand=path includes the path from the root group to the current group. $expand=ancestors includes the ancestor Ids of the current group.
The $recurse=true query string parameter allows clients to request inclusion of entire hierarchy in the response payload. Note that $expand=children must be passed up if $recurse is set to true.
- filter
- String
A filter which allows the exclusion of subscriptions from results (i.e. '$filter=children.childType ne Subscription').
- cacheControl
- String
Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
groupId
is an empty string, and was expected to be non-empty.
groupId
is null.