{"files":{"SKILL.md":"---\nname: policyclient\ndescription: \"PolicyClient API skill. Use when working with PolicyClient for {scope}, subscriptions, {policyAssignmentId}. Covers 9 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# PolicyClient\nAPI version: 2019-06-01\n\n## Auth\nOAuth2\n\n## Base URL\nhttps://management.azure.com\n\n## Setup\n1. Configure auth: OAuth2\n2. GET /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName} -- retrieves a policy assignment.\n3. Explore available endpoints below\n\n## Endpoints\n9 endpoints across 3 groups. See references/api-spec.lap for full details.\n\n### {scope}\n| Method | Path | Description |\n|--------|------|-------------|\n| DELETE | /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName} | Deletes a policy assignment. |\n| PUT | /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName} | Creates or updates a policy assignment. |\n| GET | /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName} | Retrieves a policy assignment. |\n\n### Subscriptions\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments | Retrieves all policy assignments that apply to a resource group. |\n| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments | Retrieves all policy assignments that apply to a resource. |\n| GET | /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments | Retrieves all policy assignments that apply to a subscription. |\n\n### {policyAssignmentId}\n| Method | Path | Description |\n|--------|------|-------------|\n| DELETE | /{policyAssignmentId} | Deletes a policy assignment. |\n| PUT | /{policyAssignmentId} | Creates or updates a policy assignment. |\n| GET | /{policyAssignmentId} | Retrieves the policy assignment with the given ID. |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Delete a policyAssignment?\" -> DELETE /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}\n- \"Update a policyAssignment?\" -> PUT /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}\n- \"Get policyAssignment details?\" -> GET /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}\n- \"List all policyAssignments?\" -> GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments\n- \"Delete a {policyAssignmentId}?\" -> DELETE /{policyAssignmentId}\n- \"Update a {policyAssignmentId}?\" -> PUT /{policyAssignmentId}\n- \"Get {policyAssignmentId} details?\" -> GET /{policyAssignmentId}\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api PolicyClient\n@base https://management.azure.com\n@version 2019-06-01\n@auth OAuth2\n@common_fields {api-version: any # The API version to use for the operation.}\n@endpoints 9\n@toc {scope}(3), subscriptions(3), {policyAssignmentId}(3)\n\n@group {scope}\n@endpoint DELETE /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}\n@desc Deletes a policy assignment.\n@required {scope: any # The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}', policyAssignmentName: any # The name of the policy assignment to delete.}\n@returns(200) OK - Returns information about the deleted assignment.\n@returns(204) No Content - the policy assignment doesn't exist.\n\n@endpoint PUT /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}\n@desc Creates or updates a policy assignment.\n@required {scope: any # The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}', policyAssignmentName: any # The name of the policy assignment., parameters: any # Parameters for the policy assignment.}\n@returns(201) Created - Returns information about the new policy assignment.\n\n@endpoint GET /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}\n@desc Retrieves a policy assignment.\n@required {scope: any # The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}', policyAssignmentName: any # The name of the policy assignment to get.}\n@returns(200) OK - Returns information about the policy assignment.\n\n@endgroup\n\n@group subscriptions\n@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments\n@desc Retrieves all policy assignments that apply to a resource group.\n@required {resourceGroupName: any # The name of the resource group that contains policy assignments., subscriptionId: any # The ID of the target subscription.}\n@optional {$filter: any # The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed.}\n@returns(200) OK - Returns an array of policy assignments.\n\n@endpoint GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments\n@desc Retrieves all policy assignments that apply to a resource.\n@required {resourceGroupName: any # The name of the resource group containing the resource., resourceProviderNamespace: any # The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines), parentResourcePath: any # The parent resource path. Use empty string if there is none., resourceType: any # The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites)., resourceName: any # The name of the resource., subscriptionId: any # The ID of the target subscription.}\n@optional {$filter: any # The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed.}\n@returns(200) OK - Returns an array of policy assignments.\n\n@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments\n@desc Retrieves all policy assignments that apply to a subscription.\n@required {subscriptionId: any # The ID of the target subscription.}\n@optional {$filter: any # The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed.}\n@returns(200) OK - Returns an array of policy assignments.\n\n@endgroup\n\n@group {policyAssignmentId}\n@endpoint DELETE /{policyAssignmentId}\n@desc Deletes a policy assignment.\n@required {policyAssignmentId: any # The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.}\n@returns(200) OK - Returns information about the policy assignment.\n@returns(204) No Content - the policy assignment doesn't exist.\n\n@endpoint PUT /{policyAssignmentId}\n@desc Creates or updates a policy assignment.\n@required {policyAssignmentId: any # The ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'., parameters: any # Parameters for policy assignment.}\n@returns(201) Created - Returns information about the policy assignment.\n\n@endpoint GET /{policyAssignmentId}\n@desc Retrieves the policy assignment with the given ID.\n@required {policyAssignmentId: any # The ID of the policy assignment to get. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.}\n@returns(200) OK - Returns information about the policy assignment.\n\n@endgroup\n\n@end\n"}}