swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Policies API schemes: - https tags: - name: Policies paths: ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies : get: tags: - Policies description: List policies in a given policy set. operationId: microsoftAzurePoliciesList parameters: - $ref: '#/parameters/subscriptionId' - $ref: '#/parameters/resourceGroupName' - name: labName in: path description: The name of the lab. required: true type: string - name: policySetName in: path description: The name of the policy set. required: true type: string - name: $expand in: query description: 'Specify the $expand query. Example: ''properties($select=description)''' type: string - name: $filter in: query description: 'The filter to apply to the operation. Example: ''$filter=contains(name,''myName'')' type: string - name: $top in: query description: 'The maximum number of resources to return from the operation. Example: ''$top=10''' type: integer format: int32 - name: $orderby in: query description: 'The ordering expression for the results, using OData notation. Example: ''$orderby=name desc''' type: string - $ref: '#/parameters/api-version' responses: '200': description: OK schema: $ref: '#/definitions/PolicyList' default: description: BadRequest schema: $ref: '#/definitions/CloudError' x-ms-pageable: nextLinkName: nextLink x-ms-odata: '#/definitions/Policy' x-ms-examples: Policies_List: $ref: ./examples/Policies_List.json summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Devtestlab Labs Labname Policysets Policysetname Policies ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name} : get: tags: - Policies description: Get policy. operationId: microsoftAzurePoliciesGet parameters: - $ref: '#/parameters/subscriptionId' - $ref: '#/parameters/resourceGroupName' - name: labName in: path description: The name of the lab. required: true type: string - name: policySetName in: path description: The name of the policy set. required: true type: string - name: name in: path description: The name of the policy. required: true type: string - name: $expand in: query description: 'Specify the $expand query. Example: ''properties($select=description)''' type: string - $ref: '#/parameters/api-version' responses: '200': description: OK schema: $ref: '#/definitions/Policy' default: description: BadRequest schema: $ref: '#/definitions/CloudError' x-ms-examples: Policies_Get: $ref: ./examples/Policies_Get.json summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Devtestlab Labs Labname Policysets Policysetname Policies Name put: tags: - Policies description: Create or replace an existing policy. operationId: microsoftAzurePoliciesCreateorupdate parameters: - $ref: '#/parameters/subscriptionId' - $ref: '#/parameters/resourceGroupName' - name: labName in: path description: The name of the lab. required: true type: string - name: policySetName in: path description: The name of the policy set. required: true type: string - name: name in: path description: The name of the policy. required: true type: string - name: policy in: body description: A Policy. required: true schema: $ref: '#/definitions/Policy' - $ref: '#/parameters/api-version' responses: '200': description: OK schema: $ref: '#/definitions/Policy' '201': description: Created schema: $ref: '#/definitions/Policy' default: description: BadRequest schema: $ref: '#/definitions/CloudError' x-ms-examples: Policies_CreateOrUpdate: $ref: ./examples/Policies_CreateOrUpdate.json summary: Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Devtestlab Labs Labname Policysets Policysetname Policies Name delete: tags: - Policies description: Delete policy. operationId: microsoftAzurePoliciesDelete parameters: - $ref: '#/parameters/subscriptionId' - $ref: '#/parameters/resourceGroupName' - name: labName in: path description: The name of the lab. required: true type: string - name: policySetName in: path description: The name of the policy set. required: true type: string - name: name in: path description: The name of the policy. required: true type: string - $ref: '#/parameters/api-version' responses: '200': description: OK '204': description: No Content default: description: BadRequest schema: $ref: '#/definitions/CloudError' x-ms-examples: Policies_Delete: $ref: ./examples/Policies_Delete.json summary: Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Devtestlab Labs Labname Policysets Policysetname Policies Name patch: tags: - Policies description: Allows modifying tags of policies. All other properties will be ignored. operationId: microsoftAzurePoliciesUpdate parameters: - $ref: '#/parameters/subscriptionId' - $ref: '#/parameters/resourceGroupName' - name: labName in: path description: The name of the lab. required: true type: string - name: policySetName in: path description: The name of the policy set. required: true type: string - name: name in: path description: The name of the policy. required: true type: string - name: policy in: body description: A Policy. required: true schema: $ref: '#/definitions/PolicyFragment' - $ref: '#/parameters/api-version' responses: '200': description: OK schema: $ref: '#/definitions/Policy' default: description: BadRequest schema: $ref: '#/definitions/CloudError' x-ms-examples: Policies_Update: $ref: ./examples/Policies_Update.json summary: Microsoft Azure Patch Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Devtestlab Labs Labname Policysets Policysetname Policies Name definitions: Resource: description: An Azure resource. type: object properties: id: description: The identifier of the resource. type: string readOnly: true name: description: The name of the resource. type: string readOnly: true type: description: The type of the resource. type: string readOnly: true location: description: The location of the resource. type: string tags: description: The tags of the resource. type: object additionalProperties: type: string x-ms-azure-resource: true PolicyFragment: description: A Policy. type: object allOf: - $ref: '#/definitions/UpdateResource' properties: {} PolicyList: description: The response of a list operation. type: object properties: value: description: Results of the list operation. type: array items: $ref: '#/definitions/Policy' nextLink: description: Link for next set of results. type: string CloudError: description: Error from a REST request. type: object properties: error: $ref: '#/definitions/CloudErrorBody' description: The cloud error that occurred x-ms-external: true CloudErrorBody: description: Body of an error from a REST request. type: object properties: code: description: The error code. type: string message: description: The error message. type: string target: description: The error target. type: string details: description: Inner errors. type: array items: $ref: '#/definitions/CloudErrorBody' x-ms-external: true UpdateResource: description: Represents an update resource type: object properties: tags: description: The tags of the resource. type: object additionalProperties: type: string PolicyProperties: description: Properties of a Policy. type: object properties: description: description: The description of the policy. type: string status: description: The status of the policy. enum: - Enabled - Disabled type: string x-ms-enum: name: PolicyStatus modelAsString: true factName: description: The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc. enum: - UserOwnedLabVmCount - UserOwnedLabPremiumVmCount - LabVmCount - LabPremiumVmCount - LabVmSize - GalleryImage - UserOwnedLabVmCountInSubnet - LabTargetCost - EnvironmentTemplate - ScheduleEditPermission type: string x-ms-enum: name: PolicyFactName modelAsString: true factData: description: The fact data of the policy. type: string threshold: description: The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). type: string evaluatorType: description: The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy). enum: - AllowedValuesPolicy - MaxValuePolicy type: string x-ms-enum: name: PolicyEvaluatorType modelAsString: true createdDate: format: date-time description: The creation date of the policy. type: string readOnly: true provisioningState: description: The provisioning status of the resource. type: string readOnly: true uniqueIdentifier: description: The unique immutable identifier of a resource (Guid). type: string readOnly: true Policy: description: A Policy. required: - properties type: object allOf: - $ref: '#/definitions/Resource' properties: properties: $ref: '#/definitions/PolicyProperties' description: The properties of the resource. x-ms-client-flatten: true parameters: resourceGroupName: name: resourceGroupName in: path description: The name of the resource group. required: true type: string x-ms-parameter-location: method subscriptionId: name: subscriptionId in: path description: The subscription ID. required: true type: string api-version: name: api-version in: query description: Client API version. required: true type: string default: '2018-09-15' x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'