/// <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> /// 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.IResourceGroupOperations. /// </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 ResourceGroupListResult ListNext(this IResourceGroupOperations operations, string nextLink) { return(Task.Factory.StartNew((object s) => { return ((IResourceGroupOperations)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.IResourceGroupOperations. /// </param> /// <param name='parameters'> /// Required. Your documentation here. /// </param> /// <returns> /// Your documentation here. /// </returns> public static ResourceGroupCreateOrUpdateResult CreateOrUpdate(this IResourceGroupOperations operations, ResourceGroupCreateOrUpdateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IResourceGroupOperations)s).CreateOrUpdateAsync(parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Resource groups can be updated through a simple PATCH operation to /// a group address. The format of the request is the same as that for /// creating a resource groups, though if a field is unspecified /// current value will be carried over. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IResourceGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group to be created or updated. /// The name is case insensitive. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the update state resource group /// service operation. /// </param> /// <returns> /// Resource group information. /// </returns> public static ResourceGroupPatchResult Patch(this IResourceGroupOperations operations, string resourceGroupName, BasicResourceGroup parameters) { return(Task.Factory.StartNew((object s) => { return ((IResourceGroupOperations)s).PatchAsync(resourceGroupName, parameters); } , 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.IResourceGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Your documentation here. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse Delete(this IResourceGroupOperations operations, string resourceGroupName) { return(Task.Factory.StartNew((object s) => { return ((IResourceGroupOperations)s).DeleteAsync(resourceGroupName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the ResourceManagementClient class. /// </summary> private ResourceManagementClient() : base() { this._deploymentOperations = new DeploymentOperationOperations(this); this._deployments = new DeploymentOperations(this); this._providers = new ProviderOperations(this); this._resourceGroups = new ResourceGroupOperations(this); this._resources = new ResourceOperations(this); this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
public static void DeleteIfExists(this IResourceGroupOperations rgOps, string rgName) { try { // Delete RG is not supposed to throw on not found error. It should be 204 response status instead. // CSM people confirmed [6/16/15] that's a regression and will be fixed. var deleteResourceGroupResponse = rgOps.Delete(rgName); Assert.Equal(HttpStatusCode.OK, deleteResourceGroupResponse.StatusCode); } catch (CloudException ex) { Assert.Equal("ResourceGroupNotFound", ex.Error.Code); } }
/// <summary> /// Initializes a new instance of the ResourceManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public ResourceManagementClient(HttpClient httpClient) : base(httpClient) { this._deploymentOperations = new DeploymentOperationOperations(this); this._deployments = new DeploymentOperations(this); this._providers = new ProviderOperations(this); this._resourceGroups = new ResourceGroupOperations(this); this._resources = new ResourceOperations(this); this._tags = new TagOperations(this); this._apiVersion = "2014-04-01-preview"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Initializes a new instance of the ResourceManagementClient class. /// </summary> public ResourceManagementClient() : base() { this._deploymentOperations = new DeploymentOperationOperations(this); this._deployments = new DeploymentOperations(this); this._providers = new ProviderOperations(this); this._providerOperationsMetadata = new ProviderOperationsMetadataOperations(this); this._resourceGroups = new ResourceGroupOperations(this); this._resources = new ResourceOperations(this); this._resourceProviderOperationDetails = new ResourceProviderOperationDetailsOperations(this); this._tags = new TagOperations(this); this._apiVersion = "2016-02-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <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> /// 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.IResourceGroupOperations. /// </param> /// <param name='parameters'> /// Required. Your documentation here. /// </param> /// <returns> /// Your documentation here. /// </returns> public static Task <ResourceGroupCreateOrUpdateResult> CreateOrUpdateAsync(this IResourceGroupOperations operations, ResourceGroupCreateOrUpdateParameters parameters) { return(operations.CreateOrUpdateAsync(parameters, CancellationToken.None)); }
/// <summary> /// Resource groups can be updated through a simple PATCH operation to /// a group address. The format of the request is the same as that for /// creating a resource groups, though if a field is unspecified /// current value will be carried over. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IResourceGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group to be created or updated. /// The name is case insensitive. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the update state resource group /// service operation. /// </param> /// <returns> /// Resource group information. /// </returns> public static Task <ResourceGroupPatchResult> PatchAsync(this IResourceGroupOperations operations, string resourceGroupName, BasicResourceGroup parameters) { return(operations.PatchAsync(resourceGroupName, parameters, 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.IResourceGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Optional. /// </param> /// <returns> /// Your documentation here. /// </returns> public static Task <ResourceGroupListResourcesResult> ListResourcesAsync(this IResourceGroupOperations operations, string resourceGroupName) { return(operations.ListResourcesAsync(resourceGroupName, CancellationToken.None)); }
/// <summary> /// Gets a resource group permissions. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IResourceGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Name of the resource group to get the permissions for.The /// name is case insensitive. /// </param> /// <returns> /// Permissions information. /// </returns> public static Task <PermissionGetResult> GetPermissionsAsync(this IResourceGroupOperations operations, string resourceGroupName) { return(operations.GetPermissionsAsync(resourceGroupName, CancellationToken.None)); }
/// <summary> /// Checks whether resource group exists. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IResourceGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group to check. The name is case /// insensitive. /// </param> /// <returns> /// Resource group information. /// </returns> public static Task <ResourceGroupExistsResult> CheckExistenceAsync(this IResourceGroupOperations operations, string resourceGroupName) { return(operations.CheckExistenceAsync(resourceGroupName, 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.IResourceGroupOperations. /// </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 <ResourceGroupListResult> ListNextAsync(this IResourceGroupOperations 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.IResourceGroupOperations. /// </param> /// <returns> /// Your documentation here. /// </returns> public static Task <ResourceGroupListResult> ListAsync(this IResourceGroupOperations operations) { return(operations.ListAsync(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.IResourceGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. Your documentation here. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> DeleteAsync(this IResourceGroupOperations operations, string resourceGroupName) { return(operations.DeleteAsync(resourceGroupName, CancellationToken.None)); }
/// <summary> /// Create a resource group. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IResourceGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group to be created or updated. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the create or update resource /// group service operation. /// </param> /// <returns> /// Resource group information. /// </returns> public static Task <ResourceGroupCreateOrUpdateResult> CreateOrUpdateAsync(this IResourceGroupOperations operations, string resourceGroupName, BasicResourceGroup parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, parameters, CancellationToken.None)); }
/// <summary> /// Begin deleting resource group.To determine whether the operation /// has finished processing the request, call /// GetLongRunningOperationStatus. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IResourceGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group to be deleted. The name is /// case insensitive. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <LongRunningOperationResponse> BeginDeletingAsync(this IResourceGroupOperations operations, string resourceGroupName) { return(operations.BeginDeletingAsync(resourceGroupName, CancellationToken.None)); }
/// <summary> /// Gets a collection of resource groups. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IResourceGroupOperations. /// </param> /// <param name='parameters'> /// Optional. Query parameters. If null is passed returns all resource /// groups. /// </param> /// <returns> /// List of resource groups. /// </returns> public static Task <ResourceGroupListResult> ListAsync(this IResourceGroupOperations operations, ResourceGroupListParameters parameters) { return(operations.ListAsync(parameters, CancellationToken.None)); }