зеркало из https://github.com/microsoft/azure-cli.git
Merge pull request #186 from BurtBiel/commands/CreateVM
Commands/create vm
This commit is contained in:
Коммит
1d2461b316
|
@ -126,6 +126,26 @@
|
|||
<Compile Include="command_modules\azure-cli-storage\setup.py" />
|
||||
<Compile Include="command_modules\azure-cli-taskhelp\azure\cli\command_modules\taskhelp\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-taskhelp\setup.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\credentials.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\exceptions.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\models\basic_dependency.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\models\dependency.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\models\deployment_extended.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\models\deployment_parameter_virtual_network_ip_address_prefix.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\models\deployment_properties_extended.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\models\deployment_vm.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\models\parameters_link.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\models\provider.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\models\provider_resource_type.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\models\template_link.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\models\vm_creation_client_enums.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\models\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\operations\vm_operations.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\operations\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\version.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\vm_creation_client.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\tests\command_specs.py">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
@ -141,6 +161,9 @@
|
|||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\command_modules\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\cli\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\azure\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-vm\setup.py" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -197,6 +220,11 @@
|
|||
<Folder Include="command_modules\azure-cli-vm\azure\cli\" />
|
||||
<Folder Include="command_modules\azure-cli-vm\azure\cli\command_modules\" />
|
||||
<Folder Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\" />
|
||||
<Folder Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\" />
|
||||
<Folder Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\" />
|
||||
<Folder Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\models\" />
|
||||
<Folder Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\lib\operations\" />
|
||||
<Folder Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\nested_templates\" />
|
||||
<Folder Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\tests\" />
|
||||
<Folder Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\tests\recordings\" />
|
||||
</ItemGroup>
|
||||
|
@ -223,6 +251,20 @@
|
|||
<Content Include="command_modules\azure-cli-storage\requirements.txt" />
|
||||
<Content Include="command_modules\azure-cli-taskhelp\requirements.txt" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\tests\aliases.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\azuredeploy.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\nested_templates\ExistingStorageAccount.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\nested_templates\ExistingVNet.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\nested_templates\NewStorageAccount.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\nested_templates\NewVNet.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\nested_templates\nic_ip_existing_dns_none.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\nested_templates\nic_ip_new_dns_new.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\nested_templates\nic_ip_new_dns_none.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\nested_templates\nic_ip_none_dns_none.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\nested_templates\vm_existing_password.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\nested_templates\vm_existing_sshkey.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\nested_templates\vm_none_password.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\nested_templates\vm_none_sshkey.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\mgmt\swagger_create_vm.json" />
|
||||
<Content Include="command_modules\azure-cli-vm\requirements.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -86,13 +86,16 @@ def print_arguments(help_file):
|
|||
indent,
|
||||
max_name_length + indent*4 + 2)
|
||||
|
||||
indent = 2
|
||||
indent = 4
|
||||
if p.long_summary:
|
||||
_print_indent('{0}'.format(p.long_summary.rstrip()), indent)
|
||||
|
||||
if p.value_sources:
|
||||
_print_indent('')
|
||||
_print_indent(L("Values from: {0}").format(', '.join(p.value_sources)), indent)
|
||||
|
||||
if p.long_summary or p.value_sources:
|
||||
print('')
|
||||
return indent
|
||||
|
||||
def _print_header(help_file):
|
||||
|
@ -249,10 +252,17 @@ class HelpParameter(object): #pylint: disable=too-few-public-methods
|
|||
data.get('required'),
|
||||
data.get('name')))
|
||||
|
||||
self.type = data.get('type')
|
||||
self.short_summary = data.get('short-summary')
|
||||
self.long_summary = data.get('long-summary')
|
||||
self.value_sources = data.get('populator-commands')
|
||||
if data.get('type'):
|
||||
self.type = data.get('type')
|
||||
|
||||
if data.get('short-summary'):
|
||||
self.short_summary = data.get('short-summary')
|
||||
|
||||
if data.get('long-summary'):
|
||||
self.long_summary = data.get('long-summary')
|
||||
|
||||
if data.get('populator-commands'):
|
||||
self.value_sources = data.get('populator-commands')
|
||||
|
||||
|
||||
class HelpExample(object): #pylint: disable=too-few-public-methods
|
||||
|
|
|
@ -192,7 +192,7 @@ class Profile(object):
|
|||
username_or_sp_id)
|
||||
|
||||
return BasicTokenAuthentication(
|
||||
{'access_token': access_token}), active_account[_SUBSCRIPTION_ID]
|
||||
{'access_token': access_token}), str(active_account[_SUBSCRIPTION_ID])
|
||||
|
||||
|
||||
class SubscriptionFinder(object):
|
||||
|
|
|
@ -232,11 +232,13 @@ Command
|
|||
|
||||
Arguments
|
||||
--foobar2 -fb2 [Required]: one line partial sentence
|
||||
paragraph(s)
|
||||
--foobar -fb : one line partial sentence
|
||||
text, markdown, etc.
|
||||
paragraph(s)
|
||||
|
||||
--foobar -fb : one line partial sentence
|
||||
text, markdown, etc.
|
||||
|
||||
Values from: az vm list, default
|
||||
|
||||
Values from: az vm list, default
|
||||
--foobar3 -fb3 : the foobar3
|
||||
--help -h : show this help message and exit
|
||||
'''
|
||||
|
@ -295,11 +297,13 @@ Command
|
|||
|
||||
Arguments
|
||||
--foobar2 -fb2 [Required]: one line partial sentence
|
||||
paragraph(s)
|
||||
--foobar -fb : one line partial sentence
|
||||
text, markdown, etc.
|
||||
paragraph(s)
|
||||
|
||||
--foobar -fb : one line partial sentence
|
||||
text, markdown, etc.
|
||||
|
||||
Values from: az vm list, default
|
||||
|
||||
Values from: az vm list, default
|
||||
--help -h : show this help message and exit
|
||||
Examples
|
||||
foo example
|
||||
|
|
|
@ -14,7 +14,7 @@ class DeploymentVNet(Model):
|
|||
Deployment operation parameters.
|
||||
|
||||
:param str uri: URI referencing the template. Default value:
|
||||
"https://azuretemplatehost.blob.core.windows.net/templatehost/CreateVNet/azuredeploy.json"
|
||||
"https://azuresdkci.blob.core.windows.net/templatehost/CreateVNet/azuredeploy.json"
|
||||
.
|
||||
:param str content_version: If included it must match the ContentVersion
|
||||
in the template.
|
||||
|
@ -52,7 +52,7 @@ class DeploymentVNet(Model):
|
|||
}
|
||||
|
||||
def __init__(self, content_version=None, deployment_parameter_virtual_network_prefix_value=None, deployment_parameter_subnet_prefix_value=None, deployment_parameter_virtual_network_name_value=None, deployment_parameter_subnet_name_value=None, deployment_parameter_location_value=None, **kwargs):
|
||||
self.uri = "https://azuretemplatehost.blob.core.windows.net/templatehost/CreateVNet/azuredeploy.json"
|
||||
self.uri = "https://azuresdkci.blob.core.windows.net/templatehost/CreateVNet/azuredeploy.json"
|
||||
self.content_version = content_version
|
||||
self.deployment_parameter_virtual_network_prefix_value = deployment_parameter_virtual_network_prefix_value
|
||||
self.deployment_parameter_subnet_prefix_value = deployment_parameter_subnet_prefix_value
|
||||
|
|
|
@ -14,7 +14,7 @@ class TemplateLink(Model):
|
|||
Entity representing the reference to the template.
|
||||
|
||||
:param str uri: URI referencing the template. Default value:
|
||||
"https://azuretemplatehost.blob.core.windows.net/templatehost/CreateVNet/azuredeploy.json"
|
||||
"https://azuresdkci.blob.core.windows.net/templatehost/CreateVNet/azuredeploy.json"
|
||||
.
|
||||
:param str content_version: If included it must match the ContentVersion
|
||||
in the template.
|
||||
|
@ -30,5 +30,5 @@ class TemplateLink(Model):
|
|||
}
|
||||
|
||||
def __init__(self, content_version=None, **kwargs):
|
||||
self.uri = "https://azuretemplatehost.blob.core.windows.net/templatehost/CreateVNet/azuredeploy.json"
|
||||
self.uri = "https://azuresdkci.blob.core.windows.net/templatehost/CreateVNet/azuredeploy.json"
|
||||
self.content_version = content_version
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
"type": "string",
|
||||
"description": "URI referencing the template.",
|
||||
"enum": [
|
||||
"https://azuretemplatehost.blob.core.windows.net/templatehost/CreateVNet/azuredeploy.json"
|
||||
"https://azuresdkci.blob.core.windows.net/templatehost/CreateVNet/azuredeploy.json"
|
||||
]
|
||||
},
|
||||
"contentVersion": {
|
||||
|
|
|
@ -63,6 +63,8 @@ def _update_progress(current, total):
|
|||
message += '{: >5.1f}'.format(percent_done)
|
||||
print('\b' * len(message) + message, end='', file=stderr)
|
||||
stderr.flush()
|
||||
if current == total:
|
||||
print('', file=stderr)
|
||||
|
||||
#### ACCOUNT COMMANDS #############################################################################
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import argparse
|
||||
import re
|
||||
from azure.mgmt.compute import ComputeManagementClient, ComputeManagementClientConfiguration
|
||||
from azure.mgmt.compute.operations import (AvailabilitySetsOperations,
|
||||
VirtualMachineExtensionImagesOperations,
|
||||
|
@ -13,6 +15,11 @@ from azure.cli.commands._command_creation import get_mgmt_service_client
|
|||
from azure.cli.commands._auto_command import build_operation, AutoCommandDefinition
|
||||
from azure.cli.commands import CommandTable, LongRunningOperation
|
||||
from azure.cli._locale import L
|
||||
from azure.cli.command_modules.vm.mgmt.lib import (VMCreationClient as VMClient,
|
||||
VMCreationClientConfiguration
|
||||
as VMClientConfig)
|
||||
from azure.cli.command_modules.vm.mgmt.lib.operations import VMOperations
|
||||
from azure.cli._help_files import helps
|
||||
|
||||
from ._params import PARAMETER_ALIASES
|
||||
from .custom import ConvenienceVmCommands
|
||||
|
@ -157,3 +164,101 @@ build_operation("vm",
|
|||
AutoCommandDefinition(ConvenienceVmCommands.list_ip_addresses, 'object'),
|
||||
],
|
||||
command_table, PARAMETER_ALIASES)
|
||||
|
||||
vm_param_aliases = {
|
||||
'name': {
|
||||
'name': '--name -n'
|
||||
},
|
||||
'os_disk_uri': {
|
||||
'name': '--os-disk-uri',
|
||||
'help': argparse.SUPPRESS
|
||||
},
|
||||
'os_offer': {
|
||||
'name': '--os_offer',
|
||||
'help': argparse.SUPPRESS
|
||||
},
|
||||
'os_publisher': {
|
||||
'name': '--os-publisher',
|
||||
'help': argparse.SUPPRESS
|
||||
},
|
||||
'os_sku': {
|
||||
'name': '--os-sku',
|
||||
'help': argparse.SUPPRESS
|
||||
},
|
||||
'os_type': {
|
||||
'name': '--os-type',
|
||||
'help': argparse.SUPPRESS
|
||||
},
|
||||
'os_version': {
|
||||
'name': '--os-version',
|
||||
'help': argparse.SUPPRESS
|
||||
},
|
||||
}
|
||||
|
||||
class VMImageFieldAction(argparse.Action): #pylint: disable=too-few-public-methods
|
||||
def __call__(self, parser, namespace, values, option_string=None):
|
||||
image = values
|
||||
match = re.match('([^:]*):([^:]*):([^:]*):([^:]*)', image)
|
||||
|
||||
if image.lower().endswith('.vhd'):
|
||||
namespace.os_disk_uri = image
|
||||
elif match:
|
||||
namespace.os_type = 'Custom'
|
||||
namespace.os_publisher = match.group(1)
|
||||
namespace.os_offer = match.group(2)
|
||||
namespace.os_sku = match.group(3)
|
||||
namespace.os_version = match.group(4)
|
||||
else:
|
||||
namespace.os_type = image
|
||||
|
||||
extra_parameters = [
|
||||
{
|
||||
'name': '--image',
|
||||
'help': 'The OS image. Supported values: Common OS (e.g. Win2012R2Datacenter), URN (e.g. "publisher:offer:sku:version"), or existing VHD URI.',
|
||||
'action': VMImageFieldAction
|
||||
}
|
||||
]
|
||||
|
||||
helps['vm create'] = """
|
||||
type: command
|
||||
short-summary: Create an Azure Virtual Machine
|
||||
long-summary: See https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-quick-create-cli/ for an end-to-end tutorial
|
||||
parameters:
|
||||
- name: --image
|
||||
type: string
|
||||
required: false
|
||||
short-summary: OS image
|
||||
long-summary: |
|
||||
Common OS types: CentOS, CoreOS, Debian, openSUSE, RHEL, SLES, UbuntuLTS,
|
||||
Win2012R2Datacenter, Win2012Datacenter, Win2008R2SP1
|
||||
Example URN: canonical:Ubuntu_Snappy_Core:15.04:2016.0318.1949
|
||||
Example URI: http://<storageAccount>.blob.core.windows.net/vhds/osdiskimage.vhd
|
||||
populator-commands:
|
||||
- az vm image list
|
||||
- az vm image show
|
||||
examples:
|
||||
- name: Create a simple Windows Server VM with private IP address
|
||||
text: >
|
||||
az vm create --image Win2012R2Datacenter --admin-username myadmin --admin-password Admin_001
|
||||
-l "West US" -g myvms --name myvm001
|
||||
- name: Create a Linux VM with SSH key authentication, add a public DNS entry and add to an existing Virtual Network and Availability Set.
|
||||
text: >
|
||||
az vm create --image canonical:Ubuntu_Snappy_Core:15.04:2016.0318.1949
|
||||
--admin-username myadmin --admin-password Admin_001 --authentication-type sshkey
|
||||
--virtual-network-type existing --virtual-network-name myvnet --subnet-name default
|
||||
--availability-set-type existing --availability-set-id myavailset
|
||||
--public-ip-address-type new --dns-name-for-public-ip myGloballyUniqueVmDnsName
|
||||
-l "West US" -g myvms --name myvm18o --ssh-key-value "<ssh-rsa-key>"
|
||||
"""
|
||||
|
||||
build_operation('vm',
|
||||
'vm',
|
||||
lambda _: get_mgmt_service_client(VMClient, VMClientConfig),
|
||||
[
|
||||
AutoCommandDefinition(VMOperations.create_or_update,
|
||||
LongRunningOperation(L('Creating virtual machine'), L('Virtual machine created')),
|
||||
'create')
|
||||
],
|
||||
command_table,
|
||||
vm_param_aliases,
|
||||
extra_parameters)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#pylint: skip-file
|
||||
import pkg_resources
|
||||
pkg_resources.declare_namespace(__name__)
|
|
@ -0,0 +1,471 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"_artifactsLocation": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "Container URI of the template."
|
||||
}
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine."
|
||||
}
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine."
|
||||
}
|
||||
},
|
||||
"authenticationType": {
|
||||
"type": "string",
|
||||
"defaultValue": "password",
|
||||
"allowedValues": [
|
||||
"password",
|
||||
"sshkey"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Authentication method: password-only or add ssh-keys (Linux-only)."
|
||||
}
|
||||
},
|
||||
"availabilitySetId": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "Existing availability set for the VM."
|
||||
}
|
||||
},
|
||||
"availabilitySetType": {
|
||||
"type": "string",
|
||||
"defaultValue": "none",
|
||||
"allowedValues": [
|
||||
"none",
|
||||
"existing"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Flag to add the VM to an existing availability set."
|
||||
}
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "Globally unique DNS Name for the Public IP used to access the Virtual Machine."
|
||||
}
|
||||
},
|
||||
"dnsNameType": {
|
||||
"type": "string",
|
||||
"defaultValue": "none",
|
||||
"allowedValues": [
|
||||
"none",
|
||||
"new"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Associate VMs with a public IP address to a DNS name (new or none)."
|
||||
}
|
||||
},
|
||||
"location": {
|
||||
"type": "string",
|
||||
"defaultValue": "[resourceGroup().location]",
|
||||
"metadata": {
|
||||
"description": "Location for VM resources."
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"metadata": {
|
||||
"description": "The VM resource name."
|
||||
}
|
||||
},
|
||||
"osDiskName": {
|
||||
"type": "string",
|
||||
"defaultValue": "osdiskimage",
|
||||
"metadata": {
|
||||
"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": {
|
||||
"type": "string",
|
||||
"defaultValue": "WindowsServer",
|
||||
"metadata": {
|
||||
"description": "The OS Offer to install."
|
||||
}
|
||||
},
|
||||
"osPublisher": {
|
||||
"type": "string",
|
||||
"defaultValue": "MicrosoftWindowsServer",
|
||||
"metadata": {
|
||||
"description": "The OS publisher of the OS image."
|
||||
}
|
||||
},
|
||||
"osSKU": {
|
||||
"type": "string",
|
||||
"defaultValue": "2012-R2-Datacenter",
|
||||
"metadata": {
|
||||
"description": "The OS SKU to install."
|
||||
}
|
||||
},
|
||||
"osType": {
|
||||
"type": "string",
|
||||
"defaultValue": "Win2012R2Datacenter",
|
||||
"allowedValues": [
|
||||
"CentOS",
|
||||
"CoreOS",
|
||||
"Debian",
|
||||
"openSUSE",
|
||||
"RHEL",
|
||||
"SLES",
|
||||
"UbuntuLTS",
|
||||
"Win2012R2Datacenter",
|
||||
"Win2012Datacenter",
|
||||
"Win2008R2SP1",
|
||||
"Custom"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Common OS choices. Choose 'Custom' to specify an image with the osPublisher, osOffer, osSKU, and osVersion parameters."
|
||||
}
|
||||
},
|
||||
"osVersion": {
|
||||
"type": "string",
|
||||
"defaultValue": "latest",
|
||||
"metadata": {
|
||||
"description": "The OS version to install."
|
||||
}
|
||||
},
|
||||
"privateIpAddressAllocation": {
|
||||
"type": "string",
|
||||
"defaultValue": "Dynamic",
|
||||
"allowedValues": [
|
||||
"Dynamic",
|
||||
"Static"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Dynamic of Static private IP address allocation."
|
||||
}
|
||||
},
|
||||
"publicIpAddressAllocation": {
|
||||
"type": "string",
|
||||
"defaultValue": "Dynamic",
|
||||
"allowedValues": [
|
||||
"Dynamic",
|
||||
"Static"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Dynamic or Static public IP address allocation."
|
||||
}
|
||||
},
|
||||
"publicIpAddressName": {
|
||||
"type": "string",
|
||||
"defaultValue": "[concat('PublicIP', parameters('name'))]",
|
||||
"metadata": {
|
||||
"description": "Name of public IP address to use."
|
||||
}
|
||||
},
|
||||
"publicIpAddressType": {
|
||||
"type": "string",
|
||||
"defaultValue": "none",
|
||||
"allowedValues": [
|
||||
"none",
|
||||
"new",
|
||||
"existing"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Use a public IP Address for the VM Nic. (new, existing or none)."
|
||||
}
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"defaultValue": "Standard_A2",
|
||||
"metadata": {
|
||||
"description": "The VM Size that should be created (e.g. Standard_A2)"
|
||||
}
|
||||
},
|
||||
"sshKeyPath": {
|
||||
"type": "string",
|
||||
"defaultValue": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]",
|
||||
"metadata": {
|
||||
"description": "VM file path for SSH key."
|
||||
}
|
||||
},
|
||||
"sshKeyValue": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "SSH key file data."
|
||||
}
|
||||
},
|
||||
"storageAccountName": {
|
||||
"type": "string",
|
||||
"defaultValue": "[concat('vhdstorage', uniqueString(parameters('name')))]",
|
||||
"metadata": {
|
||||
"description": "Name of storage account for the VM OS disk."
|
||||
}
|
||||
},
|
||||
"storageAccountType": {
|
||||
"type": "string",
|
||||
"defaultValue": "new",
|
||||
"allowedValues": [
|
||||
"new",
|
||||
"existing"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Whether to use an existing storage account or create a new one."
|
||||
}
|
||||
},
|
||||
"storageContainerName": {
|
||||
"type": "string",
|
||||
"defaultValue": "vhds",
|
||||
"metadata": {
|
||||
"description": "Name of storage container for the VM OS disk."
|
||||
}
|
||||
},
|
||||
"storageRedundancyType": {
|
||||
"type": "string",
|
||||
"defaultValue": "Standard_LRS",
|
||||
"metadata": {
|
||||
"description": "The VM storage type."
|
||||
}
|
||||
},
|
||||
"subnetIpAddressPrefix": {
|
||||
"type": "string",
|
||||
"defaultValue": "10.0.0.0/24",
|
||||
"metadata": {
|
||||
"description": "The subnet address type."
|
||||
}
|
||||
},
|
||||
"subnetName": {
|
||||
"type": "string",
|
||||
"defaultValue": "[concat('Subnet', parameters('name'))]",
|
||||
"metadata": {
|
||||
"description": "The subnet name."
|
||||
}
|
||||
},
|
||||
"virtualNetworkIpAddressPrefix": {
|
||||
"type": "string",
|
||||
"defaultValue": "10.0.0.0/16",
|
||||
"metadata": {
|
||||
"description": "The IP address prefix."
|
||||
}
|
||||
},
|
||||
"virtualNetworkName": {
|
||||
"type": "string",
|
||||
"defaultValue": "[concat('VNET', parameters('name'))]",
|
||||
"metadata": {
|
||||
"description": "Name of virtual network to add VM to."
|
||||
}
|
||||
},
|
||||
"virtualNetworkType": {
|
||||
"type": "string",
|
||||
"defaultValue": "new",
|
||||
"allowedValues": [
|
||||
"new",
|
||||
"existing"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Whether to use an existing VNet or create a new one."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"imagePublishers": {
|
||||
"CoreOS": "CoreOS",
|
||||
"Win2012R2Datacenter": "MicrosoftWindowsServer",
|
||||
"Win2012Datacenter": "MicrosoftWindowsServer",
|
||||
"Win2008R2SP1": "MicrosoftWindowsServer",
|
||||
"Debian": "credativ",
|
||||
"RHEL": "RedHat",
|
||||
"CentOS": "OpenLogic",
|
||||
"openSUSE": "SUSE",
|
||||
"UbuntuLTS": "Canonical",
|
||||
"SLES": "SUSE",
|
||||
"Custom": "[parameters('osPublisher')]"
|
||||
},
|
||||
"imageOffers": {
|
||||
"CoreOS": "CoreOS",
|
||||
"Win2012R2Datacenter": "WindowsServer",
|
||||
"Win2012Datacenter": "WindowsServer",
|
||||
"Win2008R2SP1": "WindowsServer",
|
||||
"Debian": "Debian",
|
||||
"RHEL": "RHEL",
|
||||
"CentOS": "CentOS",
|
||||
"openSUSE": "openSUSE",
|
||||
"UbuntuLTS": "UbuntuServer",
|
||||
"SLES": "SLES",
|
||||
"Custom": "[parameters('osOffer')]"
|
||||
},
|
||||
"imageSkus": {
|
||||
"CoreOS": "Stable",
|
||||
"Win2012R2Datacenter": "2012-R2-Datacenter",
|
||||
"Win2012Datacenter": "2012-Datacenter",
|
||||
"Win2008R2SP1": "2008-R2-SP1",
|
||||
"Debian": "8",
|
||||
"RHEL": "7.2",
|
||||
"CentOS": "7.2",
|
||||
"openSUSE": "13.2",
|
||||
"UbuntuLTS": "14.04.4-LTS",
|
||||
"SLES": "12-SP1",
|
||||
"Custom": "[parameters('osSKU')]"
|
||||
},
|
||||
"imageVersions": {
|
||||
"CoreOS": "latest",
|
||||
"Win2012R2Datacenter": "latest",
|
||||
"Win2012Datacenter": "latest",
|
||||
"Win2008R2SP1": "latest",
|
||||
"Debian": "latest",
|
||||
"RHEL": "latest",
|
||||
"CentOS": "latest",
|
||||
"openSUSE": "latest",
|
||||
"UbuntuLTS": "latest",
|
||||
"SLES": "latest",
|
||||
"Custom": "[parameters('osVersion')]"
|
||||
},
|
||||
"vnetDeploymentName": "[concat('VNet', variables('vmName'))]",
|
||||
"nicName": "[concat('VMNic', parameters('name'))]",
|
||||
"vnetAddressPrefix": "[parameters('virtualNetworkIpAddressPrefix')]",
|
||||
"subnetName": "[parameters('subnetName')]",
|
||||
"subnetAddressPrefix": "[parameters('subnetIpAddressPrefix')]",
|
||||
"vhdStorageType": "[parameters('storageRedundancyType')]",
|
||||
"publicIPName": "[parameters('publicIpAddressName')]",
|
||||
"publicIpAddressAllocation": "[parameters('publicIpAddressAllocation')]",
|
||||
"vhdStorageContainerName": "vhds",
|
||||
"vmName": "[parameters('name')]",
|
||||
"vmSize": "[parameters('size')]",
|
||||
"vmDeploymentName": "[concat('VM', variables('vmName'))]",
|
||||
"nicDeploymentName": "[concat('NicIp', variables('vmName'))]",
|
||||
"vnetName": "[parameters('virtualNetworkName')]",
|
||||
"vnetId": "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]",
|
||||
"subnetRef": "[concat(variables('vnetId'), '/subnets/', variables('subnetName'))]",
|
||||
"storageAccountTemplateFilePaths": {
|
||||
"new": "nested_templates/NewStorageAccount.json",
|
||||
"existing": "nested_templates/ExistingStorageAccount.json"
|
||||
},
|
||||
"storageDeploymentName": "[concat(parameters('storageAccountName'), variables('vmName'))]",
|
||||
"availSetId": "[resourceId('Microsoft.Compute/availabilitySets', parameters('availabilitySetId'))]",
|
||||
"vnetTemplateFilePaths": {
|
||||
"new": "nested_templates/NewVNet.json",
|
||||
"existing": "nested_templates/ExistingVNet.json"
|
||||
},
|
||||
"nicTemplateFilePaths": {
|
||||
"none": "[concat('/nested_templates/nic_ip_none_dns_', parameters('dnsNameType'), '.json')]",
|
||||
"new": "[concat('/nested_templates/nic_ip_new_dns_', parameters('dnsNameType'), '.json')]",
|
||||
"existing": "[concat('/nested_templates/nic_ip_existing_dns_', parameters('dnsNameType'), '.json')]"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[variables('storageDeploymentName')]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"apiVersion": "2015-01-01",
|
||||
"dependsOn": [ ],
|
||||
"properties": {
|
||||
"mode": "Incremental",
|
||||
"templateLink": {
|
||||
"uri": "[concat(parameters('_artifactsLocation'), '/', variables('storageAccountTemplateFilePaths')[parameters('storageAccountType')])]",
|
||||
"contentVersion": "1.0.0.0"
|
||||
},
|
||||
"parameters": {
|
||||
"storageAccountName": { "value": "[parameters('storageAccountName')]" },
|
||||
"location": { "value": "[parameters('location')]" },
|
||||
"vhdStorageType": { "value": "[variables('vhdStorageType')]" }
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('nicDeploymentName')]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"apiVersion": "2015-01-01",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Resources/deployments/', variables('vnetDeploymentName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"mode": "Incremental",
|
||||
"templateLink": {
|
||||
"uri": "[concat(parameters('_artifactsLocation'), variables('nicTemplateFilePaths')[parameters('publicIpAddressType')])]",
|
||||
"contentVersion": "1.0.0.0"
|
||||
},
|
||||
"parameters": {
|
||||
"location": { "value": "[parameters('location')]" },
|
||||
"dnsNameForPublicIP": { "value": "[parameters('dnsNameForPublicIP')]" },
|
||||
"virtualMachineName": { "value": "[parameters('name')]" },
|
||||
"publicIPAddressName": { "value": "[variables('publicIPName')]" },
|
||||
"publicIpAddressAllocation": { "value": "[variables('publicIpAddressAllocation')]" },
|
||||
"nicName": { "value": "[variables('nicName')]" },
|
||||
"subnetRef": { "value": "[variables('subnetRef')]" },
|
||||
"privateIpAllocation": { "value": "[parameters('privateIpAddressAllocation')]" }
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('vnetDeploymentName')]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"apiVersion": "2015-01-01",
|
||||
"dependsOn": [ ],
|
||||
"properties": {
|
||||
"mode": "Incremental",
|
||||
"templateLink": {
|
||||
"uri": "[concat(parameters('_artifactsLocation'), '/', variables('vnetTemplateFilePaths')[parameters('virtualNetworkType')])]",
|
||||
"contentVersion": "1.0.0.0"
|
||||
},
|
||||
"parameters": {
|
||||
"vnetName": { "value": "[variables('vnetName')]" },
|
||||
"vnetIpAddressType": { "value": "[parameters('publicIpAddressAllocation')]" },
|
||||
"vnetIpAddressPrefix": { "value": "[variables('vnetAddressPrefix')]" },
|
||||
"subnetIpAddressPrefix": { "value": "[variables('subnetAddressPrefix')]" },
|
||||
"subnetName": { "value": "[variables('subnetName')]" },
|
||||
"location": { "value": "[parameters('location')]" }
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "[variables('vmDeploymentName')]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"apiVersion": "2015-01-01",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Resources/deployments/', variables('storageDeploymentName'))]",
|
||||
"[concat('Microsoft.Resources/deployments/', variables('nicDeploymentName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"mode": "Incremental",
|
||||
"templateLink": {
|
||||
"uri": "[concat(parameters('_artifactsLocation'), '/nested_templates/vm_', parameters('availabilitySetType'), '_', parameters('authenticationType'), '.json')]",
|
||||
"contentVersion": "1.0.0.0"
|
||||
},
|
||||
"parameters": {
|
||||
"adminUsername": { "value": "[parameters('adminUsername')]" },
|
||||
"adminPassword": { "value": "[parameters('adminPassword')]" },
|
||||
"dnsNameForPublicIP": { "value": "[parameters('dnsNameForPublicIP')]" },
|
||||
"virtualMachineName": { "value": "[variables('vmName')]" },
|
||||
"osPublisher": { "value": "[variables('imagePublishers')[parameters('osType')]]" },
|
||||
"osOffer": { "value": "[variables('imageOffers')[parameters('osType')]]" },
|
||||
"osSKU": { "value": "[variables('imageSkus')[parameters('osType')]]" },
|
||||
"osVersion": { "value": "[variables('imageVersions')[parameters('osType')]]" },
|
||||
"size": { "value": "[variables('vmSize')]" },
|
||||
"storageType": { "value": "[variables('vhdStorageType')]" },
|
||||
"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')]" },
|
||||
"location": { "value": "[parameters('location')]" }
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from .vm_creation_client import VMCreationClient, VMCreationClientConfiguration
|
||||
from .version import VERSION
|
||||
|
||||
__all__ = [
|
||||
'VMCreationClient',
|
||||
'VMCreationClientConfiguration'
|
||||
]
|
||||
|
||||
__version__ = VERSION
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.authentication import (
|
||||
BasicAuthentication,
|
||||
BasicTokenAuthentication,
|
||||
OAuthTokenAuthentication)
|
||||
|
||||
from msrestazure.azure_active_directory import (
|
||||
InteractiveCredentials,
|
||||
ServicePrincipalCredentials,
|
||||
UserPassCredentials)
|
|
@ -0,0 +1,20 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.exceptions import (
|
||||
ClientException,
|
||||
SerializationError,
|
||||
DeserializationError,
|
||||
TokenExpiredError,
|
||||
ClientRequestError,
|
||||
AuthenticationError,
|
||||
HttpOperationError,
|
||||
ValidationError,
|
||||
)
|
||||
|
||||
from msrestazure.azure_exceptions import CloudError
|
|
@ -0,0 +1,35 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from .deployment_vm import DeploymentVM
|
||||
from .template_link import TemplateLink
|
||||
from .deployment_parameter_artifacts_location import DeploymentParameterArtifactsLocation
|
||||
from .parameters_link import ParametersLink
|
||||
from .provider_resource_type import ProviderResourceType
|
||||
from .provider import Provider
|
||||
from .basic_dependency import BasicDependency
|
||||
from .dependency import Dependency
|
||||
from .deployment_properties_extended import DeploymentPropertiesExtended
|
||||
from .deployment_extended import DeploymentExtended
|
||||
from .vm_creation_client_enums import (
|
||||
DeploymentMode,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
'DeploymentVM',
|
||||
'TemplateLink',
|
||||
'DeploymentParameterArtifactsLocation',
|
||||
'ParametersLink',
|
||||
'ProviderResourceType',
|
||||
'Provider',
|
||||
'BasicDependency',
|
||||
'Dependency',
|
||||
'DeploymentPropertiesExtended',
|
||||
'DeploymentExtended',
|
||||
'DeploymentMode',
|
||||
]
|
|
@ -0,0 +1,33 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class BasicDependency(Model):
|
||||
"""
|
||||
Deployment dependency information.
|
||||
|
||||
:param id: Gets or sets the ID of the dependency.
|
||||
:type id: str
|
||||
:param resource_type: Gets or sets the dependency resource type.
|
||||
:type resource_type: str
|
||||
:param resource_name: Gets or sets the dependency resource name.
|
||||
:type resource_name: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'id': {'key': 'id', 'type': 'str'},
|
||||
'resource_type': {'key': 'resourceType', 'type': 'str'},
|
||||
'resource_name': {'key': 'resourceName', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, id=None, resource_type=None, resource_name=None):
|
||||
self.id = id
|
||||
self.resource_type = resource_type
|
||||
self.resource_name = resource_name
|
|
@ -0,0 +1,38 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class Dependency(Model):
|
||||
"""
|
||||
Deployment dependency information.
|
||||
|
||||
:param depends_on: Gets the list of dependencies.
|
||||
:type depends_on: list of :class:`BasicDependency
|
||||
<mynamespace.models.BasicDependency>`
|
||||
:param id: Gets or sets the ID of the dependency.
|
||||
:type id: str
|
||||
:param resource_type: Gets or sets the dependency resource type.
|
||||
:type resource_type: str
|
||||
:param resource_name: Gets or sets the dependency resource name.
|
||||
:type resource_name: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'depends_on': {'key': 'dependsOn', 'type': '[BasicDependency]'},
|
||||
'id': {'key': 'id', 'type': 'str'},
|
||||
'resource_type': {'key': 'resourceType', 'type': 'str'},
|
||||
'resource_name': {'key': 'resourceName', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, depends_on=None, id=None, resource_type=None, resource_name=None):
|
||||
self.depends_on = depends_on
|
||||
self.id = id
|
||||
self.resource_type = resource_type
|
||||
self.resource_name = resource_name
|
|
@ -0,0 +1,38 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class DeploymentExtended(Model):
|
||||
"""
|
||||
Deployment information.
|
||||
|
||||
:param id: Gets or sets the ID of the deployment.
|
||||
:type id: str
|
||||
:param name: Gets or sets the name of the deployment.
|
||||
:type name: str
|
||||
:param properties: Gets or sets deployment properties.
|
||||
:type properties: :class:`DeploymentPropertiesExtended
|
||||
<mynamespace.models.DeploymentPropertiesExtended>`
|
||||
"""
|
||||
|
||||
_validation = {
|
||||
'name': {'required': True},
|
||||
}
|
||||
|
||||
_attribute_map = {
|
||||
'id': {'key': 'id', 'type': 'str'},
|
||||
'name': {'key': 'name', 'type': 'str'},
|
||||
'properties': {'key': 'properties', 'type': 'DeploymentPropertiesExtended'},
|
||||
}
|
||||
|
||||
def __init__(self, name, id=None, properties=None):
|
||||
self.id = id
|
||||
self.name = name
|
||||
self.properties = properties
|
|
@ -0,0 +1,31 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class DeploymentParameterArtifactsLocation(Model):
|
||||
"""DeploymentParameterArtifactsLocation
|
||||
|
||||
Variables are only populated by the server, and will be ignored when
|
||||
sending a request.
|
||||
|
||||
:ivar value: Container URI of of the template. Default value:
|
||||
"https://azuresdkci.blob.core.windows.net/templatehost/CreateVM" .
|
||||
:vartype value: str
|
||||
"""
|
||||
|
||||
_validation = {
|
||||
'value': {'required': True, 'constant': True},
|
||||
}
|
||||
|
||||
_attribute_map = {
|
||||
'value': {'key': 'value', 'type': 'str'},
|
||||
}
|
||||
|
||||
value = "https://azuresdkci.blob.core.windows.net/templatehost/CreateVM"
|
|
@ -0,0 +1,24 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class DeploymentParameterVirtualNetworkIpAddressPrefix(Model):
|
||||
"""DeploymentParameterVirtualNetworkIpAddressPrefix
|
||||
|
||||
:param vnet_ip_address_prefix: IP address prefixe for the virtual network.
|
||||
:type vnet_ip_address_prefix: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'vnet_ip_address_prefix': {'key': 'value', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, vnet_ip_address_prefix=None):
|
||||
self.vnet_ip_address_prefix = vnet_ip_address_prefix
|
|
@ -0,0 +1,75 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class DeploymentPropertiesExtended(Model):
|
||||
"""
|
||||
Deployment properties with additional details.
|
||||
|
||||
:param provisioning_state: Gets or sets the state of the provisioning.
|
||||
:type provisioning_state: str
|
||||
:param correlation_id: Gets or sets the correlation ID of the deployment.
|
||||
:type correlation_id: str
|
||||
:param timestamp: Gets or sets the timestamp of the template deployment.
|
||||
:type timestamp: datetime
|
||||
:param outputs: Gets or sets key/value pairs that represent
|
||||
deploymentoutput.
|
||||
:type outputs: object
|
||||
:param providers: Gets the list of resource providers needed for the
|
||||
deployment.
|
||||
:type providers: list of :class:`Provider <mynamespace.models.Provider>`
|
||||
:param dependencies: Gets the list of deployment dependencies.
|
||||
:type dependencies: list of :class:`Dependency
|
||||
<mynamespace.models.Dependency>`
|
||||
:param template: Gets or sets the template content. Use only one of
|
||||
Template or TemplateLink.
|
||||
:type template: object
|
||||
:param template_link: Gets or sets the URI referencing the template. Use
|
||||
only one of Template or TemplateLink.
|
||||
:type template_link: :class:`TemplateLink
|
||||
<mynamespace.models.TemplateLink>`
|
||||
:param parameters: Deployment parameters. Use only one of Parameters or
|
||||
ParametersLink.
|
||||
:type parameters: object
|
||||
:param parameters_link: Gets or sets the URI referencing the parameters.
|
||||
Use only one of Parameters or ParametersLink.
|
||||
:type parameters_link: :class:`ParametersLink
|
||||
<mynamespace.models.ParametersLink>`
|
||||
:param mode: Gets or sets the deployment mode. Possible values include:
|
||||
'Incremental', 'Complete'
|
||||
:type mode: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
|
||||
'correlation_id': {'key': 'correlationId', 'type': 'str'},
|
||||
'timestamp': {'key': 'timestamp', 'type': 'iso-8601'},
|
||||
'outputs': {'key': 'outputs', 'type': 'object'},
|
||||
'providers': {'key': 'providers', 'type': '[Provider]'},
|
||||
'dependencies': {'key': 'dependencies', 'type': '[Dependency]'},
|
||||
'template': {'key': 'template', 'type': 'object'},
|
||||
'template_link': {'key': 'TemplateLink', 'type': 'TemplateLink'},
|
||||
'parameters': {'key': 'parameters', 'type': 'object'},
|
||||
'parameters_link': {'key': 'parametersLink', 'type': 'ParametersLink'},
|
||||
'mode': {'key': 'mode', 'type': 'DeploymentMode'},
|
||||
}
|
||||
|
||||
def __init__(self, provisioning_state=None, correlation_id=None, timestamp=None, outputs=None, providers=None, dependencies=None, template=None, template_link=None, parameters=None, parameters_link=None, mode=None):
|
||||
self.provisioning_state = provisioning_state
|
||||
self.correlation_id = correlation_id
|
||||
self.timestamp = timestamp
|
||||
self.outputs = outputs
|
||||
self.providers = providers
|
||||
self.dependencies = dependencies
|
||||
self.template = template
|
||||
self.template_link = template_link
|
||||
self.parameters = parameters
|
||||
self.parameters_link = parameters_link
|
||||
self.mode = mode
|
|
@ -0,0 +1,197 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from .deployment_parameter_artifacts_location import DeploymentParameterArtifactsLocation
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class DeploymentVM(Model):
|
||||
"""
|
||||
Deployment operation parameters.
|
||||
|
||||
Variables are only populated by the server, and will be ignored when
|
||||
sending a request.
|
||||
|
||||
:ivar uri: URI referencing the template. Default value:
|
||||
"https://azuresdkci.blob.core.windows.net/templatehost/CreateVM/azuredeploy.json"
|
||||
.
|
||||
:vartype uri: str
|
||||
:param content_version: If included it must match the ContentVersion in
|
||||
the template.
|
||||
:type content_version: 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 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 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
|
||||
:ivar _artifacts_location:
|
||||
:vartype _artifacts_location:
|
||||
:class:`DeploymentParameterArtifactsLocation <mynamespace.models.DeploymentParameterArtifactsLocation>`
|
||||
: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 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 (e.g. Standard_A2)
|
||||
: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
|
||||
"""
|
||||
|
||||
_validation = {
|
||||
'uri': {'required': True, 'constant': True},
|
||||
'_artifacts_location': {'constant': 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_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'},
|
||||
'private_ip_address_allocation': {'key': 'properties.parameters.privateIpAddressAllocation.value', 'type': 'str'},
|
||||
'dns_name_for_public_ip': {'key': 'properties.parameters.dnsNameForPublicIP.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', 'type': 'DeploymentParameterArtifactsLocation'},
|
||||
'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'},
|
||||
}
|
||||
|
||||
uri = "https://azuresdkci.blob.core.windows.net/templatehost/CreateVM/azuredeploy.json"
|
||||
|
||||
_artifacts_location = DeploymentParameterArtifactsLocation()
|
||||
|
||||
mode = "Incremental"
|
||||
|
||||
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, 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_container_name = storage_container_name
|
||||
self.virtual_network_name = virtual_network_name
|
||||
self.subnet_ip_address_prefix = subnet_ip_address_prefix
|
||||
self.private_ip_address_allocation = private_ip_address_allocation
|
||||
self.dns_name_for_public_ip = dns_name_for_public_ip
|
||||
self.storage_account_type = storage_account_type
|
||||
self.os_disk_uri = os_disk_uri
|
||||
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
|
|
@ -0,0 +1,34 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class ParametersLink(Model):
|
||||
"""
|
||||
Entity representing the reference to the deployment paramaters.
|
||||
|
||||
:param uri: URI referencing the template.
|
||||
:type uri: str
|
||||
:param content_version: If included it must match the ContentVersion in
|
||||
the template.
|
||||
:type content_version: str
|
||||
"""
|
||||
|
||||
_validation = {
|
||||
'uri': {'required': True},
|
||||
}
|
||||
|
||||
_attribute_map = {
|
||||
'uri': {'key': 'uri', 'type': 'str'},
|
||||
'content_version': {'key': 'contentVersion', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, uri, content_version=None):
|
||||
self.uri = uri
|
||||
self.content_version = content_version
|
|
@ -0,0 +1,40 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class Provider(Model):
|
||||
"""
|
||||
Resource provider information.
|
||||
|
||||
:param id: Gets or sets the provider id.
|
||||
:type id: str
|
||||
:param namespace: Gets or sets the namespace of the provider.
|
||||
:type namespace: str
|
||||
:param registration_state: Gets or sets the registration state of the
|
||||
provider.
|
||||
:type registration_state: str
|
||||
:param resource_types: Gets or sets the collection of provider resource
|
||||
types.
|
||||
:type resource_types: list of :class:`ProviderResourceType
|
||||
<mynamespace.models.ProviderResourceType>`
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'id': {'key': 'id', 'type': 'str'},
|
||||
'namespace': {'key': 'namespace', 'type': 'str'},
|
||||
'registration_state': {'key': 'registrationState', 'type': 'str'},
|
||||
'resource_types': {'key': 'resourceTypes', 'type': '[ProviderResourceType]'},
|
||||
}
|
||||
|
||||
def __init__(self, id=None, namespace=None, registration_state=None, resource_types=None):
|
||||
self.id = id
|
||||
self.namespace = namespace
|
||||
self.registration_state = registration_state
|
||||
self.resource_types = resource_types
|
|
@ -0,0 +1,38 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class ProviderResourceType(Model):
|
||||
"""
|
||||
Resource type managed by the resource provider.
|
||||
|
||||
:param resource_type: Gets or sets the resource type.
|
||||
:type resource_type: str
|
||||
:param locations: Gets or sets the collection of locations where this
|
||||
resource type can be created in.
|
||||
:type locations: list of str
|
||||
:param api_versions: Gets or sets the api version.
|
||||
:type api_versions: list of str
|
||||
:param properties: Gets or sets the properties.
|
||||
:type properties: dict
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'resource_type': {'key': 'resourceType', 'type': 'str'},
|
||||
'locations': {'key': 'locations', 'type': '[str]'},
|
||||
'api_versions': {'key': 'apiVersions', 'type': '[str]'},
|
||||
'properties': {'key': 'properties', 'type': '{str}'},
|
||||
}
|
||||
|
||||
def __init__(self, resource_type=None, locations=None, api_versions=None, properties=None):
|
||||
self.resource_type = resource_type
|
||||
self.locations = locations
|
||||
self.api_versions = api_versions
|
||||
self.properties = properties
|
|
@ -0,0 +1,40 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class TemplateLink(Model):
|
||||
"""
|
||||
Entity representing the reference to the template.
|
||||
|
||||
Variables are only populated by the server, and will be ignored when
|
||||
sending a request.
|
||||
|
||||
:ivar uri: URI referencing the template. Default value:
|
||||
"https://azuresdkci.blob.core.windows.net/templatehost/CreateVM/azuredeploy.json"
|
||||
.
|
||||
:vartype uri: str
|
||||
:param content_version: If included it must match the ContentVersion in
|
||||
the template.
|
||||
:type content_version: str
|
||||
"""
|
||||
|
||||
_validation = {
|
||||
'uri': {'required': True, 'constant': True},
|
||||
}
|
||||
|
||||
_attribute_map = {
|
||||
'uri': {'key': 'uri', 'type': 'str'},
|
||||
'content_version': {'key': 'contentVersion', 'type': 'str'},
|
||||
}
|
||||
|
||||
uri = "https://azuresdkci.blob.core.windows.net/templatehost/CreateVM/azuredeploy.json"
|
||||
|
||||
def __init__(self, content_version=None):
|
||||
self.content_version = content_version
|
|
@ -0,0 +1,15 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class DeploymentMode(Enum):
|
||||
|
||||
incremental = "Incremental"
|
||||
complete = "Complete"
|
|
@ -0,0 +1,13 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from .vm_operations import VMOperations
|
||||
|
||||
__all__ = [
|
||||
'VMOperations',
|
||||
]
|
|
@ -0,0 +1,204 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.pipeline import ClientRawResponse
|
||||
from msrestazure.azure_exceptions import CloudError
|
||||
from msrestazure.azure_operation import AzureOperationPoller
|
||||
import uuid
|
||||
|
||||
from .. import models
|
||||
|
||||
|
||||
class VMOperations(object):
|
||||
"""VMOperations operations.
|
||||
|
||||
:param client: Client for service requests.
|
||||
:param config: Configuration of service client.
|
||||
:param serializer: An object model serializer.
|
||||
:param deserializer: An objec model deserializer.
|
||||
"""
|
||||
|
||||
def __init__(self, client, config, serializer, deserializer):
|
||||
|
||||
self._client = client
|
||||
self._serialize = serializer
|
||||
self._deserialize = deserializer
|
||||
|
||||
self.config = config
|
||||
|
||||
def create_or_update(
|
||||
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, 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.
|
||||
|
||||
:param resource_group_name: The name of the resource group. The name
|
||||
is case insensitive.
|
||||
:type resource_group_name: str
|
||||
:param deployment_name: The name of the deployment.
|
||||
:type deployment_name: 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_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 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 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 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 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 (e.g. Standard_A2)
|
||||
: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
|
||||
:rtype:
|
||||
:class:`AzureOperationPoller<msrestazure.azure_operation.AzureOperationPoller>`
|
||||
instance that returns :class:`DeploymentExtended
|
||||
<mynamespace.models.DeploymentExtended>`
|
||||
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
|
||||
if raw=true
|
||||
"""
|
||||
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, 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}'
|
||||
path_format_arguments = {
|
||||
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=1, pattern='^[-\w\._]+$'),
|
||||
'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern='^[-\w\._]+$'),
|
||||
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
|
||||
}
|
||||
url = self._client.format_url(url, **path_format_arguments)
|
||||
|
||||
# Construct parameters
|
||||
query_parameters = {}
|
||||
query_parameters['api-version'] = self._serialize.query("self.config.api_version", self.config.api_version, 'str')
|
||||
|
||||
# Construct headers
|
||||
header_parameters = {}
|
||||
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
|
||||
if self.config.generate_client_request_id:
|
||||
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
|
||||
if custom_headers:
|
||||
header_parameters.update(custom_headers)
|
||||
if self.config.accept_language is not None:
|
||||
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
|
||||
|
||||
# Construct body
|
||||
body_content = self._serialize.body(parameters, 'DeploymentVM')
|
||||
|
||||
# Construct and send request
|
||||
def long_running_send():
|
||||
|
||||
request = self._client.put(url, query_parameters)
|
||||
return self._client.send(
|
||||
request, header_parameters, body_content, **operation_config)
|
||||
|
||||
def get_long_running_status(status_link, headers={}):
|
||||
|
||||
request = self._client.get(status_link)
|
||||
request.headers.update(headers)
|
||||
return self._client.send(
|
||||
request, header_parameters, **operation_config)
|
||||
|
||||
def get_long_running_output(response):
|
||||
|
||||
if response.status_code not in [200, 201]:
|
||||
exp = CloudError(response)
|
||||
exp.request_id = response.headers.get('x-ms-request-id')
|
||||
raise exp
|
||||
|
||||
deserialized = None
|
||||
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('DeploymentExtended', response)
|
||||
if response.status_code == 201:
|
||||
deserialized = self._deserialize('DeploymentExtended', response)
|
||||
|
||||
if raw:
|
||||
client_raw_response = ClientRawResponse(deserialized, response)
|
||||
return client_raw_response
|
||||
|
||||
return deserialized
|
||||
|
||||
if raw:
|
||||
response = long_running_send()
|
||||
return get_long_running_output(response)
|
||||
|
||||
long_running_operation_timeout = operation_config.get(
|
||||
'long_running_operation_timeout',
|
||||
self.config.long_running_operation_timeout)
|
||||
return AzureOperationPoller(
|
||||
long_running_send, get_long_running_output,
|
||||
get_long_running_status, long_running_operation_timeout)
|
|
@ -0,0 +1,10 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
VERSION = "2015-11-01"
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
#pylint: skip-file
|
||||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.service_client import ServiceClient
|
||||
from msrest import Serializer, Deserializer
|
||||
from msrestazure import AzureConfiguration
|
||||
from .version import VERSION
|
||||
from .operations.vm_operations import VMOperations
|
||||
from . import models
|
||||
|
||||
|
||||
class VMCreationClientConfiguration(AzureConfiguration):
|
||||
"""Configuration for VMCreationClient
|
||||
Note that all parameters used to create this instance are saved as instance
|
||||
attributes.
|
||||
|
||||
:param credentials: Gets Azure subscription credentials.
|
||||
:type credentials: :mod:`A msrestazure Credentials
|
||||
object<msrestazure.azure_active_directory>`
|
||||
:param subscription_id: Gets subscription credentials which uniquely
|
||||
identify Microsoft Azure subscription. The subscription ID forms part of
|
||||
the URI for every service call.
|
||||
:type subscription_id: str
|
||||
:param api_version: Client Api Version.
|
||||
:type api_version: str
|
||||
:param accept_language: Gets or sets the preferred language for the
|
||||
response.
|
||||
:type accept_language: str
|
||||
:param long_running_operation_retry_timeout: Gets or sets the retry
|
||||
timeout in seconds for Long Running Operations. Default value is 30.
|
||||
:type long_running_operation_retry_timeout: int
|
||||
:param generate_client_request_id: When set to true a unique
|
||||
x-ms-client-request-id value is generated and included in each request.
|
||||
Default is true.
|
||||
:type generate_client_request_id: bool
|
||||
:param str base_url: Service URL
|
||||
:param str filepath: Existing config
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self, credentials, subscription_id, api_version='2015-11-01', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):
|
||||
|
||||
if credentials is None:
|
||||
raise ValueError("Parameter 'credentials' must not be None.")
|
||||
if subscription_id is None:
|
||||
raise ValueError("Parameter 'subscription_id' must not be None.")
|
||||
if not isinstance(subscription_id, str):
|
||||
raise TypeError("Parameter 'subscription_id' must be str.")
|
||||
if api_version is not None and not isinstance(api_version, str):
|
||||
raise TypeError("Optional parameter 'api_version' must be str.")
|
||||
if accept_language is not None and not isinstance(accept_language, str):
|
||||
raise TypeError("Optional parameter 'accept_language' must be str.")
|
||||
if not base_url:
|
||||
base_url = 'https://management.azure.com'
|
||||
|
||||
super(VMCreationClientConfiguration, self).__init__(base_url, filepath)
|
||||
|
||||
self.add_user_agent('vmcreationclient/{}'.format(VERSION))
|
||||
self.add_user_agent('Azure-SDK-For-Python')
|
||||
|
||||
self.credentials = credentials
|
||||
self.subscription_id = subscription_id
|
||||
self.api_version = api_version
|
||||
self.accept_language = accept_language
|
||||
self.long_running_operation_retry_timeout = long_running_operation_retry_timeout
|
||||
self.generate_client_request_id = generate_client_request_id
|
||||
|
||||
|
||||
class VMCreationClient(object):
|
||||
"""VMCreationClient
|
||||
|
||||
:param config: Configuration for client.
|
||||
:type config: VMCreationClientConfiguration
|
||||
|
||||
:ivar vm: VM operations
|
||||
:vartype vm: .operations.VMOperations
|
||||
"""
|
||||
|
||||
def __init__(self, config):
|
||||
|
||||
self._client = ServiceClient(config.credentials, config)
|
||||
|
||||
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
|
||||
self._serialize = Serializer()
|
||||
self._deserialize = Deserializer(client_models)
|
||||
|
||||
self.config = config
|
||||
self.vm = VMOperations(
|
||||
self._client, self.config, self._serialize, self._deserialize)
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"storageAccountName": {
|
||||
"type": "string"
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"vhdStorageType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
|
||||
},
|
||||
"resources": [
|
||||
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"vnetName": {
|
||||
"type": "string"
|
||||
},
|
||||
"vnetIpAddressType": {
|
||||
"type": "string"
|
||||
},
|
||||
"vnetIpAddressPrefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"subnetIpAddressPrefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"subnetName": {
|
||||
"type": "string"
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
},
|
||||
"resources": [
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"storageAccountName": {
|
||||
"type": "string"
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"vhdStorageType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[parameters('storageAccountName')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"location": "[parameters('location')]",
|
||||
"tags": {
|
||||
"displayName": "StorageAccount"
|
||||
},
|
||||
"properties": {
|
||||
"accountType": "[parameters('vhdStorageType')]"
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"vnetName": {
|
||||
"type": "string"
|
||||
},
|
||||
"vnetIpAddressType": {
|
||||
"type": "string"
|
||||
},
|
||||
"vnetIpAddressPrefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"subnetIpAddressPrefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"subnetName": {
|
||||
"type": "string"
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"NewVNetName": "[parameters('vnetName')]",
|
||||
"NewVNetPrefix": "[parameters('vnetIpAddressPrefix')]",
|
||||
"NewVNetSubnet1Name": "[parameters('subnetName')]",
|
||||
"NewVNetSubnet1Prefix": "[parameters('subnetIpAddressPrefix')]",
|
||||
"NewVNetIpAddressType": "[parameters('vnetIpAddressType')]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"name": "[variables('NewVNetName')]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"location": "[parameters('location')]",
|
||||
"apiVersion": "2015-06-15",
|
||||
"dependsOn": [ ],
|
||||
"tags": {
|
||||
"displayName": "NewVNet"
|
||||
},
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('NewVNetPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('NewVNetSubnet1Name')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('NewVNetSubnet1Prefix')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"type": "string"
|
||||
},
|
||||
"VirtualMachineName": {
|
||||
"type": "string"
|
||||
},
|
||||
"publicIPAddressName": {
|
||||
"type": "string"
|
||||
},
|
||||
"publicIpAddressAllocation": {
|
||||
"type": "string"
|
||||
},
|
||||
"nicName": {
|
||||
"type": "string"
|
||||
},
|
||||
"subnetRef": {
|
||||
"type": "string"
|
||||
},
|
||||
"privateIpAllocation": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[parameters('nicName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"tags": {
|
||||
"displayName": "NetworkInterface"
|
||||
},
|
||||
"dependsOn": [ ],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "[concat('ipconfig', parameters('VirtualMachineName'))]",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "[parameters('privateIpAllocation')]",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[parameters('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"type": "string"
|
||||
},
|
||||
"VirtualMachineName": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
"publicIPAddressName": {
|
||||
"type": "string"
|
||||
},
|
||||
"publicIpAddressAllocation": {
|
||||
"type": "string"
|
||||
},
|
||||
"nicName": {
|
||||
"type": "string"
|
||||
},
|
||||
"subnetRef": {
|
||||
"type": "string"
|
||||
},
|
||||
"privateIpAllocation": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[parameters('publicIPAddressName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"tags": {
|
||||
"displayName": "PublicIPAddress"
|
||||
},
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[parameters('publicIpAddressAllocation')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[parameters('dnsNameForPublicIP')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[parameters('nicName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"tags": {
|
||||
"displayName": "NetworkInterface"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPAddressName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "[concat('ipconfig', parameters('VirtualMachineName'))]",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "[parameters('privateIpAllocation')]",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[parameters('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
"VMNic": {
|
||||
"type": "object",
|
||||
"value": "[reference(parameters('nicName'))]"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"type": "string"
|
||||
},
|
||||
"VirtualMachineName": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
"publicIPAddressName": {
|
||||
"type": "string"
|
||||
},
|
||||
"publicIpAddressAllocation": {
|
||||
"type": "string"
|
||||
},
|
||||
"nicName": {
|
||||
"type": "string"
|
||||
},
|
||||
"subnetRef": {
|
||||
"type": "string"
|
||||
},
|
||||
"privateIpAllocation": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[parameters('publicIPAddressName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"tags": {
|
||||
"displayName": "PublicIPAddress"
|
||||
},
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[parameters('publicIpAddressAllocation')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[parameters('nicName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"tags": {
|
||||
"displayName": "NetworkInterface"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPAddressName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "[concat('ipconfig', parameters('VirtualMachineName'))]",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "[parameters('privateIpAllocation')]",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[parameters('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"type": "string"
|
||||
},
|
||||
"VirtualMachineName": {
|
||||
"type": "string"
|
||||
},
|
||||
"publicIPAddressName": {
|
||||
"type": "string"
|
||||
},
|
||||
"publicIpAddressAllocation": {
|
||||
"type": "string"
|
||||
},
|
||||
"nicName": {
|
||||
"type": "string"
|
||||
},
|
||||
"subnetRef": {
|
||||
"type": "string"
|
||||
},
|
||||
"privateIpAllocation": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[parameters('nicName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"tags": {
|
||||
"displayName": "NetworkInterface"
|
||||
},
|
||||
"dependsOn": [ ],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "[concat('ipconfig', parameters('VirtualMachineName'))]",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "[parameters('privateIpAllocation')]",
|
||||
"subnet": {
|
||||
"id": "[parameters('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring"
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"type": "string"
|
||||
},
|
||||
"virtualMachineName": {
|
||||
"type": "string"
|
||||
},
|
||||
"osPublisher": {
|
||||
"type": "string"
|
||||
},
|
||||
"osOffer": {
|
||||
"type": "string"
|
||||
},
|
||||
"osSKU": {
|
||||
"type": "string"
|
||||
},
|
||||
"osVersion": {
|
||||
"type": "string"
|
||||
},
|
||||
"size": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageAccountName": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageContainerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"osDiskName": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageType": {
|
||||
"type": "string"
|
||||
},
|
||||
"sshKeyValue": {
|
||||
"type": "string",
|
||||
"defaultValue": ""
|
||||
},
|
||||
"sshKeyPath": {
|
||||
"type": "string",
|
||||
"defaultValue": ""
|
||||
},
|
||||
"availabilitySetId": {
|
||||
"type": "string"
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"osDiskUri": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"imagePublisher": "[parameters('osPublisher')]",
|
||||
"imageOffer": "[parameters('osOffer')]",
|
||||
"imageSku": "[parameters('osSKU')]",
|
||||
"imageVersion": "[parameters('osVersion')]",
|
||||
"OSDiskName": "[parameters('osDiskName')]",
|
||||
"vmName": "[parameters('virtualMachineName')]",
|
||||
"vmSize": "[parameters('size')]",
|
||||
"vhdStorageName": "[parameters('storageAccountName')]",
|
||||
"vhdStorageType": "[parameters('storageType')]",
|
||||
"vhdStorageContainerName": "[parameters('storageContainerName')]",
|
||||
"nicName": "[concat('VMNic', parameters('VirtualMachineName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"tags": {
|
||||
"displayName": "VirtualMachine"
|
||||
},
|
||||
"dependsOn": [ ],
|
||||
"properties": {
|
||||
"availabilitySet": {
|
||||
"id": "[parameters('availabilitySetId')]"
|
||||
},
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('imageSku')]",
|
||||
"version": "[variables('imageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "[concat('osdisk', parameters('virtualMachineName'))]",
|
||||
"vhd": {
|
||||
"uri": "[parameters('osDiskUri')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring"
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"type": "string"
|
||||
},
|
||||
"virtualMachineName": {
|
||||
"type": "string"
|
||||
},
|
||||
"osPublisher": {
|
||||
"type": "string"
|
||||
},
|
||||
"osOffer": {
|
||||
"type": "string"
|
||||
},
|
||||
"osSKU": {
|
||||
"type": "string"
|
||||
},
|
||||
"osVersion": {
|
||||
"type": "string"
|
||||
},
|
||||
"size": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageAccountName": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageContainerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"osDiskName": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageType": {
|
||||
"type": "string"
|
||||
},
|
||||
"sshKeyValue": {
|
||||
"type": "string"
|
||||
},
|
||||
"sshKeyPath": {
|
||||
"type": "string"
|
||||
},
|
||||
"availabilitySetId": {
|
||||
"type": "string"
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"osDiskUri": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"imagePublisher": "[parameters('osPublisher')]",
|
||||
"imageOffer": "[parameters('osOffer')]",
|
||||
"imageSku": "[parameters('osSKU')]",
|
||||
"imageVersion": "[parameters('osVersion')]",
|
||||
"OSDiskName": "[parameters('osDiskName')]",
|
||||
"vmName": "[parameters('virtualMachineName')]",
|
||||
"vmSize": "[parameters('size')]",
|
||||
"vhdStorageName": "[parameters('storageAccountName')]",
|
||||
"vhdStorageType": "[parameters('storageType')]",
|
||||
"vhdStorageContainerName": "[parameters('storageContainerName')]",
|
||||
"nicName": "[concat('VMNic', parameters('VirtualMachineName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"tags": {
|
||||
"displayName": "VirtualMachine"
|
||||
},
|
||||
"dependsOn": [ ],
|
||||
"properties": {
|
||||
"availabilitySet": {
|
||||
"id": "[parameters('availabilitySetId')]"
|
||||
},
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]",
|
||||
"linuxConfiguration": {
|
||||
"disablePasswordAuthentication": true,
|
||||
"ssh": {
|
||||
"publicKeys": [
|
||||
{
|
||||
"keyData": "[parameters('sshKeyValue')]",
|
||||
"path": "[parameters('sshKeyPath')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('imageSku')]",
|
||||
"version": "[variables('imageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "[concat('osdisk', parameters('virtualMachineName'))]",
|
||||
"vhd": {
|
||||
"uri": "[parameters('osDiskUri')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,126 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring"
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"type": "string"
|
||||
},
|
||||
"virtualMachineName": {
|
||||
"type": "string"
|
||||
},
|
||||
"osPublisher": {
|
||||
"type": "string"
|
||||
},
|
||||
"osOffer": {
|
||||
"type": "string"
|
||||
},
|
||||
"osSKU": {
|
||||
"type": "string"
|
||||
},
|
||||
"osVersion": {
|
||||
"type": "string"
|
||||
},
|
||||
"size": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageAccountName": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageContainerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"osDiskName": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageType": {
|
||||
"type": "string"
|
||||
},
|
||||
"sshKeyValue": {
|
||||
"type": "string",
|
||||
"defaultValue": ""
|
||||
},
|
||||
"sshKeyPath": {
|
||||
"type": "string",
|
||||
"defaultValue": ""
|
||||
},
|
||||
"availabilitySetId": {
|
||||
"type": "string",
|
||||
"defaultValue": ""
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"osDiskUri": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"imagePublisher": "[parameters('osPublisher')]",
|
||||
"imageOffer": "[parameters('osOffer')]",
|
||||
"imageSku": "[parameters('osSKU')]",
|
||||
"imageVersion": "[parameters('osVersion')]",
|
||||
"OSDiskName": "[parameters('osDiskName')]",
|
||||
"vmName": "[parameters('virtualMachineName')]",
|
||||
"vmSize": "[parameters('size')]",
|
||||
"vhdStorageName": "[parameters('storageAccountName')]",
|
||||
"vhdStorageType": "[parameters('storageType')]",
|
||||
"vhdStorageContainerName": "[parameters('storageContainerName')]",
|
||||
"nicName": "[concat('VMNic', parameters('VirtualMachineName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"tags": {
|
||||
"displayName": "VirtualMachine"
|
||||
},
|
||||
"dependsOn": [ ],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('imageSku')]",
|
||||
"version": "[variables('imageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "[concat('osdisk', parameters('virtualMachineName'))]",
|
||||
"vhd": {
|
||||
"uri": "[parameters('osDiskUri')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,135 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring"
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"type": "string"
|
||||
},
|
||||
"virtualMachineName": {
|
||||
"type": "string"
|
||||
},
|
||||
"osPublisher": {
|
||||
"type": "string"
|
||||
},
|
||||
"osOffer": {
|
||||
"type": "string"
|
||||
},
|
||||
"osSKU": {
|
||||
"type": "string"
|
||||
},
|
||||
"osVersion": {
|
||||
"type": "string"
|
||||
},
|
||||
"size": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageAccountName": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageContainerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"osDiskName": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageType": {
|
||||
"type": "string"
|
||||
},
|
||||
"sshKeyValue": {
|
||||
"type": "string"
|
||||
},
|
||||
"sshKeyPath": {
|
||||
"type": "string"
|
||||
},
|
||||
"availabilitySetId": {
|
||||
"type": "string",
|
||||
"defaultValue": ""
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"osDiskUri": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"imagePublisher": "[parameters('osPublisher')]",
|
||||
"imageOffer": "[parameters('osOffer')]",
|
||||
"imageSku": "[parameters('osSKU')]",
|
||||
"imageVersion": "[parameters('osVersion')]",
|
||||
"OSDiskName": "[parameters('osDiskName')]",
|
||||
"vmName": "[parameters('virtualMachineName')]",
|
||||
"vmSize": "[parameters('size')]",
|
||||
"vhdStorageName": "[parameters('storageAccountName')]",
|
||||
"vhdStorageType": "[parameters('storageType')]",
|
||||
"vhdStorageContainerName": "[parameters('storageContainerName')]",
|
||||
"nicName": "[concat('VMNic', parameters('VirtualMachineName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"tags": {
|
||||
"displayName": "VirtualMachine"
|
||||
},
|
||||
"dependsOn": [ ],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]",
|
||||
"linuxConfiguration": {
|
||||
"disablePasswordAuthentication": true,
|
||||
"ssh": {
|
||||
"publicKeys": [
|
||||
{
|
||||
"keyData": "[parameters('sshKeyValue')]",
|
||||
"path": "[parameters('sshKeyPath')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('imageSku')]",
|
||||
"version": "[variables('imageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "[concat('osdisk', parameters('virtualMachineName'))]",
|
||||
"vhd": {
|
||||
"uri": "[parameters('osDiskUri')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,861 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "VMCreationClient",
|
||||
"version": "2015-11-01"
|
||||
},
|
||||
"host": "management.azure.com",
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"azure_auth": [
|
||||
"user_impersonation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"securityDefinitions": {
|
||||
"azure_auth": {
|
||||
"type": "oauth2",
|
||||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
|
||||
"flow": "implicit",
|
||||
"description": "Azure Active Directory OAuth2 Flow",
|
||||
"scopes": {
|
||||
"user_impersonation": "impersonate your user account"
|
||||
}
|
||||
}
|
||||
},
|
||||
"paths": {
|
||||
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"VM"
|
||||
],
|
||||
"operationId": "VM_CreateOrUpdate",
|
||||
"description": "Create or update a virtual machine.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "resourceGroupName",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The name of the resource group. The name is case insensitive.",
|
||||
"pattern": "^[-\\w\\._]+$",
|
||||
"minLength": 1,
|
||||
"maxLength": 64
|
||||
},
|
||||
{
|
||||
"name": "deploymentName",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The name of the deployment.",
|
||||
"pattern": "^[-\\w\\._]+$",
|
||||
"minLength": 1,
|
||||
"maxLength": 64
|
||||
},
|
||||
{
|
||||
"name": "parameters",
|
||||
"x-ms-client-flatten": true,
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Deployment_VM"
|
||||
},
|
||||
"description": "Additional parameters supplied to the operation."
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/ApiVersionParameter"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/SubscriptionIdParameter"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/DeploymentExtended"
|
||||
}
|
||||
},
|
||||
"201": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/DeploymentExtended"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-ms-long-running-operation": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"Deployment_VM": {
|
||||
"properties": {
|
||||
"properties": {
|
||||
"$ref": "#/definitions/DeploymentProperties_VM",
|
||||
"description": "Gets or sets the deployment properties.",
|
||||
"x-ms-client-flatten": true
|
||||
}
|
||||
},
|
||||
"description": "Deployment operation parameters."
|
||||
},
|
||||
"DeploymentProperties_VM": {
|
||||
"properties": {
|
||||
"templateLink": {
|
||||
"$ref": "#/definitions/TemplateLink",
|
||||
"description": "Gets or sets the URI referencing the template. Use only one of Template or TemplateLink.",
|
||||
"x-ms-client-flatten": true
|
||||
},
|
||||
"parameters": {
|
||||
"$ref": "#/definitions/VMParameters",
|
||||
"type": "object",
|
||||
"description": "Deployment parameters. Use only one of Parameters or ParametersLink.",
|
||||
"x-ms-client-flatten": true
|
||||
},
|
||||
"mode": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the deployment mode.",
|
||||
"enum": [
|
||||
"Incremental"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "DeploymentMode",
|
||||
"modelAsString": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"templateLink",
|
||||
"parameters",
|
||||
"mode"
|
||||
],
|
||||
"description": "Deployment properties."
|
||||
},
|
||||
"TemplateLink": {
|
||||
"properties": {
|
||||
"uri": {
|
||||
"type": "string",
|
||||
"description": "URI referencing the template.",
|
||||
"enum": [
|
||||
"https://azuresdkci.blob.core.windows.net/templatehost/CreateVM/azuredeploy.json"
|
||||
]
|
||||
},
|
||||
"contentVersion": {
|
||||
"type": "string",
|
||||
"description": "If included it must match the ContentVersion in the template."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"uri"
|
||||
],
|
||||
"description": "Entity representing the reference to the template."
|
||||
},
|
||||
"VMParameters": {
|
||||
|
||||
"properties": {
|
||||
"storageContainerName": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/DeploymentParameter_storageContainerName",
|
||||
"x-ms-client-flatten": true
|
||||
},
|
||||
"virtualNetworkName": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/DeploymentParameter_virtualNetworkName",
|
||||
"x-ms-client-flatten": true
|
||||
},
|
||||
"subnetIpAddressPrefix": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/DeploymentParameter_subnetIpAddressPrefix",
|
||||
"x-ms-client-flatten": true
|
||||
},
|
||||
"privateIpAddressAllocation": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/DeploymentParameter_privateIpAddressAllocation",
|
||||
"x-ms-client-flatten": true
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/DeploymentParameter_dnsNameForPublicIP",
|
||||
"x-ms-client-flatten": true
|
||||
},
|
||||
"storageAccountType": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/DeploymentParameter_storageAccountType",
|
||||
"x-ms-client-flatten": true
|
||||
},
|
||||
"osDiskUri": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/DeploymentParameter_osDiskUri",
|
||||
"x-ms-client-flatten": true
|
||||
},
|
||||
"_artifactsLocation": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/DeploymentParameter__artifactsLocation"
|
||||
},
|
||||
"name": {
|
||||
"type": "object",
|
||||
"$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": {
|
||||
"type": "object",
|
||||
"$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": [
|
||||
"adminPassword",
|
||||
"adminUsername",
|
||||
"virtualMachineName"
|
||||
]
|
||||
},
|
||||
"DeploymentParameter_storageContainerName": {
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "Name of storage container for the VM OS disk.",
|
||||
"x-ms-client-name": "storageContainerName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DeploymentParameter_virtualNetworkName": {
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "Name of virtual network to add VM to.",
|
||||
"x-ms-client-name": "virtualNetworkName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DeploymentParameter_subnetIpAddressPrefix": {
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "The subnet address type.",
|
||||
"x-ms-client-name": "subnetIpAddressPrefix"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DeploymentParameter_privateIpAddressAllocation": {
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "Dynamic of Static private IP address allocation.",
|
||||
"x-ms-client-name": "privateIpAddressAllocation"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DeploymentParameter_dnsNameForPublicIP": {
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "Globally unique DNS Name for the Public IP used to access the Virtual Machine.",
|
||||
"x-ms-client-name": "dnsNameForPublicIP"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DeploymentParameter_storageAccountType": {
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "Whether to use an existing storage account or create a new one.",
|
||||
"x-ms-client-name": "storageAccountType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DeploymentParameter_osDiskUri": {
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "URI for a custom VHD image.",
|
||||
"x-ms-client-name": "osDiskUri"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DeploymentParameter__artifactsLocation": {
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "Container URI of of the template.",
|
||||
"enum": [
|
||||
"https://azuresdkci.blob.core.windows.net/templatehost/CreateVM"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"DeploymentParameter_name": {
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DeploymentParameter_osOffer": {
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "The OS Offer to install.",
|
||||
"x-ms-client-name": "osOffer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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 (e.g. Standard_A2)",
|
||||
"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": {
|
||||
"type": "string",
|
||||
"description": "The OS publisher of the OS image.",
|
||||
"x-ms-client-name": "osPublisher"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"type": "string",
|
||||
"description": "URI referencing the template."
|
||||
},
|
||||
"contentVersion": {
|
||||
"type": "string",
|
||||
"description": "If included it must match the ContentVersion in the template."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"uri"
|
||||
],
|
||||
"description": "Entity representing the reference to the deployment paramaters."
|
||||
},
|
||||
"ProviderResourceType": {
|
||||
"properties": {
|
||||
"resourceType": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the resource type."
|
||||
},
|
||||
"locations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Gets or sets the collection of locations where this resource type can be created in."
|
||||
},
|
||||
"apiVersions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Gets or sets the api version."
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Gets or sets the properties."
|
||||
}
|
||||
},
|
||||
"description": "Resource type managed by the resource provider."
|
||||
},
|
||||
"Provider": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the provider id."
|
||||
},
|
||||
"namespace": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the namespace of the provider."
|
||||
},
|
||||
"registrationState": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the registration state of the provider."
|
||||
},
|
||||
"resourceTypes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ProviderResourceType"
|
||||
},
|
||||
"description": "Gets or sets the collection of provider resource types."
|
||||
}
|
||||
},
|
||||
"description": "Resource provider information."
|
||||
},
|
||||
"BasicDependency": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the ID of the dependency."
|
||||
},
|
||||
"resourceType": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the dependency resource type."
|
||||
},
|
||||
"resourceName": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the dependency resource name."
|
||||
}
|
||||
},
|
||||
"description": "Deployment dependency information."
|
||||
},
|
||||
"Dependency": {
|
||||
"properties": {
|
||||
"dependsOn": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/BasicDependency"
|
||||
},
|
||||
"description": "Gets the list of dependencies."
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the ID of the dependency."
|
||||
},
|
||||
"resourceType": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the dependency resource type."
|
||||
},
|
||||
"resourceName": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the dependency resource name."
|
||||
}
|
||||
},
|
||||
"description": "Deployment dependency information."
|
||||
},
|
||||
"DeploymentPropertiesExtended": {
|
||||
"properties": {
|
||||
"provisioningState": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the state of the provisioning."
|
||||
},
|
||||
"correlationId": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the correlation ID of the deployment."
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "Gets or sets the timestamp of the template deployment."
|
||||
},
|
||||
"outputs": {
|
||||
"type": "object",
|
||||
"description": "Gets or sets key/value pairs that represent deploymentoutput."
|
||||
},
|
||||
"providers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Provider"
|
||||
},
|
||||
"description": "Gets the list of resource providers needed for the deployment."
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Dependency"
|
||||
},
|
||||
"description": "Gets the list of deployment dependencies."
|
||||
},
|
||||
"template": {
|
||||
"type": "object",
|
||||
"description": "Gets or sets the template content. Use only one of Template or TemplateLink."
|
||||
},
|
||||
"TemplateLink": {
|
||||
"$ref": "#/definitions/TemplateLink",
|
||||
"description": "Gets or sets the URI referencing the template. Use only one of Template or TemplateLink."
|
||||
},
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"description": "Deployment parameters. Use only one of Parameters or ParametersLink."
|
||||
},
|
||||
"parametersLink": {
|
||||
"$ref": "#/definitions/ParametersLink",
|
||||
"description": "Gets or sets the URI referencing the parameters. Use only one of Parameters or ParametersLink."
|
||||
},
|
||||
"mode": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the deployment mode.",
|
||||
"enum": [
|
||||
"Incremental",
|
||||
"Complete"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "DeploymentMode",
|
||||
"modelAsString": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Deployment properties with additional details."
|
||||
},
|
||||
"DeploymentExtended": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the ID of the deployment."
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the name of the deployment."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/DeploymentPropertiesExtended",
|
||||
"description": "Gets or sets deployment properties."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"description": "Deployment information."
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"SubscriptionIdParameter": {
|
||||
"name": "subscriptionId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."
|
||||
},
|
||||
"ApiVersionParameter": {
|
||||
"name": "api-version",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "Client Api Version."
|
||||
}
|
||||
}
|
||||
}
|
|
@ -60,6 +60,10 @@ setup(
|
|||
],
|
||||
packages=[
|
||||
'azure.cli.command_modules.vm',
|
||||
'azure.cli.command_modules.vm.mgmt',
|
||||
'azure.cli.command_modules.vm.mgmt.lib',
|
||||
'azure.cli.command_modules.vm.mgmt.lib.models',
|
||||
'azure.cli.command_modules.vm.mgmt.lib.operations',
|
||||
],
|
||||
install_requires=DEPENDENCIES,
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче