示例#1
0
 /// <summary>
 /// Share an already replicated VM image. This operation is only for
 /// publishers. You have to be registered as image publisher with
 /// Windows Azure to be able to call this.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='vmImageName'>
 /// Required. The name of the virtual machine image to share.
 /// </param>
 /// <param name='permission'>
 /// Required. The sharing permission: public, msdn, or private.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse BeginSharing(this IVirtualMachineVMImageOperations operations, string vmImageName, string permission)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVirtualMachineVMImageOperations)s).BeginSharingAsync(vmImageName, permission);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#2
0
 /// <summary>
 /// Unreplicate an VM image to multiple target locations. This
 /// operation is only for publishers. You have to be registered as
 /// image publisher with Windows Azure to be able to call this. Note:
 /// The operation removes the published copies of the user VM Image.
 /// It does not remove the actual user VM Image. To remove the actual
 /// user VM Image, the publisher will have to call Delete VM Image.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='vmImageName'>
 /// Required. The name of the virtual machine image to replicate. Note:
 /// The VM Image Name should be the user VM Image, not the published
 /// name of the VM Image.
 /// </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 error information regarding
 /// the failure.
 /// </returns>
 public static OperationStatusResponse Unreplicate(this IVirtualMachineVMImageOperations operations, string vmImageName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVirtualMachineVMImageOperations)s).UnreplicateAsync(vmImageName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// The Create VM Image operation creates a VM image that in your image
 /// repository.  (see
 /// http://msdn.microsoft.com/en-us/library/azure/dn775054.aspx for
 /// more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the virtual machine VM image
 /// create operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse BeginCreating(this IVirtualMachineVMImageOperations operations, VirtualMachineVMImageCreateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVirtualMachineVMImageOperations)s).BeginCreatingAsync(parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#4
0
 /// <summary>
 /// The Update VM Image operation updates a VM image that in your image
 /// repository.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='imageName'>
 /// Required. The name of the virtual machine image to be updated.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Update Virtual Machine Image
 /// operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse Update(this IVirtualMachineVMImageOperations operations, string imageName, VirtualMachineVMImageUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVirtualMachineVMImageOperations)s).UpdateAsync(imageName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// The Begin Deleting Virtual Machine Image operation deletes the
 /// specified virtual machine image.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='vmImageName'>
 /// Required. The name of the virtual machine image to delete.
 /// </param>
 /// <param name='deleteFromStorage'>
 /// Required. Specifies that the source blob for the image should also
 /// be deleted from storage.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse BeginDeleting(this IVirtualMachineVMImageOperations operations, string vmImageName, bool deleteFromStorage)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVirtualMachineVMImageOperations)s).BeginDeletingAsync(vmImageName, deleteFromStorage);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// The List Virtual Machine Images operation retrieves a list of the
 /// virtual machine images.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <returns>
 /// The List VM Images operation response.
 /// </returns>
 public static VirtualMachineVMImageListResponse List(this IVirtualMachineVMImageOperations operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVirtualMachineVMImageOperations)s).ListAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#7
