示例#1
0
 /// <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);
 }
示例#2
0
 /// <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.IGalleryItemOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. Your documentation here.
 /// </param>
 /// <param name='galleryItemId'>
 /// Required. Your documentation here.
 /// </param>
 /// <param name='parameters'>
 /// Required. Your documentation here.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse CreateOrUpdate(this IGalleryItemOperations operations, string resourceGroupName, string galleryItemId, GalleryItemCreateOrUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IGalleryItemOperations)s).CreateOrUpdateAsync(resourceGroupName, galleryItemId, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#3
0
 /// <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.IGalleryItemOperations.
 /// </param>
 /// <returns>
 /// Your documentation here.
 /// </returns>
 public static GalleryItemListResult ListWithoutResourceGroup(this IGalleryItemOperations operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IGalleryItemOperations)s).ListWithoutResourceGroupAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#4
0
 /// <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.IGalleryItemOperations.
 /// </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 GalleryItemListResult ListNext(this IGalleryItemOperations operations, string nextLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IGalleryItemOperations)s).ListNextAsync(nextLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#5
0
 /// <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.IGalleryItemOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. Your documentation here.
 /// </param>
 /// <param name='galleryItemId'>
 /// Required. Your documentation here.
 /// </param>
 /// <returns>
 /// Your documentation here.
 /// </returns>
 public static GalleryItemGetResult Get(this IGalleryItemOperations operations, string resourceGroupName, string galleryItemId)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IGalleryItemOperations)s).GetAsync(resourceGroupName, galleryItemId);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gallery item Delete operation.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.AzureStack.Management.IGalleryItemOperations.
 /// </param>
 /// <param name='galleryItemId'>
 /// Required. Gallery item identity.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse Delete(this IGalleryItemOperations operations, string galleryItemId)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IGalleryItemOperations)s).DeleteAsync(galleryItemId);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#7
0
 /// <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);
 }
示例#8
0
 /// <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.IGalleryItemOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. Your documentation here.
 /// </param>
 /// <param name='galleryItemId'>
 /// Required. Your documentation here.
 /// </param>
 /// <param name='parameters'>
 /// Required. Your documentation here.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> CreateOrUpdateAsync(this IGalleryItemOperations operations, string resourceGroupName, string galleryItemId, GalleryItemCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, galleryItemId, parameters, CancellationToken.None));
 }
示例#9
0
 /// <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.IGalleryItemOperations.
 /// </param>
 /// <returns>
 /// Your documentation here.
 /// </returns>
 public static Task <GalleryItemListResult> ListWithoutResourceGroupAsync(this IGalleryItemOperations operations)
 {
     return(operations.ListWithoutResourceGroupAsync(CancellationToken.None));
 }
示例#10
0
 /// <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.IGalleryItemOperations.
 /// </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 <GalleryItemListResult> ListNextAsync(this IGalleryItemOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink, CancellationToken.None));
 }
示例#11
0
 /// <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.IGalleryItemOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. Your documentation here.
 /// </param>
 /// <returns>
 /// Your documentation here.
 /// </returns>
 public static Task <GalleryItemListResult> ListAsync(this IGalleryItemOperations operations, string resourceGroupName)
 {
     return(operations.ListAsync(resourceGroupName, CancellationToken.None));
 }
示例#12
0
 /// <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.IGalleryItemOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. Your documentation here.
 /// </param>
 /// <param name='galleryItemId'>
 /// Required. Your documentation here.
 /// </param>
 /// <returns>
 /// Your documentation here.
 /// </returns>
 public static Task <GalleryItemGetResult> GetAsync(this IGalleryItemOperations operations, string resourceGroupName, string galleryItemId)
 {
     return(operations.GetAsync(resourceGroupName, galleryItemId, CancellationToken.None));
 }
示例#13
0
 /// <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.IGalleryItemOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. Your documentation here.
 /// </param>
 /// <param name='galleryItemId'>
 /// 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 IGalleryItemOperations operations, string resourceGroupName, string galleryItemId)
 {
     return(operations.DeleteAsync(resourceGroupName, galleryItemId, CancellationToken.None));
 }
 /// <summary>
 /// Creates or updates the Gallery Item
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.AzureStack.Management.IGalleryItemOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Gallery item Upload parameters.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> CreateOrUpdateAsync(this IGalleryItemOperations operations, GalleryItemCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(parameters, CancellationToken.None));
 }