Skip to content

Instantly share code, notes, and snippets.

@nmackenzie
Last active December 18, 2015 05:59
Show Gist options
  • Save nmackenzie/5736501 to your computer and use it in GitHub Desktop.
Save nmackenzie/5736501 to your computer and use it in GitHub Desktop.
Sample payload for a Create Virtual Machine Deployment operation in the Windows Azure Service Management REST API
<Deployment xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Name>DEPLOYMENT_NAME</Name>
<DeploymentSlot>Production</DeploymentSlot>
<Label>Deployment 0.1</Label>
<RoleList>
<Role>
<RoleName>COMPUTER_NAME</RoleName>
<RoleType>PersistentVMRole</RoleType>
<ConfigurationSets>
<ConfigurationSet>
<ConfigurationSetType>WindowsProvisioningConfiguration</ConfigurationSetType>
<ComputerName>COMPUTER_NAME</ComputerName>
<AdminPassword>PASSWORD</AdminPassword>
<AdminUsername>USER_NAME</AdminUsername>
</ConfigurationSet>
<ConfigurationSet>
<ConfigurationSetType>NetworkConfiguration</ConfigurationSetType>
<InputEndpoints>
<InputEndpoint>
<LocalPort>3389</LocalPort>
<Name>RDP</Name>
<Port>3389</Port>
<Protocol>TCP</Protocol>
<EnableDirectServerReturn>false</EnableDirectServerReturn>
<EndpointAcl>
<Rules>
<Rule>
<Order>1</Order>
<Action>permit</Action>
<RemoteSubnet>209.116.0.0/16</RemoteSubnet>
<Description>Lock down RDP</Description>
</Rule>
</Rules>
</EndpointAcl>
</InputEndpoint>
</InputEndpoints>
</ConfigurationSet>
</ConfigurationSets>
<OSVirtualHardDisk>
<HostCaching>ReadWrite</HostCaching>
<DiskLabel>os-disk-label</DiskLabel>
<DiskName>DISK_NAME</DiskName>
<MediaLink>http://STORAGE_ACCOUNT.blob.core.windows.net/vhds/DISK_NAME.vhd</MediaLink>
<SourceImageName>a699494373c04fc0bc8f2bb1389d6106__Win2K8R2SP1-Datacenter-201305.01-en.us-127GB.vhd</SourceImageName>
</OSVirtualHardDisk>
<RoleSize>Small</RoleSize>
</Role>
</RoleList>
</Deployment>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment