diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml
index 9bcae9133669..45f915f423b1 100644
--- a/common/config/rush/pnpm-lock.yaml
+++ b/common/config/rush/pnpm-lock.yaml
@@ -14,6 +14,7 @@ specifiers:
'@rush-temp/arm-apimanagement': file:./projects/arm-apimanagement.tgz
'@rush-temp/arm-appplatform': file:./projects/arm-appplatform.tgz
'@rush-temp/arm-appservice': file:./projects/arm-appservice.tgz
+ '@rush-temp/arm-attestation': file:./projects/arm-attestation.tgz
'@rush-temp/arm-authorization': file:./projects/arm-authorization.tgz
'@rush-temp/arm-batch': file:./projects/arm-batch.tgz
'@rush-temp/arm-botservice': file:./projects/arm-botservice.tgz
@@ -190,6 +191,7 @@ dependencies:
'@rush-temp/arm-apimanagement': file:projects/arm-apimanagement.tgz
'@rush-temp/arm-appplatform': file:projects/arm-appplatform.tgz
'@rush-temp/arm-appservice': file:projects/arm-appservice.tgz
+ '@rush-temp/arm-attestation': file:projects/arm-attestation.tgz
'@rush-temp/arm-authorization': file:projects/arm-authorization.tgz
'@rush-temp/arm-batch': file:projects/arm-batch.tgz
'@rush-temp/arm-botservice': file:projects/arm-botservice.tgz
@@ -8072,6 +8074,27 @@ packages:
uglify-js: 3.14.5
dev: false
+ file:projects/arm-attestation.tgz:
+ resolution: {integrity: sha512-jIUHVpNd+Vexi4RG/knyP+kjgAzI4HA9bu3J600ZXZ/avKoy/Hut+Pd4LWKd1pR3JETpM1t4kMyw/vIGBlSItg==, tarball: file:projects/arm-attestation.tgz}
+ name: '@rush-temp/arm-attestation'
+ version: 0.0.0
+ dependencies:
+ '@microsoft/api-extractor': 7.19.2
+ '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
+ '@rollup/plugin-json': 4.1.0_rollup@1.32.1
+ '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
+ '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
+ cross-env: 7.0.3
+ mkdirp: 1.0.4
+ mocha: 7.2.0
+ rimraf: 3.0.2
+ rollup: 1.32.1
+ rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
+ tslib: 2.3.1
+ typescript: 4.2.4
+ uglify-js: 3.14.5
+ dev: false
+
file:projects/arm-authorization.tgz:
resolution: {integrity: sha512-WM4xyGTydD8+/LHQL+nCUBAiJs8qQUhNlY/Wei33PvR7RkQiVC6n8Jzd7UijWW8poj/hawJyABuQxU+Pese58A==, tarball: file:projects/arm-authorization.tgz}
name: '@rush-temp/arm-authorization'
diff --git a/eng/ignore-links.txt b/eng/ignore-links.txt
index f2ce1d0ef473..7b8b44a4e173 100644
--- a/eng/ignore-links.txt
+++ b/eng/ignore-links.txt
@@ -13,3 +13,5 @@ https://docs.microsoft.com/javascript/api/@azure/arm-portal
https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/portal/arm-portal
https://docs.microsoft.com/javascript/api/@azure/arm-loadtestservice
https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/arm-loadtestservice
+https://docs.microsoft.com/javascript/api/@azure/arm-attestation
+https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/attestation/arm-attestation
diff --git a/rush.json b/rush.json
index 73f9d46cc455..34af3f469246 100644
--- a/rush.json
+++ b/rush.json
@@ -1190,6 +1190,11 @@
"packageName": "@azure/arm-hdinsight",
"projectFolder": "sdk/hdinsight/arm-hdinsight",
"versionPolicyName": "management"
+ },
+ {
+ "packageName": "@azure/arm-attestation",
+ "projectFolder": "sdk/attestation/arm-attestation",
+ "versionPolicyName": "management"
}
]
}
\ No newline at end of file
diff --git a/sdk/attestation/arm-attestation/CHANGELOG.md b/sdk/attestation/arm-attestation/CHANGELOG.md
new file mode 100644
index 000000000000..c9869de02da1
--- /dev/null
+++ b/sdk/attestation/arm-attestation/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 2.0.0 (2021-12-30)
+
+The package of @azure/arm-attestation is using our next generation design principles since version 2.0.0, which contains breaking changes.
+
+To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
+
+To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
+
+To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
diff --git a/sdk/attestation/arm-attestation/LICENSE.txt b/sdk/attestation/arm-attestation/LICENSE
similarity index 96%
rename from sdk/attestation/arm-attestation/LICENSE.txt
rename to sdk/attestation/arm-attestation/LICENSE
index ea8fb1516028..ccb63b166732 100644
--- a/sdk/attestation/arm-attestation/LICENSE.txt
+++ b/sdk/attestation/arm-attestation/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2020 Microsoft
+Copyright (c) 2021 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+SOFTWARE.
\ No newline at end of file
diff --git a/sdk/attestation/arm-attestation/README.md b/sdk/attestation/arm-attestation/README.md
index e26c14c75674..1c48c56e9592 100644
--- a/sdk/attestation/arm-attestation/README.md
+++ b/sdk/attestation/arm-attestation/README.md
@@ -1,109 +1,98 @@
-## Azure AttestationManagementClient SDK for JavaScript
+# Azure AttestationManagement client library for JavaScript
-This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AttestationManagementClient.
+This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure AttestationManagement client.
+
+Various APIs for managing resources in attestation service. This primarily encompasses per-provider management.
+
+[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/attestation/arm-attestation) |
+[Package (NPM)](https://www.npmjs.com/package/@azure/arm-attestation) |
+[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-attestation) |
+[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
+
+## Getting started
### Currently supported environments
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
-- Latest versions of Safari, Chrome, Edge, and Firefox.
+- Latest versions of Safari, Chrome, Edge and Firefox.
### Prerequisites
-You must have an [Azure subscription](https://azure.microsoft.com/free/).
+- An [Azure subscription][azure_sub].
-### How to install
+### Install the `@azure/arm-attestation` package
-To use this SDK in your project, you will need to install two packages.
-- `@azure/arm-attestation` that contains the client.
-- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory.
+Install the Azure AttestationManagement client library for JavaScript with `npm`:
-Install both packages using the below command:
```bash
-npm install --save @azure/arm-attestation @azure/identity
+npm install @azure/arm-attestation
```
-> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
-If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
+### Create and authenticate a `AttestationManagementClient`
-### How to use
+To create a client object to access the Azure AttestationManagement API, you will need the `endpoint` of your Azure AttestationManagement resource and a `credential`. The Azure AttestationManagement client can use Azure Active Directory credentials to authenticate.
+You can find the endpoint for your Azure AttestationManagement resource in the [Azure Portal][azure_portal].
-- If you are writing a client side browser application,
- - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions.
- - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below.
-- If you are writing a server side application,
- - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples)
- - Complete the set up steps required by the credential if any.
- - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below.
+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).
-In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
-Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
+To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
+
+```bash
+npm install @azure/identity
+```
-#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript.
+You will also need to **register a new AAD application and grant access to Azure AttestationManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
+Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
-##### Sample code
+For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
```javascript
-const { DefaultAzureCredential } = require("@azure/identity");
const { AttestationManagementClient } = require("@azure/arm-attestation");
-const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
-
-// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples
-// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
-const creds = new DefaultAzureCredential();
-const client = new AttestationManagementClient(creds, subscriptionId);
-
-client.operations.list().then((result) => {
- console.log("The result is:");
- console.log(result);
-}).catch((err) => {
- console.log("An error occurred:");
- console.error(err);
-});
+const { DefaultAzureCredential } = require("@azure/identity");
+const subscriptionId = "00000000-0000-0000-0000-000000000000";
+const client = new AttestationManagementClient(new DefaultAzureCredential(), subscriptionId);
```
-#### browser - Authentication, client creation, and list operations as an example written in JavaScript.
-
-In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
- - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
- - Note down the client Id from the previous step and use it in the browser sample below.
-
-##### Sample code
-
-- index.html
-
-```html
-
-
-
- @azure/arm-attestation sample
-
-
-
-
-
-
-
+
+### 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).
+
+## Key concepts
+
+### AttestationManagementClient
+
+`AttestationManagementClient` is the primary interface for developers using the Azure AttestationManagement client library. Explore the methods on this client object to understand the different features of the Azure AttestationManagement service that you can access.
+
+## Troubleshooting
+
+### Logging
+
+Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
+
+```javascript
+const { setLogLevel } = require("@azure/logger");
+setLogLevel("info");
```
+For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
+
+## 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.
+
+## Contributing
+
+If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
+
## Related projects
-- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
+- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
+
+
-
+[azure_cli]: https://docs.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
+[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
diff --git a/sdk/attestation/arm-attestation/_meta.json b/sdk/attestation/arm-attestation/_meta.json
new file mode 100644
index 000000000000..1c9145ea2976
--- /dev/null
+++ b/sdk/attestation/arm-attestation/_meta.json
@@ -0,0 +1,7 @@
+{
+ "commit": "54ee1a9eb50c13e0790627749f986c886ad4f4db",
+ "readme": "specification/attestation/resource-manager/readme.md",
+ "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/attestation/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
+ "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
+ "use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
+}
\ No newline at end of file
diff --git a/sdk/attestation/arm-attestation/api-extractor.json b/sdk/attestation/arm-attestation/api-extractor.json
new file mode 100644
index 000000000000..217b40e272e5
--- /dev/null
+++ b/sdk/attestation/arm-attestation/api-extractor.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
+ "mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
+ "docModel": { "enabled": true },
+ "apiReport": { "enabled": true, "reportFolder": "./review" },
+ "dtsRollup": {
+ "enabled": true,
+ "untrimmedFilePath": "",
+ "publicTrimmedFilePath": "./types/arm-attestation.d.ts"
+ },
+ "messages": {
+ "tsdocMessageReporting": { "default": { "logLevel": "none" } },
+ "extractorMessageReporting": {
+ "ae-missing-release-tag": { "logLevel": "none" },
+ "ae-unresolved-link": { "logLevel": "none" }
+ }
+ }
+}
diff --git a/sdk/attestation/arm-attestation/package.json b/sdk/attestation/arm-attestation/package.json
index 07337a0d6638..42e3640550f0 100644
--- a/sdk/attestation/arm-attestation/package.json
+++ b/sdk/attestation/arm-attestation/package.json
@@ -1,58 +1,89 @@
{
"name": "@azure/arm-attestation",
+ "sdk-type": "mgmt",
"author": "Microsoft Corporation",
- "description": "AttestationManagementClient Library with typescript type definitions for node.js and browser.",
- "version": "1.1.0",
+ "description": "A generated SDK for AttestationManagementClient.",
+ "version": "2.0.0",
+ "engines": { "node": ">=12.0.0" },
"dependencies": {
- "@azure/ms-rest-azure-js": "^2.1.0",
- "@azure/ms-rest-js": "^2.2.0",
- "@azure/core-auth": "^1.1.4",
- "tslib": "^1.10.0"
+ "@azure/core-paging": "^1.2.0",
+ "@azure/core-client": "^1.0.0",
+ "@azure/core-auth": "^1.3.0",
+ "@azure/core-rest-pipeline": "^1.1.0",
+ "tslib": "^2.2.0"
},
- "keywords": [
- "node",
- "azure",
- "typescript",
- "browser",
- "isomorphic"
- ],
+ "keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
"license": "MIT",
- "main": "./dist/arm-attestation.js",
- "module": "./esm/attestationManagementClient.js",
- "types": "./esm/attestationManagementClient.d.ts",
+ "main": "./dist/index.js",
+ "module": "./dist-esm/src/index.js",
+ "types": "./types/arm-attestation.d.ts",
"devDependencies": {
- "typescript": "^3.6.0",
- "rollup": "^1.18.0",
- "rollup-plugin-node-resolve": "^5.2.0",
+ "@microsoft/api-extractor": "^7.18.11",
+ "@rollup/plugin-commonjs": "11.0.2",
+ "@rollup/plugin-json": "^4.0.0",
+ "@rollup/plugin-multi-entry": "^3.0.0",
+ "@rollup/plugin-node-resolve": "^8.0.0",
+ "mkdirp": "^1.0.4",
+ "rollup": "^1.16.3",
"rollup-plugin-sourcemaps": "^0.4.2",
- "uglify-js": "^3.6.0"
+ "typescript": "~4.2.0",
+ "uglify-js": "^3.4.9",
+ "rimraf": "^3.0.0",
+ "@azure/identity": "^2.0.1",
+ "@azure-tools/test-recorder": "^1.0.0",
+ "mocha": "^7.1.1",
+ "cross-env": "^7.0.2"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/attestation/arm-attestation",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
- "bugs": {
- "url": "https://github.com/Azure/azure-sdk-for-js/issues"
- },
+ "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
"dist/**/*.d.ts",
"dist/**/*.d.ts.map",
- "esm/**/*.js",
- "esm/**/*.js.map",
- "esm/**/*.d.ts",
- "esm/**/*.d.ts.map",
+ "dist-esm/**/*.js",
+ "dist-esm/**/*.js.map",
+ "dist-esm/**/*.d.ts",
+ "dist-esm/**/*.d.ts.map",
"src/**/*.ts",
"README.md",
+ "LICENSE",
"rollup.config.js",
- "tsconfig.json"
+ "tsconfig.json",
+ "review/*",
+ "CHANGELOG.md",
+ "types/*"
],
"scripts": {
- "build": "tsc && rollup -c rollup.config.js && npm run minify",
- "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-attestation.js.map'\" -o ./dist/arm-attestation.min.js ./dist/arm-attestation.js",
- "prepack": "npm install && npm run build"
+ "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
+ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
+ "prepack": "npm run build",
+ "pack": "npm pack 2>&1",
+ "extract-api": "api-extractor run --local",
+ "lint": "echo skipped",
+ "audit": "echo skipped",
+ "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
+ "build:node": "echo skipped",
+ "build:browser": "echo skipped",
+ "build:test": "echo skipped",
+ "build:samples": "echo skipped.",
+ "check-format": "echo skipped",
+ "execute:samples": "echo skipped",
+ "format": "echo skipped",
+ "test": "npm run integration-test",
+ "test:node": "echo skipped",
+ "test:browser": "echo skipped",
+ "unit-test": "npm run unit-test:node && npm run unit-test:browser",
+ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
+ "unit-test:browser": "echo skipped",
+ "integration-test": "npm run integration-test:node && npm run integration-test:browser",
+ "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
+ "integration-test:browser": "echo skipped",
+ "docs": "echo skipped"
},
"sideEffects": false,
"autoPublish": true
diff --git a/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_create_test.js b/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_create_test.js
new file mode 100644
index 000000000000..c9008cee2875
--- /dev/null
+++ b/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_create_test.js
@@ -0,0 +1,147 @@
+let nock = require('nock');
+
+module.exports.hash = "9ce42a0ead77b05ef4fbb8767344b21f";
+
+module.exports.testInfo = {"uniqueName":{},"newDate":{}}
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .get('/common/discovery/instance')
+ .query(true)
+ .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [
+ 'Cache-Control',
+ 'max-age=86400, private',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Access-Control-Allow-Methods',
+ 'GET, OPTIONS',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ '22bae914-ff50-4d80-9999-fb66d30f3100',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - SEASLR2 ProdSlices',
+ 'Set-Cookie',
+ 'fpc=AtR34GHImEtNpGeNzcHI8ps; expires=Sat, 29-Jan-2022 03:19:09 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrf2AwpacadoKvdkk3h__G1OowUB3noBTyr575daor6sG9x3NPVTK_vMRSZ4F4VPqn4E3Hv5a4eLGAuzvR7AIEKTDHBwwWbIhmfJLP6r0Zff5NrZsfnlGDbYsXfam6AbNmQcZCJGm5tMp224xNrpSPTM3ikj1GUGklQb4jloDdFdYgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:09 GMT',
+ 'Content-Length',
+ '980'
+]);
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration')
+ .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [
+ 'Cache-Control',
+ 'max-age=86400, private',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Access-Control-Allow-Methods',
+ 'GET, OPTIONS',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ 'f9d8b77c-5495-4058-a16d-afdd5c4c4f00',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - SEASLR1 ProdSlices',
+ 'Set-Cookie',
+ 'fpc=AmKamCK0ApNElq9nSHL7SxE; expires=Sat, 29-Jan-2022 03:19:09 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrENahb0E9MXNroLowxj0aMhZCoJjtisj9V8yPEK0BNeLDXSoatWyEPcpZyIMyMxZvwo-UkscmaR2ZDKIH3sWK-sEwbdir-8l7lbTTakFYgplX_iFj0V39sh92ZSrb_-iyjGZDC_2TJE8BfRzNyrSjzAy81jjE8MAGwvHF1mDXr2ggAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:09 GMT',
+ 'Content-Length',
+ '1753'
+]);
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=861286a2-3a9c-4471-8891-3f2cec65db3d&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D")
+ .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [
+ 'Cache-Control',
+ 'no-store, no-cache',
+ 'Pragma',
+ 'no-cache',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Expires',
+ '-1',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ 'c8a5e3e9-f35c-4dbc-a255-5341a6854f00',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - SEASLR2 ProdSlices',
+ 'x-ms-clitelem',
+ '1,0,0,,',
+ 'Set-Cookie',
+ 'fpc=An59P9eGnf5Ogan486P5dIHLj78gAQAAAC4cX9kOAAAA; expires=Sat, 29-Jan-2022 03:19:10 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:10 GMT',
+ 'Content-Length',
+ '1393'
+]);
+
+nock('https://management.azure.com:443', {"encodedQueryParams":true})
+ .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Attestation/attestationProviders/myservicexxx', {"location":"eastus","properties":{}})
+ .query(true)
+ .reply(201, {"id":"/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Attestation/attestationProviders/myservicexxx","name":"myservicexxx","type":"Microsoft.Attestation/attestationProviders","location":"eastus","properties":{"trustModel":"AAD","status":"Ready","attestUri":"https://myservicexxx.eus.attest.azure.net"}}, [
+ 'Cache-Control',
+ 'no-cache',
+ 'Pragma',
+ 'no-cache',
+ 'Content-Length',
+ '351',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Expires',
+ '-1',
+ 'Location',
+ 'https://myservicexxx.eus.attest.azure.net/',
+ 'x-ms-ratelimit-remaining-subscription-writes',
+ '1199',
+ 'x-ms-request-id',
+ '00-63c7b0ce4101ea4ea05daccbdeae3f85-8ac5553a9aac1242-01',
+ 'x-ms-maa-service-version',
+ '1.10.01780.0001',
+ 'Server',
+ 'Kestrel',
+ 'x-ms-correlation-request-id',
+ 'ccb67430-6c60-422c-a5ca-51e6f0e7f675',
+ 'x-ms-routing-request-id',
+ 'SOUTHEASTASIA:20211230T031918Z:ccb67430-6c60-422c-a5ca-51e6f0e7f675',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:18 GMT'
+]);
diff --git a/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_delete_test.js b/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_delete_test.js
new file mode 100644
index 000000000000..2280721007c8
--- /dev/null
+++ b/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_delete_test.js
@@ -0,0 +1,177 @@
+let nock = require('nock');
+
+module.exports.hash = "7ed884d7172fb255a1bc6015b496565b";
+
+module.exports.testInfo = {"uniqueName":{},"newDate":{}}
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .get('/common/discovery/instance')
+ .query(true)
+ .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [
+ 'Cache-Control',
+ 'max-age=86400, private',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Access-Control-Allow-Methods',
+ 'GET, OPTIONS',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ 'cc627666-e0af-4a19-bdb7-d110aeae4200',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - KRSLR2 ProdSlices',
+ 'Set-Cookie',
+ 'fpc=AtHEhSZNXIRIjbqFE_EFjIM; expires=Sat, 29-Jan-2022 03:19:24 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr_9b10xe2fGr0C5GLm9e1spsqkWS-0iTTXh6pGoiDKUO9Pst5TBqeFY3hYWCj0Mb3LdvIOrJFWKtmNsDl8CMRlx-0t6wmDYLlncjYbgLvalIjIDACHZJoGLPwKAW8OTWBnUSS93J6UDfGhE9lB4uMlcT9dObLgdx6KplClV5ILLAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:24 GMT',
+ 'Content-Length',
+ '980'
+]);
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration')
+ .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [
+ 'Cache-Control',
+ 'max-age=86400, private',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Access-Control-Allow-Methods',
+ 'GET, OPTIONS',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ '22bae914-ff50-4d80-9999-fb661b103100',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - SEASLR2 ProdSlices',
+ 'Set-Cookie',
+ 'fpc=Agaxp5np3StAlIbqK_SVBt8; expires=Sat, 29-Jan-2022 03:19:24 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrX4KzJHO3LglT0HH93vO54GESPJqMjhAWiLlWLJ60wBkUj7KTzdl3f2Q3wEcr_Kj-dBF5dVs5in1yhhV4CTpLNB-xBPHBF065P5PUhSAIPUnq_vAJjZ3CEwhX5BMa__lhEYgLcsikMuUvQK8r8P--W-Y0oNb3IbL9ee_vSFStXREgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:24 GMT',
+ 'Content-Length',
+ '1753'
+]);
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=4ce40030-93e9-4cc9-bc01-fa72baae571b&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D")
+ .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [
+ 'Cache-Control',
+ 'no-store, no-cache',
+ 'Pragma',
+ 'no-cache',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Expires',
+ '-1',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ 'f9d8b77c-5495-4058-a16d-afddac4c4f00',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - SEASLR1 ProdSlices',
+ 'x-ms-clitelem',
+ '1,0,0,,',
+ 'Set-Cookie',
+ 'fpc=AqYWwVegETRDm6Egl6fjnXbLj78gAQAAADwcX9kOAAAA; expires=Sat, 29-Jan-2022 03:19:24 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:24 GMT',
+ 'Content-Length',
+ '1393'
+]);
+
+nock('https://management.azure.com:443', {"encodedQueryParams":true})
+ .delete('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Attestation/attestationProviders/myservicexxx')
+ .query(true)
+ .reply(200, "", [
+ 'Cache-Control',
+ 'no-cache',
+ 'Pragma',
+ 'no-cache',
+ 'Expires',
+ '-1',
+ 'x-ms-request-id',
+ '00-a6af2bbc153e18489669b95183497e2e-3735a1a227d5d840-01',
+ 'x-ms-maa-service-version',
+ '1.10.01780.0001',
+ 'Server',
+ 'Kestrel',
+ 'x-ms-ratelimit-remaining-subscription-deletes',
+ '14999',
+ 'x-ms-correlation-request-id',
+ '397b49d1-8e61-4675-b4c9-b84e5cb3c9fe',
+ 'x-ms-routing-request-id',
+ 'SOUTHEASTASIA:20211230T031932Z:397b49d1-8e61-4675-b4c9-b84e5cb3c9fe',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:32 GMT',
+ 'Content-Length',
+ '0'
+]);
+
+nock('https://management.azure.com:443', {"encodedQueryParams":true})
+ .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Attestation/attestationProviders')
+ .query(true)
+ .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bdefff92ff0742ea40440c000000"], [
+ 'Cache-Control',
+ 'no-cache',
+ 'Pragma',
+ 'no-cache',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Content-Encoding',
+ 'gzip',
+ 'Expires',
+ '-1',
+ 'Vary',
+ 'Accept-Encoding',
+ 'x-ms-ratelimit-remaining-subscription-reads',
+ '11997',
+ 'x-ms-request-id',
+ 'e5b3e22d-48d7-424c-938e-4cce568251a2',
+ 'x-ms-correlation-request-id',
+ 'e5b3e22d-48d7-424c-938e-4cce568251a2',
+ 'x-ms-routing-request-id',
+ 'SOUTHEASTASIA:20211230T031932Z:e5b3e22d-48d7-424c-938e-4cce568251a2',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:32 GMT',
+ 'Content-Length',
+ '133'
+]);
diff --git a/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_get_test.js b/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_get_test.js
new file mode 100644
index 000000000000..c7d04104cba1
--- /dev/null
+++ b/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_get_test.js
@@ -0,0 +1,149 @@
+let nock = require('nock');
+
+module.exports.hash = "8d0623430faa706bfcf3d97f04ab4594";
+
+module.exports.testInfo = {"uniqueName":{},"newDate":{}}
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .get('/common/discovery/instance')
+ .query(true)
+ .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [
+ 'Cache-Control',
+ 'max-age=86400, private',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Access-Control-Allow-Methods',
+ 'GET, OPTIONS',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ 'f9d8b77c-5495-4058-a16d-afdd814c4f00',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - SEASLR1 ProdSlices',
+ 'Set-Cookie',
+ 'fpc=Arq6eKxUeNJNpWfYLnbPg2Y; expires=Sat, 29-Jan-2022 03:19:18 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrTiGJIFNIC2neIlhJyYHHv5MGLBZjGMoAfTA01s6rUkyzHsx-e9mfE2x0IRSoz9SA7MA1a6R7_5g_RQNsqOgd2EbUiuVyzIfrkR3l4PkPXrjRGFQnQd5EsboSpUHV2tiP2dOt54-nyisasEuD3afux99j-DlRdwjnBaTb3GQ-D2UgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:18 GMT',
+ 'Content-Length',
+ '980'
+]);
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration')
+ .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [
+ 'Cache-Control',
+ 'max-age=86400, private',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Access-Control-Allow-Methods',
+ 'GET, OPTIONS',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ 'cc627666-e0af-4a19-bdb7-d1108aae4200',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - KRSLR2 ProdSlices',
+ 'Set-Cookie',
+ 'fpc=AhBi7lWmL_xOl59GMHg9hps; expires=Sat, 29-Jan-2022 03:19:19 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr46-N6DR6Nq76tA5h6uucmllcBbJlQCmIPpXXwvHJxo8KMvbIRLz8jkWhTXxnSi5vzp1BB4ty_c3eqGyLqNQ_2ZoiM18MYP4vmXiFNOqUr3mLMFyRz0fvjHw4UEEDZGRYNqFkcZVysLfnPkmGs7cMhDyO-vmfsRoS8wJ5bR3PwEQgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:18 GMT',
+ 'Content-Length',
+ '1753'
+]);
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=b193a4ee-3b62-4cf5-bbab-da4942265901&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D")
+ .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [
+ 'Cache-Control',
+ 'no-store, no-cache',
+ 'Pragma',
+ 'no-cache',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Expires',
+ '-1',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ 'c8a5e3e9-f35c-4dbc-a255-5341e1854f00',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - SEASLR2 ProdSlices',
+ 'x-ms-clitelem',
+ '1,0,0,,',
+ 'Set-Cookie',
+ 'fpc=AudsgMvVuHFKor-gRytqnG_Lj78gAQAAADYcX9kOAAAA; expires=Sat, 29-Jan-2022 03:19:19 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:19 GMT',
+ 'Content-Length',
+ '1393'
+]);
+
+nock('https://management.azure.com:443', {"encodedQueryParams":true})
+ .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Attestation/attestationProviders/myservicexxx')
+ .query(true)
+ .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e8f5b7c9501faddccfdfed2365d5c37797d594cf377efde7d34fa68992d7242abf3697bbdc2a7b7074bef94d5943fa3f7f2ac69d7f88c305ce5755be4cd478f7ef1476dbd6eda2faa595e529be3e3a7d40070a8e5a38f5ee5d9ec9a3e10e05fd5057d366fdb55f3e86e80f2385f37636934ce7eb0aef3f1326f3ffa25bf","e4ff01c03d39285f010000"], [
+ 'Cache-Control',
+ 'no-cache',
+ 'Pragma',
+ 'no-cache',
+ 'Transfer-Encoding',
+ 'chunked',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Content-Encoding',
+ 'gzip',
+ 'Expires',
+ '-1',
+ 'Vary',
+ 'Accept-Encoding',
+ 'x-ms-ratelimit-remaining-subscription-reads',
+ '11999',
+ 'x-ms-request-id',
+ '00-cad15b21a3301841a124d363ac5a2f17-dbce01cb5e362443-01',
+ 'x-ms-maa-service-version',
+ '1.10.01780.0001',
+ 'Server',
+ 'Kestrel',
+ 'x-ms-correlation-request-id',
+ '1b7a50a2-03c1-4232-a7af-b09a7e07f6bd',
+ 'x-ms-routing-request-id',
+ 'SOUTHEASTASIA:20211230T031919Z:1b7a50a2-03c1-4232-a7af-b09a7e07f6bd',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:19 GMT'
+]);
diff --git a/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_list_test.js b/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_list_test.js
new file mode 100644
index 000000000000..7935523f09ca
--- /dev/null
+++ b/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_list_test.js
@@ -0,0 +1,149 @@
+let nock = require('nock');
+
+module.exports.hash = "997d2ddde2d9fba547675efc3ccedb49";
+
+module.exports.testInfo = {"uniqueName":{},"newDate":{}}
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .get('/common/discovery/instance')
+ .query(true)
+ .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [
+ 'Cache-Control',
+ 'max-age=86400, private',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Access-Control-Allow-Methods',
+ 'GET, OPTIONS',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ 'f9d8b77c-5495-4058-a16d-afdd894c4f00',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - SEASLR1 ProdSlices',
+ 'Set-Cookie',
+ 'fpc=AjSPVu2ix8FHoqp2qcohtXQ; expires=Sat, 29-Jan-2022 03:19:19 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrM1nPz0jsdma0FOgYiyaimn22skShuouOcCrlcw0qYLHUFaGbLwcvd5OkJskLHSmuK1Q3XLMZHjNHkjBAbCEigqcjRP32Qm3oSnE6ziaUVnlrc--QfgcnUAy8EOThevBCEOBy0h8Q6AGuUeKIxdF1YiHw9O6IEn4VebN_blIu_bAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:19 GMT',
+ 'Content-Length',
+ '980'
+]);
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration')
+ .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [
+ 'Cache-Control',
+ 'max-age=86400, private',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Access-Control-Allow-Methods',
+ 'GET, OPTIONS',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ 'eecc4b7d-edeb-42ed-9476-136542594300',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - KRSLR1 ProdSlices',
+ 'Set-Cookie',
+ 'fpc=AjLG9oVQlYtKmIhNO9HlDxU; expires=Sat, 29-Jan-2022 03:19:20 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrKOx3mnqHOu4g2eHlxfQuop5BA-EhZwr7IjwseYhe49pucoKwi9Um8rUNhpUV8Vt5xIy_RKJWJnJ8EXYHfIv0yhhs7_-T1vRvCPn1WOw3jEALA5LoflHLcP7VkCWUeKlWOoDYxsdN3mJLr5imvjgAdleUCfsFfE6zRY1jLouEod4gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:19 GMT',
+ 'Content-Length',
+ '1753'
+]);
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=df820000-9886-4608-ab2a-240a55091c0a&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D")
+ .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [
+ 'Cache-Control',
+ 'no-store, no-cache',
+ 'Pragma',
+ 'no-cache',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Expires',
+ '-1',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ 'cc627666-e0af-4a19-bdb7-d11095ae4200',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - KRSLR2 ProdSlices',
+ 'x-ms-clitelem',
+ '1,0,0,,',
+ 'Set-Cookie',
+ 'fpc=Ahku6TkXY7FHvfnOnqbyC2zLj78gAQAAADccX9kOAAAA; expires=Sat, 29-Jan-2022 03:19:20 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:20 GMT',
+ 'Content-Length',
+ '1393'
+]);
+
+nock('https://management.azure.com:443', {"encodedQueryParams":true})
+ .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Attestation/attestationProviders')
+ .query(true)
+ .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffc5131fbe8d147779bf5a499d6c5aa2daa6573f7e1def9c3fbb383f3ed7bd34f1f6cefefeeed6f3fdc9d3ed83e989eef3c98ce26e77bfbbb77ebbca9d6f534ffbcaed6abe6eee2faa79b366fdabbabbaba2c6679dddcfda298d655539db7e3e3165f65807e3773bfbfb44d17d74d5e5f16d3fcddbb771f8d3e5a660bc2eea3cea7edf50a9fde1e2cbd535653fe8cdecbb3a65de333c27095d76d91371f3dfac51fb5f5ba69bfa86679496d8e8f9f5203c0a1968f3e7a9567b36bfa40807f5517f4d9bc6d57cda3bb01cae37cdd8ca5d138fbc1bacec7cbbcfde897fc92efff","92ff074913c0a86b010000"], [
+ 'Cache-Control',
+ 'no-cache',
+ 'Pragma',
+ 'no-cache',
+ 'Transfer-Encoding',
+ 'chunked',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Content-Encoding',
+ 'gzip',
+ 'Expires',
+ '-1',
+ 'Vary',
+ 'Accept-Encoding',
+ 'x-ms-ratelimit-remaining-subscription-reads',
+ '11998',
+ 'x-ms-request-id',
+ '00-733acc6d69bc6546a94fcc8c4c57140e-cf84e900f13ed74c-01',
+ 'x-ms-maa-service-version',
+ '1.10.01780.0001',
+ 'Server',
+ 'Kestrel',
+ 'x-ms-correlation-request-id',
+ '07d0e5d1-54f4-4b6a-bc36-e052c6331416',
+ 'x-ms-routing-request-id',
+ 'SOUTHEASTASIA:20211230T031920Z:07d0e5d1-54f4-4b6a-bc36-e052c6331416',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:20 GMT'
+]);
diff --git a/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_update_test.js b/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_update_test.js
new file mode 100644
index 000000000000..1dd650d75a7c
--- /dev/null
+++ b/sdk/attestation/arm-attestation/recordings/node/attestation_test/recording_attestationproviders_update_test.js
@@ -0,0 +1,149 @@
+let nock = require('nock');
+
+module.exports.hash = "af7f256d9ab552cba33986c57f7f53ea";
+
+module.exports.testInfo = {"uniqueName":{},"newDate":{}}
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .get('/common/discovery/instance')
+ .query(true)
+ .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [
+ 'Cache-Control',
+ 'max-age=86400, private',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Access-Control-Allow-Methods',
+ 'GET, OPTIONS',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ 'cc627666-e0af-4a19-bdb7-d11099ae4200',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - KRSLR2 ProdSlices',
+ 'Set-Cookie',
+ 'fpc=Au0hl0x6C-xOll5vgsB9Rlk; expires=Sat, 29-Jan-2022 03:19:20 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrLvqEid8XmwmMlrex8vhoJYY0ccHUhaUcTo5S1vAlgZmQW24MykVtYlrLdQ2jJZ3Gh9ZVpTsKk6NfdeXNejZhFaxXY62WEFKqKFuEJXjwmVKXLJx3gg3yczSCUxBpNE086hSlb-mCyYqb6_v5mN0F8uWxpxnevpwAUfwc91Mc9_ogAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:20 GMT',
+ 'Content-Length',
+ '980'
+]);
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration')
+ .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [
+ 'Cache-Control',
+ 'max-age=86400, private',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Access-Control-Allow-Origin',
+ '*',
+ 'Access-Control-Allow-Methods',
+ 'GET, OPTIONS',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ '22bae914-ff50-4d80-9999-fb6605103100',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - SEASLR2 ProdSlices',
+ 'Set-Cookie',
+ 'fpc=Aj_sL1_t78pPuxoF1q__XN4; expires=Sat, 29-Jan-2022 03:19:21 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrMVJs1FDMQGJaJc8sgQB0YiSNQhyfnnUeKc5G3Whs5B4jDogpAWn_xDQtat_BLg1c5HggkVBj2XlKCyiImDUVb62g-VSQbZhhTFLQ2yFpDsbShZ2xx7ajn6xYs_-uWPGeHS6JXnU8fzon___X5OOu1fjkFJs9PAjO-TdWnepRiN4gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:20 GMT',
+ 'Content-Length',
+ '1753'
+]);
+
+nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
+ .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=3bea3839-d563-41ed-8f2e-e0bc8b4fe672&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D")
+ .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [
+ 'Cache-Control',
+ 'no-store, no-cache',
+ 'Pragma',
+ 'no-cache',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Expires',
+ '-1',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'P3P',
+ 'CP="DSP CUR OTPi IND OTRi ONL FIN"',
+ 'x-ms-request-id',
+ 'cc627666-e0af-4a19-bdb7-d1109cae4200',
+ 'x-ms-ests-server',
+ '2.1.12261.17 - KRSLR2 ProdSlices',
+ 'x-ms-clitelem',
+ '1,0,0,,',
+ 'Set-Cookie',
+ 'fpc=AnKkc5p9DmBPp9z3Ika463vLj78gAQAAADgcX9kOAAAA; expires=Sat, 29-Jan-2022 03:19:21 GMT; path=/; secure; HttpOnly; SameSite=None',
+ 'Set-Cookie',
+ 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
+ 'Set-Cookie',
+ 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:21 GMT',
+ 'Content-Length',
+ '1393'
+]);
+
+nock('https://management.azure.com:443', {"encodedQueryParams":true})
+ .patch('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Attestation/attestationProviders/myservicexxx', {"tags":{"tag1":"value1","tag2":"value2"}})
+ .query(true)
+ .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e8f5b7c9501faddccfdfed2365d5c37797d594cf377efde7d34fa68992d7242abf3697bbdc2a7b7074bef94d5943fa3f7f2ac69d7f8accd2e9a8f1efd62fcdca5cf2fb3729defcae77be6efbd8f7ec9e8231aca2aafdb2297e6f5ba69bfa86679498d8e8f9fd21be890403efae8559ecdaee903c1e2abbaa0cfe66dbb6a1edd0dc636ced7cd581a8db31faceb7cbcccdb8f7ec9","2ff97f004cb4757388010000"], [
+ 'Cache-Control',
+ 'no-cache',
+ 'Pragma',
+ 'no-cache',
+ 'Transfer-Encoding',
+ 'chunked',
+ 'Content-Type',
+ 'application/json; charset=utf-8',
+ 'Content-Encoding',
+ 'gzip',
+ 'Expires',
+ '-1',
+ 'Vary',
+ 'Accept-Encoding',
+ 'x-ms-ratelimit-remaining-subscription-writes',
+ '1198',
+ 'x-ms-request-id',
+ '00-115b09fbc7e208438e5660815f24fed9-c85ad0217d0b1e43-01',
+ 'x-ms-maa-service-version',
+ '1.10.01780.0001',
+ 'Server',
+ 'Kestrel',
+ 'x-ms-correlation-request-id',
+ 'aee3de3c-64c4-4de7-9169-bcf1faaa09d2',
+ 'x-ms-routing-request-id',
+ 'SOUTHEASTASIA:20211230T031924Z:aee3de3c-64c4-4de7-9169-bcf1faaa09d2',
+ 'Strict-Transport-Security',
+ 'max-age=31536000; includeSubDomains',
+ 'X-Content-Type-Options',
+ 'nosniff',
+ 'Date',
+ 'Thu, 30 Dec 2021 03:19:24 GMT'
+]);
diff --git a/sdk/attestation/arm-attestation/review/arm-attestation.api.md b/sdk/attestation/arm-attestation/review/arm-attestation.api.md
new file mode 100644
index 000000000000..f03f0a4f8d95
--- /dev/null
+++ b/sdk/attestation/arm-attestation/review/arm-attestation.api.md
@@ -0,0 +1,346 @@
+## API Report File for "@azure/arm-attestation"
+
+> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
+
+```ts
+
+import * as coreAuth from '@azure/core-auth';
+import * as coreClient from '@azure/core-client';
+import { PagedAsyncIterableIterator } from '@azure/core-paging';
+
+// @public (undocumented)
+export class AttestationManagementClient extends coreClient.ServiceClient {
+ // (undocumented)
+ $host: string;
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AttestationManagementClientOptionalParams);
+ // (undocumented)
+ apiVersion: string;
+ // (undocumented)
+ attestationProviders: AttestationProviders;
+ // (undocumented)
+ operations: Operations;
+ // (undocumented)
+ privateEndpointConnections: PrivateEndpointConnections;
+ // (undocumented)
+ subscriptionId: string;
+}
+
+// @public
+export interface AttestationManagementClientOptionalParams extends coreClient.ServiceClientOptions {
+ $host?: string;
+ apiVersion?: string;
+ endpoint?: string;
+}
+
+// @public
+export type AttestationProvider = TrackedResource & {
+ readonly systemData?: SystemData;
+ trustModel?: string;
+ status?: AttestationServiceStatus;
+ attestUri?: string;
+ readonly privateEndpointConnections?: PrivateEndpointConnection[];
+};
+
+// @public
+export interface AttestationProviderListResult {
+ readonly systemData?: SystemData;
+ value?: AttestationProvider[];
+}
+
+// @public
+export interface AttestationProviders {
+ create(resourceGroupName: string, providerName: string, creationParams: AttestationServiceCreationParams, options?: AttestationProvidersCreateOptionalParams): Promise;
+ delete(resourceGroupName: string, providerName: string, options?: AttestationProvidersDeleteOptionalParams): Promise;
+ get(resourceGroupName: string, providerName: string, options?: AttestationProvidersGetOptionalParams): Promise;
+ getDefaultByLocation(location: string, options?: AttestationProvidersGetDefaultByLocationOptionalParams): Promise;
+ list(options?: AttestationProvidersListOptionalParams): Promise;
+ listByResourceGroup(resourceGroupName: string, options?: AttestationProvidersListByResourceGroupOptionalParams): Promise;
+ listDefault(options?: AttestationProvidersListDefaultOptionalParams): Promise;
+ update(resourceGroupName: string, providerName: string, updateParams: AttestationServicePatchParams, options?: AttestationProvidersUpdateOptionalParams): Promise;
+}
+
+// @public
+export interface AttestationProvidersCreateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AttestationProvidersCreateResponse = AttestationProvider;
+
+// @public
+export interface AttestationProvidersDeleteOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export interface AttestationProvidersGetDefaultByLocationOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AttestationProvidersGetDefaultByLocationResponse = AttestationProvider;
+
+// @public
+export interface AttestationProvidersGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AttestationProvidersGetResponse = AttestationProvider;
+
+// @public
+export interface AttestationProvidersListByResourceGroupOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AttestationProvidersListByResourceGroupResponse = AttestationProviderListResult;
+
+// @public
+export interface AttestationProvidersListDefaultOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AttestationProvidersListDefaultResponse = AttestationProviderListResult;
+
+// @public
+export interface AttestationProvidersListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AttestationProvidersListResponse = AttestationProviderListResult;
+
+// @public
+export interface AttestationProvidersUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AttestationProvidersUpdateResponse = AttestationProvider;
+
+// @public
+export interface AttestationServiceCreationParams {
+ location: string;
+ properties: AttestationServiceCreationSpecificParams;
+ tags?: {
+ [propertyName: string]: string;
+ };
+}
+
+// @public
+export interface AttestationServiceCreationSpecificParams {
+ policySigningCertificates?: JsonWebKeySet;
+}
+
+// @public
+export interface AttestationServicePatchParams {
+ tags?: {
+ [propertyName: string]: string;
+ };
+}
+
+// @public
+export type AttestationServiceStatus = string;
+
+// @public
+export interface CloudError {
+ error?: CloudErrorBody;
+}
+
+// @public
+export interface CloudErrorBody {
+ code?: string;
+ message?: string;
+}
+
+// @public
+export type CreatedByType = string;
+
+// @public (undocumented)
+interface JsonWebKey_2 {
+ alg?: string;
+ crv?: string;
+ d?: string;
+ dp?: string;
+ dq?: string;
+ e?: string;
+ k?: string;
+ kid?: string;
+ kty: string;
+ n?: string;
+ p?: string;
+ q?: string;
+ qi?: string;
+ use?: string;
+ x?: string;
+ x5C?: string[];
+ y?: string;
+}
+export { JsonWebKey_2 as JsonWebKey }
+
+// @public (undocumented)
+export interface JsonWebKeySet {
+ keys?: JsonWebKey_2[];
+}
+
+// @public
+export enum KnownAttestationServiceStatus {
+ // (undocumented)
+ Error = "Error",
+ // (undocumented)
+ NotReady = "NotReady",
+ // (undocumented)
+ Ready = "Ready"
+}
+
+// @public
+export enum KnownCreatedByType {
+ // (undocumented)
+ Application = "Application",
+ // (undocumented)
+ Key = "Key",
+ // (undocumented)
+ ManagedIdentity = "ManagedIdentity",
+ // (undocumented)
+ User = "User"
+}
+
+// @public
+export enum KnownPrivateEndpointConnectionProvisioningState {
+ // (undocumented)
+ Creating = "Creating",
+ // (undocumented)
+ Deleting = "Deleting",
+ // (undocumented)
+ Failed = "Failed",
+ // (undocumented)
+ Succeeded = "Succeeded"
+}
+
+// @public
+export enum KnownPrivateEndpointServiceConnectionStatus {
+ // (undocumented)
+ Approved = "Approved",
+ // (undocumented)
+ Pending = "Pending",
+ // (undocumented)
+ Rejected = "Rejected"
+}
+
+// @public
+export interface OperationList {
+ readonly systemData?: SystemData;
+ value?: OperationsDefinition[];
+}
+
+// @public
+export interface Operations {
+ list(options?: OperationsListOptionalParams): Promise;
+}
+
+// @public
+export interface OperationsDefinition {
+ display?: OperationsDisplayDefinition;
+ name?: string;
+}
+
+// @public
+export interface OperationsDisplayDefinition {
+ description?: string;
+ operation?: string;
+ provider?: string;
+ resource?: string;
+}
+
+// @public
+export interface OperationsListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type OperationsListResponse = OperationList;
+
+// @public
+export interface PrivateEndpoint {
+ readonly id?: string;
+}
+
+// @public
+export type PrivateEndpointConnection = Resource & {
+ privateEndpoint?: PrivateEndpoint;
+ privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState;
+ readonly provisioningState?: PrivateEndpointConnectionProvisioningState;
+};
+
+// @public
+export interface PrivateEndpointConnectionListResult {
+ value?: PrivateEndpointConnection[];
+}
+
+// @public
+export type PrivateEndpointConnectionProvisioningState = string;
+
+// @public
+export interface PrivateEndpointConnections {
+ create(resourceGroupName: string, providerName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOptionalParams): Promise;
+ delete(resourceGroupName: string, providerName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise;
+ get(resourceGroupName: string, providerName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise;
+ list(resourceGroupName: string, providerName: string, options?: PrivateEndpointConnectionsListOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface PrivateEndpointConnectionsCreateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PrivateEndpointConnectionsCreateResponse = PrivateEndpointConnection;
+
+// @public
+export interface PrivateEndpointConnectionsDeleteOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export interface PrivateEndpointConnectionsGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection;
+
+// @public
+export interface PrivateEndpointConnectionsListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult;
+
+// @public
+export type PrivateEndpointServiceConnectionStatus = string;
+
+// @public
+export interface PrivateLinkServiceConnectionState {
+ actionsRequired?: string;
+ description?: string;
+ status?: PrivateEndpointServiceConnectionStatus;
+}
+
+// @public
+export interface Resource {
+ readonly id?: string;
+ readonly name?: string;
+ readonly type?: string;
+}
+
+// @public
+export interface SystemData {
+ createdAt?: Date;
+ createdBy?: string;
+ createdByType?: CreatedByType;
+ lastModifiedAt?: Date;
+ lastModifiedBy?: string;
+ lastModifiedByType?: CreatedByType;
+}
+
+// @public
+export type TrackedResource = Resource & {
+ tags?: {
+ [propertyName: string]: string;
+ };
+ location: string;
+};
+
+// (No @packageDocumentation comment for this package)
+
+```
diff --git a/sdk/attestation/arm-attestation/rollup.config.js b/sdk/attestation/arm-attestation/rollup.config.js
index 562646229ed1..9be1955eb7f1 100644
--- a/sdk/attestation/arm-attestation/rollup.config.js
+++ b/sdk/attestation/arm-attestation/rollup.config.js
@@ -1,37 +1,188 @@
-import rollup from "rollup";
-import nodeResolve from "rollup-plugin-node-resolve";
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import nodeResolve from "@rollup/plugin-node-resolve";
+import cjs from "@rollup/plugin-commonjs";
import sourcemaps from "rollup-plugin-sourcemaps";
+import multiEntry from "@rollup/plugin-multi-entry";
+import json from "@rollup/plugin-json";
+
+import nodeBuiltins from "builtin-modules";
+
+/**
+ * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
+ *
+ * NOTE: this manual configuration is only needed because OpenTelemetry uses an
+ * __exportStar downleveled helper function to declare its exports which confuses
+ * rollup's automatic discovery mechanism.
+ *
+ * @returns an object reference that can be `...`'d into your cjs() configuration.
+ */
+export function openTelemetryCommonJs() {
+ const namedExports = {};
+
+ for (const key of [
+ "@opentelemetry/api",
+ "@azure/core-tracing/node_modules/@opentelemetry/api"
+ ]) {
+ namedExports[key] = [
+ "SpanKind",
+ "TraceFlags",
+ "getSpan",
+ "setSpan",
+ "SpanStatusCode",
+ "getSpanContext",
+ "setSpanContext"
+ ];
+ }
+
+ const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
+
+ for (const version of releasedOpenTelemetryVersions) {
+ namedExports[
+ // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
+ `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
+ ] = [
+ "SpanKind",
+ "TraceFlags",
+ "getSpan",
+ "setSpan",
+ "StatusCode",
+ "CanonicalCode",
+ "getSpanContext",
+ "setSpanContext"
+ ];
+ }
+
+ return namedExports;
+}
+
+// #region Warning Handler
/**
- * @type {rollup.RollupFileOptions}
+ * A function that can determine whether a rollupwarning should be ignored. If
+ * the function returns `true`, then the warning will not be displayed.
*/
-const config = {
- input: "./esm/attestationManagementClient.js",
- external: [
- "@azure/ms-rest-js",
- "@azure/ms-rest-azure-js"
- ],
- output: {
- file: "./dist/arm-attestation.js",
- format: "umd",
- name: "Azure.ArmAttestation",
- sourcemap: true,
- globals: {
- "@azure/ms-rest-js": "msRest",
- "@azure/ms-rest-azure-js": "msRestAzure"
+
+function ignoreNiseSinonEvalWarnings(warning) {
+ return (
+ warning.code === "EVAL" &&
+ warning.id &&
+ (warning.id.includes("node_modules/nise") ||
+ warning.id.includes("node_modules/sinon")) === true
+ );
+}
+
+function ignoreChaiCircularDependencyWarnings(warning) {
+ return (
+ warning.code === "CIRCULAR_DEPENDENCY" &&
+ warning.importer && warning.importer.includes("node_modules/chai") === true
+ );
+}
+
+const warningInhibitors = [
+ ignoreChaiCircularDependencyWarnings,
+ ignoreNiseSinonEvalWarnings
+];
+
+/**
+ * Construct a warning handler for the shared rollup configuration
+ * that ignores certain warnings that are not relevant to testing.
+ */
+function makeOnWarnForTesting() {
+ return (warning, warn) => {
+ // If every inhibitor returns false (i.e. no inhibitors), then show the warning
+ if (warningInhibitors.every((inhib) => !inhib(warning))) {
+ warn(warning);
+ }
+ };
+}
+
+// #endregion
+
+function makeBrowserTestConfig() {
+ const config = {
+ input: {
+ include: ["dist-esm/test/**/*.spec.js"],
+ exclude: ["dist-esm/test/**/node/**"]
},
- banner: `/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */`
- },
- plugins: [
- nodeResolve({ mainFields: ['module', 'main'] }),
- sourcemaps()
- ]
+ output: {
+ file: `dist-test/index.browser.js`,
+ format: "umd",
+ sourcemap: true
+ },
+ preserveSymlinks: false,
+ plugins: [
+ multiEntry({ exports: false }),
+ nodeResolve({
+ mainFields: ["module", "browser"]
+ }),
+ cjs({
+ namedExports: {
+ // Chai's strange internal architecture makes it impossible to statically
+ // analyze its exports.
+ chai: [
+ "version",
+ "use",
+ "util",
+ "config",
+ "expect",
+ "should",
+ "assert"
+ ],
+ ...openTelemetryCommonJs()
+ }
+ }),
+ json(),
+ sourcemaps()
+ //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
+ ],
+ onwarn: makeOnWarnForTesting(),
+ // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
+ // rollup started respecting the "sideEffects" field in package.json. Since
+ // our package.json sets "sideEffects=false", this also applies to test
+ // code, which causes all tests to be removed by tree-shaking.
+ treeshake: false
+ };
+
+ return config;
+}
+
+const defaultConfigurationOptions = {
+ disableBrowserBundle: false
};
-export default config;
+export function makeConfig(pkg, options) {
+ options = {
+ ...defaultConfigurationOptions,
+ ...(options || {})
+ };
+
+ const baseConfig = {
+ // Use the package's module field if it has one
+ input: pkg["module"] || "dist-esm/src/index.js",
+ external: [
+ ...nodeBuiltins,
+ ...Object.keys(pkg.dependencies),
+ ...Object.keys(pkg.devDependencies)
+ ],
+ output: { file: "dist/index.js", format: "cjs", sourcemap: true },
+ preserveSymlinks: false,
+ plugins: [sourcemaps(), nodeResolve(), cjs()]
+ };
+
+ const config = [baseConfig];
+
+ if (!options.disableBrowserBundle) {
+ config.push(makeBrowserTestConfig());
+ }
+
+ return config;
+}
+
+export default makeConfig(require("./package.json"));
diff --git a/sdk/attestation/arm-attestation/src/attestationManagementClient.ts b/sdk/attestation/arm-attestation/src/attestationManagementClient.ts
index ab2f54efb640..373d73b0fb5d 100644
--- a/sdk/attestation/arm-attestation/src/attestationManagementClient.ts
+++ b/sdk/attestation/arm-attestation/src/attestationManagementClient.ts
@@ -1,50 +1,87 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import { TokenCredential } from "@azure/core-auth";
-import * as Models from "./models";
-import * as Mappers from "./models/mappers";
-import * as operations from "./operations";
-import { AttestationManagementClientContext } from "./attestationManagementClientContext";
+import * as coreClient from "@azure/core-client";
+import * as coreAuth from "@azure/core-auth";
+import {
+ OperationsImpl,
+ AttestationProvidersImpl,
+ PrivateEndpointConnectionsImpl
+} from "./operations";
+import {
+ Operations,
+ AttestationProviders,
+ PrivateEndpointConnections
+} from "./operationsInterfaces";
+import { AttestationManagementClientOptionalParams } from "./models";
-
-class AttestationManagementClient extends AttestationManagementClientContext {
- // Operation groups
- operations: operations.Operations;
- attestationProviders: operations.AttestationProviders;
+export class AttestationManagementClient extends coreClient.ServiceClient {
+ $host: string;
+ apiVersion: string;
+ subscriptionId: string;
/**
* Initializes a new instance of the AttestationManagementClient class.
- * @param credentials Credentials needed for the client to connect to Azure. Credentials
- * implementing the TokenCredential interface from the @azure/identity package are recommended. For
- * more information about these credentials, see
- * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
- * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
- * @azure/ms-rest-browserauth are also supported.
+ * @param credentials Subscription credentials which uniquely identify client subscription.
* @param subscriptionId The ID of the target subscription.
- * @param [options] The parameter options
+ * @param options The parameter options
*/
- constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AttestationManagementClientOptions) {
- super(credentials, subscriptionId, options);
- this.operations = new operations.Operations(this);
- this.attestationProviders = new operations.AttestationProviders(this);
- }
-}
+ constructor(
+ credentials: coreAuth.TokenCredential,
+ subscriptionId: string,
+ options?: AttestationManagementClientOptionalParams
+ ) {
+ if (credentials === undefined) {
+ throw new Error("'credentials' cannot be null");
+ }
+ if (subscriptionId === undefined) {
+ throw new Error("'subscriptionId' cannot be null");
+ }
+
+ // Initializing default values for options
+ if (!options) {
+ options = {};
+ }
+ const defaults: AttestationManagementClientOptionalParams = {
+ requestContentType: "application/json; charset=utf-8",
+ credential: credentials
+ };
-// Operation Specifications
+ const packageDetails = `azsdk-js-arm-attestation/2.0.0`;
+ const userAgentPrefix =
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
+ : `${packageDetails}`;
-export {
- AttestationManagementClient,
- AttestationManagementClientContext,
- Models as AttestationManagementModels,
- Mappers as AttestationManagementMappers
-};
-export * from "./operations";
+ if (!options.credentialScopes) {
+ options.credentialScopes = ["https://management.azure.com/.default"];
+ }
+ const optionsWithDefaults = {
+ ...defaults,
+ ...options,
+ userAgentOptions: {
+ userAgentPrefix
+ },
+ baseUri: options.endpoint || "https://management.azure.com"
+ };
+ super(optionsWithDefaults);
+ // Parameter assignments
+ this.subscriptionId = subscriptionId;
+
+ // Assigning values to Constant parameters
+ this.$host = options.$host || "https://management.azure.com";
+ this.apiVersion = options.apiVersion || "2020-10-01";
+ this.operations = new OperationsImpl(this);
+ this.attestationProviders = new AttestationProvidersImpl(this);
+ this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
+ }
+
+ operations: Operations;
+ attestationProviders: AttestationProviders;
+ privateEndpointConnections: PrivateEndpointConnections;
+}
diff --git a/sdk/attestation/arm-attestation/src/attestationManagementClientContext.ts b/sdk/attestation/arm-attestation/src/attestationManagementClientContext.ts
deleted file mode 100644
index c094c4cfbaa1..000000000000
--- a/sdk/attestation/arm-attestation/src/attestationManagementClientContext.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
- */
-
-import * as Models from "./models";
-import * as msRest from "@azure/ms-rest-js";
-import { TokenCredential } from "@azure/core-auth";
-import * as msRestAzure from "@azure/ms-rest-azure-js";
-
-const packageName = "@azure/arm-attestation";
-const packageVersion = "1.1.0";
-
-export class AttestationManagementClientContext extends msRestAzure.AzureServiceClient {
- credentials: msRest.ServiceClientCredentials | TokenCredential;
- apiVersion?: string;
- subscriptionId: string;
-
- /**
- * Initializes a new instance of the AttestationManagementClient class.
- * @param credentials Credentials needed for the client to connect to Azure. Credentials
- * implementing the TokenCredential interface from the @azure/identity package are recommended. For
- * more information about these credentials, see
- * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
- * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
- * @azure/ms-rest-browserauth are also supported.
- * @param subscriptionId The ID of the target subscription.
- * @param [options] The parameter options
- */
- constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AttestationManagementClientOptions) {
- if (credentials == undefined) {
- throw new Error('\'credentials\' cannot be null.');
- }
- if (subscriptionId == undefined) {
- throw new Error('\'subscriptionId\' cannot be null.');
- }
-
- if (!options) {
- options = {};
- }
- if(!options.userAgent) {
- const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
- options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
- }
-
- super(credentials, options);
-
- this.apiVersion = '2020-10-01';
- this.acceptLanguage = 'en-US';
- this.longRunningOperationRetryTimeout = 30;
- this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
- this.requestContentType = "application/json; charset=utf-8";
- this.credentials = credentials;
- this.subscriptionId = subscriptionId;
-
- if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
- this.acceptLanguage = options.acceptLanguage;
- }
- if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
- this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
- }
- }
-}
diff --git a/sdk/attestation/arm-attestation/src/index.ts b/sdk/attestation/arm-attestation/src/index.ts
new file mode 100644
index 000000000000..995c8129ac9c
--- /dev/null
+++ b/sdk/attestation/arm-attestation/src/index.ts
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+///
+export * from "./models";
+export { AttestationManagementClient } from "./attestationManagementClient";
+export * from "./operationsInterfaces";
diff --git a/sdk/attestation/arm-attestation/src/models/attestationProvidersMappers.ts b/sdk/attestation/arm-attestation/src/models/attestationProvidersMappers.ts
deleted file mode 100644
index fcead856c16c..000000000000
--- a/sdk/attestation/arm-attestation/src/models/attestationProvidersMappers.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-
-export {
- AttestationProvider,
- AttestationProviderListResult,
- AttestationServiceCreationParams,
- AttestationServiceCreationSpecificParams,
- AttestationServicePatchParams,
- AzureEntityResource,
- BaseResource,
- CloudError,
- JSONWebKey,
- JSONWebKeySet,
- ProxyResource,
- Resource,
- SystemData,
- TrackedResource
-} from "../models/mappers";
diff --git a/sdk/attestation/arm-attestation/src/models/index.ts b/sdk/attestation/arm-attestation/src/models/index.ts
index 9e0198f5ff55..95d2d10815fb 100644
--- a/sdk/attestation/arm-attestation/src/models/index.ts
+++ b/sdk/attestation/arm-attestation/src/models/index.ts
@@ -1,191 +1,140 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js";
-import * as msRest from "@azure/ms-rest-js";
+import * as coreClient from "@azure/core-client";
-export { BaseResource, CloudError };
-
-/**
- * Metadata pertaining to creation and last modification of the resource.
- */
-export interface SystemData {
+/** List of supported operations. */
+export interface OperationList {
/**
- * The identity that created the resource.
+ * The system metadata relating to this resource
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
+ readonly systemData?: SystemData;
+ /** List of supported operations. */
+ value?: OperationsDefinition[];
+}
+
+/** Metadata pertaining to creation and last modification of the resource. */
+export interface SystemData {
+ /** The identity that created the resource. */
createdBy?: string;
- /**
- * The type of identity that created the resource. Possible values include: 'User',
- * 'Application', 'ManagedIdentity', 'Key'
- */
+ /** The type of identity that created the resource. */
createdByType?: CreatedByType;
- /**
- * The timestamp of resource creation (UTC).
- */
+ /** The timestamp of resource creation (UTC). */
createdAt?: Date;
- /**
- * The identity that last modified the resource.
- */
+ /** The identity that last modified the resource. */
lastModifiedBy?: string;
- /**
- * The type of identity that last modified the resource. Possible values include: 'User',
- * 'Application', 'ManagedIdentity', 'Key'
- */
+ /** The type of identity that last modified the resource. */
lastModifiedByType?: CreatedByType;
- /**
- * The type of identity that last modified the resource.
- */
+ /** The timestamp of resource last modification (UTC) */
lastModifiedAt?: Date;
}
-/**
- * Display object with properties of the operation.
- */
+/** Definition object with the name and properties of an operation. */
+export interface OperationsDefinition {
+ /** Name of the operation. */
+ name?: string;
+ /** Display object with properties of the operation. */
+ display?: OperationsDisplayDefinition;
+}
+
+/** Display object with properties of the operation. */
export interface OperationsDisplayDefinition {
- /**
- * Resource provider of the operation.
- */
+ /** Resource provider of the operation. */
provider?: string;
- /**
- * Resource for the operation.
- */
+ /** Resource for the operation. */
resource?: string;
- /**
- * Short description of the operation.
- */
+ /** Short description of the operation. */
operation?: string;
- /**
- * Description of the operation.
- */
+ /** Description of the operation. */
description?: string;
}
-/**
- * Definition object with the name and properties of an operation.
- */
-export interface OperationsDefinition {
- /**
- * Name of the operation.
- */
- name?: string;
- /**
- * Display object with properties of the operation.
- */
- display?: OperationsDisplayDefinition;
+/** An error response from Attestation. */
+export interface CloudError {
+ /** An error response from Attestation. */
+ error?: CloudErrorBody;
}
-/**
- * List of supported operations.
- */
-export interface OperationList {
- /**
- * The system metadata relating to this resource
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly systemData?: SystemData;
+/** An error response from Attestation. */
+export interface CloudErrorBody {
+ /** An identifier for the error. Codes are invariant and are intended to be consumed programmatically. */
+ code?: string;
+ /** A message describing the error, intended to be suitable for displaying in a user interface. */
+ message?: string;
+}
+
+/** The Private Endpoint resource. */
+export interface PrivateEndpoint {
/**
- * List of supported operations.
+ * The ARM identifier for Private Endpoint
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- value?: OperationsDefinition[];
+ readonly id?: string;
}
-/**
- * Common fields that are returned in the response for all Azure Resource Manager resources
- * @summary Resource
- */
-export interface Resource extends BaseResource {
+/** A collection of information about the state of the connection between service consumer and provider. */
+export interface PrivateLinkServiceConnectionState {
+ /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */
+ status?: PrivateEndpointServiceConnectionStatus;
+ /** The reason for approval/rejection of the connection. */
+ description?: string;
+ /** A message indicating if changes on the service provider require any updates on the consumer. */
+ actionsRequired?: string;
+}
+
+/** Common fields that are returned in the response for all Azure Resource Manager resources */
+export interface Resource {
/**
- * Fully qualified resource ID for the resource. Ex -
- * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly id?: string;
/**
* The name of the resource
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
/**
- * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- * "Microsoft.Storage/storageAccounts"
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly type?: string;
}
-/**
- * The resource model definition for an Azure Resource Manager tracked top level resource which has
- * 'tags' and a 'location'
- * @summary Tracked Resource
- */
-export interface TrackedResource extends Resource {
- /**
- * Resource tags.
- */
- tags?: { [propertyName: string]: string };
- /**
- * The geo-location where the resource lives
- */
+/** Parameters for creating an attestation provider */
+export interface AttestationServiceCreationParams {
+ /** The supported Azure location where the attestation provider should be created. */
location: string;
+ /** The tags that will be assigned to the attestation provider. */
+ tags?: { [propertyName: string]: string };
+ /** Properties of the attestation provider */
+ properties: AttestationServiceCreationSpecificParams;
}
-/**
- * Attestation service response message.
- */
-export interface AttestationProvider extends TrackedResource {
- /**
- * The system metadata relating to this resource
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly systemData?: SystemData;
- /**
- * Trust model for the attestation service instance.
- */
- trustModel?: string;
- /**
- * Status of attestation service. Possible values include: 'Ready', 'NotReady', 'Error'
- */
- status?: AttestationServiceStatus;
- /**
- * Gets the uri of attestation service
- */
- attestUri?: string;
-}
-
-/**
- * Attestation Providers List.
- */
-export interface AttestationProviderListResult {
- /**
- * The system metadata relating to this resource
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly systemData?: SystemData;
- /**
- * Attestation Provider array.
- */
- value?: AttestationProvider[];
+/** Client supplied parameters used to create a new attestation provider. */
+export interface AttestationServiceCreationSpecificParams {
+ /** JSON Web Key Set defining a set of X.509 Certificates that will represent the parent certificate for the signing certificate used for policy operations */
+ policySigningCertificates?: JsonWebKeySet;
}
-/**
- * Parameters for patching an attestation service instance
- */
-export interface AttestationServicePatchParams extends BaseResource {
+export interface JsonWebKeySet {
/**
- * The tags that will be assigned to the attestation service instance.
+ * The value of the "keys" parameter is an array of JWK values. By
+ * default, the order of the JWK values within the array does not imply
+ * an order of preference among them, although applications of JWK Sets
+ * can choose to assign a meaning to the order for their purposes, if
+ * desired.
*/
- tags?: { [propertyName: string]: string };
+ keys?: JsonWebKey[];
}
-/**
- * An interface representing JSONWebKey.
- */
-export interface JSONWebKey {
+export interface JsonWebKey {
/**
* The "alg" (algorithm) parameter identifies the algorithm intended for
* use with the key. The values used should either be registered in the
@@ -193,30 +142,18 @@ export interface JSONWebKey {
* established by [JWA] or be a value that contains a Collision-
* Resistant Name.
*/
- alg: string;
- /**
- * The "crv" (curve) parameter identifies the curve type
- */
+ alg?: string;
+ /** The "crv" (curve) parameter identifies the curve type */
crv?: string;
- /**
- * RSA private exponent or ECC private key
- */
+ /** RSA private exponent or ECC private key */
d?: string;
- /**
- * RSA Private Key Parameter
- */
+ /** RSA Private Key Parameter */
dp?: string;
- /**
- * RSA Private Key Parameter
- */
+ /** RSA Private Key Parameter */
dq?: string;
- /**
- * RSA public exponent, in Base64
- */
+ /** RSA public exponent, in Base64 */
e?: string;
- /**
- * Symmetric key
- */
+ /** Symmetric key */
k?: string;
/**
* The "kid" (key ID) parameter is used to match a specific key. This
@@ -229,7 +166,7 @@ export interface JSONWebKey {
* equivalent alternatives by the application using them.) The "kid"
* value is a case-sensitive string.
*/
- kid: string;
+ kid?: string;
/**
* The "kty" (key type) parameter identifies the cryptographic algorithm
* family used with the key, such as "RSA" or "EC". "kty" values should
@@ -238,21 +175,13 @@ export interface JSONWebKey {
* Resistant Name. The "kty" value is a case-sensitive string.
*/
kty: string;
- /**
- * RSA modulus, in Base64
- */
+ /** RSA modulus, in Base64 */
n?: string;
- /**
- * RSA secret prime
- */
+ /** RSA secret prime */
p?: string;
- /**
- * RSA secret prime, with p < q
- */
+ /** RSA secret prime, with p < q */
q?: string;
- /**
- * RSA Private Key Parameter
- */
+ /** RSA Private Key Parameter */
qi?: string;
/**
* Use ("public key use") identifies the intended use of
@@ -260,10 +189,8 @@ export interface JSONWebKey {
* a public key is used for encrypting data or verifying the signature
* on data. Values are commonly "sig" (signature) or "enc" (encryption).
*/
- use: string;
- /**
- * X coordinate for the Elliptic Curve point
- */
+ use?: string;
+ /** X coordinate for the Elliptic Curve point */
x?: string;
/**
* The "x5c" (X.509 certificate chain) parameter contains a chain of one
@@ -274,255 +201,243 @@ export interface JSONWebKey {
* The PKIX certificate containing the key value MUST be the first
* certificate.
*/
- x5c?: string[];
- /**
- * Y coordinate for the Elliptic Curve point
- */
+ x5C?: string[];
+ /** Y coordinate for the Elliptic Curve point */
y?: string;
}
-/**
- * An interface representing JSONWebKeySet.
- */
-export interface JSONWebKeySet {
- /**
- * The value of the "keys" parameter is an array of JWK values. By
- * default, the order of the JWK values within the array does not imply
- * an order of preference among them, although applications of JWK Sets
- * can choose to assign a meaning to the order for their purposes, if
- * desired.
- */
- keys?: JSONWebKey[];
+/** Parameters for patching an attestation provider */
+export interface AttestationServicePatchParams {
+ /** The tags that will be assigned to the attestation provider. */
+ tags?: { [propertyName: string]: string };
}
-/**
- * Client supplied parameters used to create a new attestation service instance.
- */
-export interface AttestationServiceCreationSpecificParams {
+/** List of private endpoint connection associated with the specified storage account */
+export interface PrivateEndpointConnectionListResult {
+ /** Array of private endpoint connections */
+ value?: PrivateEndpointConnection[];
+}
+
+/** Attestation Providers List. */
+export interface AttestationProviderListResult {
/**
- * JSON Web Key Set defining a set of X.509 Certificates that will represent the parent
- * certificate for the signing certificate used for policy operations
+ * The system metadata relating to this resource
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- policySigningCertificates?: JSONWebKeySet;
+ readonly systemData?: SystemData;
+ /** Attestation Provider array. */
+ value?: AttestationProvider[];
}
-/**
- * Parameters for creating an attestation service instance
- */
-export interface AttestationServiceCreationParams extends BaseResource {
+/** The Private Endpoint Connection resource. */
+export type PrivateEndpointConnection = Resource & {
+ /** The resource of private end point. */
+ privateEndpoint?: PrivateEndpoint;
+ /** A collection of information about the state of the connection between service consumer and provider. */
+ privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState;
/**
- * The supported Azure location where the attestation service instance should be created.
+ * The provisioning state of the private endpoint connection resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
+ readonly provisioningState?: PrivateEndpointConnectionProvisioningState;
+};
+
+/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */
+export type TrackedResource = Resource & {
+ /** Resource tags. */
+ tags?: { [propertyName: string]: string };
+ /** The geo-location where the resource lives */
location: string;
+};
+
+/** Attestation service response message. */
+export type AttestationProvider = TrackedResource & {
/**
- * The tags that will be assigned to the attestation service instance.
+ * The system metadata relating to this resource
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- tags?: { [propertyName: string]: string };
+ readonly systemData?: SystemData;
+ /** Trust model for the attestation provider. */
+ trustModel?: string;
+ /** Status of attestation service. */
+ status?: AttestationServiceStatus;
+ /** Gets the uri of attestation service */
+ attestUri?: string;
/**
- * Properties of the attestation service instance
+ * List of private endpoint connections associated with the attestation provider.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- properties: AttestationServiceCreationSpecificParams;
+ readonly privateEndpointConnections?: PrivateEndpointConnection[];
+};
+
+/** Known values of {@link CreatedByType} that the service accepts. */
+export enum KnownCreatedByType {
+ User = "User",
+ Application = "Application",
+ ManagedIdentity = "ManagedIdentity",
+ Key = "Key"
}
/**
- * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags
- * and a location
- * @summary Proxy Resource
+ * Defines values for CreatedByType. \
+ * {@link KnownCreatedByType} can be used interchangeably with CreatedByType,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **User** \
+ * **Application** \
+ * **ManagedIdentity** \
+ * **Key**
*/
-export interface ProxyResource extends Resource {
+export type CreatedByType = string;
+
+/** Known values of {@link AttestationServiceStatus} that the service accepts. */
+export enum KnownAttestationServiceStatus {
+ Ready = "Ready",
+ NotReady = "NotReady",
+ Error = "Error"
}
/**
- * The resource model definition for an Azure Resource Manager resource with an etag.
- * @summary Entity Resource
+ * Defines values for AttestationServiceStatus. \
+ * {@link KnownAttestationServiceStatus} can be used interchangeably with AttestationServiceStatus,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Ready** \
+ * **NotReady** \
+ * **Error**
*/
-export interface AzureEntityResource extends Resource {
- /**
- * Resource Etag.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly etag?: string;
+export type AttestationServiceStatus = string;
+
+/** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */
+export enum KnownPrivateEndpointServiceConnectionStatus {
+ Pending = "Pending",
+ Approved = "Approved",
+ Rejected = "Rejected"
}
/**
- * An interface representing AttestationManagementClientOptions.
+ * Defines values for PrivateEndpointServiceConnectionStatus. \
+ * {@link KnownPrivateEndpointServiceConnectionStatus} can be used interchangeably with PrivateEndpointServiceConnectionStatus,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Pending** \
+ * **Approved** \
+ * **Rejected**
*/
-export interface AttestationManagementClientOptions extends AzureServiceClientOptions {
- baseUri?: string;
+export type PrivateEndpointServiceConnectionStatus = string;
+
+/** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */
+export enum KnownPrivateEndpointConnectionProvisioningState {
+ Succeeded = "Succeeded",
+ Creating = "Creating",
+ Deleting = "Deleting",
+ Failed = "Failed"
}
/**
- * Defines values for CreatedByType.
- * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
- * @readonly
- * @enum {string}
+ * Defines values for PrivateEndpointConnectionProvisioningState. \
+ * {@link KnownPrivateEndpointConnectionProvisioningState} can be used interchangeably with PrivateEndpointConnectionProvisioningState,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Succeeded** \
+ * **Creating** \
+ * **Deleting** \
+ * **Failed**
*/
-export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key';
+export type PrivateEndpointConnectionProvisioningState = string;
-/**
- * Defines values for AttestationServiceStatus.
- * Possible values include: 'Ready', 'NotReady', 'Error'
- * @readonly
- * @enum {string}
- */
-export type AttestationServiceStatus = 'Ready' | 'NotReady' | 'Error';
+/** Optional parameters. */
+export interface OperationsListOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the list operation.
- */
-export type OperationsListResponse = OperationList & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
-
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: OperationList;
- };
-};
+/** Contains response data for the list operation. */
+export type OperationsListResponse = OperationList;
-/**
- * Contains response data for the get operation.
- */
-export type AttestationProvidersGetResponse = AttestationProvider & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
-
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AttestationProvider;
- };
-};
+/** Optional parameters. */
+export interface AttestationProvidersGetOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the create operation.
- */
-export type AttestationProvidersCreateResponse = AttestationProvider & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
-
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AttestationProvider;
- };
-};
+/** Contains response data for the get operation. */
+export type AttestationProvidersGetResponse = AttestationProvider;
-/**
- * Contains response data for the update operation.
- */
-export type AttestationProvidersUpdateResponse = AttestationProvider & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
-
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AttestationProvider;
- };
-};
+/** Optional parameters. */
+export interface AttestationProvidersCreateOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the list operation.
- */
-export type AttestationProvidersListResponse = AttestationProviderListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
-
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AttestationProviderListResult;
- };
-};
+/** Contains response data for the create operation. */
+export type AttestationProvidersCreateResponse = AttestationProvider;
-/**
- * Contains response data for the listByResourceGroup operation.
- */
-export type AttestationProvidersListByResourceGroupResponse = AttestationProviderListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
-
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AttestationProviderListResult;
- };
-};
+/** Optional parameters. */
+export interface AttestationProvidersUpdateOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listDefault operation.
- */
-export type AttestationProvidersListDefaultResponse = AttestationProviderListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
-
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AttestationProviderListResult;
- };
-};
+/** Contains response data for the update operation. */
+export type AttestationProvidersUpdateResponse = AttestationProvider;
-/**
- * Contains response data for the getDefaultByLocation operation.
- */
-export type AttestationProvidersGetDefaultByLocationResponse = AttestationProvider & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
-
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AttestationProvider;
- };
-};
+/** Optional parameters. */
+export interface AttestationProvidersDeleteOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Optional parameters. */
+export interface AttestationProvidersListOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the list operation. */
+export type AttestationProvidersListResponse = AttestationProviderListResult;
+
+/** Optional parameters. */
+export interface AttestationProvidersListByResourceGroupOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listByResourceGroup operation. */
+export type AttestationProvidersListByResourceGroupResponse = AttestationProviderListResult;
+
+/** Optional parameters. */
+export interface AttestationProvidersListDefaultOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listDefault operation. */
+export type AttestationProvidersListDefaultResponse = AttestationProviderListResult;
+
+/** Optional parameters. */
+export interface AttestationProvidersGetDefaultByLocationOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the getDefaultByLocation operation. */
+export type AttestationProvidersGetDefaultByLocationResponse = AttestationProvider;
+
+/** Optional parameters. */
+export interface PrivateEndpointConnectionsListOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the list operation. */
+export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult;
+
+/** Optional parameters. */
+export interface PrivateEndpointConnectionsGetOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the get operation. */
+export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection;
+
+/** Optional parameters. */
+export interface PrivateEndpointConnectionsCreateOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the create operation. */
+export type PrivateEndpointConnectionsCreateResponse = PrivateEndpointConnection;
+
+/** Optional parameters. */
+export interface PrivateEndpointConnectionsDeleteOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Optional parameters. */
+export interface AttestationManagementClientOptionalParams
+ extends coreClient.ServiceClientOptions {
+ /** server parameter */
+ $host?: string;
+ /** Api Version */
+ apiVersion?: string;
+ /** Overrides client endpoint. */
+ endpoint?: string;
+}
diff --git a/sdk/attestation/arm-attestation/src/models/mappers.ts b/sdk/attestation/arm-attestation/src/models/mappers.ts
index 47b461c6d7b7..57d2ae4e5f3b 100644
--- a/sdk/attestation/arm-attestation/src/models/mappers.ts
+++ b/sdk/attestation/arm-attestation/src/models/mappers.ts
@@ -1,19 +1,42 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js";
-import * as msRest from "@azure/ms-rest-js";
+import * as coreClient from "@azure/core-client";
-export const CloudError = CloudErrorMapper;
-export const BaseResource = BaseResourceMapper;
+export const OperationList: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "OperationList",
+ modelProperties: {
+ systemData: {
+ serializedName: "systemData",
+ type: {
+ name: "Composite",
+ className: "SystemData"
+ }
+ },
+ value: {
+ serializedName: "value",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "OperationsDefinition"
+ }
+ }
+ }
+ }
+ }
+ }
+};
-export const SystemData: msRest.CompositeMapper = {
- serializedName: "systemData",
+export const SystemData: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "SystemData",
@@ -58,8 +81,29 @@ export const SystemData: msRest.CompositeMapper = {
}
};
-export const OperationsDisplayDefinition: msRest.CompositeMapper = {
- serializedName: "OperationsDisplayDefinition",
+export const OperationsDefinition: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "OperationsDefinition",
+ modelProperties: {
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ display: {
+ serializedName: "display",
+ type: {
+ name: "Composite",
+ className: "OperationsDisplayDefinition"
+ }
+ }
+ }
+ }
+};
+
+export const OperationsDisplayDefinition: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "OperationsDisplayDefinition",
@@ -92,82 +136,78 @@ export const OperationsDisplayDefinition: msRest.CompositeMapper = {
}
};
-export const OperationsDefinition: msRest.CompositeMapper = {
- serializedName: "OperationsDefinition",
+export const CloudError: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "OperationsDefinition",
+ className: "CloudError",
modelProperties: {
- name: {
- serializedName: "name",
- type: {
- name: "String"
- }
- },
- display: {
- serializedName: "display",
+ error: {
+ serializedName: "error",
type: {
name: "Composite",
- className: "OperationsDisplayDefinition"
+ className: "CloudErrorBody"
}
}
}
}
};
-export const OperationList: msRest.CompositeMapper = {
- serializedName: "OperationList",
+export const CloudErrorBody: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "OperationList",
+ className: "CloudErrorBody",
modelProperties: {
- systemData: {
- readOnly: true,
- serializedName: "systemData",
+ code: {
+ serializedName: "code",
type: {
- name: "Composite",
- className: "SystemData"
+ name: "String"
}
},
- value: {
- serializedName: "value",
+ message: {
+ serializedName: "message",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "OperationsDefinition"
- }
- }
+ name: "String"
}
}
}
}
};
-export const Resource: msRest.CompositeMapper = {
- serializedName: "Resource",
+export const PrivateEndpoint: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "Resource",
+ className: "PrivateEndpoint",
modelProperties: {
id: {
- readOnly: true,
serializedName: "id",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "PrivateLinkServiceConnectionState",
+ modelProperties: {
+ status: {
+ serializedName: "status",
type: {
name: "String"
}
},
- name: {
- readOnly: true,
- serializedName: "name",
+ description: {
+ serializedName: "description",
type: {
name: "String"
}
},
- type: {
- readOnly: true,
- serializedName: "type",
+ actionsRequired: {
+ serializedName: "actionsRequired",
type: {
name: "String"
}
@@ -176,27 +216,28 @@ export const Resource: msRest.CompositeMapper = {
}
};
-export const TrackedResource: msRest.CompositeMapper = {
- serializedName: "TrackedResource",
+export const Resource: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "TrackedResource",
+ className: "Resource",
modelProperties: {
- ...Resource.type.modelProperties,
- tags: {
- serializedName: "tags",
+ id: {
+ serializedName: "id",
+ readOnly: true,
type: {
- name: "Dictionary",
- value: {
- type: {
- name: "String"
- }
- }
+ name: "String"
}
},
- location: {
- required: true,
- serializedName: "location",
+ name: {
+ serializedName: "name",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ type: {
+ serializedName: "type",
+ readOnly: true,
type: {
name: "String"
}
@@ -205,86 +246,65 @@ export const TrackedResource: msRest.CompositeMapper = {
}
};
-export const AttestationProvider: msRest.CompositeMapper = {
- serializedName: "AttestationProvider",
+export const AttestationServiceCreationParams: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "AttestationProvider",
+ className: "AttestationServiceCreationParams",
modelProperties: {
- ...TrackedResource.type.modelProperties,
- systemData: {
- readOnly: true,
- serializedName: "systemData",
- type: {
- name: "Composite",
- className: "SystemData"
- }
- },
- trustModel: {
- serializedName: "properties.trustModel",
+ location: {
+ serializedName: "location",
+ required: true,
type: {
name: "String"
}
},
- status: {
- serializedName: "properties.status",
+ tags: {
+ serializedName: "tags",
type: {
- name: "String"
+ name: "Dictionary",
+ value: { type: { name: "String" } }
}
},
- attestUri: {
- serializedName: "properties.attestUri",
+ properties: {
+ serializedName: "properties",
type: {
- name: "String"
+ name: "Composite",
+ className: "AttestationServiceCreationSpecificParams"
}
}
}
}
};
-export const AttestationProviderListResult: msRest.CompositeMapper = {
- serializedName: "AttestationProviderListResult",
+export const AttestationServiceCreationSpecificParams: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "AttestationProviderListResult",
+ className: "AttestationServiceCreationSpecificParams",
modelProperties: {
- systemData: {
- readOnly: true,
- serializedName: "systemData",
+ policySigningCertificates: {
+ serializedName: "policySigningCertificates",
type: {
name: "Composite",
- className: "SystemData"
- }
- },
- value: {
- serializedName: "value",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "AttestationProvider"
- }
- }
+ className: "JsonWebKeySet"
}
}
}
}
};
-export const AttestationServicePatchParams: msRest.CompositeMapper = {
- serializedName: "AttestationServicePatchParams",
+export const JsonWebKeySet: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "AttestationServicePatchParams",
+ className: "JsonWebKeySet",
modelProperties: {
- tags: {
- serializedName: "tags",
+ keys: {
+ serializedName: "keys",
type: {
- name: "Dictionary",
- value: {
+ name: "Sequence",
+ element: {
type: {
- name: "String"
+ name: "Composite",
+ className: "JsonWebKey"
}
}
}
@@ -293,14 +313,12 @@ export const AttestationServicePatchParams: msRest.CompositeMapper = {
}
};
-export const JSONWebKey: msRest.CompositeMapper = {
- serializedName: "JSONWebKey",
+export const JsonWebKey: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "JSONWebKey",
+ className: "JsonWebKey",
modelProperties: {
alg: {
- required: true,
serializedName: "alg",
type: {
name: "String"
@@ -343,15 +361,14 @@ export const JSONWebKey: msRest.CompositeMapper = {
}
},
kid: {
- required: true,
serializedName: "kid",
type: {
name: "String"
}
},
kty: {
- required: true,
serializedName: "kty",
+ required: true,
type: {
name: "String"
}
@@ -381,7 +398,6 @@ export const JSONWebKey: msRest.CompositeMapper = {
}
},
use: {
- required: true,
serializedName: "use",
type: {
name: "String"
@@ -393,7 +409,7 @@ export const JSONWebKey: msRest.CompositeMapper = {
name: "String"
}
},
- x5c: {
+ x5C: {
serializedName: "x5c",
type: {
name: "Sequence",
@@ -414,20 +430,35 @@ export const JSONWebKey: msRest.CompositeMapper = {
}
};
-export const JSONWebKeySet: msRest.CompositeMapper = {
- serializedName: "JSONWebKeySet",
+export const AttestationServicePatchParams: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "JSONWebKeySet",
+ className: "AttestationServicePatchParams",
modelProperties: {
- keys: {
- serializedName: "keys",
+ tags: {
+ serializedName: "tags",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ }
+ }
+ }
+ }
+};
+
+export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "PrivateEndpointConnectionListResult",
+ modelProperties: {
+ value: {
+ serializedName: "value",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "JSONWebKey"
+ className: "PrivateEndpointConnection"
}
}
}
@@ -436,83 +467,132 @@ export const JSONWebKeySet: msRest.CompositeMapper = {
}
};
-export const AttestationServiceCreationSpecificParams: msRest.CompositeMapper = {
- serializedName: "AttestationServiceCreationSpecificParams",
+export const AttestationProviderListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "AttestationServiceCreationSpecificParams",
+ className: "AttestationProviderListResult",
modelProperties: {
- policySigningCertificates: {
- serializedName: "policySigningCertificates",
+ systemData: {
+ serializedName: "systemData",
type: {
name: "Composite",
- className: "JSONWebKeySet"
+ className: "SystemData"
+ }
+ },
+ value: {
+ serializedName: "value",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "AttestationProvider"
+ }
+ }
}
}
}
}
};
-export const AttestationServiceCreationParams: msRest.CompositeMapper = {
- serializedName: "AttestationServiceCreationParams",
+export const PrivateEndpointConnection: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "AttestationServiceCreationParams",
+ className: "PrivateEndpointConnection",
modelProperties: {
- location: {
- required: true,
- serializedName: "location",
+ ...Resource.type.modelProperties,
+ privateEndpoint: {
+ serializedName: "properties.privateEndpoint",
type: {
- name: "String"
+ name: "Composite",
+ className: "PrivateEndpoint"
}
},
- tags: {
- serializedName: "tags",
+ privateLinkServiceConnectionState: {
+ serializedName: "properties.privateLinkServiceConnectionState",
type: {
- name: "Dictionary",
- value: {
- type: {
- name: "String"
- }
- }
+ name: "Composite",
+ className: "PrivateLinkServiceConnectionState"
}
},
- properties: {
- required: true,
- serializedName: "properties",
+ provisioningState: {
+ serializedName: "properties.provisioningState",
+ readOnly: true,
type: {
- name: "Composite",
- className: "AttestationServiceCreationSpecificParams"
+ name: "String"
}
}
}
}
};
-export const ProxyResource: msRest.CompositeMapper = {
- serializedName: "ProxyResource",
+export const TrackedResource: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "ProxyResource",
+ className: "TrackedResource",
modelProperties: {
- ...Resource.type.modelProperties
+ ...Resource.type.modelProperties,
+ tags: {
+ serializedName: "tags",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ }
+ },
+ location: {
+ serializedName: "location",
+ required: true,
+ type: {
+ name: "String"
+ }
+ }
}
}
};
-export const AzureEntityResource: msRest.CompositeMapper = {
- serializedName: "AzureEntityResource",
+export const AttestationProvider: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "AzureEntityResource",
+ className: "AttestationProvider",
modelProperties: {
- ...Resource.type.modelProperties,
- etag: {
- readOnly: true,
- serializedName: "etag",
+ ...TrackedResource.type.modelProperties,
+ systemData: {
+ serializedName: "systemData",
+ type: {
+ name: "Composite",
+ className: "SystemData"
+ }
+ },
+ trustModel: {
+ serializedName: "properties.trustModel",
type: {
name: "String"
}
+ },
+ status: {
+ serializedName: "properties.status",
+ type: {
+ name: "String"
+ }
+ },
+ attestUri: {
+ serializedName: "properties.attestUri",
+ type: {
+ name: "String"
+ }
+ },
+ privateEndpointConnections: {
+ serializedName: "properties.privateEndpointConnections",
+ readOnly: true,
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "PrivateEndpointConnection"
+ }
+ }
+ }
}
}
}
diff --git a/sdk/attestation/arm-attestation/src/models/operationsMappers.ts b/sdk/attestation/arm-attestation/src/models/operationsMappers.ts
deleted file mode 100644
index de9b9fa3908e..000000000000
--- a/sdk/attestation/arm-attestation/src/models/operationsMappers.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */
-
-export {
- CloudError,
- OperationList,
- OperationsDefinition,
- OperationsDisplayDefinition,
- SystemData
-} from "../models/mappers";
diff --git a/sdk/attestation/arm-attestation/src/models/parameters.ts b/sdk/attestation/arm-attestation/src/models/parameters.ts
index dddd4f15efe6..9e60129ad922 100644
--- a/sdk/attestation/arm-attestation/src/models/parameters.ts
+++ b/sdk/attestation/arm-attestation/src/models/parameters.ts
@@ -1,83 +1,160 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
+import {
+ OperationParameter,
+ OperationURLParameter,
+ OperationQueryParameter
+} from "@azure/core-client";
+import {
+ AttestationServiceCreationParams as AttestationServiceCreationParamsMapper,
+ AttestationServicePatchParams as AttestationServicePatchParamsMapper,
+ PrivateEndpointConnection as PrivateEndpointConnectionMapper
+} from "../models/mappers";
-export const acceptLanguage: msRest.OperationParameter = {
- parameterPath: "acceptLanguage",
+export const accept: OperationParameter = {
+ parameterPath: "accept",
mapper: {
- serializedName: "accept-language",
- defaultValue: 'en-US',
+ defaultValue: "application/json",
+ isConstant: true,
+ serializedName: "Accept",
type: {
name: "String"
}
}
};
-export const apiVersion: msRest.OperationQueryParameter = {
- parameterPath: "apiVersion",
+
+export const $host: OperationURLParameter = {
+ parameterPath: "$host",
mapper: {
+ serializedName: "$host",
required: true,
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+
+export const apiVersion: OperationQueryParameter = {
+ parameterPath: "apiVersion",
+ mapper: {
+ defaultValue: "2020-10-01",
+ isConstant: true,
serializedName: "api-version",
type: {
name: "String"
}
}
};
-export const location: msRest.OperationURLParameter = {
- parameterPath: "location",
+
+export const subscriptionId: OperationURLParameter = {
+ parameterPath: "subscriptionId",
mapper: {
+ constraints: {
+ MinLength: 1
+ },
+ serializedName: "subscriptionId",
required: true,
- serializedName: "location",
+ type: {
+ name: "String"
+ }
+ }
+};
+
+export const resourceGroupName: OperationURLParameter = {
+ parameterPath: "resourceGroupName",
+ mapper: {
constraints: {
+ MaxLength: 90,
MinLength: 1
},
+ serializedName: "resourceGroupName",
+ required: true,
type: {
name: "String"
}
}
};
-export const providerName: msRest.OperationURLParameter = {
+
+export const providerName: OperationURLParameter = {
parameterPath: "providerName",
mapper: {
- required: true,
serializedName: "providerName",
+ required: true,
type: {
name: "String"
}
}
};
-export const resourceGroupName: msRest.OperationURLParameter = {
- parameterPath: "resourceGroupName",
+
+export const contentType: OperationParameter = {
+ parameterPath: ["options", "contentType"],
+ mapper: {
+ defaultValue: "application/json",
+ isConstant: true,
+ serializedName: "Content-Type",
+ type: {
+ name: "String"
+ }
+ }
+};
+
+export const creationParams: OperationParameter = {
+ parameterPath: "creationParams",
+ mapper: AttestationServiceCreationParamsMapper
+};
+
+export const updateParams: OperationParameter = {
+ parameterPath: "updateParams",
+ mapper: AttestationServicePatchParamsMapper
+};
+
+export const location: OperationURLParameter = {
+ parameterPath: "location",
mapper: {
- required: true,
- serializedName: "resourceGroupName",
constraints: {
- MaxLength: 90,
- MinLength: 1,
- Pattern: /^[-\w\._\(\)]+$/
+ MinLength: 1
},
+ serializedName: "location",
+ required: true,
type: {
name: "String"
}
}
};
-export const subscriptionId: msRest.OperationURLParameter = {
- parameterPath: "subscriptionId",
+
+export const providerName1: OperationURLParameter = {
+ parameterPath: "providerName",
mapper: {
- required: true,
- serializedName: "subscriptionId",
constraints: {
- MinLength: 1
+ Pattern: new RegExp("^[a-zA-Z0-9-]{3,24}$")
},
+ serializedName: "providerName",
+ required: true,
type: {
name: "String"
}
}
};
+
+export const privateEndpointConnectionName: OperationURLParameter = {
+ parameterPath: "privateEndpointConnectionName",
+ mapper: {
+ serializedName: "privateEndpointConnectionName",
+ required: true,
+ type: {
+ name: "String"
+ }
+ }
+};
+
+export const properties: OperationParameter = {
+ parameterPath: "properties",
+ mapper: PrivateEndpointConnectionMapper
+};
diff --git a/sdk/attestation/arm-attestation/src/operations/attestationProviders.ts b/sdk/attestation/arm-attestation/src/operations/attestationProviders.ts
index b15ef848d02b..ded3888bceae 100644
--- a/sdk/attestation/arm-attestation/src/operations/attestationProviders.ts
+++ b/sdk/attestation/arm-attestation/src/operations/attestationProviders.ts
@@ -1,288 +1,180 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import * as Models from "../models";
-import * as Mappers from "../models/attestationProvidersMappers";
+import { AttestationProviders } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { AttestationManagementClientContext } from "../attestationManagementClientContext";
+import { AttestationManagementClient } from "../attestationManagementClient";
+import {
+ AttestationProvidersGetOptionalParams,
+ AttestationProvidersGetResponse,
+ AttestationServiceCreationParams,
+ AttestationProvidersCreateOptionalParams,
+ AttestationProvidersCreateResponse,
+ AttestationServicePatchParams,
+ AttestationProvidersUpdateOptionalParams,
+ AttestationProvidersUpdateResponse,
+ AttestationProvidersDeleteOptionalParams,
+ AttestationProvidersListOptionalParams,
+ AttestationProvidersListResponse,
+ AttestationProvidersListByResourceGroupOptionalParams,
+ AttestationProvidersListByResourceGroupResponse,
+ AttestationProvidersListDefaultOptionalParams,
+ AttestationProvidersListDefaultResponse,
+ AttestationProvidersGetDefaultByLocationOptionalParams,
+ AttestationProvidersGetDefaultByLocationResponse
+} from "../models";
-/** Class representing a AttestationProviders. */
-export class AttestationProviders {
- private readonly client: AttestationManagementClientContext;
+/** Class containing AttestationProviders operations. */
+export class AttestationProvidersImpl implements AttestationProviders {
+ private readonly client: AttestationManagementClient;
/**
- * Create a AttestationProviders.
- * @param {AttestationManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class AttestationProviders class.
+ * @param client Reference to the service client
*/
- constructor(client: AttestationManagementClientContext) {
+ constructor(client: AttestationManagementClient) {
this.client = client;
}
/**
* Get the status of Attestation Provider.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param providerName Name of the attestation service instance
- * @param [options] The optional parameters
- * @returns Promise
+ * @param providerName Name of the attestation provider.
+ * @param options The options parameters.
*/
- get(resourceGroupName: string, providerName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param providerName Name of the attestation service instance
- * @param callback The callback
- */
- get(resourceGroupName: string, providerName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param providerName Name of the attestation service instance
- * @param options The optional parameters
- * @param callback The callback
- */
- get(resourceGroupName: string, providerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- get(resourceGroupName: string, providerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ get(
+ resourceGroupName: string,
+ providerName: string,
+ options?: AttestationProvidersGetOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- providerName,
- options
- },
- getOperationSpec,
- callback) as Promise;
+ { resourceGroupName, providerName, options },
+ getOperationSpec
+ );
}
/**
- * Creates a new Attestation Provider instance.
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param providerName Name of the attestation service instance.
- * @param creationParams Client supplied parameters.
- * @param [options] The optional parameters
- * @returns Promise
- */
- create(resourceGroupName: string, providerName: string, creationParams: Models.AttestationServiceCreationParams, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param providerName Name of the attestation service instance.
- * @param creationParams Client supplied parameters.
- * @param callback The callback
- */
- create(resourceGroupName: string, providerName: string, creationParams: Models.AttestationServiceCreationParams, callback: msRest.ServiceCallback): void;
- /**
+ * Creates a new Attestation Provider.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param providerName Name of the attestation service instance.
+ * @param providerName Name of the attestation provider.
* @param creationParams Client supplied parameters.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- create(resourceGroupName: string, providerName: string, creationParams: Models.AttestationServiceCreationParams, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- create(resourceGroupName: string, providerName: string, creationParams: Models.AttestationServiceCreationParams, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ create(
+ resourceGroupName: string,
+ providerName: string,
+ creationParams: AttestationServiceCreationParams,
+ options?: AttestationProvidersCreateOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- providerName,
- creationParams,
- options
- },
- createOperationSpec,
- callback) as Promise;
+ { resourceGroupName, providerName, creationParams, options },
+ createOperationSpec
+ );
}
/**
* Updates the Attestation Provider.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param providerName Name of the attestation service instance.
+ * @param providerName Name of the attestation provider.
* @param updateParams Client supplied parameters.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- update(resourceGroupName: string, providerName: string, updateParams: Models.AttestationServicePatchParams, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param providerName Name of the attestation service instance.
- * @param updateParams Client supplied parameters.
- * @param callback The callback
- */
- update(resourceGroupName: string, providerName: string, updateParams: Models.AttestationServicePatchParams, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param providerName Name of the attestation service instance.
- * @param updateParams Client supplied parameters.
- * @param options The optional parameters
- * @param callback The callback
- */
- update(resourceGroupName: string, providerName: string, updateParams: Models.AttestationServicePatchParams, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- update(resourceGroupName: string, providerName: string, updateParams: Models.AttestationServicePatchParams, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ update(
+ resourceGroupName: string,
+ providerName: string,
+ updateParams: AttestationServicePatchParams,
+ options?: AttestationProvidersUpdateOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- providerName,
- updateParams,
- options
- },
- updateOperationSpec,
- callback) as Promise;
+ { resourceGroupName, providerName, updateParams, options },
+ updateOperationSpec
+ );
}
/**
* Delete Attestation Service.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param providerName Name of the attestation service
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- deleteMethod(resourceGroupName: string, providerName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param providerName Name of the attestation service
- * @param callback The callback
- */
- deleteMethod(resourceGroupName: string, providerName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param providerName Name of the attestation service
- * @param options The optional parameters
- * @param callback The callback
- */
- deleteMethod(resourceGroupName: string, providerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- deleteMethod(resourceGroupName: string, providerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ delete(
+ resourceGroupName: string,
+ providerName: string,
+ options?: AttestationProvidersDeleteOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- providerName,
- options
- },
- deleteMethodOperationSpec,
- callback);
+ { resourceGroupName, providerName, options },
+ deleteOperationSpec
+ );
}
/**
* Returns a list of attestation providers in a subscription.
- * @param [options] The optional parameters
- * @returns Promise
- */
- list(options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param callback The callback
- */
- list(callback: msRest.ServiceCallback): void;
- /**
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
- options
- },
- listOperationSpec,
- callback) as Promise;
+ list(
+ options?: AttestationProvidersListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
}
/**
* Returns attestation providers list in a resource group.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param [options] The optional parameters
- * @returns Promise
- */
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param callback The callback
- */
- listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ listByResourceGroup(
+ resourceGroupName: string,
+ options?: AttestationProvidersListByResourceGroupOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- options
- },
- listByResourceGroupOperationSpec,
- callback) as Promise;
+ { resourceGroupName, options },
+ listByResourceGroupOperationSpec
+ );
}
/**
* Get the default provider
- * @param [options] The optional parameters
- * @returns Promise
- */
- listDefault(options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param callback The callback
+ * @param options The options parameters.
*/
- listDefault(callback: msRest.ServiceCallback): void;
- /**
- * @param options The optional parameters
- * @param callback The callback
- */
- listDefault(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listDefault(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ listDefault(
+ options?: AttestationProvidersListDefaultOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- options
- },
- listDefaultOperationSpec,
- callback) as Promise;
+ { options },
+ listDefaultOperationSpec
+ );
}
/**
* Get the default provider by location.
* @param location The location of the default provider.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- getDefaultByLocation(location: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param location The location of the default provider.
- * @param callback The callback
- */
- getDefaultByLocation(location: string, callback: msRest.ServiceCallback): void;
- /**
- * @param location The location of the default provider.
- * @param options The optional parameters
- * @param callback The callback
- */
- getDefaultByLocation(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- getDefaultByLocation(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ getDefaultByLocation(
+ location: string,
+ options?: AttestationProvidersGetDefaultByLocationOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- location,
- options
- },
- getDefaultByLocationOperationSpec,
- callback) as Promise;
+ { location, options },
+ getDefaultByLocationOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const getOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const getOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}",
- urlParameters: [
- Parameters.subscriptionId,
- Parameters.resourceGroupName,
- Parameters.providerName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.AttestationProvider
@@ -291,30 +183,20 @@ const getOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
- serializer
-};
-
-const createOperationSpec: msRest.OperationSpec = {
- httpMethod: "PUT",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.providerName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
- requestBody: {
- parameterPath: "creationParams",
- mapper: {
- ...Mappers.AttestationServiceCreationParams,
- required: true
- }
- },
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const createOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}",
+ httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.AttestationProvider
@@ -326,30 +208,22 @@ const createOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
- serializer
-};
-
-const updateOperationSpec: msRest.OperationSpec = {
- httpMethod: "PATCH",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}",
+ requestBody: Parameters.creationParams,
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.providerName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
- requestBody: {
- parameterPath: "updateParams",
- mapper: {
- ...Mappers.AttestationServicePatchParams,
- required: true
- }
- },
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
+ serializer
+};
+const updateOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}",
+ httpMethod: "PATCH",
responses: {
200: {
bodyMapper: Mappers.AttestationProvider
@@ -358,23 +232,22 @@ const updateOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
- serializer
-};
-
-const deleteMethodOperationSpec: msRest.OperationSpec = {
- httpMethod: "DELETE",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}",
+ requestBody: Parameters.updateParams,
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.providerName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
+ serializer
+};
+const deleteOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}",
+ httpMethod: "DELETE",
responses: {
200: {},
202: {},
@@ -383,21 +256,20 @@ const deleteMethodOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.providerName
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listOperationSpec: msRest.OperationSpec = {
+const listOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Attestation/attestationProviders",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Attestation/attestationProviders",
- urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.AttestationProviderListResult
@@ -406,22 +278,15 @@ const listOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listByResourceGroupOperationSpec: msRest.OperationSpec = {
+const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders",
- urlParameters: [
- Parameters.resourceGroupName,
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.AttestationProviderListResult
@@ -430,21 +295,19 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listDefaultOperationSpec: msRest.OperationSpec = {
+const listDefaultOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Attestation/defaultProviders",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Attestation/defaultProviders",
- urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.AttestationProviderListResult
@@ -453,22 +316,15 @@ const listDefaultOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const getDefaultByLocationOperationSpec: msRest.OperationSpec = {
+const getDefaultByLocationOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Attestation/locations/{location}/defaultProvider",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Attestation/locations/{location}/defaultProvider",
- urlParameters: [
- Parameters.location,
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.AttestationProvider
@@ -477,5 +333,12 @@ const getDefaultByLocationOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.location
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/attestation/arm-attestation/src/operations/index.ts b/sdk/attestation/arm-attestation/src/operations/index.ts
index b8a242e5b5b4..8698171ed9eb 100644
--- a/sdk/attestation/arm-attestation/src/operations/index.ts
+++ b/sdk/attestation/arm-attestation/src/operations/index.ts
@@ -1,12 +1,11 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export * from "./operations";
export * from "./attestationProviders";
+export * from "./privateEndpointConnections";
diff --git a/sdk/attestation/arm-attestation/src/operations/operations.ts b/sdk/attestation/arm-attestation/src/operations/operations.ts
index 71d7e5859cdb..49a449f4bbbd 100644
--- a/sdk/attestation/arm-attestation/src/operations/operations.ts
+++ b/sdk/attestation/arm-attestation/src/operations/operations.ts
@@ -1,67 +1,49 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import * as Models from "../models";
-import * as Mappers from "../models/operationsMappers";
+import { Operations } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { AttestationManagementClientContext } from "../attestationManagementClientContext";
+import { AttestationManagementClient } from "../attestationManagementClient";
+import {
+ OperationsListOptionalParams,
+ OperationsListResponse
+} from "../models";
-/** Class representing a Operations. */
-export class Operations {
- private readonly client: AttestationManagementClientContext;
+/** Class containing Operations operations. */
+export class OperationsImpl implements Operations {
+ private readonly client: AttestationManagementClient;
/**
- * Create a Operations.
- * @param {AttestationManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class Operations class.
+ * @param client Reference to the service client
*/
- constructor(client: AttestationManagementClientContext) {
+ constructor(client: AttestationManagementClient) {
this.client = client;
}
/**
* Lists all of the available Azure attestation operations.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- list(options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param callback The callback
- */
- list(callback: msRest.ServiceCallback): void;
- /**
- * @param options The optional parameters
- * @param callback The callback
- */
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
- options
- },
- listOperationSpec,
- callback) as Promise;
+ list(
+ options?: OperationsListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const listOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listOperationSpec: coreClient.OperationSpec = {
+ path: "/providers/Microsoft.Attestation/operations",
httpMethod: "GET",
- path: "providers/Microsoft.Attestation/operations",
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.OperationList
@@ -70,5 +52,8 @@ const listOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/attestation/arm-attestation/src/operations/privateEndpointConnections.ts b/sdk/attestation/arm-attestation/src/operations/privateEndpointConnections.ts
new file mode 100644
index 000000000000..15f994f948b4
--- /dev/null
+++ b/sdk/attestation/arm-attestation/src/operations/privateEndpointConnections.ts
@@ -0,0 +1,277 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { PrivateEndpointConnections } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
+import * as Parameters from "../models/parameters";
+import { AttestationManagementClient } from "../attestationManagementClient";
+import {
+ PrivateEndpointConnection,
+ PrivateEndpointConnectionsListOptionalParams,
+ PrivateEndpointConnectionsListResponse,
+ PrivateEndpointConnectionsGetOptionalParams,
+ PrivateEndpointConnectionsGetResponse,
+ PrivateEndpointConnectionsCreateOptionalParams,
+ PrivateEndpointConnectionsCreateResponse,
+ PrivateEndpointConnectionsDeleteOptionalParams
+} from "../models";
+
+///
+/** Class containing PrivateEndpointConnections operations. */
+export class PrivateEndpointConnectionsImpl
+ implements PrivateEndpointConnections {
+ private readonly client: AttestationManagementClient;
+
+ /**
+ * Initialize a new instance of the class PrivateEndpointConnections class.
+ * @param client Reference to the service client
+ */
+ constructor(client: AttestationManagementClient) {
+ this.client = client;
+ }
+
+ /**
+ * List all the private endpoint connections associated with the attestation provider.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param providerName The name of the attestation provider.
+ * @param options The options parameters.
+ */
+ public list(
+ resourceGroupName: string,
+ providerName: string,
+ options?: PrivateEndpointConnectionsListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(resourceGroupName, providerName, options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listPagingPage(resourceGroupName, providerName, options);
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ resourceGroupName: string,
+ providerName: string,
+ options?: PrivateEndpointConnectionsListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(resourceGroupName, providerName, options);
+ yield result.value || [];
+ }
+
+ private async *listPagingAll(
+ resourceGroupName: string,
+ providerName: string,
+ options?: PrivateEndpointConnectionsListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(
+ resourceGroupName,
+ providerName,
+ options
+ )) {
+ yield* page;
+ }
+ }
+
+ /**
+ * List all the private endpoint connections associated with the attestation provider.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param providerName The name of the attestation provider.
+ * @param options The options parameters.
+ */
+ private _list(
+ resourceGroupName: string,
+ providerName: string,
+ options?: PrivateEndpointConnectionsListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroupName, providerName, options },
+ listOperationSpec
+ );
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the attestation provider.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param providerName The name of the attestation provider.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
+ * Azure resource
+ * @param options The options parameters.
+ */
+ get(
+ resourceGroupName: string,
+ providerName: string,
+ privateEndpointConnectionName: string,
+ options?: PrivateEndpointConnectionsGetOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ providerName,
+ privateEndpointConnectionName,
+ options
+ },
+ getOperationSpec
+ );
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the attestation provider.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param providerName The name of the attestation provider.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
+ * Azure resource
+ * @param properties The private endpoint connection properties.
+ * @param options The options parameters.
+ */
+ create(
+ resourceGroupName: string,
+ providerName: string,
+ privateEndpointConnectionName: string,
+ properties: PrivateEndpointConnection,
+ options?: PrivateEndpointConnectionsCreateOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ providerName,
+ privateEndpointConnectionName,
+ properties,
+ options
+ },
+ createOperationSpec
+ );
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the attestation provider.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param providerName The name of the attestation provider.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
+ * Azure resource
+ * @param options The options parameters.
+ */
+ delete(
+ resourceGroupName: string,
+ providerName: string,
+ privateEndpointConnectionName: string,
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ providerName,
+ privateEndpointConnectionName,
+ options
+ },
+ deleteOperationSpec
+ );
+ }
+}
+// Operation Specifications
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateEndpointConnections",
+ httpMethod: "GET",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.PrivateEndpointConnectionListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.providerName1
+ ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const getOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateEndpointConnections/{privateEndpointConnectionName}",
+ httpMethod: "GET",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.PrivateEndpointConnection
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.providerName1,
+ Parameters.privateEndpointConnectionName
+ ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const createOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateEndpointConnections/{privateEndpointConnectionName}",
+ httpMethod: "PUT",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.PrivateEndpointConnection
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ requestBody: Parameters.properties,
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.providerName1,
+ Parameters.privateEndpointConnectionName
+ ],
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
+ serializer
+};
+const deleteOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateEndpointConnections/{privateEndpointConnectionName}",
+ httpMethod: "DELETE",
+ responses: {
+ 200: {},
+ 204: {},
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.providerName1,
+ Parameters.privateEndpointConnectionName
+ ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
diff --git a/sdk/attestation/arm-attestation/src/operationsInterfaces/attestationProviders.ts b/sdk/attestation/arm-attestation/src/operationsInterfaces/attestationProviders.ts
new file mode 100644
index 000000000000..5dc6c4d1b213
--- /dev/null
+++ b/sdk/attestation/arm-attestation/src/operationsInterfaces/attestationProviders.ts
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import {
+ AttestationProvidersGetOptionalParams,
+ AttestationProvidersGetResponse,
+ AttestationServiceCreationParams,
+ AttestationProvidersCreateOptionalParams,
+ AttestationProvidersCreateResponse,
+ AttestationServicePatchParams,
+ AttestationProvidersUpdateOptionalParams,
+ AttestationProvidersUpdateResponse,
+ AttestationProvidersDeleteOptionalParams,
+ AttestationProvidersListOptionalParams,
+ AttestationProvidersListResponse,
+ AttestationProvidersListByResourceGroupOptionalParams,
+ AttestationProvidersListByResourceGroupResponse,
+ AttestationProvidersListDefaultOptionalParams,
+ AttestationProvidersListDefaultResponse,
+ AttestationProvidersGetDefaultByLocationOptionalParams,
+ AttestationProvidersGetDefaultByLocationResponse
+} from "../models";
+
+/** Interface representing a AttestationProviders. */
+export interface AttestationProviders {
+ /**
+ * Get the status of Attestation Provider.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param providerName Name of the attestation provider.
+ * @param options The options parameters.
+ */
+ get(
+ resourceGroupName: string,
+ providerName: string,
+ options?: AttestationProvidersGetOptionalParams
+ ): Promise;
+ /**
+ * Creates a new Attestation Provider.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param providerName Name of the attestation provider.
+ * @param creationParams Client supplied parameters.
+ * @param options The options parameters.
+ */
+ create(
+ resourceGroupName: string,
+ providerName: string,
+ creationParams: AttestationServiceCreationParams,
+ options?: AttestationProvidersCreateOptionalParams
+ ): Promise;
+ /**
+ * Updates the Attestation Provider.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param providerName Name of the attestation provider.
+ * @param updateParams Client supplied parameters.
+ * @param options The options parameters.
+ */
+ update(
+ resourceGroupName: string,
+ providerName: string,
+ updateParams: AttestationServicePatchParams,
+ options?: AttestationProvidersUpdateOptionalParams
+ ): Promise;
+ /**
+ * Delete Attestation Service.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param providerName Name of the attestation service
+ * @param options The options parameters.
+ */
+ delete(
+ resourceGroupName: string,
+ providerName: string,
+ options?: AttestationProvidersDeleteOptionalParams
+ ): Promise;
+ /**
+ * Returns a list of attestation providers in a subscription.
+ * @param options The options parameters.
+ */
+ list(
+ options?: AttestationProvidersListOptionalParams
+ ): Promise;
+ /**
+ * Returns attestation providers list in a resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param options The options parameters.
+ */
+ listByResourceGroup(
+ resourceGroupName: string,
+ options?: AttestationProvidersListByResourceGroupOptionalParams
+ ): Promise;
+ /**
+ * Get the default provider
+ * @param options The options parameters.
+ */
+ listDefault(
+ options?: AttestationProvidersListDefaultOptionalParams
+ ): Promise;
+ /**
+ * Get the default provider by location.
+ * @param location The location of the default provider.
+ * @param options The options parameters.
+ */
+ getDefaultByLocation(
+ location: string,
+ options?: AttestationProvidersGetDefaultByLocationOptionalParams
+ ): Promise;
+}
diff --git a/sdk/attestation/arm-attestation/src/operationsInterfaces/index.ts b/sdk/attestation/arm-attestation/src/operationsInterfaces/index.ts
new file mode 100644
index 000000000000..8698171ed9eb
--- /dev/null
+++ b/sdk/attestation/arm-attestation/src/operationsInterfaces/index.ts
@@ -0,0 +1,11 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+export * from "./operations";
+export * from "./attestationProviders";
+export * from "./privateEndpointConnections";
diff --git a/sdk/attestation/arm-attestation/src/operationsInterfaces/operations.ts b/sdk/attestation/arm-attestation/src/operationsInterfaces/operations.ts
new file mode 100644
index 000000000000..03505a4200e2
--- /dev/null
+++ b/sdk/attestation/arm-attestation/src/operationsInterfaces/operations.ts
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import {
+ OperationsListOptionalParams,
+ OperationsListResponse
+} from "../models";
+
+/** Interface representing a Operations. */
+export interface Operations {
+ /**
+ * Lists all of the available Azure attestation operations.
+ * @param options The options parameters.
+ */
+ list(options?: OperationsListOptionalParams): Promise;
+}
diff --git a/sdk/attestation/arm-attestation/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/attestation/arm-attestation/src/operationsInterfaces/privateEndpointConnections.ts
new file mode 100644
index 000000000000..4cde426e2674
--- /dev/null
+++ b/sdk/attestation/arm-attestation/src/operationsInterfaces/privateEndpointConnections.ts
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import {
+ PrivateEndpointConnection,
+ PrivateEndpointConnectionsListOptionalParams,
+ PrivateEndpointConnectionsGetOptionalParams,
+ PrivateEndpointConnectionsGetResponse,
+ PrivateEndpointConnectionsCreateOptionalParams,
+ PrivateEndpointConnectionsCreateResponse,
+ PrivateEndpointConnectionsDeleteOptionalParams
+} from "../models";
+
+///
+/** Interface representing a PrivateEndpointConnections. */
+export interface PrivateEndpointConnections {
+ /**
+ * List all the private endpoint connections associated with the attestation provider.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param providerName The name of the attestation provider.
+ * @param options The options parameters.
+ */
+ list(
+ resourceGroupName: string,
+ providerName: string,
+ options?: PrivateEndpointConnectionsListOptionalParams
+ ): PagedAsyncIterableIterator;
+ /**
+ * Gets the specified private endpoint connection associated with the attestation provider.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param providerName The name of the attestation provider.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
+ * Azure resource
+ * @param options The options parameters.
+ */
+ get(
+ resourceGroupName: string,
+ providerName: string,
+ privateEndpointConnectionName: string,
+ options?: PrivateEndpointConnectionsGetOptionalParams
+ ): Promise;
+ /**
+ * Update the state of specified private endpoint connection associated with the attestation provider.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param providerName The name of the attestation provider.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
+ * Azure resource
+ * @param properties The private endpoint connection properties.
+ * @param options The options parameters.
+ */
+ create(
+ resourceGroupName: string,
+ providerName: string,
+ privateEndpointConnectionName: string,
+ properties: PrivateEndpointConnection,
+ options?: PrivateEndpointConnectionsCreateOptionalParams
+ ): Promise;
+ /**
+ * Deletes the specified private endpoint connection associated with the attestation provider.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param providerName The name of the attestation provider.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
+ * Azure resource
+ * @param options The options parameters.
+ */
+ delete(
+ resourceGroupName: string,
+ providerName: string,
+ privateEndpointConnectionName: string,
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
+ ): Promise;
+}
diff --git a/sdk/attestation/arm-attestation/test/attestation_examples.ts b/sdk/attestation/arm-attestation/test/attestation_examples.ts
new file mode 100644
index 000000000000..7b619a68b5d4
--- /dev/null
+++ b/sdk/attestation/arm-attestation/test/attestation_examples.ts
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import {
+ env,
+ record,
+ RecorderEnvironmentSetup,
+ Recorder,
+ delay,
+ isPlaybackMode
+} from "@azure-tools/test-recorder";
+import * as assert from "assert";
+import { ClientSecretCredential } from "@azure/identity";
+import { AttestationManagementClient } from "../src/attestationManagementClient";
+
+const recorderEnvSetup: RecorderEnvironmentSetup = {
+ replaceableVariables: {
+ AZURE_CLIENT_ID: "azure_client_id",
+ AZURE_CLIENT_SECRET: "azure_client_secret",
+ AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
+ SUBSCRIPTION_ID: "azure_subscription_id"
+ },
+ customizationsOnRecordings: [
+ (recording: any): any =>
+ recording.replace(
+ /"access_token":"[^"]*"/g,
+ `"access_token":"access_token"`
+ )
+ ],
+ queryParametersToSkip: []
+};
+
+export const testPollingOptions = {
+ updateIntervalInMs: isPlaybackMode() ? 0 : undefined,
+};
+
+describe("Attestation test", () => {
+ let recorder: Recorder;
+ let subscriptionId: string;
+ let client: AttestationManagementClient;
+ let location: string;
+ let resourceGroup: string;
+ let providerName: string;
+
+ beforeEach(async function() {
+ recorder = record(this, recorderEnvSetup);
+ subscriptionId = env.SUBSCRIPTION_ID;
+ // This is an example of how the environment variables are used
+ const credential = new ClientSecretCredential(
+ env.AZURE_TENANT_ID,
+ env.AZURE_CLIENT_ID,
+ env.AZURE_CLIENT_SECRET
+ );
+ client = new AttestationManagementClient(credential, subscriptionId);
+ location = "eastus";
+ resourceGroup = "myjstest";
+ providerName = "myservicexxx";
+ });
+
+ afterEach(async function() {
+ await recorder.stop();
+ });
+
+ it("attestationProviders create test", async function() {
+ const res = await client.attestationProviders.create(resourceGroup,providerName,{
+ properties: {
+
+ },
+ location: location
+ })
+ assert.equal(res.name,providerName);
+ });
+
+ it("attestationProviders get test", async function() {
+ const res = await client.attestationProviders.get(resourceGroup,providerName)
+ assert.equal(res.name,providerName);
+ });
+
+ it("attestationProviders list test", async function() {
+ const res = await client.attestationProviders.listByResourceGroup(resourceGroup)
+ assert.notEqual(res.value?.length,0);
+ });
+
+ it("attestationProviders update test", async function() {
+ const res = await client.attestationProviders.update(resourceGroup,providerName,{
+ tags: {
+ tag1: "value1",
+ tag2: "value2"
+ }
+ })
+ assert.equal(res.type,"Microsoft.Attestation/attestationProviders")
+ });
+
+ it("attestationProviders delete test", async function() {
+ const resDelete = await client.attestationProviders.delete(resourceGroup,providerName)
+ const res = await client.attestationProviders.listByResourceGroup(resourceGroup)
+ assert.equal(res.value?.length,0);
+ });
+});
diff --git a/sdk/attestation/arm-attestation/tsconfig.json b/sdk/attestation/arm-attestation/tsconfig.json
index 422b584abd5e..6e3251194117 100644
--- a/sdk/attestation/arm-attestation/tsconfig.json
+++ b/sdk/attestation/arm-attestation/tsconfig.json
@@ -3,7 +3,7 @@
"module": "es6",
"moduleResolution": "node",
"strict": true,
- "target": "es5",
+ "target": "es6",
"sourceMap": true,
"declarationMap": true,
"esModuleInterop": true,
@@ -11,9 +11,9 @@
"forceConsistentCasingInFileNames": true,
"lib": ["es6", "dom"],
"declaration": true,
- "outDir": "./esm",
+ "outDir": "./dist-esm",
"importHelpers": true
},
- "include": ["./src/**/*.ts"],
+ "include": ["./src/**/*.ts", "./test/**/*.ts"],
"exclude": ["node_modules"]
}
diff --git a/sdk/attestation/ci.yml b/sdk/attestation/ci.yml
index 842bde13471c..037f0be95cdb 100644
--- a/sdk/attestation/ci.yml
+++ b/sdk/attestation/ci.yml
@@ -1,5 +1,4 @@
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
-
trigger:
branches:
include:
@@ -9,7 +8,6 @@ trigger:
paths:
include:
- sdk/attestation/
-
pr:
branches:
include:
@@ -17,10 +15,11 @@ pr:
- feature/*
- release/*
- hotfix/*
+ exclude:
+ - feature/v4
paths:
include:
- sdk/attestation/
-
extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
@@ -28,3 +27,5 @@ extends:
Artifacts:
- name: azure-attestation
safeName: azureattestation
+ - name: azure-arm-attestation
+ safeName: azurearmattestation