Skip to content

Instantly share code, notes, and snippets.

@nmackenzie
Last active December 18, 2015 05:59
Show Gist options
  • Save nmackenzie/5736663 to your computer and use it in GitHub Desktop.
Save nmackenzie/5736663 to your computer and use it in GitHub Desktop.
Sample payload for the Add Role operation in the Windows Azure Service Management REST API
<PersistentVMRole xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<RoleName>COMPUTER_NAME</RoleName>
<RoleType>PersistentVMRole</RoleType>
<ConfigurationSets>
<ConfigurationSet>
<ConfigurationSetType>WindowsProvisioningConfiguration</ConfigurationSetType>
<ComputerName>COMPUTER_NAME</ComputerName>
<AdminPassword>PASSWORD</AdminPassword>
<AdminUsername>USER_NAME</AdminUsername>
<EnableAutomaticUpdates>true</EnableAutomaticUpdates>
</ConfigurationSet>
<ConfigurationSet>
<ConfigurationSetType>NetworkConfiguration</ConfigurationSetType>
<InputEndpoints>
<InputEndpoint>
<LocalPort>3389</LocalPort>
<Name>RDP</Name>
<Port>5389</Port>
<Protocol>TCP</Protocol>
<EnableDirectServerReturn>false</EnableDirectServerReturn>
<EndpointAcl>
<Rules>
<Rule>
<Order>1</Order>
<Action>permit</Action>
<RemoteSubnet>108.239.229.0/24</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>
</PersistentVMRole>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment