/// <summary> /// The Delete Store Item operation deletes Windows Azure Storeentries /// that are provisioned for a subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Store.IAddOnOperations. /// </param> /// <param name='cloudServiceName'> /// Required. The name of the cloud service to which this store item /// will be assigned. /// </param> /// <param name='resourceProviderNamespace'> /// Required. The namespace in which this store item resides. /// </param> /// <param name='resourceProviderType'> /// Required. The type of store item to be deleted. /// </param> /// <param name='resourceProviderName'> /// Required. The name of this resource provider. /// </param> /// <returns> /// The response body contains the status of the specified asynchronous /// operation, indicating whether it has succeeded, is inprogress, or /// has failed. Note that this status is distinct from the HTTP status /// code returned for the Get Operation Status operation itself. If /// the asynchronous operation succeeded, the response body includes /// the HTTP status code for the successful request. If the /// asynchronous operation failed, the response body includes the HTTP /// status code for the failed request, and also includes error /// information regarding the failure. /// </returns> public static OperationStatusResponse Delete(this IAddOnOperations operations, string cloudServiceName, string resourceProviderNamespace, string resourceProviderType, string resourceProviderName) { return(Task.Factory.StartNew((object s) => { return ((IAddOnOperations)s).DeleteAsync(cloudServiceName, resourceProviderNamespace, resourceProviderType, resourceProviderName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// The Create Store Item operation creates Windows Azure Store entries /// in a Windows Azure subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Store.IAddOnOperations. /// </param> /// <param name='cloudServiceName'> /// Required. The name of the cloud service to which this store item /// will be assigned. /// </param> /// <param name='resourceName'> /// Required. The name of this resource. /// </param> /// <param name='addOnName'> /// Required. The add on name. /// </param> /// <param name='parameters'> /// Required. Parameters used to specify how the Create procedure will /// function. /// </param> /// <returns> /// The response body contains the status of the specified asynchronous /// operation, indicating whether it has succeeded, is inprogress, or /// has failed. Note that this status is distinct from the HTTP status /// code returned for the Get Operation Status operation itself. If /// the asynchronous operation succeeded, the response body includes /// the HTTP status code for the successful request. If the /// asynchronous operation failed, the response body includes the HTTP /// status code for the failed request, and also includes error /// information regarding the failure. /// </returns> public static OperationStatusResponse Create(this IAddOnOperations operations, string cloudServiceName, string resourceName, string addOnName, AddOnCreateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IAddOnOperations)s).CreateAsync(cloudServiceName, resourceName, addOnName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the StoreManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> private StoreManagementClient(HttpClient httpClient) : base(httpClient) { this._addOns = new AddOnOperations(this); this._cloudServices = new CloudServiceOperations(this); this._apiVersion = "2013-06-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// The Create Store Item operation creates Windows Azure Store entries /// in a Windows Azure subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Store.IAddOnOperations. /// </param> /// <param name='cloudServiceName'> /// The name of the cloud service to which this store item will be /// assigned. /// </param> /// <param name='resourceName'> /// The name of this resource. /// </param> /// <param name='addOnName'> /// The add on name. /// </param> /// <param name='parameters'> /// Parameters used to specify how the Create procedure will function. /// </param> /// <returns> /// The response body contains the status of the specified asynchronous /// operation, indicating whether it has succeeded, is inprogress, or /// has failed. Note that this status is distinct from the HTTP status /// code returned for the Get Operation Status operation itself. If /// the asynchronous operation succeeded, the response body includes /// the HTTP status code for the successful request. If the /// asynchronous operation failed, the response body includes the HTTP /// status code for the failed request, and also includes error /// information regarding the failure. /// </returns> public static AddOnOperationStatusResponse BeginCreating(this IAddOnOperations operations, string cloudServiceName, string resourceName, string addOnName, AddOnCreateParameters parameters) { try { return(operations.BeginCreatingAsync(cloudServiceName, resourceName, addOnName, parameters).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The Delete Store Item operation deletes Windows Azure Storeentries /// that are provisioned for a subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Store.IAddOnOperations. /// </param> /// <param name='cloudServiceName'> /// The name of the cloud service to which this store item will be /// assigned. /// </param> /// <param name='resourceProviderNamespace'> /// The namespace in which this store item resides. /// </param> /// <param name='resourceProviderType'> /// The type of store item to be deleted. /// </param> /// <param name='resourceProviderName'> /// The name of this resource provider. /// </param> /// <returns> /// The response body contains the status of the specified asynchronous /// operation, indicating whether it has succeeded, is inprogress, or /// has failed. Note that this status is distinct from the HTTP status /// code returned for the Get Operation Status operation itself. If /// the asynchronous operation succeeded, the response body includes /// the HTTP status code for the successful request. If the /// asynchronous operation failed, the response body includes the HTTP /// status code for the failed request, and also includes error /// information regarding the failure. /// </returns> public static AddOnOperationStatusResponse Delete(this IAddOnOperations operations, string cloudServiceName, string resourceProviderNamespace, string resourceProviderType, string resourceProviderName) { try { return(operations.DeleteAsync(cloudServiceName, resourceProviderNamespace, resourceProviderType, resourceProviderName).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The Update Store Item operation creates Windows Azure Store entries /// in a Windows Azure subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Store.IAddOnOperations. /// </param> /// <param name='cloudServiceName'> /// Required. The name of the cloud service to which this store item /// will be assigned. /// </param> /// <param name='resourceName'> /// Required. The name of this resource. /// </param> /// <param name='addOnName'> /// Required. The addon name. /// </param> /// <param name='parameters'> /// Required. Parameters used to specify how the Create procedure will /// function. /// </param> /// <returns> /// The response body contains the status of the specified asynchronous /// operation, indicating whether it has succeeded, is inprogress, or /// has failed. Note that this status is distinct from the HTTP status /// code returned for the Get Operation Status operation itself. If /// the asynchronous operation succeeded, the response body includes /// the HTTP status code for the successful request. If the /// asynchronous operation failed, the response body includes the HTTP /// status code for the failed request, and also includes error /// information regarding the failure. /// </returns> public static Task <OperationStatusResponse> UpdateAsync(this IAddOnOperations operations, string cloudServiceName, string resourceName, string addOnName, AddOnUpdateParameters parameters) { return(operations.UpdateAsync(cloudServiceName, resourceName, addOnName, parameters, CancellationToken.None)); }
/// <summary> /// The Delete Store Item operation deletes Windows Azure Storeentries /// that are provisioned for a subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Store.IAddOnOperations. /// </param> /// <param name='cloudServiceName'> /// Required. The name of the cloud service to which this store item /// will be assigned. /// </param> /// <param name='resourceProviderNamespace'> /// Required. The namespace in which this store item resides. /// </param> /// <param name='resourceProviderType'> /// Required. The type of store item to be deleted. /// </param> /// <param name='resourceProviderName'> /// Required. The name of this resource provider. /// </param> /// <returns> /// The response body contains the status of the specified asynchronous /// operation, indicating whether it has succeeded, is inprogress, or /// has failed. Note that this status is distinct from the HTTP status /// code returned for the Get Operation Status operation itself. If /// the asynchronous operation succeeded, the response body includes /// the HTTP status code for the successful request. If the /// asynchronous operation failed, the response body includes the HTTP /// status code for the failed request, and also includes error /// information regarding the failure. /// </returns> public static Task <OperationStatusResponse> DeleteAsync(this IAddOnOperations operations, string cloudServiceName, string resourceProviderNamespace, string resourceProviderType, string resourceProviderName) { return(operations.DeleteAsync(cloudServiceName, resourceProviderNamespace, resourceProviderType, resourceProviderName, CancellationToken.None)); }