コード例 #1
0
 /// <summary>
 /// Get a list of management locks at resource level or below.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IManagementLockOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. NextLink from the previous successful call to List
 /// operation.
 /// </param>
 /// <returns>
 /// List of management locks.
 /// </returns>
 public static ManagementLockListResult ListNext(this IManagementLockOperations operations, string nextLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IManagementLockOperations)s).ListNextAsync(nextLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #2
0
 /// <summary>
 /// Gets all the management locks of a subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IManagementLockOperations.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If empty is passed returns all locks
 /// at, above or below the subscription.
 /// </param>
 /// <returns>
 /// List of management locks.
 /// </returns>
 public static ManagementLockListResult ListAtSubscriptionLevel(this IManagementLockOperations operations, ManagementLockGetQueryParameter parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IManagementLockOperations)s).ListAtSubscriptionLevelAsync(parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #3
0
 /// <summary>
 /// Gets all the management locks of a resource or any level below
 /// resource.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IManagementLockOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group. The name is case
 /// insensitive.
 /// </param>
 /// <param name='identity'>
 /// Required. Resource identity.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If empty is passed returns all locks at
 /// or below the resource.If atScope() is passed returns all locks at
 /// the resource level.
 /// </param>
 /// <returns>
 /// List of management locks.
 /// </returns>
 public static ManagementLockListResult ListAtResourceLevel(this IManagementLockOperations operations, string resourceGroupName, ResourceIdentity identity, ManagementLockGetQueryParameter parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IManagementLockOperations)s).ListAtResourceLevelAsync(resourceGroupName, identity, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #4
0
 /// <summary>
 /// Create or update a management lock at the resource group level.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IManagementLockOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name.
 /// </param>
 /// <param name='lockName'>
 /// Required. The lock name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The management lock parameters.
 /// </param>
 /// <returns>
 /// Management lock information.
 /// </returns>
 public static ManagementLockReturnResult CreateOrUpdateAtResourceGroupLevel(this IManagementLockOperations operations, string resourceGroupName, string lockName, ManagementLockProperties parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IManagementLockOperations)s).CreateOrUpdateAtResourceGroupLevelAsync(resourceGroupName, lockName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #5
0
 /// <summary>
 /// Deletes the management lock of a subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IManagementLockOperations.
 /// </param>
 /// <param name='lockName'>
 /// Required. The name of lock.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse DeleteAtSubscriptionLevel(this IManagementLockOperations operations, string lockName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IManagementLockOperations)s).DeleteAtSubscriptionLevelAsync(lockName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the AuthorizationClient class.
 /// </summary>
 public AuthorizationClient()
     : base()
 {
     this._managementLocks = new ManagementLockOperations(this);
     this._apiVersion      = "2015-01-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
コード例 #7
0
 /// <summary>
 /// Create or update a management lock at the resource group level.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IManagementLockOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name.
 /// </param>
 /// <param name='lockName'>
 /// Required. The lock name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The management lock parameters.
 /// </param>
 /// <returns>
 /// Management lock information.
 /// </returns>
 public static Task <ManagementLockReturnResult> CreateOrUpdateAtResourceGroupLevelAsync(this IManagementLockOperations operations, string resourceGroupName, string lockName, ManagementLockProperties parameters)
 {
     return(operations.CreateOrUpdateAtResourceGroupLevelAsync(resourceGroupName, lockName, parameters, CancellationToken.None));
 }
コード例 #8
0
 /// <summary>
 /// Get a list of management locks at resource level or below.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IManagementLockOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. NextLink from the previous successful call to List
 /// operation.
 /// </param>
 /// <returns>
 /// List of management locks.
 /// </returns>
 public static Task <ManagementLockListResult> ListNextAsync(this IManagementLockOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink, CancellationToken.None));
 }
コード例 #9
0
 /// <summary>
 /// Gets all the management locks of a subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IManagementLockOperations.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If empty is passed returns all locks
 /// at, above or below the subscription.
 /// </param>
 /// <returns>
 /// List of management locks.
 /// </returns>
 public static Task <ManagementLockListResult> ListAtSubscriptionLevelAsync(this IManagementLockOperations operations, ManagementLockGetQueryParameter parameters)
 {
     return(operations.ListAtSubscriptionLevelAsync(parameters, CancellationToken.None));
 }
コード例 #10
0
 /// <summary>
 /// Gets all the management locks of a resource or any level below
 /// resource.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IManagementLockOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group. The name is case
 /// insensitive.
 /// </param>
 /// <param name='identity'>
 /// Required. Resource identity.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If empty is passed returns all locks at
 /// or below the resource.If atScope() is passed returns all locks at
 /// the resource level.
 /// </param>
 /// <returns>
 /// List of management locks.
 /// </returns>
 public static Task <ManagementLockListResult> ListAtResourceLevelAsync(this IManagementLockOperations operations, string resourceGroupName, ResourceIdentity identity, ManagementLockGetQueryParameter parameters)
 {
     return(operations.ListAtResourceLevelAsync(resourceGroupName, identity, parameters, CancellationToken.None));
 }
コード例 #11
0
 /// <summary>
 /// Gets the management lock of a scope.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IManagementLockOperations.
 /// </param>
 /// <param name='lockName'>
 /// Required. Name of the management lock.
 /// </param>
 /// <returns>
 /// Management lock information.
 /// </returns>
 public static Task <ManagementLockReturnResult> GetAsync(this IManagementLockOperations operations, string lockName)
 {
     return(operations.GetAsync(lockName, CancellationToken.None));
 }
コード例 #12
0
 /// <summary>
 /// Deletes the management lock of a subscription.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IManagementLockOperations.
 /// </param>
 /// <param name='lockName'>
 /// Required. The name of lock.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAtSubscriptionLevelAsync(this IManagementLockOperations operations, string lockName)
 {
     return(operations.DeleteAtSubscriptionLevelAsync(lockName, CancellationToken.None));
 }
コード例 #13
0
 /// <summary>
 /// Deletes the management lock of a resource or any level below
 /// resource.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IManagementLockOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='identity'>
 /// Required. Resource identity.
 /// </param>
 /// <param name='lockName'>
 /// Required. The name of lock.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAtResourceLevelAsync(this IManagementLockOperations operations, string resourceGroupName, ResourceIdentity identity, string lockName)
 {
     return(operations.DeleteAtResourceLevelAsync(resourceGroupName, identity, lockName, CancellationToken.None));
 }