ResourceDefinition [SPFSDK][VMROLE]
Applies To: Windows Azure Pack
A resource definition is a template for a VM role that is offered to tenants through gallery items. The template includes the configuration for hardware, network, operating system, and application configuration in addition to the user interface that is required to collect specific information from the tenant. Resource definitions are based on a consistent model across private clouds, but can have platform-specific hardware and network elements as required to support VM role deployment on each platform.
Type Hierarchy
VirtualMachineRole (Instance) [SPFSDK][VMROLE].ResourceDefinition
Syntax
{
"Name" : "Name of the resource definition",
"Version" : "Version of the resource definition",
"Publisher" : "Publisher of resource definition",
"SchemaVersion" : "1.0",
"Type" : "Microsoft.Compute/VMRole/1.0",
"ResourceParameters" : [
{ <ResourceParameters> }
],
"ResourceExtensionReferences" : [
{ <ResourceExtensionReferences> }
],
"IntrinsicSettings" : { <IntrinsicSettings> }
}
Properties
Name |
Type |
Required |
Default value |
Description |
---|---|---|---|---|
Name |
String |
No |
nulll |
The name of this resource definition. |
Version |
String |
Yes |
None |
The version of this resource definition. The format of the version is: <major>.<minor>.<build>.<release>. For example, 6.33.2.10. |
Publisher |
String |
No |
null |
The publisher name of this resource definition. |
SchemaVersion |
String |
Yes |
1.0.0.0 |
This property must be declared, and the value for this property is always 1.0. |
Type |
String |
Yes |
MicrosoftCompute/VMRole |
This property must be declared. The value for this property is always Microsoft.Compute/VMRole/1.0. |
ResourceParameters |
No |
null |
An array of parameters that are declared by the resource definition. |
|
ResourceExtensionReferences |
No |
null |
An array of resource extension references. |
|
IntrinsicSettings |
Yes |
None |
The settings of the virtual machine when it is created from the VM role. |
Remarks
The following code example provides a sample ResourceDefinition object.
{
"Name" : "MyResource",
"ResourceConfiguration" : {
"Version" : "1.0.0.0",
"ParameterValues" : "{
\"MyParameter1\" : \"Value1\",
\"MyParameter2\" : \"Value2\"
}"
},
"ResourceDefinition" : {
"Name" : "Name of the resource definition",
"Version" : "Version of the resource definition",
"Publisher" : "Publisher of resource definition",
"Type" : "MicrosoftCompute/VMRole/1.0",
"SchemaVersion" : "1.0",
"ResourceParameters" : [
{
"Name" : "SQLDeploymentCredential",
"Type" : "Credential",
"Description" : "Parameter Description"
}
],
"ResourceExtensionReferences" : [
{
"ReferenceName" : "MyExtensionReference",
"Name" : "NameOfImportedResourceExtension",
"Version" : "1.0.0.0",
"Publisher" : "Publisher Name"
"ResourceExtensionParameterValues" : "{
\"SQLInstance\" : \"[Param.MyParameter1]\",
\"MyParameter\" : \"MyParameterValue\"
}"
}
],
"IntrinsicSettings" : {
"ScaleOutSettings" : {
"InitialInstanceCount" : "1",
"MaximumInstanceCount" : "5",
"MinimumInstanceCount" : "1",
"UpgradeDomainCount" : "2"
},
"HardwareProfile": {
"VMSize" : "<platform-specific-size-value>"
},
"StorageProfile": {
"OSVirtualHardDiskImage" : "OSVHDImageName:1.0.0.0",
"DataVirtualHardDisk" : [
{
"DataVirtualHardDiskImage" : "DataVHDName:1.0.0.0",
"Lun" : 0
}
]
},
"NetworkProfile": {
"NetworkAdapters" : [
{
"Name" : "myNic1",
"NetworkRef" : "External",
"IPAddresses" : [
{
"Type" : "IPv4 | IPv6",
"AllocationMethod" : "Static | Dynamic",
"IPAddressConfigurations" : [
{
"ConfigurationName" : "MyIPConfiguration",
"LoadBalancerConfigurations" : [
{
"ConfigurationName" : "MyLBConfiguration",
"FrontEndNetwork" : "internet",
"PortConfig" : {
"Name" : "MyPortConfig",
"Protocol" : "UDP",
"FrontEndPort" : 80,
"BackEndPort" : 8080
},
"Probe": {
"MaxRetryCount" : 5,
"Port" : 8080,
"ProbeIntervalInSeconds" : 20,
"Protocol" : "HTTP",
"RequestPath" : "http://myrequest/"
}
}
]
}
]
}
]
}
]
},
"OperatingSystemProfile" : {
"ComputerNamePattern" : "MyComputer###",
"TimeZone" : "Pacific Standard Time",
"AdminCredential" : "username:password",
"WindowsOperatingSystemProfile" : {
"WorkgroupName" : "workgroup",
"DomainJoin" : {
"DomainToJoin" : "Redmond",
"DomainJoinCredentials" : "domain\\user:pwd"
}
},
"LinuxOperatingSystemProfile" : {
"DNSDomainName" : "Redmond",
"SSHPublicKey" : "f3:31:a8:c6:82:18:c8:0f:dd:6b:fb:27:98:83:3d:3b"
}
}
}
}
}
See Also
VM Role JSON Reference [SPFSDK][VMROLE]
VirtualMachineRole (Instance) [SPFSDK][VMROLE]
ResourceExtension [SPFSDK][VMROLE]
ResourceConfiguration [SPFSDK][VMROLE]
Parameters and Types [SPFSDK][VMROLE]
ResourceExtensionReference [SPFSDK][VMROLE]
IntrinsicSettings [SPFSDK][VMROLE]