0
 /// <summary>
 /// Initializes a new instance of the ComputeManagementClient class.
 /// </summary>
 private ComputeManagementClient()
     : base()
 {
     this._deployments              = new DeploymentOperations(this);
     this._hostedServices           = new HostedServiceOperations(this);
     this._operatingSystems         = new OperatingSystemOperations(this);
     this._serviceCertificates      = new ServiceCertificateOperations(this);
     this._virtualMachineDisks      = new VirtualMachineDiskOperations(this);
     this._virtualMachineExtensions = new VirtualMachineExtensionOperations(this);
     this._virtualMachines          = new VirtualMachineOperations(this);
     this._virtualMachineOSImages   = new VirtualMachineOSImageOperations(this);
     this._virtualMachineVMImages   = new VirtualMachineVMImageOperations(this);
     this.HttpClient.Timeout        = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Initializes a new instance of the ComputeManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 private ComputeManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._deployments              = new DeploymentOperations(this);
     this._hostedServices           = new HostedServiceOperations(this);
     this._loadBalancers            = new LoadBalancerOperations(this);
     this._operatingSystems         = new OperatingSystemOperations(this);
     this._serviceCertificates      = new ServiceCertificateOperations(this);
     this._virtualMachineDisks      = new VirtualMachineDiskOperations(this);
     this._virtualMachineExtensions = new VirtualMachineExtensionOperations(this);
     this._virtualMachines          = new VirtualMachineOperations(this);
     this._virtualMachineOSImages   = new VirtualMachineOSImageOperations(this);
     this._virtualMachineVMImages   = new VirtualMachineVMImageOperations(this);
     this._apiVersion = "2014-05-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// The Begin Deleting Virtual Machine Image operation deletes the
 /// specified virtual machine image.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='vmImageName'>
 /// Required. The name of the virtual machine image to delete.
 /// </param>
 /// <param name='deleteFromStorage'>
 /// Required. Specifies that the source blob for the image should also
 /// be deleted from storage.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> BeginDeletingAsync(this IVirtualMachineVMImageOperations operations, string vmImageName, bool deleteFromStorage)
 {
     return(operations.BeginDeletingAsync(vmImageName, deleteFromStorage, CancellationToken.None));
 }
 /// <summary>
 /// The List Virtual Machine Images operation retrieves a list of the
 /// virtual machine images.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <returns>
 /// The List VM Images operation response.
 /// </returns>
 public static Task <VirtualMachineVMImageListResponse> ListAsync(this IVirtualMachineVMImageOperations operations)
 {
     return(operations.ListAsync(CancellationToken.None));
 }
示例#11
0
 /// <summary>
 /// The Create VM Image operation creates a VM image that in your image
 /// repository.  (see
 /// http://msdn.microsoft.com/en-us/library/azure/dn775054.aspx for
 /// more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the virtual machine VM image
 /// create operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> BeginCreatingAsync(this IVirtualMachineVMImageOperations operations, VirtualMachineVMImageCreateParameters parameters)
 {
     return(operations.BeginCreatingAsync(parameters, CancellationToken.None));
 }
示例#12
0
 /// <summary>
 /// The Update VM Image operation updates a VM image that in your image
 /// repository.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='imageName'>
 /// Required. The name of the virtual machine image to be updated.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Update Virtual Machine Image
 /// operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> UpdateAsync(this IVirtualMachineVMImageOperations operations, string imageName, VirtualMachineVMImageUpdateParameters parameters)
 {
     return(operations.UpdateAsync(imageName, parameters, CancellationToken.None));
 }
示例#13
0
 /// <summary>
 /// Unreplicate an VM image to multiple target locations. This
 /// operation is only for publishers. You have to be registered as
 /// image publisher with Windows Azure to be able to call this. Note:
 /// The operation removes the published copies of the user VM Image.
 /// It does not remove the actual user VM Image. To remove the actual
 /// user VM Image, the publisher will have to call Delete VM Image.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='vmImageName'>
 /// Required. The name of the virtual machine image to replicate. Note:
 /// The VM Image Name should be the user VM Image, not the published
 /// name of the VM Image.
 /// </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 error information regarding
 /// the failure.
 /// </returns>
 public static Task <OperationStatusResponse> UnreplicateAsync(this IVirtualMachineVMImageOperations operations, string vmImageName)
 {
     return(operations.UnreplicateAsync(vmImageName, CancellationToken.None));
 }
示例#14
0
 /// <summary>
 /// Share an already replicated VM image. This operation is only for
 /// publishers. You have to be registered as image publisher with
 /// Windows Azure to be able to call this.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='vmImageName'>
 /// Required. The name of the virtual machine image to share.
 /// </param>
 /// <param name='permission'>
 /// Required. The sharing permission: public, msdn, or private.
 /// </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 error information regarding
 /// the failure.
 /// </returns>
 public static Task <OperationStatusResponse> ShareAsync(this IVirtualMachineVMImageOperations operations, string vmImageName, string permission)
 {
     return(operations.ShareAsync(vmImageName, permission, CancellationToken.None));
 }
示例#15
0
 /// <summary>
 /// Replicate an VM image to multiple target locations. This operation
 /// is only for publishers. You have to be registered as image
 /// publisher with Windows Azure to be able to call this.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='vmImageName'>
 /// Required. The name of the virtual machine image to replicate.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Replicate Virtual Machine
 /// Image operation.
 /// </param>
 /// <returns>
 /// The response body contains the published name of the image.
 /// </returns>
 public static Task <VirtualMachineVMImageReplicateResponse> ReplicateAsync(this IVirtualMachineVMImageOperations operations, string vmImageName, VirtualMachineVMImageReplicateParameters parameters)
 {
     return(operations.ReplicateAsync(vmImageName, parameters, CancellationToken.None));
 }
示例#16
0
 /// <summary>
 /// Gets VMImage's properties and its replication details. This
 /// operation is only for publishers. You have to be registered as
 /// image publisher with Windows Azure to be able to call this.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='vmImageName'>
 /// Required. The name of the virtual machine image to replicate.
 /// </param>
 /// <returns>
 /// The Get Details VM Images operation response.
 /// </returns>
 public static Task <VirtualMachineVMImageGetDetailsResponse> GetDetailsAsync(this IVirtualMachineVMImageOperations operations, string vmImageName)
 {
     return(operations.GetDetailsAsync(vmImageName, CancellationToken.None));
 }
示例#17
0
 /// <summary>
 /// The Create VM Image operation creates a VM image that in your image
 /// repository.  (see
 /// http://msdn.microsoft.com/en-us/library/azure/dn775054.aspx for
 /// more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Create Virtual Machine Image
 /// operation.
 /// </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 error information regarding
 /// the failure.
 /// </returns>
 public static Task <OperationStatusResponse> CreateAsync(this IVirtualMachineVMImageOperations operations, VirtualMachineVMImageCreateParameters parameters)
 {
     return(operations.CreateAsync(parameters, CancellationToken.None));
 }
示例#18
0
 /// <summary>
 /// Unreplicate an VM image to multiple target locations. This
 /// operation is only for publishers. You have to be registered as
 /// image publisher with Windows Azure to be able to call this. Note:
 /// The operation removes the published copies of the user VM Image.
 /// It does not remove the actual user VM Image. To remove the actual
 /// user VM Image, the publisher will have to call Delete VM Image.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='vmImageName'>
 /// Required. The name of the virtual machine image to replicate. Note:
 /// The VM Image Name should be the user VM Image, not the published
 /// name of the VM Image.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> BeginUnreplicatingAsync(this IVirtualMachineVMImageOperations operations, string vmImageName)
 {
     return(operations.BeginUnreplicatingAsync(vmImageName, CancellationToken.None));
 }
示例#19
0
 /// <summary>
 /// Share an already replicated VM image. This operation is only for
 /// publishers. You have to be registered as image publisher with
 /// Windows Azure to be able to call this.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineVMImageOperations.
 /// </param>
 /// <param name='vmImageName'>
 /// Required. The name of the virtual machine image to share.
 /// </param>
 /// <param name='permission'>
 /// Required. The sharing permission: public, msdn, or private.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> BeginSharingAsync(this IVirtualMachineVMImageOperations operations, string vmImageName, string permission)
 {
     return(operations.BeginSharingAsync(vmImageName, permission, CancellationToken.None));
 }