Exemple #1
0
 /// <summary>
 /// Get the specified scope assignment.
 /// </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='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <ScopeAssignment> > ListNextAsync(this IScopeAssignmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
 /// <summary>
 /// Get the specified scope assignment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The base resource of the scope assignment.
 /// </param>
 /// <param name='scopeAssignmentName'>
 /// The name of the scope assignment to get.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ScopeAssignment> GetAsync(this IScopeAssignmentsOperations operations, string scope, string scopeAssignmentName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(scope, scopeAssignmentName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #3
0
 /// <summary>
 /// Creates a scope assignment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the specify which Managed Network this scope is
 /// being assigned
 /// </param>
 /// <param name='scope'>
 /// The base resource of the scope assignment to create. The scope can be any
 /// REST resource instance. For example, use
 /// '/subscriptions/{subscription-id}/' for a subscription,
 /// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
 /// a resource group, and
 /// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}'
 /// for a resource.
 /// </param>
 /// <param name='scopeAssignmentName'>
 /// The name of the scope assignment to create.
 /// </param>
 public static ScopeAssignment CreateOrUpdate(this IScopeAssignmentsOperations operations, ScopeAssignment parameters, string scope, string scopeAssignmentName)
 {
     return(operations.CreateOrUpdateAsync(parameters, scope, scopeAssignmentName).GetAwaiter().GetResult());
 }
Exemple #4
0
 /// <summary>
 /// Get the specified scope assignment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The base resource of the scope assignment.
 /// </param>
 /// <param name='scopeAssignmentName'>
 /// The name of the scope assignment to get.
 /// </param>
 public static ScopeAssignment Get(this IScopeAssignmentsOperations operations, string scope, string scopeAssignmentName)
 {
     return(operations.GetAsync(scope, scopeAssignmentName).GetAwaiter().GetResult());
 }
Exemple #5
0
 /// <summary>
 /// Get the specified scope assignment.
 /// </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 <ScopeAssignment> ListNext(this IScopeAssignmentsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Exemple #6
0
 /// <summary>
 /// Get the specified scope assignment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The base resource of the scope assignment.
 /// </param>
 public static IPage <ScopeAssignment> List(this IScopeAssignmentsOperations operations, string scope)
 {
     return(operations.ListAsync(scope).GetAwaiter().GetResult());
 }
Exemple #7
0
 /// <summary>
 /// Deletes a scope assignment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The scope of the scope assignment to delete.
 /// </param>
 /// <param name='scopeAssignmentName'>
 /// The name of the scope assignment to delete.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IScopeAssignmentsOperations operations, string scope, string scopeAssignmentName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(scope, scopeAssignmentName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemple #8
0
 /// <summary>
 /// Deletes a scope assignment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The scope of the scope assignment to delete.
 /// </param>
 /// <param name='scopeAssignmentName'>
 /// The name of the scope assignment to delete.
 /// </param>
 public static void Delete(this IScopeAssignmentsOperations operations, string scope, string scopeAssignmentName)
 {
     operations.DeleteAsync(scope, scopeAssignmentName).GetAwaiter().GetResult();
 }