Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 16 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions sdk/policy/arm-policy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,60 @@
# Release History

## 7.0.0 (2026-02-05)

### Features Added
- Added operation group PolicyTokensOperations
- Added Interface ErrorDetail
- Added Interface ExtensionResource
- Added Interface ExternalEvaluationEndpointInvocationResult
- Added Interface ExternalEvaluationEndpointSettings
- Added Interface ExternalEvaluationEnforcementSettings
- Added Interface PagedAsyncIterableIterator
- Added Interface PageSettings
- Added Interface PolicyAssignmentProperties
- Added Interface PolicyAssignmentUpdateProperties
- Added Interface PolicyDefinitionProperties
- Added Interface PolicyDefinitionVersionProperties
- Added Interface PolicyLogInfo
- Added Interface PolicySetDefinitionProperties
- Added Interface PolicySetDefinitionVersionProperties
- Added Interface PolicyTokenOperation
- Added Interface PolicyTokenRequest
- Added Interface PolicyTokenResponse
- Added Interface PolicyTokensAcquireAtManagementGroupOptionalParams
- Added Interface PolicyTokensAcquireOptionalParams
- Added Interface ProxyResource
- Added Interface Resource
- Interface ErrorResponse has a new optional parameter error
- Interface ParameterDefinitionsValueMetadata has a new optional parameter additionalProperties
- Interface PolicyAssignment has a new optional parameter instanceId
- Interface PolicyDefinition has a new optional parameter externalEvaluationEnforcementSettings
- Interface PolicyDefinitionVersion has a new optional parameter externalEvaluationEnforcementSettings
- Added Type Alias AzureSupportedClouds
- Added Type Alias ExternalEndpointResult
- Added Type Alias PolicyTokenResult
- Added Enum AzureClouds
- Added Enum KnownExternalEndpointResult
- Added Enum KnownPolicyTokenResult
- Added Enum KnownVersions
- Enum KnownEnforcementMode has a new value Enroll

### Breaking Changes
- Removed operation PolicyAssignments.createById
- Removed operation PolicyAssignments.deleteById
- Removed operation PolicyAssignments.getById
- Removed operation PolicyAssignments.updateById
- Removed Interface CloudError
- Removed Interface PolicyAssignmentsCreateByIdOptionalParams
- Removed Interface PolicyAssignmentsDeleteByIdOptionalParams
- Removed Interface PolicyAssignmentsGetByIdOptionalParams
- Removed Interface PolicyAssignmentsUpdateByIdOptionalParams
- Interface ErrorResponse no longer has parameter additionalInfo
- Interface ErrorResponse no longer has parameter code
- Interface ErrorResponse no longer has parameter details
- Interface ErrorResponse no longer has parameter message
- Interface ErrorResponse no longer has parameter target


## 6.0.0 (2025-03-28)

Expand Down
20 changes: 10 additions & 10 deletions sdk/policy/arm-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f

To manage and control access to your resources, you can define customized policies and assign them at a scope.

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/policy/arm-policy) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-policy) |
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-policy?view=azure-node-preview) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
Key links:

- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/policy/arm-policy)
- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-policy)
- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-policy)
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/policy/arm-policy/samples)

## Getting started

Expand Down Expand Up @@ -35,7 +37,7 @@ npm install @azure/arm-policy
To create a client object to access the Azure Policy API, you will need the `endpoint` of your Azure Policy resource and a `credential`. The Azure Policy client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure Policy resource in the [Azure Portal][azure_portal].

You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).

To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:

Expand Down Expand Up @@ -63,14 +65,15 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur
import { InteractiveBrowserCredential } from "@azure/identity";
import { PolicyClient } from "@azure/arm-policy";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new InteractiveBrowserCredential({
tenantId: "<YOUR_TENANT_ID>",
clientId: "<YOUR_CLIENT_ID>",
});
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new PolicyClient(credential, subscriptionId);
```


### JavaScript Bundle
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).

Expand All @@ -96,7 +99,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur

## Next steps

Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/policy/arm-policy/samples) directory for detailed examples on how to use this library.

## Contributing

Expand All @@ -106,9 +109,6 @@ If you'd like to contribute to this library, please read the [contributing guide

- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)


[azure_cli]: https://learn.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[azure_sub]: https://azure.microsoft.com/free/
[azure_portal]: https://portal.azure.com
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
Expand Down
8 changes: 0 additions & 8 deletions sdk/policy/arm-policy/_meta.json

This file was deleted.

4 changes: 1 addition & 3 deletions sdk/policy/arm-policy/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"extends": "../../../api-extractor-base.json"
}
{ "extends": "../../../api-extractor-base.json" }
14 changes: 14 additions & 0 deletions sdk/policy/arm-policy/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"@azure/azure-sdk/ts-package-json-files-required": "off",
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
"tsdoc/syntax": "warn",
},
},
]);
Loading
Loading