/// <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); } }
/// <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); } }
/// <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()); }
/// <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()); }
/// <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()); }
/// <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()); }
/// <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(); }
/// <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(); }