This commit is contained in:
Burt Bielicki 2016-04-29 16:31:58 -07:00
Родитель 4b598cddf2
Коммит b728a9f558
8 изменённых файлов: 549 добавлений и 504 удалений

Просмотреть файл

@ -87,7 +87,14 @@
"type": "string",
"defaultValue": "osdiskimage",
"metadata": {
"description": "Name of storage VHD for the VM OS disk."
"description": "Name of new VM OS disk."
}
},
"osDiskUri": {
"type": "string",
"defaultValue": "[concat('http://', parameters('storageAccountName'), '.blob.core.windows.net/', parameters('storageContainerName'), '/', parameters('osDiskName'), '.vhd')]",
"metadata": {
"description": "URI for a custom VHD image."
}
},
"osOffer": {
@ -113,7 +120,7 @@
},
"osType": {
"type": "string",
"defaultValue": "WinServer 2012 R2",
"defaultValue": "Win2012R2Datacenter",
"allowedValues": [
"CentOS",
"CoreOS",
@ -450,6 +457,7 @@
"storageAccountName": { "value": "[parameters('storageAccountName')]" },
"storageContainerName": { "value": "[parameters('storageContainerName')]" },
"osDiskName": { "value": "[parameters('osDiskName')]" },
"osDiskUri": { "value": "[parameters('osDiskUri')]"},
"sshKeyValue": { "value": "[parameters('sshKeyValue')]" },
"sshKeyPath": { "value": "[parameters('sshKeyPath')]" },
"availabilitySetId": { "value": "[variables('availSetId')]" },

Просмотреть файл

@ -23,81 +23,83 @@ class DeploymentVM(Model):
:param content_version: If included it must match the ContentVersion in
the template.
:type content_version: str
:param storage_redundancy_type: The VM storage type.
:type storage_redundancy_type: str
:param storage_account_type: Whether to use an existing storage account
or create a new one.
:type storage_account_type: str
:param authentication_type: Authentication method: password-only or add
ssh-keys (Linux-only).
:type authentication_type: str
:param dns_name_type: Associate VMs with a public IP address to a DNS
name (new or none).
:type dns_name_type: str
:param ssh_key_value: SSH key file data.
:type ssh_key_value: str
:param os_type: Common OS choices. Choose 'Custom' to specify an image
with the osPublisher, osOffer, osSKU, and osVersion parameters.
:type os_type: str
:param os_version: The OS version to install.
:type os_version: str
:param public_ip_address_name: Name of public IP address to use.
:type public_ip_address_name: str
:param name: The VM resource name.
:type name: str
:param public_ip_address_allocation: Dynamic or Static public IP address
allocation.
:type public_ip_address_allocation: str
:param os_sku: The OS SKU to install.
:type os_sku: str
:param admin_username: Username for the Virtual Machine.
:type admin_username: str
:param public_ip_address_type: Use a public IP Address for the VM Nic.
(new, existing or none).
:type public_ip_address_type: str
:param virtual_network_ip_address_prefix: The IP address prefix.
:type virtual_network_ip_address_prefix: str
:param os_disk_name: Name of storage VHD for the VM OS disk.
:type os_disk_name: str
:param location: Location for VM resources.
:type location: str
:param availability_set_type: Flag to add the VM to an existing
availability set.
:type availability_set_type: str
:param admin_password: Password for the Virtual Machine.
:type admin_password: str
:param size: The VM Size that should be created.
:type size: str
:param storage_container_name: Name of storage container for the VM OS
disk.
:type storage_container_name: str
:param virtual_network_name: Name of virtual network to add VM to.
:type virtual_network_name: str
:param subnet_ip_address_prefix: The subnet address type.
:type subnet_ip_address_prefix: str
:param storage_account_name: Name of storage account for the VM OS disk.
:type storage_account_name: str
:param private_ip_address_allocation: Dynamic of Static private IP
address allocation.
:type private_ip_address_allocation: str
:param dns_name_for_public_ip: Globally unique DNS Name for the Public IP
used to access the Virtual Machine.
:type dns_name_for_public_ip: str
:param subnet_name: The subnet name.
:type subnet_name: str
:param storage_account_type: Whether to use an existing storage account
or create a new one.
:type storage_account_type: str
:param os_disk_uri: URI for a custom VHD image.
:type os_disk_uri: str
:param _artifacts_location: Container URI of of the template.
:type _artifacts_location: str
:param name: The VM resource name.
:type name: str
:param virtual_network_type: Whether to use an existing VNet or create a
new one.
:type virtual_network_type: str
:param admin_password: Password for the Virtual Machine.
:type admin_password: str
:param os_sku: The OS SKU to install.
:type os_sku: str
:param subnet_name: The subnet name.
:type subnet_name: str
:param os_type: Common OS choices. Choose 'Custom' to specify an image
with the osPublisher, osOffer, osSKU, and osVersion parameters.
:type os_type: str
:param admin_username: Username for the Virtual Machine.
:type admin_username: str
:param os_version: The OS version to install.
:type os_version: str
:param os_disk_name: Name of new VM OS disk.
:type os_disk_name: str
:param ssh_key_path: VM file path for SSH key.
:type ssh_key_path: str
:param storage_container_name: Name of storage container for the VM OS
disk.
:type storage_container_name: str
:param availability_set_id: Existing availability set for the VM.
:type availability_set_id: str
:param _artifacts_location: Container URI of of the template.
:type _artifacts_location: str
:param virtual_network_name: Name of virtual network to add VM to.
:type virtual_network_name: str
:param os_offer: The OS Offer to install.
:type os_offer: str
:param public_ip_address_allocation: Dynamic or Static public IP address
allocation.
:type public_ip_address_allocation: str
:param authentication_type: Authentication method: password-only or add
ssh-keys (Linux-only).
:type authentication_type: str
:param storage_account_name: Name of storage account for the VM OS disk.
:type storage_account_name: str
:param storage_redundancy_type: The VM storage type.
:type storage_redundancy_type: str
:param size: The VM Size that should be created.
:type size: str
:param public_ip_address_type: Use a public IP Address for the VM Nic.
(new, existing or none).
:type public_ip_address_type: str
:param virtual_network_ip_address_prefix: The IP address prefix.
:type virtual_network_ip_address_prefix: str
:param availability_set_id: Existing availability set for the VM.
:type availability_set_id: str
:param ssh_key_value: SSH key file data.
:type ssh_key_value: str
:param location: Location for VM resources.
:type location: str
:param os_publisher: The OS publisher of the OS image.
:type os_publisher: str
:param availability_set_type: Flag to add the VM to an existing
availability set.
:type availability_set_type: str
:param public_ip_address_name: Name of public IP address to use.
:type public_ip_address_name: str
:param dns_name_type: Associate VMs with a public IP address to a DNS
name (new or none).
:type dns_name_type: str
:ivar mode: Gets or sets the deployment mode. Default value:
"Incremental" .
:vartype mode: str
@ -105,46 +107,48 @@ class DeploymentVM(Model):
_validation = {
'uri': {'required': True, 'constant': True},
'admin_username': {'required': True},
'name': {'required': True},
'admin_password': {'required': True},
'admin_username': {'required': True},
'mode': {'required': True, 'constant': True},
}
_attribute_map = {
'uri': {'key': 'properties.templateLink.uri', 'type': 'str'},
'content_version': {'key': 'properties.templateLink.contentVersion', 'type': 'str'},
'storage_redundancy_type': {'key': 'properties.parameters.storageRedundancyType.value', 'type': 'str'},
'storage_account_type': {'key': 'properties.parameters.storageAccountType.value', 'type': 'str'},
'authentication_type': {'key': 'properties.parameters.authenticationType.value', 'type': 'str'},
'dns_name_type': {'key': 'properties.parameters.dnsNameType.value', 'type': 'str'},
'ssh_key_value': {'key': 'properties.parameters.sshKeyValue.value', 'type': 'str'},
'os_type': {'key': 'properties.parameters.osType.value', 'type': 'str'},
'os_version': {'key': 'properties.parameters.osVersion.value', 'type': 'str'},
'public_ip_address_name': {'key': 'properties.parameters.publicIpAddressName.value', 'type': 'str'},
'name': {'key': 'properties.parameters.name.value', 'type': 'str'},
'public_ip_address_allocation': {'key': 'properties.parameters.publicIpAddressAllocation.value', 'type': 'str'},
'os_sku': {'key': 'properties.parameters.osSKU.value', 'type': 'str'},
'admin_username': {'key': 'properties.parameters.adminUsername.value', 'type': 'str'},
'public_ip_address_type': {'key': 'properties.parameters.publicIpAddressType.value', 'type': 'str'},
'virtual_network_ip_address_prefix': {'key': 'properties.parameters.virtualNetworkIpAddressPrefix.value', 'type': 'str'},
'os_disk_name': {'key': 'properties.parameters.osDiskName.value', 'type': 'str'},
'location': {'key': 'properties.parameters.location.value', 'type': 'str'},
'availability_set_type': {'key': 'properties.parameters.availabilitySetType.value', 'type': 'str'},
'admin_password': {'key': 'properties.parameters.adminPassword.value', 'type': 'str'},
'size': {'key': 'properties.parameters.size.value', 'type': 'str'},
'storage_container_name': {'key': 'properties.parameters.storageContainerName.value', 'type': 'str'},
'virtual_network_name': {'key': 'properties.parameters.virtualNetworkName.value', 'type': 'str'},
'subnet_ip_address_prefix': {'key': 'properties.parameters.subnetIpAddressPrefix.value', 'type': 'str'},
'storage_account_name': {'key': 'properties.parameters.storageAccountName.value', 'type': 'str'},
'private_ip_address_allocation': {'key': 'properties.parameters.privateIpAddressAllocation.value', 'type': 'str'},
'dns_name_for_public_ip': {'key': 'properties.parameters.dnsNameForPublicIP.value', 'type': 'str'},
'subnet_name': {'key': 'properties.parameters.subnetName.value', 'type': 'str'},
'virtual_network_type': {'key': 'properties.parameters.virtualNetworkType.value', 'type': 'str'},
'ssh_key_path': {'key': 'properties.parameters.sshKeyPath.value', 'type': 'str'},
'storage_container_name': {'key': 'properties.parameters.storageContainerName.value', 'type': 'str'},
'availability_set_id': {'key': 'properties.parameters.availabilitySetId.value', 'type': 'str'},
'storage_account_type': {'key': 'properties.parameters.storageAccountType.value', 'type': 'str'},
'os_disk_uri': {'key': 'properties.parameters.osDiskUri.value', 'type': 'str'},
'_artifacts_location': {'key': 'properties.parameters._artifactsLocation.value', 'type': 'str'},
'virtual_network_name': {'key': 'properties.parameters.virtualNetworkName.value', 'type': 'str'},
'name': {'key': 'properties.parameters.name.value', 'type': 'str'},
'virtual_network_type': {'key': 'properties.parameters.virtualNetworkType.value', 'type': 'str'},
'admin_password': {'key': 'properties.parameters.adminPassword.value', 'type': 'str'},
'os_sku': {'key': 'properties.parameters.osSKU.value', 'type': 'str'},
'subnet_name': {'key': 'properties.parameters.subnetName.value', 'type': 'str'},
'os_type': {'key': 'properties.parameters.osType.value', 'type': 'str'},
'admin_username': {'key': 'properties.parameters.adminUsername.value', 'type': 'str'},
'os_version': {'key': 'properties.parameters.osVersion.value', 'type': 'str'},
'os_disk_name': {'key': 'properties.parameters.osDiskName.value', 'type': 'str'},
'ssh_key_path': {'key': 'properties.parameters.sshKeyPath.value', 'type': 'str'},
'os_offer': {'key': 'properties.parameters.osOffer.value', 'type': 'str'},
'public_ip_address_allocation': {'key': 'properties.parameters.publicIpAddressAllocation.value', 'type': 'str'},
'authentication_type': {'key': 'properties.parameters.authenticationType.value', 'type': 'str'},
'storage_account_name': {'key': 'properties.parameters.storageAccountName.value', 'type': 'str'},
'storage_redundancy_type': {'key': 'properties.parameters.storageRedundancyType.value', 'type': 'str'},
'size': {'key': 'properties.parameters.size.value', 'type': 'str'},
'public_ip_address_type': {'key': 'properties.parameters.publicIpAddressType.value', 'type': 'str'},
'virtual_network_ip_address_prefix': {'key': 'properties.parameters.virtualNetworkIpAddressPrefix.value', 'type': 'str'},
'availability_set_id': {'key': 'properties.parameters.availabilitySetId.value', 'type': 'str'},
'ssh_key_value': {'key': 'properties.parameters.sshKeyValue.value', 'type': 'str'},
'location': {'key': 'properties.parameters.location.value', 'type': 'str'},
'os_publisher': {'key': 'properties.parameters.osPublisher.value', 'type': 'str'},
'availability_set_type': {'key': 'properties.parameters.availabilitySetType.value', 'type': 'str'},
'public_ip_address_name': {'key': 'properties.parameters.publicIpAddressName.value', 'type': 'str'},
'dns_name_type': {'key': 'properties.parameters.dnsNameType.value', 'type': 'str'},
'mode': {'key': 'properties.mode', 'type': 'str'},
}
@ -152,37 +156,38 @@ class DeploymentVM(Model):
mode = "Incremental"
def __init__(self, admin_username, admin_password, content_version=None, storage_redundancy_type=None, storage_account_type=None, authentication_type=None, dns_name_type=None, ssh_key_value=None, os_type=None, os_version=None, public_ip_address_name=None, name=None, public_ip_address_allocation=None, os_sku=None, public_ip_address_type=None, virtual_network_ip_address_prefix=None, os_disk_name=None, location=None, availability_set_type=None, size=None, subnet_ip_address_prefix=None, storage_account_name=None, private_ip_address_allocation=None, dns_name_for_public_ip=None, subnet_name=None, virtual_network_type=None, ssh_key_path=None, storage_container_name=None, availability_set_id=None, _artifacts_location=None, virtual_network_name=None, os_offer=None, os_publisher=None):
def __init__(self, name, admin_password, admin_username, content_version=None, storage_container_name=None, virtual_network_name=None, subnet_ip_address_prefix=None, private_ip_address_allocation=None, dns_name_for_public_ip=None, storage_account_type=None, os_disk_uri=None, _artifacts_location=None, virtual_network_type=None, os_sku=None, subnet_name=None, os_type=None, os_version=None, os_disk_name=None, ssh_key_path=None, os_offer=None, public_ip_address_allocation=None, authentication_type=None, storage_account_name=None, storage_redundancy_type=None, size=None, public_ip_address_type=None, virtual_network_ip_address_prefix=None, availability_set_id=None, ssh_key_value=None, location=None, os_publisher=None, availability_set_type=None, public_ip_address_name=None, dns_name_type=None):
self.content_version = content_version
self.storage_redundancy_type = storage_redundancy_type
self.storage_account_type = storage_account_type
self.authentication_type = authentication_type
self.dns_name_type = dns_name_type
self.ssh_key_value = ssh_key_value
self.os_type = os_type
self.os_version = os_version
self.public_ip_address_name = public_ip_address_name
self.name = name
self.public_ip_address_allocation = public_ip_address_allocation
self.os_sku = os_sku
self.admin_username = admin_username
self.public_ip_address_type = public_ip_address_type
self.virtual_network_ip_address_prefix = virtual_network_ip_address_prefix
self.os_disk_name = os_disk_name
self.location = location
self.availability_set_type = availability_set_type
self.admin_password = admin_password
self.size = size
self.storage_container_name = storage_container_name
self.virtual_network_name = virtual_network_name
self.subnet_ip_address_prefix = subnet_ip_address_prefix
self.storage_account_name = storage_account_name
self.private_ip_address_allocation = private_ip_address_allocation
self.dns_name_for_public_ip = dns_name_for_public_ip
self.subnet_name = subnet_name
self.virtual_network_type = virtual_network_type
self.ssh_key_path = ssh_key_path
self.storage_container_name = storage_container_name
self.availability_set_id = availability_set_id
self.storage_account_type = storage_account_type
self.os_disk_uri = os_disk_uri
self._artifacts_location = _artifacts_location
self.virtual_network_name = virtual_network_name
self.name = name
self.virtual_network_type = virtual_network_type
self.admin_password = admin_password
self.os_sku = os_sku
self.subnet_name = subnet_name
self.os_type = os_type
self.admin_username = admin_username
self.os_version = os_version
self.os_disk_name = os_disk_name
self.ssh_key_path = ssh_key_path
self.os_offer = os_offer
self.public_ip_address_allocation = public_ip_address_allocation
self.authentication_type = authentication_type
self.storage_account_name = storage_account_name
self.storage_redundancy_type = storage_redundancy_type
self.size = size
self.public_ip_address_type = public_ip_address_type
self.virtual_network_ip_address_prefix = virtual_network_ip_address_prefix
self.availability_set_id = availability_set_id
self.ssh_key_value = ssh_key_value
self.location = location
self.os_publisher = os_publisher
self.availability_set_type = availability_set_type
self.public_ip_address_name = public_ip_address_name
self.dns_name_type = dns_name_type

Просмотреть файл

@ -32,7 +32,7 @@ class VMOperations(object):
self.config = config
def create_or_update(
self, resource_group_name, deployment_name, admin_username, admin_password, content_version=None, storage_redundancy_type=None, storage_account_type=None, authentication_type=None, dns_name_type=None, ssh_key_value=None, os_type=None, os_version=None, public_ip_address_name=None, name=None, public_ip_address_allocation=None, os_sku=None, public_ip_address_type=None, virtual_network_ip_address_prefix=None, os_disk_name=None, location=None, availability_set_type=None, size=None, subnet_ip_address_prefix=None, storage_account_name=None, private_ip_address_allocation=None, dns_name_for_public_ip=None, subnet_name=None, virtual_network_type=None, ssh_key_path=None, storage_container_name=None, availability_set_id=None, _artifacts_location=None, virtual_network_name=None, os_offer=None, os_publisher=None, custom_headers={}, raw=False, **operation_config):
self, resource_group_name, deployment_name, name, admin_password, admin_username, content_version=None, storage_container_name=None, virtual_network_name=None, subnet_ip_address_prefix=None, private_ip_address_allocation=None, dns_name_for_public_ip=None, storage_account_type=None, os_disk_uri=None, _artifacts_location=None, virtual_network_type=None, os_sku=None, subnet_name=None, os_type=None, os_version=None, os_disk_name=None, ssh_key_path=None, os_offer=None, public_ip_address_allocation=None, authentication_type=None, storage_account_name=None, storage_redundancy_type=None, size=None, public_ip_address_type=None, virtual_network_ip_address_prefix=None, availability_set_id=None, ssh_key_value=None, location=None, os_publisher=None, availability_set_type=None, public_ip_address_name=None, dns_name_type=None, custom_headers={}, raw=False, **operation_config):
"""
Create or update a virtual machine.
@ -41,85 +41,87 @@ class VMOperations(object):
:type resource_group_name: str
:param deployment_name: The name of the deployment.
:type deployment_name: str
:param admin_username: Username for the Virtual Machine.
:type admin_username: str
:param name: The VM resource name.
:type name: str
:param admin_password: Password for the Virtual Machine.
:type admin_password: str
:param admin_username: Username for the Virtual Machine.
:type admin_username: str
:param content_version: If included it must match the ContentVersion
in the template.
:type content_version: str
:param storage_redundancy_type: The VM storage type.
:type storage_redundancy_type: str
:param storage_account_type: Whether to use an existing storage
account or create a new one.
:type storage_account_type: str
:param authentication_type: Authentication method: password-only or
add ssh-keys (Linux-only).
:type authentication_type: str
:param dns_name_type: Associate VMs with a public IP address to a DNS
name (new or none).
:type dns_name_type: str
:param ssh_key_value: SSH key file data.
:type ssh_key_value: str
:param os_type: Common OS choices. Choose 'Custom' to specify an
image with the osPublisher, osOffer, osSKU, and osVersion parameters.
:type os_type: str
:param os_version: The OS version to install.
:type os_version: str
:param public_ip_address_name: Name of public IP address to use.
:type public_ip_address_name: str
:param name: The VM resource name.
:type name: str
:param public_ip_address_allocation: Dynamic or Static public IP
address allocation.
:type public_ip_address_allocation: str
:param os_sku: The OS SKU to install.
:type os_sku: str
:param public_ip_address_type: Use a public IP Address for the VM
Nic. (new, existing or none).
:type public_ip_address_type: str
:param virtual_network_ip_address_prefix: The IP address prefix.
:type virtual_network_ip_address_prefix: str
:param os_disk_name: Name of storage VHD for the VM OS disk.
:type os_disk_name: str
:param location: Location for VM resources.
:type location: str
:param availability_set_type: Flag to add the VM to an existing
availability set.
:type availability_set_type: str
:param size: The VM Size that should be created.
:type size: str
:param storage_container_name: Name of storage container for the VM
OS disk.
:type storage_container_name: str
:param virtual_network_name: Name of virtual network to add VM to.
:type virtual_network_name: str
:param subnet_ip_address_prefix: The subnet address type.
:type subnet_ip_address_prefix: str
:param storage_account_name: Name of storage account for the VM OS
disk.
:type storage_account_name: str
:param private_ip_address_allocation: Dynamic of Static private IP
address allocation.
:type private_ip_address_allocation: str
:param dns_name_for_public_ip: Globally unique DNS Name for the
Public IP used to access the Virtual Machine.
:type dns_name_for_public_ip: str
:param subnet_name: The subnet name.
:type subnet_name: str
:param storage_account_type: Whether to use an existing storage
account or create a new one.
:type storage_account_type: str
:param os_disk_uri: URI for a custom VHD image.
:type os_disk_uri: str
:param _artifacts_location: Container URI of of the template.
:type _artifacts_location: str
:param virtual_network_type: Whether to use an existing VNet or
create a new one.
:type virtual_network_type: str
:param os_sku: The OS SKU to install.
:type os_sku: str
:param subnet_name: The subnet name.
:type subnet_name: str
:param os_type: Common OS choices. Choose 'Custom' to specify an
image with the osPublisher, osOffer, osSKU, and osVersion parameters.
:type os_type: str
:param os_version: The OS version to install.
:type os_version: str
:param os_disk_name: Name of new VM OS disk.
:type os_disk_name: str
:param ssh_key_path: VM file path for SSH key.
:type ssh_key_path: str
:param storage_container_name: Name of storage container for the VM
OS disk.
:type storage_container_name: str
:param availability_set_id: Existing availability set for the VM.
:type availability_set_id: str
:param _artifacts_location: Container URI of of the template.
:type _artifacts_location: str
:param virtual_network_name: Name of virtual network to add VM to.
:type virtual_network_name: str
:param os_offer: The OS Offer to install.
:type os_offer: str
:param public_ip_address_allocation: Dynamic or Static public IP
address allocation.
:type public_ip_address_allocation: str
:param authentication_type: Authentication method: password-only or
add ssh-keys (Linux-only).
:type authentication_type: str
:param storage_account_name: Name of storage account for the VM OS
disk.
:type storage_account_name: str
:param storage_redundancy_type: The VM storage type.
:type storage_redundancy_type: str
:param size: The VM Size that should be created.
:type size: str
:param public_ip_address_type: Use a public IP Address for the VM
Nic. (new, existing or none).
:type public_ip_address_type: str
:param virtual_network_ip_address_prefix: The IP address prefix.
:type virtual_network_ip_address_prefix: str
:param availability_set_id: Existing availability set for the VM.
:type availability_set_id: str
:param ssh_key_value: SSH key file data.
:type ssh_key_value: str
:param location: Location for VM resources.
:type location: str
:param os_publisher: The OS publisher of the OS image.
:type os_publisher: str
:param availability_set_type: Flag to add the VM to an existing
availability set.
:type availability_set_type: str
:param public_ip_address_name: Name of public IP address to use.
:type public_ip_address_name: str
:param dns_name_type: Associate VMs with a public IP address to a DNS
name (new or none).
:type dns_name_type: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
@ -130,7 +132,7 @@ class VMOperations(object):
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
"""
parameters = models.DeploymentVM(content_version=content_version, storage_redundancy_type=storage_redundancy_type, storage_account_type=storage_account_type, authentication_type=authentication_type, dns_name_type=dns_name_type, ssh_key_value=ssh_key_value, os_type=os_type, os_version=os_version, public_ip_address_name=public_ip_address_name, name=name, public_ip_address_allocation=public_ip_address_allocation, os_sku=os_sku, admin_username=admin_username, public_ip_address_type=public_ip_address_type, virtual_network_ip_address_prefix=virtual_network_ip_address_prefix, os_disk_name=os_disk_name, location=location, availability_set_type=availability_set_type, admin_password=admin_password, size=size, subnet_ip_address_prefix=subnet_ip_address_prefix, storage_account_name=storage_account_name, private_ip_address_allocation=private_ip_address_allocation, dns_name_for_public_ip=dns_name_for_public_ip, subnet_name=subnet_name, virtual_network_type=virtual_network_type, ssh_key_path=ssh_key_path, storage_container_name=storage_container_name, availability_set_id=availability_set_id, _artifacts_location=_artifacts_location, virtual_network_name=virtual_network_name, os_offer=os_offer, os_publisher=os_publisher)
parameters = models.DeploymentVM(content_version=content_version, storage_container_name=storage_container_name, virtual_network_name=virtual_network_name, subnet_ip_address_prefix=subnet_ip_address_prefix, private_ip_address_allocation=private_ip_address_allocation, dns_name_for_public_ip=dns_name_for_public_ip, storage_account_type=storage_account_type, os_disk_uri=os_disk_uri, _artifacts_location=_artifacts_location, name=name, virtual_network_type=virtual_network_type, admin_password=admin_password, os_sku=os_sku, subnet_name=subnet_name, os_type=os_type, admin_username=admin_username, os_version=os_version, os_disk_name=os_disk_name, ssh_key_path=ssh_key_path, os_offer=os_offer, public_ip_address_allocation=public_ip_address_allocation, authentication_type=authentication_type, storage_account_name=storage_account_name, storage_redundancy_type=storage_redundancy_type, size=size, public_ip_address_type=public_ip_address_type, virtual_network_ip_address_prefix=virtual_network_ip_address_prefix, availability_set_id=availability_set_id, ssh_key_value=ssh_key_value, location=location, os_publisher=os_publisher, availability_set_type=availability_set_type, public_ip_address_name=public_ip_address_name, dns_name_type=dns_name_type)
# Construct URL
url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'

Просмотреть файл

@ -54,6 +54,9 @@
},
"location": {
"type": "string"
},
"osDiskUri": {
"type": "string"
}
},
"variables": {
@ -101,7 +104,7 @@
"osDisk": {
"name": "[concat('osdisk', parameters('virtualMachineName'))]",
"vhd": {
"uri": "[concat('http://', variables('vhdStorageName'), '.blob.core.windows.net/', variables('vhdStorageContainerName'), '/', variables('OSDiskName'), '.vhd')]"
"uri": "[parameters('osDiskUri')]"
},
"caching": "ReadWrite",
"createOption": "FromImage"

Просмотреть файл

@ -52,6 +52,9 @@
},
"location": {
"type": "string"
},
"osDiskUri": {
"type": "string"
}
},
"variables": {
@ -110,7 +113,7 @@
"osDisk": {
"name": "[concat('osdisk', parameters('virtualMachineName'))]",
"vhd": {
"uri": "[concat('http://', variables('vhdStorageName'), '.blob.core.windows.net/', variables('vhdStorageContainerName'), '/', variables('OSDiskName'), '.vhd')]"
"uri": "[parameters('osDiskUri')]"
},
"caching": "ReadWrite",
"createOption": "FromImage"

Просмотреть файл

@ -55,6 +55,9 @@
},
"location": {
"type": "string"
},
"osDiskUri": {
"type": "string"
}
},
"variables": {
@ -99,7 +102,7 @@
"osDisk": {
"name": "[concat('osdisk', parameters('virtualMachineName'))]",
"vhd": {
"uri": "[concat('http://', variables('vhdStorageName'), '.blob.core.windows.net/', variables('vhdStorageContainerName'), '/', variables('OSDiskName'), '.vhd')]"
"uri": "[parameters('osDiskUri')]"
},
"caching": "ReadWrite",
"createOption": "FromImage"

Просмотреть файл

@ -53,6 +53,9 @@
},
"location": {
"type": "string"
},
"osDiskUri": {
"type": "string"
}
},
"variables": {
@ -108,7 +111,7 @@
"osDisk": {
"name": "[concat('osdisk', parameters('virtualMachineName'))]",
"vhd": {
"uri": "[concat('http://', variables('vhdStorageName'), '.blob.core.windows.net/', variables('vhdStorageContainerName'), '/', variables('OSDiskName'), '.vhd')]"
"uri": "[parameters('osDiskUri')]"
},
"caching": "ReadWrite",
"createOption": "FromImage"

Просмотреть файл

@ -161,99 +161,14 @@
"VMParameters": {
"properties": {
"storageRedundancyType": {
"storageContainerName": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_storageRedundancyType",
"$ref": "#/definitions/DeploymentParameter_storageContainerName",
"x-ms-client-flatten": true
},
"storageAccountType": {
"virtualNetworkName": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_storageAccountType",
"x-ms-client-flatten": true
},
"authenticationType": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_authenticationType",
"x-ms-client-flatten": true
},
"dnsNameType": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_dnsNameType",
"x-ms-client-flatten": true
},
"sshKeyValue": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_sshKeyValue",
"x-ms-client-flatten": true
},
"osType": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_osType",
"x-ms-client-flatten": true
},
"osVersion": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_osVersion",
"x-ms-client-flatten": true
},
"publicIpAddressName": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_publicIpAddressName",
"x-ms-client-flatten": true
},
"name": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_name",
"x-ms-client-flatten": true
},
"publicIpAddressAllocation": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_publicIpAddressAllocation",
"x-ms-client-flatten": true
},
"osSKU": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_osSKU",
"x-ms-client-flatten": true
},
"adminUsername": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_adminUsername",
"x-ms-client-flatten": true
},
"publicIpAddressType": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_publicIpAddressType",
"x-ms-client-flatten": true
},
"virtualNetworkIpAddressPrefix": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_virtualNetworkIpAddressPrefix",
"x-ms-client-flatten": true
},
"osDiskName": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_osDiskName",
"x-ms-client-flatten": true
},
"location": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_location",
"x-ms-client-flatten": true
},
"availabilitySetType": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_availabilitySetType",
"x-ms-client-flatten": true
},
"adminPassword": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_adminPassword",
"x-ms-client-flatten": true
},
"size": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_size",
"$ref": "#/definitions/DeploymentParameter_virtualNetworkName",
"x-ms-client-flatten": true
},
"subnetIpAddressPrefix": {
@ -261,11 +176,6 @@
"$ref": "#/definitions/DeploymentParameter_subnetIpAddressPrefix",
"x-ms-client-flatten": true
},
"storageAccountName": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_storageAccountName",
"x-ms-client-flatten": true
},
"privateIpAddressAllocation": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_privateIpAddressAllocation",
@ -276,29 +186,14 @@
"$ref": "#/definitions/DeploymentParameter_dnsNameForPublicIP",
"x-ms-client-flatten": true
},
"subnetName": {
"storageAccountType": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_subnetName",
"$ref": "#/definitions/DeploymentParameter_storageAccountType",
"x-ms-client-flatten": true
},
"virtualNetworkType": {
"osDiskUri": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_virtualNetworkType",
"x-ms-client-flatten": true
},
"sshKeyPath": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_sshKeyPath",
"x-ms-client-flatten": true
},
"storageContainerName": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_storageContainerName",
"x-ms-client-flatten": true
},
"availabilitySetId": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_availabilitySetId",
"$ref": "#/definitions/DeploymentParameter_osDiskUri",
"x-ms-client-flatten": true
},
"_artifactsLocation": {
@ -306,9 +201,54 @@
"$ref": "#/definitions/DeploymentParameter__artifactsLocation",
"x-ms-client-flatten": true
},
"virtualNetworkName": {
"name": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_virtualNetworkName",
"$ref": "#/definitions/DeploymentParameter_name",
"x-ms-client-flatten": true
},
"virtualNetworkType": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_virtualNetworkType",
"x-ms-client-flatten": true
},
"adminPassword": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_adminPassword",
"x-ms-client-flatten": true
},
"osSKU": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_osSKU",
"x-ms-client-flatten": true
},
"subnetName": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_subnetName",
"x-ms-client-flatten": true
},
"osType": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_osType",
"x-ms-client-flatten": true
},
"adminUsername": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_adminUsername",
"x-ms-client-flatten": true
},
"osVersion": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_osVersion",
"x-ms-client-flatten": true
},
"osDiskName": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_osDiskName",
"x-ms-client-flatten": true
},
"sshKeyPath": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_sshKeyPath",
"x-ms-client-flatten": true
},
"osOffer": {
@ -316,10 +256,75 @@
"$ref": "#/definitions/DeploymentParameter_osOffer",
"x-ms-client-flatten": true
},
"publicIpAddressAllocation": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_publicIpAddressAllocation",
"x-ms-client-flatten": true
},
"authenticationType": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_authenticationType",
"x-ms-client-flatten": true
},
"storageAccountName": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_storageAccountName",
"x-ms-client-flatten": true
},
"storageRedundancyType": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_storageRedundancyType",
"x-ms-client-flatten": true
},
"size": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_size",
"x-ms-client-flatten": true
},
"publicIpAddressType": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_publicIpAddressType",
"x-ms-client-flatten": true
},
"virtualNetworkIpAddressPrefix": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_virtualNetworkIpAddressPrefix",
"x-ms-client-flatten": true
},
"availabilitySetId": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_availabilitySetId",
"x-ms-client-flatten": true
},
"sshKeyValue": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_sshKeyValue",
"x-ms-client-flatten": true
},
"location": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_location",
"x-ms-client-flatten": true
},
"osPublisher": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_osPublisher",
"x-ms-client-flatten": true
},
"availabilitySetType": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_availabilitySetType",
"x-ms-client-flatten": true
},
"publicIpAddressName": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_publicIpAddressName",
"x-ms-client-flatten": true
},
"dnsNameType": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_dnsNameType",
"x-ms-client-flatten": true
}
},
"required": [
@ -328,182 +333,21 @@
"virtualMachineName"
]
},
"DeploymentParameter_storageRedundancyType": {
"DeploymentParameter_storageContainerName": {
"properties": {
"value": {
"type": "string",
"description": "The VM storage type.",
"x-ms-client-name": "storageRedundancyType"
"description": "Name of storage container for the VM OS disk.",
"x-ms-client-name": "storageContainerName"
}
}
},
"DeploymentParameter_storageAccountType": {
"DeploymentParameter_virtualNetworkName": {
"properties": {
"value": {
"type": "string",
"description": "Whether to use an existing storage account or create a new one.",
"x-ms-client-name": "storageAccountType"
}
}
},
"DeploymentParameter_authenticationType": {
"properties": {
"value": {
"type": "string",
"description": "Authentication method: password-only or add ssh-keys (Linux-only).",
"x-ms-client-name": "authenticationType"
}
}
},
"DeploymentParameter_dnsNameType": {
"properties": {
"value": {
"type": "string",
"description": "Associate VMs with a public IP address to a DNS name (new or none).",
"x-ms-client-name": "dnsNameType"
}
}
},
"DeploymentParameter_sshKeyValue": {
"properties": {
"value": {
"type": "string",
"description": "SSH key file data.",
"x-ms-client-name": "sshKeyValue"
}
}
},
"DeploymentParameter_osType": {
"properties": {
"value": {
"type": "string",
"description": "Common OS choices. Choose 'Custom' to specify an image with the osPublisher, osOffer, osSKU, and osVersion parameters.",
"x-ms-client-name": "osType"
}
}
},
"DeploymentParameter_osVersion": {
"properties": {
"value": {
"type": "string",
"description": "The OS version to install.",
"x-ms-client-name": "osVersion"
}
}
},
"DeploymentParameter_publicIpAddressName": {
"properties": {
"value": {
"type": "string",
"description": "Name of public IP address to use.",
"x-ms-client-name": "publicIpAddressName"
}
}
},
"DeploymentParameter_name": {
"properties": {
"value": {
"type": "string",
"description": "The VM resource name.",
"x-ms-client-name": "name"
}
}
},
"DeploymentParameter_publicIpAddressAllocation": {
"properties": {
"value": {
"type": "string",
"description": "Dynamic or Static public IP address allocation.",
"x-ms-client-name": "publicIpAddressAllocation"
}
}
},
"DeploymentParameter_osSKU": {
"properties": {
"value": {
"type": "string",
"description": "The OS SKU to install.",
"x-ms-client-name": "osSKU"
}
}
},
"DeploymentParameter_adminUsername": {
"properties": {
"value": {
"type": "string",
"description": "Username for the Virtual Machine.",
"x-ms-client-name": "adminUsername"
}
},
"required": [
"value"
]
},
"DeploymentParameter_publicIpAddressType": {
"properties": {
"value": {
"type": "string",
"description": "Use a public IP Address for the VM Nic. (new, existing or none).",
"x-ms-client-name": "publicIpAddressType"
}
}
},
"DeploymentParameter_virtualNetworkIpAddressPrefix": {
"properties": {
"value": {
"type": "string",
"description": "The IP address prefix.",
"x-ms-client-name": "virtualNetworkIpAddressPrefix"
}
}
},
"DeploymentParameter_osDiskName": {
"properties": {
"value": {
"type": "string",
"description": "Name of storage VHD for the VM OS disk.",
"x-ms-client-name": "osDiskName"
}
}
},
"DeploymentParameter_location": {
"properties": {
"value": {
"type": "string",
"description": "Location for VM resources.",
"x-ms-client-name": "location"
}
}
},
"DeploymentParameter_availabilitySetType": {
"properties": {
"value": {
"type": "string",
"description": "Flag to add the VM to an existing availability set.",
"x-ms-client-name": "availabilitySetType"
}
}
},
"DeploymentParameter_adminPassword": {
"properties": {
"value": {
"type": "string",
"description": "Password for the Virtual Machine.",
"x-ms-client-name": "adminPassword"
}
},
"required": [
"value"
]
},
"DeploymentParameter_size": {
"properties": {
"value": {
"type": "string",
"description": "The VM Size that should be created.",
"x-ms-client-name": "size"
"description": "Name of virtual network to add VM to.",
"x-ms-client-name": "virtualNetworkName"
}
}
},
@ -516,15 +360,6 @@
}
}
},
"DeploymentParameter_storageAccountName": {
"properties": {
"value": {
"type": "string",
"description": "Name of storage account for the VM OS disk.",
"x-ms-client-name": "storageAccountName"
}
}
},
"DeploymentParameter_privateIpAddressAllocation": {
"properties": {
"value": {
@ -543,48 +378,21 @@
}
}
},
"DeploymentParameter_subnetName": {
"DeploymentParameter_storageAccountType": {
"properties": {
"value": {
"type": "string",
"description": "The subnet name.",
"x-ms-client-name": "subnetName"
"description": "Whether to use an existing storage account or create a new one.",
"x-ms-client-name": "storageAccountType"
}
}
},
"DeploymentParameter_virtualNetworkType": {
"DeploymentParameter_osDiskUri": {
"properties": {
"value": {
"type": "string",
"description": "Whether to use an existing VNet or create a new one.",
"x-ms-client-name": "virtualNetworkType"
}
}
},
"DeploymentParameter_sshKeyPath": {
"properties": {
"value": {
"type": "string",
"description": "VM file path for SSH key.",
"x-ms-client-name": "sshKeyPath"
}
}
},
"DeploymentParameter_storageContainerName": {
"properties": {
"value": {
"type": "string",
"description": "Name of storage container for the VM OS disk.",
"x-ms-client-name": "storageContainerName"
}
}
},
"DeploymentParameter_availabilitySetId": {
"properties": {
"value": {
"type": "string",
"description": "Existing availability set for the VM.",
"x-ms-client-name": "availabilitySetId"
"description": "URI for a custom VHD image.",
"x-ms-client-name": "osDiskUri"
}
}
},
@ -597,12 +405,105 @@
}
}
},
"DeploymentParameter_virtualNetworkName": {
"DeploymentParameter_name": {
"properties": {
"value": {
"type": "string",
"description": "Name of virtual network to add VM to.",
"x-ms-client-name": "virtualNetworkName"
"description": "The VM resource name.",
"x-ms-client-name": "name"
}
},
"required": [
"value"
]
},
"DeploymentParameter_virtualNetworkType": {
"properties": {
"value": {
"type": "string",
"description": "Whether to use an existing VNet or create a new one.",
"x-ms-client-name": "virtualNetworkType"
}
}
},
"DeploymentParameter_adminPassword": {
"properties": {
"value": {
"type": "string",
"description": "Password for the Virtual Machine.",
"x-ms-client-name": "adminPassword"
}
},
"required": [
"value"
]
},
"DeploymentParameter_osSKU": {
"properties": {
"value": {
"type": "string",
"description": "The OS SKU to install.",
"x-ms-client-name": "osSKU"
}
}
},
"DeploymentParameter_subnetName": {
"properties": {
"value": {
"type": "string",
"description": "The subnet name.",
"x-ms-client-name": "subnetName"
}
}
},
"DeploymentParameter_osType": {
"properties": {
"value": {
"type": "string",
"description": "Common OS choices. Choose 'Custom' to specify an image with the osPublisher, osOffer, osSKU, and osVersion parameters.",
"x-ms-client-name": "osType"
}
}
},
"DeploymentParameter_adminUsername": {
"properties": {
"value": {
"type": "string",
"description": "Username for the Virtual Machine.",
"x-ms-client-name": "adminUsername"
}
},
"required": [
"value"
]
},
"DeploymentParameter_osVersion": {
"properties": {
"value": {
"type": "string",
"description": "The OS version to install.",
"x-ms-client-name": "osVersion"
}
}
},
"DeploymentParameter_osDiskName": {
"properties": {
"value": {
"type": "string",
"description": "Name of new VM OS disk.",
"x-ms-client-name": "osDiskName"
}
}
},
"DeploymentParameter_sshKeyPath": {
"properties": {
"value": {
"type": "string",
"description": "VM file path for SSH key.",
"x-ms-client-name": "sshKeyPath"
}
}
},
@ -615,6 +516,96 @@
}
}
},
"DeploymentParameter_publicIpAddressAllocation": {
"properties": {
"value": {
"type": "string",
"description": "Dynamic or Static public IP address allocation.",
"x-ms-client-name": "publicIpAddressAllocation"
}
}
},
"DeploymentParameter_authenticationType": {
"properties": {
"value": {
"type": "string",
"description": "Authentication method: password-only or add ssh-keys (Linux-only).",
"x-ms-client-name": "authenticationType"
}
}
},
"DeploymentParameter_storageAccountName": {
"properties": {
"value": {
"type": "string",
"description": "Name of storage account for the VM OS disk.",
"x-ms-client-name": "storageAccountName"
}
}
},
"DeploymentParameter_storageRedundancyType": {
"properties": {
"value": {
"type": "string",
"description": "The VM storage type.",
"x-ms-client-name": "storageRedundancyType"
}
}
},
"DeploymentParameter_size": {
"properties": {
"value": {
"type": "string",
"description": "The VM Size that should be created.",
"x-ms-client-name": "size"
}
}
},
"DeploymentParameter_publicIpAddressType": {
"properties": {
"value": {
"type": "string",
"description": "Use a public IP Address for the VM Nic. (new, existing or none).",
"x-ms-client-name": "publicIpAddressType"
}
}
},
"DeploymentParameter_virtualNetworkIpAddressPrefix": {
"properties": {
"value": {
"type": "string",
"description": "The IP address prefix.",
"x-ms-client-name": "virtualNetworkIpAddressPrefix"
}
}
},
"DeploymentParameter_availabilitySetId": {
"properties": {
"value": {
"type": "string",
"description": "Existing availability set for the VM.",
"x-ms-client-name": "availabilitySetId"
}
}
},
"DeploymentParameter_sshKeyValue": {
"properties": {
"value": {
"type": "string",
"description": "SSH key file data.",
"x-ms-client-name": "sshKeyValue"
}
}
},
"DeploymentParameter_location": {
"properties": {
"value": {
"type": "string",
"description": "Location for VM resources.",
"x-ms-client-name": "location"
}
}
},
"DeploymentParameter_osPublisher": {
"properties": {
"value": {
@ -624,6 +615,33 @@
}
}
},
"DeploymentParameter_availabilitySetType": {
"properties": {
"value": {
"type": "string",
"description": "Flag to add the VM to an existing availability set.",
"x-ms-client-name": "availabilitySetType"
}
}
},
"DeploymentParameter_publicIpAddressName": {
"properties": {
"value": {
"type": "string",
"description": "Name of public IP address to use.",
"x-ms-client-name": "publicIpAddressName"
}
}
},
"DeploymentParameter_dnsNameType": {
"properties": {
"value": {
"type": "string",
"description": "Associate VMs with a public IP address to a DNS name (new or none).",
"x-ms-client-name": "dnsNameType"
}
}
},
"ParametersLink": {
"properties": {
"uri": {