コード例 #1
0
 /// <summary>
 /// Gets a list of management groups connected to a workspace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <ManagementGroup> > ListAsync(this IManagementGroupsOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// List all entities that descend from a management group.
 ///
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <DescendantInfo> GetDescendantsNext(this IManagementGroupsOperations operations, string nextPageLink)
 {
     return(operations.GetDescendantsNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List management groups for the authenticated user.
 ///
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cacheControl'>
 /// Indicates whether the request should utilize any caches. Populate the
 /// header with 'no-cache' value to bypass existing caches.
 /// </param>
 public static IPage <ManagementGroupInfo> ListNext(this IManagementGroupsOperations operations, string nextPageLink, string cacheControl = "no-cache")
 {
     return(operations.ListNextAsync(nextPageLink, cacheControl).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete management group.
 /// If a management group contains child resources, the request will fail.
 ///
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// Management Group ID.
 /// </param>
 /// <param name='cacheControl'>
 /// Indicates whether the request should utilize any caches. Populate the
 /// header with 'no-cache' value to bypass existing caches.
 /// </param>
 public static AzureAsyncOperationResults BeginDelete(this IManagementGroupsOperations operations, string groupId, string cacheControl = "no-cache")
 {
     return(operations.BeginDeleteAsync(groupId, cacheControl).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List management groups for the authenticated user.
 ///
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cacheControl'>
 /// Indicates whether the request should utilize any caches. Populate the
 /// header with 'no-cache' value to bypass existing caches.
 /// </param>
 /// <param name='skiptoken'>
 /// Page continuation token is only used if a previous operation returned a
 /// partial result.
 /// If a previous response contains a nextLink element, the value of the
 /// nextLink element will include a token parameter that specifies a starting
 /// point to use for subsequent calls.
 /// </param>
 public static IPage <ManagementGroupInfo> List(this IManagementGroupsOperations operations, string cacheControl = "no-cache", string skiptoken = default(string))
 {
     return(operations.ListAsync(cacheControl, skiptoken).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create or update a management group.
 /// If a management group is already created and a subsequent create request is
 /// issued with different properties, the management group properties will be
 /// updated.
 ///
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// Management Group ID.
 /// </param>
 /// <param name='createManagementGroupRequest'>
 /// Management group creation parameters.
 /// </param>
 /// <param name='cacheControl'>
 /// Indicates whether the request should utilize any caches. Populate the
 /// header with 'no-cache' value to bypass existing caches.
 /// </param>
 public static object BeginCreateOrUpdate(this IManagementGroupsOperations operations, string groupId, CreateManagementGroupRequest createManagementGroupRequest, string cacheControl = "no-cache")
 {
     return(operations.BeginCreateOrUpdateAsync(groupId, createManagementGroupRequest, cacheControl).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List all entities that descend from a management group.
 ///
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// Management Group ID.
 /// </param>
 /// <param name='skiptoken'>
 /// Page continuation token is only used if a previous operation returned a
 /// partial result.
 /// If a previous response contains a nextLink element, the value of the
 /// nextLink element will include a token parameter that specifies a starting
 /// point to use for subsequent calls.
 /// </param>
 /// <param name='top'>
 /// Number of elements to return when retrieving results. Passing this in will
 /// override $skipToken.
 /// </param>
 public static IPage <DescendantInfo> GetDescendants(this IManagementGroupsOperations operations, string groupId, string skiptoken = default(string), int?top = default(int?))
 {
     return(operations.GetDescendantsAsync(groupId, skiptoken, top).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update a management group.
 ///
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// Management Group ID.
 /// </param>
 /// <param name='patchGroupRequest'>
 /// Management group patch parameters.
 /// </param>
 /// <param name='cacheControl'>
 /// Indicates whether the request should utilize any caches. Populate the
 /// header with 'no-cache' value to bypass existing caches.
 /// </param>
 public static ManagementGroup Update(this IManagementGroupsOperations operations, string groupId, PatchManagementGroupRequest patchGroupRequest, string cacheControl = "no-cache")
 {
     return(operations.UpdateAsync(groupId, patchGroupRequest, cacheControl).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get the details of the management group.
 ///
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// Management Group ID.
 /// </param>
 /// <param name='expand'>
 /// 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. Possible values include: 'children',
 /// 'path', 'ancestors'
 /// </param>
 /// <param name='recurse'>
 /// 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.
 /// </param>
 /// <param name='filter'>
 /// A filter which allows the exclusion of subscriptions from results (i.e.
 /// '$filter=children.childType ne Subscription')
 /// </param>
 /// <param name='cacheControl'>
 /// Indicates whether the request should utilize any caches. Populate the
 /// header with 'no-cache' value to bypass existing caches.
 /// </param>
 public static ManagementGroup Get(this IManagementGroupsOperations operations, string groupId, string expand = default(string), bool?recurse = default(bool?), string filter = default(string), string cacheControl = "no-cache")
 {
     return(operations.GetAsync(groupId, expand, recurse, filter, cacheControl).GetAwaiter().GetResult());
 }
コード例 #10
0
 /// <summary>
 /// Gets a list of management groups connected to a workspace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 public static IEnumerable <ManagementGroup> List(this IManagementGroupsOperations operations, string resourceGroupName, string workspaceName)
 {
     return(operations.ListAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult());
 }