Policies - List

List policies in a given policy set.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies?api-version=2018-09-15
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies?$expand={$expand}&$filter={$filter}&$top={$top}&$orderby={$orderby}&api-version=2018-09-15

URI Parameters

Name In Required Type Description
labName
path True
  • string

The name of the lab.

policySetName
path True
  • string

The name of the policy set.

resourceGroupName
path True
  • string

The name of the resource group.

subscriptionId
path True
  • string

The subscription ID.

api-version
query True
  • string

Client API version.

$expand
query
  • string

Specify the $expand query. Example: 'properties($select=description)'

$filter
query
  • string

The filter to apply to the operation. Example: '$filter=contains(name,'myName')

$orderby
query
  • string

The ordering expression for the results, using OData notation. Example: '$orderby=name desc'

$top
query
  • integer
int32

The maximum number of resources to return from the operation. Example: '$top=10'

Responses

Name Type Description
200 OK

OK

Other Status Codes

BadRequest

Security

azure_auth

OAuth2 Implicit Grant

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation Access Microsoft Azure

Definitions

CloudError

Error from a REST request.

CloudErrorBody

Body of an error from a REST request.

Policy

A Policy.

PolicyEvaluatorType

The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).

PolicyFactName

The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.

PolicyList

The response of a list operation.

PolicyStatus

The status of the policy.

CloudError

Error from a REST request.

Name Type Description
error

The cloud error that occurred

CloudErrorBody

Body of an error from a REST request.

Name Type Description
code
  • string

The error code.

details

Inner errors.

message
  • string

The error message.

target
  • string

The error target.

Policy

A Policy.

Name Type Description
id
  • string

The identifier of the resource.

location
  • string

The location of the resource.

name
  • string

The name of the resource.

properties.createdDate
  • string

The creation date of the policy.

properties.description
  • string

The description of the policy.

properties.evaluatorType

The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).

properties.factData
  • string

The fact data of the policy.

properties.factName

The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.

properties.provisioningState
  • string

The provisioning status of the resource.

properties.status

The status of the policy.

properties.threshold
  • string

The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).

properties.uniqueIdentifier
  • string

The unique immutable identifier of a resource (Guid).

tags
  • object

The tags of the resource.

type
  • string

The type of the resource.

PolicyEvaluatorType

The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).

Name Type Description
AllowedValuesPolicy
  • string
MaxValuePolicy
  • string

PolicyFactName

The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.

Name Type Description
EnvironmentTemplate
  • string
GalleryImage
  • string
LabPremiumVmCount
  • string
LabTargetCost
  • string
LabVmCount
  • string
LabVmSize
  • string
ScheduleEditPermission
  • string
UserOwnedLabPremiumVmCount
  • string
UserOwnedLabVmCount
  • string
UserOwnedLabVmCountInSubnet
  • string

PolicyList

The response of a list operation.

Name Type Description
nextLink
  • string

Link for next set of results.

value

Results of the list operation.

PolicyStatus

The status of the policy.

Name Type Description
Disabled
  • string
Enabled
  • string