Ejemplo n.º 1
0
 // https://management.core.windows.net/<subscription-id>/services/hostedservices/<service-name>/deployments/
 /// <summary>
 /// Used to construct the command to create a virtual machine deployment including the creation of a role
 /// </summary>
 /// <param name="serviceName">the name of the cloud service</param>
 /// <param name="template">the image template of the virtual machine</param>
 /// <param name="storageAccountForVhd">the storage account used to store the virtual machine images of data and os</param>
 /// <param name="size">the required size of the virtual machine</param>
 internal CreateVirtualMachineDeploymentCommand(string serviceName, string storageAccountForVhd, VirtualMachineTemplates template, VmSize size = VmSize.Small)
 {
     AdditionalHeaders["x-ms-version"] = "2012-03-01";
     OperationId        = "hostedservices";
     ServiceType        = "services";
     HttpCommand        = serviceName + "/deployments";
     VirtualMachineType = template;
     CloudServiceName   = serviceName;
     VhdStorageAccount  = storageAccountForVhd;
     Size = size;
 }
 // https://management.core.windows.net/<subscription-id>/services/hostedservices/<service-name>/deployments/
 /// <summary>
 /// Used to construct the command to create a virtual machine deployment including the creation of a role
 /// </summary>
 /// <param name="serviceName">the name of the cloud service</param>
 /// <param name="template">the image template of the virtual machine</param>
 /// <param name="storageAccountForVhd">the storage account used to store the virtual machine images of data and os</param>
 /// <param name="size">the required size of the virtual machine</param>
 internal CreateVirtualMachineDeploymentCommand(string serviceName, string storageAccountForVhd, VirtualMachineTemplates template, VmSize size = VmSize.Small)
 {
     AdditionalHeaders["x-ms-version"] = "2012-03-01";
     OperationId = "hostedservices";
     ServiceType = "services";
     HttpCommand = serviceName + "/deployments";
     VirtualMachineType = template;
     CloudServiceName = serviceName;
     VhdStorageAccount = storageAccountForVhd;
     Size = size;
 }
 /// <summary>
 /// The type of deployment that is being made - SQL, AD, stored image, etc.
 /// </summary>
 /// <param name="templates">The deployment type</param>
 /// <returns>A IVirtualMachineDeployment interface</returns>
 IVirtualMachineDeployment IVirtualMachineDeployment.WithDeploymentType(VirtualMachineTemplates templates)
 {
     Properties.VirtualMachineType = templates;
     return(this);
 }
 /// <summary>
 /// The type of deployment that is being made - SQL, AD, stored image, etc.
 /// </summary>
 /// <param name="templates">The deployment type</param>
 /// <returns>A IVirtualMachineDeployment interface</returns>
 IVirtualMachineDeployment IVirtualMachineDeployment.WithDeploymentType(VirtualMachineTemplates templates)
 {
     Properties.VirtualMachineType = templates;
     return this;
 }