/// <summary> /// Initializes a new instance of the AzureStackClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public AzureStackClient(HttpClient httpClient) : base(httpClient) { this._clouds = new CloudOperations(this); this._curation = new CurationOperations(this); this._delegatedOffers = new DelegatedOfferOperations(this); this._delegatedProviderConfiguration = new DelegatedProviderConfigurationOperations(this); this._eventTypes = new EventTypesOperations(this); this._extensionsMetadata = new ExtensionMetadataOperations(this); this._galleryItem = new GalleryItemOperations(this); this._importedSubscriptions = new ImportedSubscriptionOperations(this); this._managedLocations = new ManagedLocationOperations(this); this._managedOffers = new ManagedOfferOperations(this); this._managedPlans = new ManagedPlanOperations(this); this._managedSubscriptions = new ManagedSubscriptionOperations(this); this._offers = new OfferOperations(this); this._package = new PackageOperations(this); this._plans = new PlanOperations(this); this._providerRegistrations = new ProviderRegistrationOperations(this); this._publicGalleryItem = new PublicGalleryItemOperations(this); this._resourceGroups = new ResourceGroupOperations(this); this._resources = new ResourceOperations(this); this._resourceProviders = new ResourceProviderOperations(this); this._shallowResources = new ShallowResourceOperations(this); this._subscriptions = new SubscriptionOperations(this); this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Get delegated offers for given subscription ID. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IDelegatedOfferOperations. /// </param> /// <returns> /// Your documentation here. /// </returns> public static DelegatedOfferListResult List(this IDelegatedOfferOperations operations) { return(Task.Factory.StartNew((object s) => { return ((IDelegatedOfferOperations)s).ListAsync(); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Update a delegated offer. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IDelegatedOfferOperations. /// </param> /// <param name='parameters'> /// Required. Parameters to update delegated offer. /// </param> /// <returns> /// Delegated offer update result. /// </returns> public static DelegatedOfferUpdateResult Update(this IDelegatedOfferOperations operations, DelegatedOfferUpdateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IDelegatedOfferOperations)s).UpdateAsync(parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets a delegated offer. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IDelegatedOfferOperations. /// </param> /// <param name='offerName'> /// Required. the name of the delegated offer. /// </param> /// <returns> /// Delegated offer get result. /// </returns> public static Task <DelegatedOfferGetResult> GetAsync(this IDelegatedOfferOperations operations, string offerName) { return(operations.GetAsync(offerName, CancellationToken.None)); }
/// <summary> /// Update a delegated offer. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IDelegatedOfferOperations. /// </param> /// <param name='parameters'> /// Required. Parameters to update delegated offer. /// </param> /// <returns> /// Delegated offer update result. /// </returns> public static Task <DelegatedOfferUpdateResult> UpdateAsync(this IDelegatedOfferOperations operations, DelegatedOfferUpdateParameters parameters) { return(operations.UpdateAsync(parameters, CancellationToken.None)); }
/// <summary> /// Next for get delegated offers for given subscription ID. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IDelegatedOfferOperations. /// </param> /// <param name='nextLink'> /// Required. The next link. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </param> /// <returns> /// Your documentation here. /// </returns> public static Task <DelegatedOfferListResult> ListNextAsync(this IDelegatedOfferOperations operations, string nextLink) { return(operations.ListNextAsync(nextLink, CancellationToken.None)); }
/// <summary> /// Get delegated offers for given subscription ID. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IDelegatedOfferOperations. /// </param> /// <returns> /// Your documentation here. /// </returns> public static Task <DelegatedOfferListResult> ListAsync(this IDelegatedOfferOperations operations) { return(operations.ListAsync(CancellationToken.None)); }