/// <summary>
 /// Gets deny assignments for a resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='resourceProviderNamespace'>
 /// The namespace of the resource provider.
 /// </param>
 /// <param name='parentResourcePath'>
 /// The parent resource identity.
 /// </param>
 /// <param name='resourceType'>
 /// The resource type of the resource.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the resource to get deny assignments for.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <DenyAssignmentInner> > ListForResourceAsync(this IDenyAssignmentsOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, ODataQuery <DenyAssignmentFilter> odataQuery = default(ODataQuery <DenyAssignmentFilter>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListForResourceWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets all deny assignments for the 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 <DenyAssignmentInner> > ListAsync(this IDenyAssignmentsOperations operations, ODataQuery <DenyAssignmentFilter> odataQuery = default(ODataQuery <DenyAssignmentFilter>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a deny assignment by ID.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='denyAssignmentId'>
 /// The fully qualified deny assignment ID. For example, use the format,
 /// /subscriptions/{guid}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId}
 /// for subscription level deny assignments, or
 /// /providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} for
 /// tenant level deny assignments.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DenyAssignmentInner> GetByIdAsync(this IDenyAssignmentsOperations operations, string denyAssignmentId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetByIdWithHttpMessagesAsync(denyAssignmentId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets all deny assignments for the 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 <DenyAssignmentInner> > ListNextAsync(this IDenyAssignmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #5
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 protected override void Initialize()
 {
     ClassicAdministrators      = new ClassicAdministratorsOperations(this);
     GlobalAdministrator        = new GlobalAdministratorOperations(this);
     ProviderOperationsMetadata = new ProviderOperationsMetadataOperations(this);
     RoleAssignments            = new RoleAssignmentsOperations(this);
     Permissions     = new PermissionsOperations(this);
     RoleDefinitions = new RoleDefinitionsOperations(this);
     DenyAssignments = new DenyAssignmentsOperations(this);
     this.BaseUri    = new System.Uri("https://management.azure.com");
     AcceptLanguage  = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
Beispiel #6
0
 /// <summary>
 /// Gets deny assignments for a resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='resourceProviderNamespace'>
 /// The namespace of the resource provider.
 /// </param>
 /// <param name='parentResourcePath'>
 /// The parent resource identity.
 /// </param>
 /// <param name='resourceType'>
 /// The resource type of the resource.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the resource to get deny assignments for.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <DenyAssignment> ListForResource(this IDenyAssignmentsOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, ODataQuery <DenyAssignmentFilter> odataQuery = default(ODataQuery <DenyAssignmentFilter>))
 {
     return(operations.ListForResourceAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, odataQuery).GetAwaiter().GetResult());
 }
Beispiel #7
0
 /// <summary>
 /// Gets deny assignments for a scope.
 /// </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 <DenyAssignment> ListForScopeNext(this IDenyAssignmentsOperations operations, string nextPageLink)
 {
     return(operations.ListForScopeNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Beispiel #8
0
 /// <summary>
 /// Gets deny assignments for a scope.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The scope of the deny assignments.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <DenyAssignment> ListForScope(this IDenyAssignmentsOperations operations, string scope, ODataQuery <DenyAssignmentFilter> odataQuery = default(ODataQuery <DenyAssignmentFilter>))
 {
     return(operations.ListForScopeAsync(scope, odataQuery).GetAwaiter().GetResult());
 }
Beispiel #9
0
 /// <summary>
 /// Gets a deny assignment by ID.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='denyAssignmentId'>
 /// The fully qualified deny assignment ID. For example, use the format,
 /// /subscriptions/{guid}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId}
 /// for subscription level deny assignments, or
 /// /providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} for
 /// tenant level deny assignments.
 /// </param>
 public static DenyAssignment GetById(this IDenyAssignmentsOperations operations, string denyAssignmentId)
 {
     return(operations.GetByIdAsync(denyAssignmentId).GetAwaiter().GetResult());
 }
Beispiel #10
0
 /// <summary>
 /// Gets all deny assignments for the 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 <DenyAssignment> List(this IDenyAssignmentsOperations operations, ODataQuery <DenyAssignmentFilter> odataQuery = default(ODataQuery <DenyAssignmentFilter>))
 {
     return(operations.ListAsync(odataQuery).GetAwaiter().GetResult());
 }
Beispiel #11
0
 /// <summary>
 /// Gets deny assignments for a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <DenyAssignment> ListForResourceGroup(this IDenyAssignmentsOperations operations, string resourceGroupName, ODataQuery <DenyAssignmentFilter> odataQuery = default(ODataQuery <DenyAssignmentFilter>))
 {
     return(operations.ListForResourceGroupAsync(resourceGroupName, odataQuery).GetAwaiter().GetResult());
 }