Role Schema


Updated: April 15, 2015

The Role element of the configuration file specifies the number of role instances to deploy for each role in the service, the values of any configuration settings, and the thumbprints for any certificates associated with a role.

For more information about the Azure Service Configuration Schema, see Azure Service Configuration Schema. For more information about the Azure Service Definition Schema, see Azure Service Definition Schema.

The following example shows the Role element and its child elements.

  <Role name="<role-name>" vmName="<vm-name>">
    <Instances count="<number-of-instances>"/>    
      <Setting name="<setting-name>" value="<setting-value>" />
      <Certificate name="<certificate-name>" thumbprint="<certificate-thumbprint>" thumbprintAlgorithm="<algorithm>"/>

The following table describes the attributes for the Role element.




Required. Specifies the name of the role. The name must match the name provided for the role in the service definition file.


Optional. Specifies the DNS name for a Virtual Machine. The name must be 10 characters or less.

The following table describes the child elements of the Role element.




Required. Specifies the number of instances to deploy for the role. The number of instances is defined by an integer for the count attribute.


Optional. Specifies a setting name and value in a collection of settings for a role. The setting name is defined by a string for the name attribute and the setting value is defined by a string for the value attribute.


Optional. Specifies the name, thumbprint, and algorithm of a service certificate that is to be associated with the role. The certificate name is defined by a string for the name attribute. The certificate thumbprint is defined by a string of hexadecimal numbers containing no spaces for the thumbprint attribute. The hexadecimal numbers must be represented using digits and uppercase alpha characters. The certificate algorithm is defined by a string for the thumbprintAlgorithm attribute.