/// <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> /// Delete operation on the plan /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IManagedPlanOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Resource group name /// </param> /// <param name='planId'> /// Required. Plan name /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse Delete(this IManagedPlanOperations operations, string resourceGroupName, string planId) { return(Task.Factory.StartNew((object s) => { return ((IManagedPlanOperations)s).DeleteAsync(resourceGroupName, planId); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates the plan /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IManagedPlanOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Resource group name /// </param> /// <param name='parameters'> /// Required. Plan properties /// </param> /// <returns> /// Result for the create or update operation of the plan /// </returns> public static ManagedPlanCreateOrUpdateResult CreateOrUpdate(this IManagedPlanOperations operations, string resourceGroupName, ManagedPlanCreateOrUpdateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IManagedPlanOperations)s).CreateOrUpdateAsync(resourceGroupName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Lists all the plans under the resource group /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IManagedPlanOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Resource group name /// </param> /// <param name='includeDetails'> /// Required. Flag to specify whether to include details /// </param> /// <returns> /// Result of the plan llist operation /// </returns> public static ManagedPlanListResult List(this IManagedPlanOperations operations, string resourceGroupName, bool includeDetails) { return(Task.Factory.StartNew((object s) => { return ((IManagedPlanOperations)s).ListAsync(resourceGroupName, includeDetails); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Your documentation here. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IManagedPlanOperations. /// </param> /// <param name='nextLink'> /// Required. Your documentation here. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </param> /// <returns> /// Your documentation here. /// </returns> public static ManagedPlanListResult ListNext(this IManagedPlanOperations operations, string nextLink) { return(Task.Factory.StartNew((object s) => { return ((IManagedPlanOperations)s).ListNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Your documentation here. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IManagedPlanOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Your documentation here. /// </param> /// <param name='planId'> /// Required. Your documentation here. /// </param> /// <param name='metricId'> /// Required. Your documentation here. /// </param> /// <param name='filter'> /// Required. Your documentation here. /// </param> /// <returns> /// Your documentation here. /// </returns> public static ManagedPlanGetMetricsResult GetMetrics(this IManagedPlanOperations operations, string resourceGroupName, string planId, string metricId, string filter) { return(Task.Factory.StartNew((object s) => { return ((IManagedPlanOperations)s).GetMetricsAsync(resourceGroupName, planId, metricId, filter); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the AzureStackClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public AzureStackClient(HttpClient httpClient) : base(httpClient) { this._curation = new CurationOperations(this); this._extensionsMetadata = new ExtensionMetadataOperations(this); this._galleryItem = new GalleryItemOperations(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._plans = new PlanOperations(this); this._providerRegistrations = new ProviderRegistrationOperations(this); this._publicGalleryItem = new PublicGalleryItemOperations(this); this._resourceGroups = new ResourceGroupOperations(this); this._subscriptions = new SubscriptionOperations(this); this._usageConnections = new UsageConnectionsOperations(this); this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Creates or updates the plan /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IManagedPlanOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Resource group name /// </param> /// <param name='parameters'> /// Required. Plan properties /// </param> /// <returns> /// Result for the create or update operation of the plan /// </returns> public static Task <ManagedPlanCreateOrUpdateResult> CreateOrUpdateAsync(this IManagedPlanOperations operations, string resourceGroupName, ManagedPlanCreateOrUpdateParameters parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, parameters, CancellationToken.None)); }
/// <summary> /// Lists all the plans under the resource group /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IManagedPlanOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Resource group name /// </param> /// <param name='includeDetails'> /// Required. Flag to specify whether to include details /// </param> /// <returns> /// Result of the plan llist operation /// </returns> public static Task <ManagedPlanListResult> ListAsync(this IManagedPlanOperations operations, string resourceGroupName, bool includeDetails) { return(operations.ListAsync(resourceGroupName, includeDetails, CancellationToken.None)); }
/// <summary> /// Gets the administrator view of the plan /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IManagedPlanOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Resource group name /// </param> /// <param name='planId'> /// Required. Plan name /// </param> /// <returns> /// Administrator view of plan for the get operation /// </returns> public static Task <ManagedPlanGetResult> GetAsync(this IManagedPlanOperations operations, string resourceGroupName, string planId) { return(operations.GetAsync(resourceGroupName, planId, CancellationToken.None)); }
/// <summary> /// Delete operation on the plan /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IManagedPlanOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Resource group name /// </param> /// <param name='planId'> /// Required. Plan name /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> DeleteAsync(this IManagedPlanOperations operations, string resourceGroupName, string planId) { return(operations.DeleteAsync(resourceGroupName, planId, CancellationToken.None)); }
/// <summary> /// Your documentation here. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IManagedPlanOperations. /// </param> /// <param name='includeDetails'> /// Required. Your documentation here. /// </param> /// <returns> /// Your documentation here. /// </returns> public static Task <ManagedPlanListResult> ListWithoutResourceGroupAsync(this IManagedPlanOperations operations, bool includeDetails) { return(operations.ListWithoutResourceGroupAsync(includeDetails, CancellationToken.None)); }
/// <summary> /// Your documentation here. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IManagedPlanOperations. /// </param> /// <param name='nextLink'> /// Required. Your documentation here. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </param> /// <returns> /// Your documentation here. /// </returns> public static Task <ManagedPlanListResult> ListNextAsync(this IManagedPlanOperations operations, string nextLink) { return(operations.ListNextAsync(nextLink, CancellationToken.None)); }
/// <summary> /// Your documentation here. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.IManagedPlanOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Your documentation here. /// </param> /// <param name='planId'> /// Required. Your documentation here. /// </param> /// <param name='metricId'> /// Required. Your documentation here. /// </param> /// <param name='filter'> /// Required. Your documentation here. /// </param> /// <returns> /// Your documentation here. /// </returns> public static Task <ManagedPlanGetMetricsResult> GetMetricsAsync(this IManagedPlanOperations operations, string resourceGroupName, string planId, string metricId, string filter) { return(operations.GetMetricsAsync(resourceGroupName, planId, metricId, filter, CancellationToken.None)); }