/// <summary> /// Gets all the policy assignments of a subscription. /// </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 <PolicyAssignment> > ListNextAsync(this IPolicyAssignmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Delete policy assignment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scope'> /// Scope of the policy assignment. /// </param> /// <param name='policyAssignmentName'> /// Policy assignment name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PolicyAssignment> DeleteAsync(this IPolicyAssignmentsOperations operations, string scope, string policyAssignmentName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteWithHttpMessagesAsync(scope, policyAssignmentName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get single policy assignment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='policyAssignmentId'> /// Policy assignment Id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PolicyAssignment> GetByIdAsync(this IPolicyAssignmentsOperations operations, string policyAssignmentId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetByIdWithHttpMessagesAsync(policyAssignmentId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all the policy assignments of a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <PolicyAssignment> > ListAsync(this IPolicyAssignmentsOperations operations, ODataQuery <PolicyAssignment> odataQuery = default(ODataQuery <PolicyAssignment>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets policy assignments of the resource. /// </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='resourceProviderNamespace'> /// The resource provider namespace. /// </param> /// <param name='parentResourcePath'> /// The parent resource path. /// </param> /// <param name='resourceType'> /// The resource type. /// </param> /// <param name='resourceName'> /// The resource name. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <PolicyAssignment> > ListForResourceAsync(this IPolicyAssignmentsOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, ODataQuery <PolicyAssignment> odataQuery = default(ODataQuery <PolicyAssignment>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListForResourceWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create policy assignment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scope'> /// Scope of the policy assignment. /// </param> /// <param name='policyAssignmentName'> /// Policy assignment name. /// </param> /// <param name='parameters'> /// Policy assignment. /// </param> public static PolicyAssignment Create(this IPolicyAssignmentsOperations operations, string scope, string policyAssignmentName, PolicyAssignment parameters) { return(Task.Factory.StartNew(s => ((IPolicyAssignmentsOperations)s).CreateAsync(scope, policyAssignmentName, parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets all the policy assignments of a subscription. /// </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 <PolicyAssignment> ListNext(this IPolicyAssignmentsOperations operations, string nextPageLink) { return(Task.Factory.StartNew(s => ((IPolicyAssignmentsOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Get single policy assignment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='policyAssignmentId'> /// Policy assignment Id /// </param> public static PolicyAssignment GetById(this IPolicyAssignmentsOperations operations, string policyAssignmentId) { return(Task.Factory.StartNew(s => ((IPolicyAssignmentsOperations)s).GetByIdAsync(policyAssignmentId), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets all the policy assignments of a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IPage <PolicyAssignment> List(this IPolicyAssignmentsOperations operations, ODataQuery <PolicyAssignment> odataQuery = default(ODataQuery <PolicyAssignment>)) { return(Task.Factory.StartNew(s => ((IPolicyAssignmentsOperations)s).ListAsync(odataQuery), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets policy assignments of the resource. /// </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='resourceProviderNamespace'> /// The resource provider namespace. /// </param> /// <param name='parentResourcePath'> /// The parent resource path. /// </param> /// <param name='resourceType'> /// The resource type. /// </param> /// <param name='resourceName'> /// The resource name. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IPage <PolicyAssignment> ListForResource(this IPolicyAssignmentsOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, ODataQuery <PolicyAssignment> odataQuery = default(ODataQuery <PolicyAssignment>)) { return(Task.Factory.StartNew(s => ((IPolicyAssignmentsOperations)s).ListForResourceAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, odataQuery), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets policy assignments of the resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group name. /// </param> /// <param name='filter'> /// The filter to apply on the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <PolicyAssignment> > ListForResourceGroupAsync(this IPolicyAssignmentsOperations operations, string resourceGroupName, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListForResourceGroupWithHttpMessagesAsync(resourceGroupName, filter, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets policy assignments of the resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group name. /// </param> /// <param name='filter'> /// The filter to apply on the operation. /// </param> public static IPage <PolicyAssignment> ListForResourceGroup(this IPolicyAssignmentsOperations operations, string resourceGroupName, string filter = default(string)) { return(Task.Factory.StartNew(s => ((IPolicyAssignmentsOperations)s).ListForResourceGroupAsync(resourceGroupName, filter), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
internal PolicyAssignmentImpl(PolicyAssignmentInner innerModel, IPolicyAssignmentsOperations client) : base(innerModel.Name, innerModel) { this.client = client; }
internal PolicyAssignmentsImpl(IPolicyAssignmentsOperations client) { this.client = client; }