diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml
index f91ffdc7ec3e..8475434e3246 100644
--- a/common/config/rush/pnpm-lock.yaml
+++ b/common/config/rush/pnpm-lock.yaml
@@ -27,6 +27,7 @@ specifiers:
'@rush-temp/arm-managedapplications': file:./projects/arm-managedapplications.tgz
'@rush-temp/arm-network': file:./projects/arm-network.tgz
'@rush-temp/arm-operationalinsights': file:./projects/arm-operationalinsights.tgz
+ '@rush-temp/arm-operations': file:./projects/arm-operations.tgz
'@rush-temp/arm-policy': file:./projects/arm-policy.tgz
'@rush-temp/arm-postgresql': file:./projects/arm-postgresql.tgz
'@rush-temp/arm-purview': file:./projects/arm-purview.tgz
@@ -167,6 +168,7 @@ dependencies:
'@rush-temp/arm-managedapplications': file:projects/arm-managedapplications.tgz
'@rush-temp/arm-network': file:projects/arm-network.tgz
'@rush-temp/arm-operationalinsights': file:projects/arm-operationalinsights.tgz
+ '@rush-temp/arm-operations': file:projects/arm-operations.tgz
'@rush-temp/arm-policy': file:projects/arm-policy.tgz
'@rush-temp/arm-postgresql': file:projects/arm-postgresql.tgz
'@rush-temp/arm-purview': file:projects/arm-purview.tgz
@@ -8974,6 +8976,30 @@ packages:
- supports-color
dev: false
+ file:projects/arm-operations.tgz:
+ resolution: {integrity: sha512-cVFq1i6MXVaKMU/DkYw2BM9lT7pTkv1pD/CeWW+sXO/IM5xLDBq2IhknP0PEdHH60RcfTt3EwoS4q9eUPlMKbw==, tarball: file:projects/arm-operations.tgz}
+ name: '@rush-temp/arm-operations'
+ version: 0.0.0
+ dependencies:
+ '@azure/identity': 2.0.0-beta.6
+ '@microsoft/api-extractor': 7.7.11
+ '@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
+ 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.2
+ transitivePeerDependencies:
+ - debug
+ - supports-color
+ dev: false
+
file:projects/arm-policy.tgz:
resolution: {integrity: sha512-7O/gYIgeBj6BnFxnLUmxWCdnsljPzs6XDy4NqM0RYlBRToxlIdV+Tn6TADE+ZkHM0tMBLTLVMj0LAHAHVnQO2g==, tarball: file:projects/arm-policy.tgz}
name: '@rush-temp/arm-policy'
@@ -13517,7 +13543,7 @@ packages:
dev: false
file:projects/web-pubsub-express.tgz:
- resolution: {integrity: sha512-BwLiUnPrFgV4H1B+OpDkMtThaGZGb2/4SmiL2CCuXJNbSFQ/0tHKPrYiHuvSu0IQNqxtmvPZvX188OTw7LxnYA==, tarball: file:projects/web-pubsub-express.tgz}
+ resolution: {integrity: sha512-Lo9UvjD8tDlR/EFi5d4mIezt9UuwSChzouW/PbvTxVr61oCNFPPgR5d/52fLh2lPe0OFtofBV0C/IviZg89weA==, tarball: file:projects/web-pubsub-express.tgz}
name: '@rush-temp/web-pubsub-express'
version: 0.0.0
dependencies:
diff --git a/rush.json b/rush.json
index 8d6d49c4a647..5f011e56db65 100644
--- a/rush.json
+++ b/rush.json
@@ -1010,6 +1010,11 @@
"packageName": "@azure/arm-containerservice",
"projectFolder": "sdk/containerservice/arm-containerservice",
"versionPolicyName": "management"
+ },
+ {
+ "packageName": "@azure/arm-operations",
+ "projectFolder": "sdk/operationsmanagement/arm-operations",
+ "versionPolicyName": "management"
}
]
}
\ No newline at end of file
diff --git a/sdk/operationsmanagement/arm-operations/CHANGELOG.md b/sdk/operationsmanagement/arm-operations/CHANGELOG.md
new file mode 100644
index 000000000000..a8a410195caf
--- /dev/null
+++ b/sdk/operationsmanagement/arm-operations/CHANGELOG.md
@@ -0,0 +1,14 @@
+## 4.0.0-beta.1 (2021-10-27)
+
+This is the first preview for the new version of the `@azure/arm-operations` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services.
+
+While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/).
+
+Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies.
+
+**Noteworthy changes and features**
+- Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice.
+- Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead.
+- List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page.
+- Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`.
+- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.
diff --git a/sdk/operationsmanagement/arm-operations/LICENSE.txt b/sdk/operationsmanagement/arm-operations/LICENSE
similarity index 96%
rename from sdk/operationsmanagement/arm-operations/LICENSE.txt
rename to sdk/operationsmanagement/arm-operations/LICENSE
index a70e8cf66038..ccb63b166732 100644
--- a/sdk/operationsmanagement/arm-operations/LICENSE.txt
+++ b/sdk/operationsmanagement/arm-operations/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2018 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/operationsmanagement/arm-operations/README.md b/sdk/operationsmanagement/arm-operations/README.md
index 9118f5db76e9..8e63d157445a 100644
--- a/sdk/operationsmanagement/arm-operations/README.md
+++ b/sdk/operationsmanagement/arm-operations/README.md
@@ -1,103 +1,94 @@
-## Azure OperationsManagementClient SDK for JavaScript
+# Azure OperationsManagement client library for JavaScript
-This package contains an isomorphic SDK for OperationsManagementClient.
+This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure OperationsManagement client.
+
+Operations Management Client
+
+[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/operationsmanagement/arm-operations) |
+[Package (NPM)](https://www.npmjs.com/package/@azure/arm-operations) |
+[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-operations) |
+[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.
-### How to Install
+### Prerequisites
-```
+- An [Azure subscription][azure_sub].
+
+### Install the `@azure/arm-operations` package
+
+Install the Azure OperationsManagement client library for JavaScript with `npm`:
+
+```bash
npm install @azure/arm-operations
```
-### How to use
+### Create and authenticate a `OperationsManagementClient`
-#### nodejs - Authentication, client creation and get solutions as an example written in TypeScript.
+To create a client object to access the Azure OperationsManagement API, you will need the `endpoint` of your Azure OperationsManagement resource and a `credential`. The Azure OperationsManagement client can use Azure Active Directory credentials to authenticate.
+You can find the endpoint for your Azure OperationsManagement resource in the [Azure Portal][azure_portal].
-##### Install @azure/ms-rest-nodeauth
+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).
-```
-npm install @azure/ms-rest-nodeauth
-```
+To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
-##### Sample code
-
-```ts
-import * as msRest from "@azure/ms-rest-js";
-import * as msRestAzure from "@azure/ms-rest-azure-js";
-import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
-import { OperationsManagementClient, OperationsManagementModels, OperationsManagementMappers } from "@azure/arm-operations";
-const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
-
-msRestNodeAuth.interactiveLogin().then((creds) => {
- const client = new OperationsManagementClient(creds, subscriptionId);
- const resourceGroupName = "testresourceGroupName";
- const solutionName = "testsolutionName";
- client.solutions.get(resourceGroupName, solutionName).then((result) => {
- console.log("The result is:");
- console.log(result);
- });
-}).catch((err) => {
- console.error(err);
-});
+```bash
+npm install @azure/identity
```
-#### browser - Authentication, client creation and get solutions as an example written in JavaScript.
+You will also need to **register a new AAD application and grant access to Azure OperationsManagement** 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`.
-##### Install @azure/ms-rest-browserauth
+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 { OperationsManagementClient } = require("@azure/arm-operations");
+const { DefaultAzureCredential } = require("@azure/identity");
+const subscriptionId = "00000000-0000-0000-0000-000000000000";
+const client = new OperationsManagementClient(new DefaultAzureCredential(), subscriptionId);
```
-npm install @azure/ms-rest-browserauth
-```
-##### Sample code
-
-See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
-
-- index.html
-```html
-
-
-
- @azure/arm-operations sample
-
-
-
-
-
-
-
-
+## Key concepts
+
+### OperationsManagementClient
+
+`OperationsManagementClient` is the primary interface for developers using the Azure OperationsManagement client library. Explore the methods on this client object to understand the different features of the Azure OperationsManagement 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");
```
-## Related projects
+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
-- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
+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)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Foperationsmanagement%2Farm-operations%2FREADME.png)
+
+[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/operationsmanagement/arm-operations/_meta.json b/sdk/operationsmanagement/arm-operations/_meta.json
new file mode 100644
index 000000000000..49b043f7b373
--- /dev/null
+++ b/sdk/operationsmanagement/arm-operations/_meta.json
@@ -0,0 +1,7 @@
+{
+ "commit": "f6a8a2ef54e892943b8c32358b2d731e01441d00",
+ "readme": "specification/operationsmanagement/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/operationsmanagement/resource-manager/readme.md --use=@autorest/typescript@6.0.0-beta.13",
+ "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
+ "use": "@autorest/typescript@6.0.0-beta.13"
+}
\ No newline at end of file
diff --git a/sdk/operationsmanagement/arm-operations/api-extractor.json b/sdk/operationsmanagement/arm-operations/api-extractor.json
new file mode 100644
index 000000000000..e79b1bc6ca87
--- /dev/null
+++ b/sdk/operationsmanagement/arm-operations/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-operations.d.ts"
+ },
+ "messages": {
+ "tsdocMessageReporting": { "default": { "logLevel": "none" } },
+ "extractorMessageReporting": {
+ "ae-missing-release-tag": { "logLevel": "none" },
+ "ae-unresolved-link": { "logLevel": "none" }
+ }
+ }
+}
diff --git a/sdk/operationsmanagement/arm-operations/package.json b/sdk/operationsmanagement/arm-operations/package.json
index 56e114a52dd6..b31bb129dec8 100644
--- a/sdk/operationsmanagement/arm-operations/package.json
+++ b/sdk/operationsmanagement/arm-operations/package.json
@@ -1,55 +1,91 @@
{
"name": "@azure/arm-operations",
+ "sdk-type": "mgmt",
"author": "Microsoft Corporation",
- "description": "OperationsManagementClient Library with typescript type definitions for node.js and browser.",
- "version": "2.1.0",
+ "description": "A generated SDK for OperationsManagementClient.",
+ "version": "4.0.0-beta.1",
+ "engines": { "node": ">=12.0.0" },
"dependencies": {
- "@azure/ms-rest-azure-js": "^1.1.0",
- "@azure/ms-rest-js": "^1.1.0",
- "tslib": "^1.9.3"
+ "@azure/core-lro": "^2.2.0",
+ "@azure/abort-controller": "^1.0.0",
+ "@azure/core-paging": "^1.1.1",
+ "@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-operations.js",
- "module": "./esm/operationsManagementClient.js",
- "types": "./esm/operationsManagementClient.d.ts",
+ "main": "./dist/index.js",
+ "module": "./dist-esm/src/index.js",
+ "types": "./types/arm-operations.d.ts",
"devDependencies": {
- "typescript": "^3.1.1",
- "rollup": "^0.66.2",
- "rollup-plugin-node-resolve": "^3.4.0",
- "uglify-js": "^3.4.9"
+ "@microsoft/api-extractor": "7.7.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",
+ "typescript": "~4.2.0",
+ "uglify-js": "^3.4.9",
+ "@azure/identity": "2.0.0-beta.6",
+ "@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/operationsmanagement/arm-operations",
+ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/operationsmanagement/arm-operations",
"repository": {
"type": "git",
- "url": "https://github.com/azure/azure-sdk-for-js.git"
- },
- "bugs": {
- "url": "https://github.com/azure/azure-sdk-for-js/issues"
+ "url": "https://github.com/Azure/azure-sdk-for-js.git"
},
+ "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-operations.js.map'\" -o ./dist/arm-operations.min.js ./dist/arm-operations.js",
- "prepack": "npm install && npm run build"
+ "build": "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": "echo skipped",
+ "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",
+ "prebuild": "echo skipped",
+ "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",
+ "integration-test:browser": "echo skipped",
+ "docs": "echo skipped"
},
"sideEffects": false,
"autoPublish": true
diff --git a/sdk/operationsmanagement/arm-operations/recordings/node/my_test/recording_sample_test.js b/sdk/operationsmanagement/arm-operations/recordings/node/my_test/recording_sample_test.js
new file mode 100644
index 000000000000..0f6ecb857acf
--- /dev/null
+++ b/sdk/operationsmanagement/arm-operations/recordings/node/my_test/recording_sample_test.js
@@ -0,0 +1,5 @@
+let nock = require('nock');
+
+module.exports.hash = "7a6be38bb8cb644d64b4094802301751";
+
+module.exports.testInfo = {"uniqueName":{},"newDate":{}}
diff --git a/sdk/operationsmanagement/arm-operations/review/arm-operations.api.md b/sdk/operationsmanagement/arm-operations/review/arm-operations.api.md
new file mode 100644
index 000000000000..417b7f8cd7e6
--- /dev/null
+++ b/sdk/operationsmanagement/arm-operations/review/arm-operations.api.md
@@ -0,0 +1,307 @@
+## API Report File for "@azure/arm-operations"
+
+> 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';
+import { PollerLike } from '@azure/core-lro';
+import { PollOperationState } from '@azure/core-lro';
+
+// @public
+export interface ArmTemplateParameter {
+ name?: string;
+ value?: string;
+}
+
+// @public
+export interface CodeMessageError {
+ error?: CodeMessageErrorAutoGenerated;
+}
+
+// @public
+export interface CodeMessageErrorAutoGenerated {
+ code?: string;
+ message?: string;
+}
+
+// @public
+export interface ManagementAssociation {
+ readonly id?: string;
+ location?: string;
+ readonly name?: string;
+ properties?: ManagementAssociationProperties;
+ readonly type?: string;
+}
+
+// @public
+export interface ManagementAssociationProperties {
+ applicationId: string;
+}
+
+// @public
+export interface ManagementAssociationPropertiesList {
+ value?: ManagementAssociation[];
+}
+
+// @public
+export interface ManagementAssociations {
+ createOrUpdate(resourceGroupName: string, managementAssociationName: string, parameters: ManagementAssociation, options?: ManagementAssociationsCreateOrUpdateOptionalParams): Promise;
+ delete(resourceGroupName: string, managementAssociationName: string, options?: ManagementAssociationsDeleteOptionalParams): Promise;
+ get(resourceGroupName: string, managementAssociationName: string, options?: ManagementAssociationsGetOptionalParams): Promise;
+ listBySubscription(options?: ManagementAssociationsListBySubscriptionOptionalParams): Promise;
+}
+
+// @public
+export interface ManagementAssociationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type ManagementAssociationsCreateOrUpdateResponse = ManagementAssociation;
+
+// @public
+export interface ManagementAssociationsDeleteOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export interface ManagementAssociationsGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type ManagementAssociationsGetResponse = ManagementAssociation;
+
+// @public
+export interface ManagementAssociationsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type ManagementAssociationsListBySubscriptionResponse = ManagementAssociationPropertiesList;
+
+// @public
+export interface ManagementConfiguration {
+ readonly id?: string;
+ location?: string;
+ readonly name?: string;
+ properties?: ManagementConfigurationProperties;
+ readonly type?: string;
+}
+
+// @public
+export interface ManagementConfigurationProperties {
+ applicationId?: string;
+ parameters: ArmTemplateParameter[];
+ parentResourceType: string;
+ readonly provisioningState?: string;
+ template: Record;
+}
+
+// @public
+export interface ManagementConfigurationPropertiesList {
+ value?: ManagementConfiguration[];
+}
+
+// @public
+export interface ManagementConfigurations {
+ createOrUpdate(resourceGroupName: string, managementConfigurationName: string, parameters: ManagementConfiguration, options?: ManagementConfigurationsCreateOrUpdateOptionalParams): Promise;
+ delete(resourceGroupName: string, managementConfigurationName: string, options?: ManagementConfigurationsDeleteOptionalParams): Promise;
+ get(resourceGroupName: string, managementConfigurationName: string, options?: ManagementConfigurationsGetOptionalParams): Promise;
+ listBySubscription(options?: ManagementConfigurationsListBySubscriptionOptionalParams): Promise;
+}
+
+// @public
+export interface ManagementConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type ManagementConfigurationsCreateOrUpdateResponse = ManagementConfiguration;
+
+// @public
+export interface ManagementConfigurationsDeleteOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export interface ManagementConfigurationsGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type ManagementConfigurationsGetResponse = ManagementConfiguration;
+
+// @public
+export interface ManagementConfigurationsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type ManagementConfigurationsListBySubscriptionResponse = ManagementConfigurationPropertiesList;
+
+// @public
+export interface Operation {
+ display?: OperationDisplay;
+ name?: string;
+}
+
+// @public
+export interface OperationDisplay {
+ operation?: string;
+ provider?: string;
+ resource?: string;
+}
+
+// @public
+export interface OperationListResult {
+ value?: Operation[];
+}
+
+// @public
+export interface Operations {
+ list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface OperationsListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type OperationsListResponse = OperationListResult;
+
+// @public (undocumented)
+export class OperationsManagementClient extends OperationsManagementClientContext {
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: OperationsManagementClientOptionalParams);
+ // (undocumented)
+ managementAssociations: ManagementAssociations;
+ // (undocumented)
+ managementConfigurations: ManagementConfigurations;
+ // (undocumented)
+ operations: Operations;
+ // (undocumented)
+ solutions: Solutions;
+}
+
+// @public (undocumented)
+export class OperationsManagementClientContext extends coreClient.ServiceClient {
+ // (undocumented)
+ $host: string;
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: OperationsManagementClientOptionalParams);
+ // (undocumented)
+ apiVersion: string;
+ // (undocumented)
+ providerName: string;
+ // (undocumented)
+ resourceName: string;
+ // (undocumented)
+ resourceType: string;
+ // (undocumented)
+ subscriptionId: string;
+}
+
+// @public
+export interface OperationsManagementClientOptionalParams extends coreClient.ServiceClientOptions {
+ $host?: string;
+ apiVersion?: string;
+ endpoint?: string;
+}
+
+// @public
+export interface Solution {
+ readonly id?: string;
+ location?: string;
+ readonly name?: string;
+ plan?: SolutionPlan;
+ properties?: SolutionProperties;
+ tags?: {
+ [propertyName: string]: string;
+ };
+ readonly type?: string;
+}
+
+// @public
+export interface SolutionPatch {
+ tags?: {
+ [propertyName: string]: string;
+ };
+}
+
+// @public
+export interface SolutionPlan {
+ name?: string;
+ product?: string;
+ promotionCode?: string;
+ publisher?: string;
+}
+
+// @public
+export interface SolutionProperties {
+ containedResources?: string[];
+ readonly provisioningState?: string;
+ referencedResources?: string[];
+ workspaceResourceId: string;
+}
+
+// @public
+export interface SolutionPropertiesList {
+ value?: Solution[];
+}
+
+// @public
+export interface Solutions {
+ beginCreateOrUpdate(resourceGroupName: string, solutionName: string, parameters: Solution, options?: SolutionsCreateOrUpdateOptionalParams): Promise, SolutionsCreateOrUpdateResponse>>;
+ beginCreateOrUpdateAndWait(resourceGroupName: string, solutionName: string, parameters: Solution, options?: SolutionsCreateOrUpdateOptionalParams): Promise;
+ beginDelete(resourceGroupName: string, solutionName: string, options?: SolutionsDeleteOptionalParams): Promise, void>>;
+ beginDeleteAndWait(resourceGroupName: string, solutionName: string, options?: SolutionsDeleteOptionalParams): Promise;
+ beginUpdate(resourceGroupName: string, solutionName: string, parameters: SolutionPatch, options?: SolutionsUpdateOptionalParams): Promise, SolutionsUpdateResponse>>;
+ beginUpdateAndWait(resourceGroupName: string, solutionName: string, parameters: SolutionPatch, options?: SolutionsUpdateOptionalParams): Promise;
+ get(resourceGroupName: string, solutionName: string, options?: SolutionsGetOptionalParams): Promise;
+ listByResourceGroup(resourceGroupName: string, options?: SolutionsListByResourceGroupOptionalParams): Promise;
+ listBySubscription(options?: SolutionsListBySubscriptionOptionalParams): Promise;
+}
+
+// @public
+export interface SolutionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
+ resumeFrom?: string;
+ updateIntervalInMs?: number;
+}
+
+// @public
+export type SolutionsCreateOrUpdateResponse = Solution;
+
+// @public
+export interface SolutionsDeleteOptionalParams extends coreClient.OperationOptions {
+ resumeFrom?: string;
+ updateIntervalInMs?: number;
+}
+
+// @public
+export interface SolutionsGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type SolutionsGetResponse = Solution;
+
+// @public
+export interface SolutionsListByResourceGroupOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type SolutionsListByResourceGroupResponse = SolutionPropertiesList;
+
+// @public
+export interface SolutionsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type SolutionsListBySubscriptionResponse = SolutionPropertiesList;
+
+// @public
+export interface SolutionsUpdateOptionalParams extends coreClient.OperationOptions {
+ resumeFrom?: string;
+ updateIntervalInMs?: number;
+}
+
+// @public
+export type SolutionsUpdateResponse = Solution;
+
+
+// (No @packageDocumentation comment for this package)
+
+```
diff --git a/sdk/operationsmanagement/arm-operations/rollup.config.js b/sdk/operationsmanagement/arm-operations/rollup.config.js
index faec19d49462..9be1955eb7f1 100644
--- a/sdk/operationsmanagement/arm-operations/rollup.config.js
+++ b/sdk/operationsmanagement/arm-operations/rollup.config.js
@@ -1,31 +1,188 @@
-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
+
+/**
+ * A function that can determine whether a rollupwarning should be ignored. If
+ * the function returns `true`, then the warning will not be displayed.
+ */
+
+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
+];
+
/**
- * @type {import('rollup').RollupFileOptions}
+ * Construct a warning handler for the shared rollup configuration
+ * that ignores certain warnings that are not relevant to testing.
*/
-const config = {
- input: './esm/operationsManagementClient.js',
- external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"],
- output: {
- file: "./dist/arm-operations.js",
- format: "umd",
- name: "Azure.ArmOperations",
- sourcemap: true,
- globals: {
- "@azure/ms-rest-js": "msRest",
- "@azure/ms-rest-azure-js": "msRestAzure"
+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({ module: true })
- ]
+ 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/operationsmanagement/arm-operations/src/index.ts b/sdk/operationsmanagement/arm-operations/src/index.ts
new file mode 100644
index 000000000000..3f1cb73cae12
--- /dev/null
+++ b/sdk/operationsmanagement/arm-operations/src/index.ts
@@ -0,0 +1,13 @@
+/*
+ * 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 { OperationsManagementClient } from "./operationsManagementClient";
+export { OperationsManagementClientContext } from "./operationsManagementClientContext";
+export * from "./operationsInterfaces";
diff --git a/sdk/operationsmanagement/arm-operations/src/lroImpl.ts b/sdk/operationsmanagement/arm-operations/src/lroImpl.ts
new file mode 100644
index 000000000000..518d5f053b4e
--- /dev/null
+++ b/sdk/operationsmanagement/arm-operations/src/lroImpl.ts
@@ -0,0 +1,34 @@
+/*
+ * 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 { LongRunningOperation, LroResponse } from "@azure/core-lro";
+
+export class LroImpl implements LongRunningOperation {
+ constructor(
+ private sendOperationFn: (args: any, spec: any) => Promise>,
+ private args: Record,
+ private spec: {
+ readonly requestBody?: unknown;
+ readonly path?: string;
+ readonly httpMethod: string;
+ } & Record,
+ public requestPath: string = spec.path!,
+ public requestMethod: string = spec.httpMethod
+ ) {}
+ public async sendInitialRequest(): Promise> {
+ return this.sendOperationFn(this.args, this.spec);
+ }
+ public async sendPollRequest(path: string): Promise> {
+ const { requestBody, ...restSpec } = this.spec;
+ return this.sendOperationFn(this.args, {
+ ...restSpec,
+ path,
+ httpMethod: "GET"
+ });
+ }
+}
diff --git a/sdk/operationsmanagement/arm-operations/src/models/index.ts b/sdk/operationsmanagement/arm-operations/src/models/index.ts
index 0a14a30ea0bc..cd9fd77cd0f1 100644
--- a/sdk/operationsmanagement/arm-operations/src/models/index.ts
+++ b/sdk/operationsmanagement/arm-operations/src/models/index.ts
@@ -1,635 +1,324 @@
/*
- * 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 { 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 };
-
-
-/**
- * @interface
- * An interface representing OperationDisplay.
- * Display metadata associated with the operation.
- *
- */
-export interface OperationDisplay {
+/** The container for solution. */
+export interface Solution {
/**
- * @member {string} [provider] Service provider: Microsoft
- * OperationsManagement.
+ * Resource ID.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- provider?: string;
+ readonly id?: string;
/**
- * @member {string} [resource] Resource on which the operation is performed
- * etc.
+ * Resource name.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- resource?: string;
+ readonly name?: string;
/**
- * @member {string} [operation] Type of operation: get, read, delete, etc.
+ * Resource type.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- operation?: string;
+ readonly type?: string;
+ /** Resource location */
+ location?: string;
+ /** Resource tags */
+ tags?: { [propertyName: string]: string };
+ /** Plan for solution object supported by the OperationsManagement resource provider. */
+ plan?: SolutionPlan;
+ /** Properties for solution object supported by the OperationsManagement resource provider. */
+ properties?: SolutionProperties;
}
-/**
- * @interface
- * An interface representing Operation.
- * Supported operation of OperationsManagement resource provider.
- *
- */
-export interface Operation {
- /**
- * @member {string} [name] Operation name: {provider}/{resource}/{operation}
- */
+/** Plan for solution object supported by the OperationsManagement resource provider. */
+export interface SolutionPlan {
+ /** name of the solution to be created. For Microsoft published solution it should be in the format of solutionType(workspaceName). SolutionType part is case sensitive. For third party solution, it can be anything. */
name?: string;
- /**
- * @member {OperationDisplay} [display] Display metadata associated with the
- * operation.
- */
- display?: OperationDisplay;
+ /** Publisher name. For gallery solution, it is Microsoft. */
+ publisher?: string;
+ /** promotionCode, Not really used now, can you left as empty */
+ promotionCode?: string;
+ /** name of the solution to enabled/add. For Microsoft published gallery solution it should be in the format of OMSGallery/. This is case sensitive */
+ product?: string;
}
-/**
- * @interface
- * An interface representing SolutionProperties.
- * Solution properties supported by the OperationsManagement resource provider.
- *
- * @extends BaseResource
- */
-export interface SolutionProperties extends BaseResource {
- /**
- * @member {string} workspaceResourceId The azure resourceId for the
- * workspace where the solution will be deployed/enabled.
- */
+/** Solution properties supported by the OperationsManagement resource provider. */
+export interface SolutionProperties {
+ /** The azure resourceId for the workspace where the solution will be deployed/enabled. */
workspaceResourceId: string;
/**
- * @member {string} [provisioningState] The provisioning state for the
- * solution.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The provisioning state for the solution.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly provisioningState?: string;
- /**
- * @member {string[]} [containedResources] The azure resources that will be
- * contained within the solutions. They will be locked and gets deleted
- * automatically when the solution is deleted.
- */
+ /** The azure resources that will be contained within the solutions. They will be locked and gets deleted automatically when the solution is deleted. */
containedResources?: string[];
- /**
- * @member {string[]} [referencedResources] The resources that will be
- * referenced from this solution. Deleting any of those solution out of band
- * will break the solution.
- */
+ /** The resources that will be referenced from this solution. Deleting any of those solution out of band will break the solution. */
referencedResources?: string[];
}
-/**
- * @interface
- * An interface representing ManagementAssociationProperties.
- * ManagementAssociation properties supported by the OperationsManagement
- * resource provider.
- *
- * @extends BaseResource
- */
-export interface ManagementAssociationProperties extends BaseResource {
- /**
- * @member {string} applicationId The applicationId of the appliance for this
- * association.
- */
- applicationId: string;
-}
-
-/**
- * @interface
- * An interface representing ArmTemplateParameter.
- * Parameter to pass to ARM template
- *
- */
-export interface ArmTemplateParameter {
- /**
- * @member {string} [name] name of the parameter.
- */
- name?: string;
- /**
- * @member {string} [value] value for the parameter. In Jtoken
- */
- value?: string;
-}
-
-/**
- * @interface
- * An interface representing ManagementConfigurationProperties.
- * ManagementConfiguration properties supported by the OperationsManagement
- * resource provider.
- *
- * @extends BaseResource
- */
-export interface ManagementConfigurationProperties extends BaseResource {
- /**
- * @member {string} [applicationId] The applicationId of the appliance for
- * this Management.
- */
- applicationId?: string;
- /**
- * @member {string} parentResourceType The type of the parent resource.
- */
- parentResourceType: string;
- /**
- * @member {ArmTemplateParameter[]} parameters Parameters to run the ARM
- * template
- */
- parameters: ArmTemplateParameter[];
- /**
- * @member {string} [provisioningState] The provisioning state for the
- * ManagementConfiguration.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
- */
- readonly provisioningState?: string;
- /**
- * @member {any} template The Json object containing the ARM template to
- * deploy
- */
- template: any;
+/** The error body contract. */
+export interface CodeMessageError {
+ /** The error details for a failed request. */
+ error?: CodeMessageErrorAutoGenerated;
}
-/**
- * @interface
- * An interface representing SolutionPlan.
- * Plan for solution object supported by the OperationsManagement resource
- * provider.
- *
- */
-export interface SolutionPlan {
- /**
- * @member {string} [name] name of the solution to be created. For Microsoft
- * published solution it should be in the format of
- * solutionType(workspaceName). SolutionType part is case sensitive. For
- * third party solution, it can be anything.
- */
- name?: string;
- /**
- * @member {string} [publisher] Publisher name. For gallery solution, it is
- * Microsoft.
- */
- publisher?: string;
- /**
- * @member {string} [promotionCode] promotionCode, Not really used now, can
- * you left as empty
- */
- promotionCode?: string;
- /**
- * @member {string} [product] name of the solution to enabled/add. For
- * Microsoft published gallery solution it should be in the format of
- * OMSGallery/. This is case sensitive
- */
- product?: string;
+/** The error details for a failed request. */
+export interface CodeMessageErrorAutoGenerated {
+ /** The error type. */
+ code?: string;
+ /** The error message. */
+ message?: string;
}
-/**
- * @interface
- * An interface representing Solution.
- * The container for solution.
- *
- * @extends BaseResource
- */
-export interface Solution extends BaseResource {
- /**
- * @member {string} [id] Resource ID.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
- */
- readonly id?: string;
- /**
- * @member {string} [name] Resource name.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
- */
- readonly name?: string;
- /**
- * @member {string} [type] Resource type.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
- */
- readonly type?: string;
- /**
- * @member {string} [location] Resource location
- */
- location?: string;
- /**
- * @member {SolutionPlan} [plan] Plan for solution object supported by the
- * OperationsManagement resource provider.
- */
- plan?: SolutionPlan;
- /**
- * @member {SolutionProperties} [properties] Properties for solution object
- * supported by the OperationsManagement resource provider.
- */
- properties?: SolutionProperties;
+/** The properties of a Solution that can be patched. */
+export interface SolutionPatch {
+ /** Resource tags */
+ tags?: { [propertyName: string]: string };
}
-/**
- * @interface
- * An interface representing SolutionPropertiesList.
- * the list of solution response
- *
- */
+/** the list of solution response */
export interface SolutionPropertiesList {
- /**
- * @member {Solution[]} [value] List of solution properites within the
- * subscription.
- */
+ /** List of solution properties within the subscription. */
value?: Solution[];
}
-/**
- * @interface
- * An interface representing ManagementAssociation.
- * The container for solution.
- *
- * @extends BaseResource
- */
-export interface ManagementAssociation extends BaseResource {
+/** the list of ManagementAssociation response */
+export interface ManagementAssociationPropertiesList {
+ /** List of Management Association properties within the subscription. */
+ value?: ManagementAssociation[];
+}
+
+/** The container for solution. */
+export interface ManagementAssociation {
/**
- * @member {string} [id] Resource ID.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Resource ID.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly id?: string;
/**
- * @member {string} [name] Resource name.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Resource name.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
/**
- * @member {string} [type] Resource type.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Resource type.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly type?: string;
- /**
- * @member {string} [location] Resource location
- */
+ /** Resource location */
location?: string;
- /**
- * @member {ManagementAssociationProperties} [properties] Properties for
- * ManagementAssociation object supported by the OperationsManagement
- * resource provider.
- */
+ /** Properties for ManagementAssociation object supported by the OperationsManagement resource provider. */
properties?: ManagementAssociationProperties;
}
-/**
- * @interface
- * An interface representing ManagementAssociationPropertiesList.
- * the list of ManagementAssociation response
- *
- */
-export interface ManagementAssociationPropertiesList {
- /**
- * @member {ManagementAssociation[]} [value] List of Management Association
- * properites within the subscription.
- */
- value?: ManagementAssociation[];
+/** ManagementAssociation properties supported by the OperationsManagement resource provider. */
+export interface ManagementAssociationProperties {
+ /** The applicationId of the appliance for this association. */
+ applicationId: string;
}
-/**
- * @interface
- * An interface representing ManagementConfiguration.
- * The container for solution.
- *
- * @extends BaseResource
- */
-export interface ManagementConfiguration extends BaseResource {
+/** the list of ManagementConfiguration response */
+export interface ManagementConfigurationPropertiesList {
+ /** List of Management Configuration properties within the subscription. */
+ value?: ManagementConfiguration[];
+}
+
+/** The container for solution. */
+export interface ManagementConfiguration {
/**
- * @member {string} [id] Resource ID.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Resource ID.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly id?: string;
/**
- * @member {string} [name] Resource name.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Resource name.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
/**
- * @member {string} [type] Resource type.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Resource type.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly type?: string;
- /**
- * @member {string} [location] Resource location
- */
+ /** Resource location */
location?: string;
- /**
- * @member {ManagementConfigurationProperties} [properties] Properties for
- * ManagementConfiguration object supported by the OperationsManagement
- * resource provider.
- */
+ /** Properties for ManagementConfiguration object supported by the OperationsManagement resource provider. */
properties?: ManagementConfigurationProperties;
}
-/**
- * @interface
- * An interface representing ManagementConfigurationPropertiesList.
- * the list of ManagementConfiguration response
- *
- */
-export interface ManagementConfigurationPropertiesList {
+/** ManagementConfiguration properties supported by the OperationsManagement resource provider. */
+export interface ManagementConfigurationProperties {
+ /** The applicationId of the appliance for this Management. */
+ applicationId?: string;
+ /** The type of the parent resource. */
+ parentResourceType: string;
+ /** Parameters to run the ARM template */
+ parameters: ArmTemplateParameter[];
/**
- * @member {ManagementConfiguration[]} [value] List of Management
- * Configuration properites within the subscription.
+ * The provisioning state for the ManagementConfiguration.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- value?: ManagementConfiguration[];
+ readonly provisioningState?: string;
+ /** The Json object containing the ARM template to deploy */
+ template: Record;
}
-/**
- * @interface
- * An interface representing CodeMessageErrorError.
- * The error details for a failed request.
- *
- */
-export interface CodeMessageErrorError {
- /**
- * @member {string} [code] The error type.
- */
- code?: string;
- /**
- * @member {string} [message] The error message.
- */
- message?: string;
+/** Parameter to pass to ARM template */
+export interface ArmTemplateParameter {
+ /** name of the parameter. */
+ name?: string;
+ /** value for the parameter. In Jtoken */
+ value?: string;
}
-/**
- * @interface
- * An interface representing CodeMessageError.
- * The error body contract.
- *
- */
-export interface CodeMessageError {
- /**
- * @member {CodeMessageErrorError} [error] The error details for a failed
- * request.
- */
- error?: CodeMessageErrorError;
+/** Result of the request to list solution operations. */
+export interface OperationListResult {
+ /** List of solution operations supported by the OperationsManagement resource provider. */
+ value?: Operation[];
}
-/**
- * @interface
- * An interface representing OperationsManagementClientOptions.
- * @extends AzureServiceClientOptions
- */
-export interface OperationsManagementClientOptions extends AzureServiceClientOptions {
- /**
- * @member {string} [baseUri]
- */
- baseUri?: string;
+/** Supported operation of OperationsManagement resource provider. */
+export interface Operation {
+ /** Operation name: {provider}/{resource}/{operation} */
+ name?: string;
+ /** Display metadata associated with the operation. */
+ display?: OperationDisplay;
}
+/** Display metadata associated with the operation. */
+export interface OperationDisplay {
+ /** Service provider: Microsoft OperationsManagement. */
+ provider?: string;
+ /** Resource on which the operation is performed etc. */
+ resource?: string;
+ /** Type of operation: get, read, delete, etc. */
+ operation?: string;
+}
-/**
- * @interface
- * An interface representing the OperationListResult.
- * Result of the request to list solution operations.
- *
- * @extends Array
- */
-export interface OperationListResult extends Array {
+/** Optional parameters. */
+export interface SolutionsCreateOrUpdateOptionalParams
+ extends coreClient.OperationOptions {
+ /** Delay to wait until next poll, in milliseconds. */
+ updateIntervalInMs?: number;
+ /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
+ resumeFrom?: string;
}
-/**
- * Contains response data for the createOrUpdate operation.
- */
-export type SolutionsCreateOrUpdateResponse = Solution & {
- /**
- * 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: Solution;
- };
-};
-
-/**
- * Contains response data for the get operation.
- */
-export type SolutionsGetResponse = Solution & {
- /**
- * 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: Solution;
- };
-};
-
-/**
- * Contains response data for the listByResourceGroup operation.
- */
-export type SolutionsListByResourceGroupResponse = SolutionPropertiesList & {
- /**
- * 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: SolutionPropertiesList;
- };
-};
-
-/**
- * Contains response data for the listBySubscription operation.
- */
-export type SolutionsListBySubscriptionResponse = SolutionPropertiesList & {
- /**
- * 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: SolutionPropertiesList;
- };
-};
-
-/**
- * Contains response data for the beginCreateOrUpdate operation.
- */
-export type SolutionsBeginCreateOrUpdateResponse = Solution & {
- /**
- * 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: Solution;
- };
-};
-
-/**
- * Contains response data for the listBySubscription operation.
- */
-export type ManagementAssociationsListBySubscriptionResponse = ManagementAssociationPropertiesList & {
- /**
- * 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: ManagementAssociationPropertiesList;
- };
-};
-
-/**
- * Contains response data for the createOrUpdate operation.
- */
-export type ManagementAssociationsCreateOrUpdateResponse = ManagementAssociation & {
- /**
- * 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: ManagementAssociation;
- };
-};
-
-/**
- * Contains response data for the get operation.
- */
-export type ManagementAssociationsGetResponse = ManagementAssociation & {
- /**
- * 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: ManagementAssociation;
- };
-};
-
-/**
- * Contains response data for the listBySubscription operation.
- */
-export type ManagementConfigurationsListBySubscriptionResponse = ManagementConfigurationPropertiesList & {
- /**
- * 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: ManagementConfigurationPropertiesList;
- };
-};
-
-/**
- * Contains response data for the createOrUpdate operation.
- */
-export type ManagementConfigurationsCreateOrUpdateResponse = ManagementConfiguration & {
- /**
- * 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: ManagementConfiguration;
- };
-};
-
-/**
- * Contains response data for the get operation.
- */
-export type ManagementConfigurationsGetResponse = ManagementConfiguration & {
- /**
- * 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: ManagementConfiguration;
- };
-};
-
-/**
- * Contains response data for the list operation.
- */
-export type OperationsListResponse = OperationListResult & {
- /**
- * 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: OperationListResult;
- };
-};
+/** Contains response data for the createOrUpdate operation. */
+export type SolutionsCreateOrUpdateResponse = Solution;
+
+/** Optional parameters. */
+export interface SolutionsUpdateOptionalParams
+ extends coreClient.OperationOptions {
+ /** Delay to wait until next poll, in milliseconds. */
+ updateIntervalInMs?: number;
+ /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
+ resumeFrom?: string;
+}
+
+/** Contains response data for the update operation. */
+export type SolutionsUpdateResponse = Solution;
+
+/** Optional parameters. */
+export interface SolutionsDeleteOptionalParams
+ extends coreClient.OperationOptions {
+ /** Delay to wait until next poll, in milliseconds. */
+ updateIntervalInMs?: number;
+ /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
+ resumeFrom?: string;
+}
+
+/** Optional parameters. */
+export interface SolutionsGetOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the get operation. */
+export type SolutionsGetResponse = Solution;
+
+/** Optional parameters. */
+export interface SolutionsListByResourceGroupOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listByResourceGroup operation. */
+export type SolutionsListByResourceGroupResponse = SolutionPropertiesList;
+
+/** Optional parameters. */
+export interface SolutionsListBySubscriptionOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listBySubscription operation. */
+export type SolutionsListBySubscriptionResponse = SolutionPropertiesList;
+
+/** Optional parameters. */
+export interface ManagementAssociationsListBySubscriptionOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listBySubscription operation. */
+export type ManagementAssociationsListBySubscriptionResponse = ManagementAssociationPropertiesList;
+
+/** Optional parameters. */
+export interface ManagementAssociationsCreateOrUpdateOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the createOrUpdate operation. */
+export type ManagementAssociationsCreateOrUpdateResponse = ManagementAssociation;
+
+/** Optional parameters. */
+export interface ManagementAssociationsDeleteOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Optional parameters. */
+export interface ManagementAssociationsGetOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the get operation. */
+export type ManagementAssociationsGetResponse = ManagementAssociation;
+
+/** Optional parameters. */
+export interface ManagementConfigurationsListBySubscriptionOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listBySubscription operation. */
+export type ManagementConfigurationsListBySubscriptionResponse = ManagementConfigurationPropertiesList;
+
+/** Optional parameters. */
+export interface ManagementConfigurationsCreateOrUpdateOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the createOrUpdate operation. */
+export type ManagementConfigurationsCreateOrUpdateResponse = ManagementConfiguration;
+
+/** Optional parameters. */
+export interface ManagementConfigurationsDeleteOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Optional parameters. */
+export interface ManagementConfigurationsGetOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the get operation. */
+export type ManagementConfigurationsGetResponse = ManagementConfiguration;
+
+/** Optional parameters. */
+export interface OperationsListOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the list operation. */
+export type OperationsListResponse = OperationListResult;
+
+/** Optional parameters. */
+export interface OperationsManagementClientOptionalParams
+ extends coreClient.ServiceClientOptions {
+ /** server parameter */
+ $host?: string;
+ /** Api Version */
+ apiVersion?: string;
+ /** Overrides client endpoint. */
+ endpoint?: string;
+}
diff --git a/sdk/operationsmanagement/arm-operations/src/models/managementAssociationsMappers.ts b/sdk/operationsmanagement/arm-operations/src/models/managementAssociationsMappers.ts
deleted file mode 100644
index 9298a1573e25..000000000000
--- a/sdk/operationsmanagement/arm-operations/src/models/managementAssociationsMappers.ts
+++ /dev/null
@@ -1,25 +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 {
- ManagementAssociationPropertiesList,
- ManagementAssociation,
- BaseResource,
- ManagementAssociationProperties,
- CodeMessageError,
- CodeMessageErrorError,
- SolutionProperties,
- ManagementConfigurationProperties,
- ArmTemplateParameter,
- Solution,
- SolutionPlan,
- ManagementConfiguration
-} from "../models/mappers";
-
diff --git a/sdk/operationsmanagement/arm-operations/src/models/managementConfigurationsMappers.ts b/sdk/operationsmanagement/arm-operations/src/models/managementConfigurationsMappers.ts
deleted file mode 100644
index e7cd4a5106ea..000000000000
--- a/sdk/operationsmanagement/arm-operations/src/models/managementConfigurationsMappers.ts
+++ /dev/null
@@ -1,25 +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 {
- ManagementConfigurationPropertiesList,
- ManagementConfiguration,
- BaseResource,
- ManagementConfigurationProperties,
- ArmTemplateParameter,
- CodeMessageError,
- CodeMessageErrorError,
- SolutionProperties,
- ManagementAssociationProperties,
- Solution,
- SolutionPlan,
- ManagementAssociation
-} from "../models/mappers";
-
diff --git a/sdk/operationsmanagement/arm-operations/src/models/mappers.ts b/sdk/operationsmanagement/arm-operations/src/models/mappers.ts
index 8dd842c003bb..e96b85d97511 100644
--- a/sdk/operationsmanagement/arm-operations/src/models/mappers.ts
+++ b/sdk/operationsmanagement/arm-operations/src/models/mappers.ts
@@ -1,52 +1,74 @@
/*
- * 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 { 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 OperationDisplay: msRest.CompositeMapper = {
- serializedName: "Operation_display",
+export const Solution: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "OperationDisplay",
+ className: "Solution",
modelProperties: {
- provider: {
- serializedName: "provider",
+ id: {
+ serializedName: "id",
+ readOnly: true,
type: {
name: "String"
}
},
- resource: {
- serializedName: "resource",
+ name: {
+ serializedName: "name",
+ readOnly: true,
type: {
name: "String"
}
},
- operation: {
- serializedName: "operation",
+ type: {
+ serializedName: "type",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ location: {
+ serializedName: "location",
type: {
name: "String"
}
+ },
+ tags: {
+ serializedName: "tags",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ }
+ },
+ plan: {
+ serializedName: "plan",
+ type: {
+ name: "Composite",
+ className: "SolutionPlan"
+ }
+ },
+ properties: {
+ serializedName: "properties",
+ type: {
+ name: "Composite",
+ className: "SolutionProperties"
+ }
}
}
}
};
-export const Operation: msRest.CompositeMapper = {
- serializedName: "Operation",
+export const SolutionPlan: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "Operation",
+ className: "SolutionPlan",
modelProperties: {
name: {
serializedName: "name",
@@ -54,33 +76,43 @@ export const Operation: msRest.CompositeMapper = {
name: "String"
}
},
- display: {
- serializedName: "display",
+ publisher: {
+ serializedName: "publisher",
type: {
- name: "Composite",
- className: "OperationDisplay"
+ name: "String"
+ }
+ },
+ promotionCode: {
+ serializedName: "promotionCode",
+ type: {
+ name: "String"
+ }
+ },
+ product: {
+ serializedName: "product",
+ type: {
+ name: "String"
}
}
}
}
};
-export const SolutionProperties: msRest.CompositeMapper = {
- serializedName: "SolutionProperties",
+export const SolutionProperties: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "SolutionProperties",
modelProperties: {
workspaceResourceId: {
- required: true,
serializedName: "workspaceResourceId",
+ required: true,
type: {
name: "String"
}
},
provisioningState: {
- readOnly: true,
serializedName: "provisioningState",
+ readOnly: true,
type: {
name: "String"
}
@@ -111,37 +143,35 @@ export const SolutionProperties: msRest.CompositeMapper = {
}
};
-export const ManagementAssociationProperties: msRest.CompositeMapper = {
- serializedName: "ManagementAssociationProperties",
+export const CodeMessageError: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "ManagementAssociationProperties",
+ className: "CodeMessageError",
modelProperties: {
- applicationId: {
- required: true,
- serializedName: "applicationId",
+ error: {
+ serializedName: "error",
type: {
- name: "String"
+ name: "Composite",
+ className: "CodeMessageErrorAutoGenerated"
}
}
}
}
};
-export const ArmTemplateParameter: msRest.CompositeMapper = {
- serializedName: "ArmTemplateParameter",
+export const CodeMessageErrorAutoGenerated: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "ArmTemplateParameter",
+ className: "CodeMessageErrorAutoGenerated",
modelProperties: {
- name: {
- serializedName: "name",
+ code: {
+ serializedName: "code",
type: {
name: "String"
}
},
- value: {
- serializedName: "value",
+ message: {
+ serializedName: "message",
type: {
name: "String"
}
@@ -150,113 +180,86 @@ export const ArmTemplateParameter: msRest.CompositeMapper = {
}
};
-export const ManagementConfigurationProperties: msRest.CompositeMapper = {
- serializedName: "ManagementConfigurationProperties",
+export const SolutionPatch: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "ManagementConfigurationProperties",
+ className: "SolutionPatch",
modelProperties: {
- applicationId: {
- serializedName: "applicationId",
- type: {
- name: "String"
- }
- },
- parentResourceType: {
- required: true,
- serializedName: "parentResourceType",
+ tags: {
+ serializedName: "tags",
type: {
- name: "String"
+ name: "Dictionary",
+ value: { type: { name: "String" } }
}
- },
- parameters: {
- required: true,
- serializedName: "parameters",
+ }
+ }
+ }
+};
+
+export const SolutionPropertiesList: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "SolutionPropertiesList",
+ modelProperties: {
+ value: {
+ serializedName: "value",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "ArmTemplateParameter"
+ className: "Solution"
}
}
}
- },
- provisioningState: {
- readOnly: true,
- serializedName: "provisioningState",
- type: {
- name: "String"
- }
- },
- template: {
- required: true,
- serializedName: "template",
- type: {
- name: "Object"
- }
}
}
}
};
-export const SolutionPlan: msRest.CompositeMapper = {
- serializedName: "SolutionPlan",
+export const ManagementAssociationPropertiesList: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "SolutionPlan",
+ className: "ManagementAssociationPropertiesList",
modelProperties: {
- name: {
- serializedName: "name",
- type: {
- name: "String"
- }
- },
- publisher: {
- serializedName: "publisher",
- type: {
- name: "String"
- }
- },
- promotionCode: {
- serializedName: "promotionCode",
- type: {
- name: "String"
- }
- },
- product: {
- serializedName: "product",
+ value: {
+ serializedName: "value",
type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ManagementAssociation"
+ }
+ }
}
}
}
}
};
-export const Solution: msRest.CompositeMapper = {
- serializedName: "Solution",
+export const ManagementAssociation: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "Solution",
+ className: "ManagementAssociation",
modelProperties: {
id: {
- readOnly: true,
serializedName: "id",
+ readOnly: true,
type: {
name: "String"
}
},
name: {
- readOnly: true,
serializedName: "name",
+ readOnly: true,
type: {
name: "String"
}
},
type: {
- readOnly: true,
serializedName: "type",
+ readOnly: true,
type: {
name: "String"
}
@@ -267,29 +270,37 @@ export const Solution: msRest.CompositeMapper = {
name: "String"
}
},
- plan: {
- serializedName: "plan",
- type: {
- name: "Composite",
- className: "SolutionPlan"
- }
- },
properties: {
serializedName: "properties",
type: {
name: "Composite",
- className: "SolutionProperties"
+ className: "ManagementAssociationProperties"
}
}
}
}
};
-export const SolutionPropertiesList: msRest.CompositeMapper = {
- serializedName: "SolutionPropertiesList",
+export const ManagementAssociationProperties: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "SolutionPropertiesList",
+ className: "ManagementAssociationProperties",
+ modelProperties: {
+ applicationId: {
+ serializedName: "applicationId",
+ required: true,
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ManagementConfigurationPropertiesList: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "ManagementConfigurationPropertiesList",
modelProperties: {
value: {
serializedName: "value",
@@ -298,7 +309,7 @@ export const SolutionPropertiesList: msRest.CompositeMapper = {
element: {
type: {
name: "Composite",
- className: "Solution"
+ className: "ManagementConfiguration"
}
}
}
@@ -307,29 +318,28 @@ export const SolutionPropertiesList: msRest.CompositeMapper = {
}
};
-export const ManagementAssociation: msRest.CompositeMapper = {
- serializedName: "ManagementAssociation",
+export const ManagementConfiguration: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "ManagementAssociation",
+ className: "ManagementConfiguration",
modelProperties: {
id: {
- readOnly: true,
serializedName: "id",
+ readOnly: true,
type: {
name: "String"
}
},
name: {
- readOnly: true,
serializedName: "name",
+ readOnly: true,
type: {
name: "String"
}
},
type: {
- readOnly: true,
serializedName: "type",
+ readOnly: true,
type: {
name: "String"
}
@@ -344,84 +354,88 @@ export const ManagementAssociation: msRest.CompositeMapper = {
serializedName: "properties",
type: {
name: "Composite",
- className: "ManagementAssociationProperties"
+ className: "ManagementConfigurationProperties"
}
}
}
}
};
-export const ManagementAssociationPropertiesList: msRest.CompositeMapper = {
- serializedName: "ManagementAssociationPropertiesList",
+export const ManagementConfigurationProperties: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "ManagementAssociationPropertiesList",
+ className: "ManagementConfigurationProperties",
modelProperties: {
- value: {
- serializedName: "value",
+ applicationId: {
+ serializedName: "applicationId",
+ type: {
+ name: "String"
+ }
+ },
+ parentResourceType: {
+ serializedName: "parentResourceType",
+ required: true,
+ type: {
+ name: "String"
+ }
+ },
+ parameters: {
+ serializedName: "parameters",
+ required: true,
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "ManagementAssociation"
+ className: "ArmTemplateParameter"
}
}
}
+ },
+ provisioningState: {
+ serializedName: "provisioningState",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ template: {
+ serializedName: "template",
+ required: true,
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "any" } }
+ }
}
}
}
};
-export const ManagementConfiguration: msRest.CompositeMapper = {
- serializedName: "ManagementConfiguration",
+export const ArmTemplateParameter: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "ManagementConfiguration",
+ className: "ArmTemplateParameter",
modelProperties: {
- id: {
- readOnly: true,
- serializedName: "id",
- type: {
- name: "String"
- }
- },
name: {
- readOnly: true,
serializedName: "name",
type: {
name: "String"
}
},
- type: {
- readOnly: true,
- serializedName: "type",
- type: {
- name: "String"
- }
- },
- location: {
- serializedName: "location",
+ value: {
+ serializedName: "value",
type: {
name: "String"
}
- },
- properties: {
- serializedName: "properties",
- type: {
- name: "Composite",
- className: "ManagementConfigurationProperties"
- }
}
}
}
};
-export const ManagementConfigurationPropertiesList: msRest.CompositeMapper = {
- serializedName: "ManagementConfigurationPropertiesList",
+export const OperationListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "ManagementConfigurationPropertiesList",
+ className: "OperationListResult",
modelProperties: {
value: {
serializedName: "value",
@@ -430,7 +444,7 @@ export const ManagementConfigurationPropertiesList: msRest.CompositeMapper = {
element: {
type: {
name: "Composite",
- className: "ManagementConfiguration"
+ className: "Operation"
}
}
}
@@ -439,61 +453,49 @@ export const ManagementConfigurationPropertiesList: msRest.CompositeMapper = {
}
};
-export const CodeMessageErrorError: msRest.CompositeMapper = {
- serializedName: "CodeMessageError_error",
+export const Operation: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "CodeMessageErrorError",
+ className: "Operation",
modelProperties: {
- code: {
- serializedName: "code",
+ name: {
+ serializedName: "name",
type: {
name: "String"
}
},
- message: {
- serializedName: "message",
+ display: {
+ serializedName: "display",
type: {
- name: "String"
+ name: "Composite",
+ className: "OperationDisplay"
}
}
}
}
};
-export const CodeMessageError: msRest.CompositeMapper = {
- serializedName: "CodeMessageError",
+export const OperationDisplay: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "CodeMessageError",
+ className: "OperationDisplay",
modelProperties: {
- error: {
- serializedName: "error",
+ provider: {
+ serializedName: "provider",
type: {
- name: "Composite",
- className: "CodeMessageErrorError"
+ name: "String"
}
- }
- }
- }
-};
-
-export const OperationListResult: msRest.CompositeMapper = {
- serializedName: "OperationListResult",
- type: {
- name: "Composite",
- className: "OperationListResult",
- modelProperties: {
- value: {
- serializedName: "",
+ },
+ resource: {
+ serializedName: "resource",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "Operation"
- }
- }
+ name: "String"
+ }
+ },
+ operation: {
+ serializedName: "operation",
+ type: {
+ name: "String"
}
}
}
diff --git a/sdk/operationsmanagement/arm-operations/src/models/operationsMappers.ts b/sdk/operationsmanagement/arm-operations/src/models/operationsMappers.ts
deleted file mode 100644
index 2edcc577920e..000000000000
--- a/sdk/operationsmanagement/arm-operations/src/models/operationsMappers.ts
+++ /dev/null
@@ -1,17 +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 {
- OperationListResult,
- Operation,
- OperationDisplay,
- CloudError
-} from "../models/mappers";
-
diff --git a/sdk/operationsmanagement/arm-operations/src/models/parameters.ts b/sdk/operationsmanagement/arm-operations/src/models/parameters.ts
index 50b33a6fdfa5..7143db81497a 100644
--- a/sdk/operationsmanagement/arm-operations/src/models/parameters.ts
+++ b/sdk/operationsmanagement/arm-operations/src/models/parameters.ts
@@ -1,115 +1,178 @@
/*
- * 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 {
+ Solution as SolutionMapper,
+ SolutionPatch as SolutionPatchMapper,
+ ManagementAssociation as ManagementAssociationMapper,
+ ManagementConfiguration as ManagementConfigurationMapper
+} from "../models/mappers";
-export const acceptLanguage: msRest.OperationParameter = {
- parameterPath: "acceptLanguage",
+export const contentType: OperationParameter = {
+ parameterPath: ["options", "contentType"],
mapper: {
- serializedName: "accept-language",
- defaultValue: 'en-US',
+ defaultValue: "application/json",
+ isConstant: true,
+ serializedName: "Content-Type",
type: {
name: "String"
}
}
};
-export const apiVersion: msRest.OperationQueryParameter = {
- parameterPath: "apiVersion",
+
+export const parameters: OperationParameter = {
+ parameterPath: "parameters",
+ mapper: SolutionMapper
+};
+
+export const accept: OperationParameter = {
+ parameterPath: "accept",
mapper: {
- required: true,
- serializedName: "api-version",
+ defaultValue: "application/json",
+ isConstant: true,
+ serializedName: "Accept",
type: {
name: "String"
}
}
};
-export const managementAssociationName: msRest.OperationURLParameter = {
- parameterPath: "managementAssociationName",
+
+export const $host: OperationURLParameter = {
+ parameterPath: "$host",
mapper: {
+ serializedName: "$host",
required: true,
- serializedName: "managementAssociationName",
type: {
name: "String"
}
- }
+ },
+ skipEncoding: true
};
-export const managementConfigurationName: msRest.OperationURLParameter = {
- parameterPath: "managementConfigurationName",
+
+export const subscriptionId: OperationURLParameter = {
+ parameterPath: "subscriptionId",
mapper: {
+ serializedName: "subscriptionId",
required: true,
- serializedName: "managementConfigurationName",
type: {
name: "String"
}
}
};
-export const providerName: msRest.OperationURLParameter = {
- parameterPath: "providerName",
+
+export const resourceGroupName: OperationURLParameter = {
+ parameterPath: "resourceGroupName",
mapper: {
+ constraints: {
+ Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"),
+ MaxLength: 90,
+ MinLength: 1
+ },
+ serializedName: "resourceGroupName",
required: true,
- serializedName: "providerName",
type: {
name: "String"
}
}
};
-export const resourceGroupName: msRest.OperationURLParameter = {
- parameterPath: "resourceGroupName",
+
+export const apiVersion: OperationQueryParameter = {
+ parameterPath: "apiVersion",
+ mapper: {
+ defaultValue: "2015-11-01-preview",
+ isConstant: true,
+ serializedName: "api-version",
+ type: {
+ name: "String"
+ }
+ }
+};
+
+export const solutionName: OperationURLParameter = {
+ parameterPath: "solutionName",
mapper: {
+ serializedName: "solutionName",
required: true,
- serializedName: "resourceGroupName",
- constraints: {
- MaxLength: 90,
- MinLength: 1,
- Pattern: /^[-\w\._\(\)]+$/
- },
type: {
name: "String"
}
}
};
-export const resourceName: msRest.OperationURLParameter = {
- parameterPath: "resourceName",
+
+export const parameters1: OperationParameter = {
+ parameterPath: "parameters",
+ mapper: SolutionPatchMapper
+};
+
+export const parameters2: OperationParameter = {
+ parameterPath: "parameters",
+ mapper: ManagementAssociationMapper
+};
+
+export const providerName: OperationURLParameter = {
+ parameterPath: "providerName",
mapper: {
+ serializedName: "providerName",
required: true,
- serializedName: "resourceName",
type: {
name: "String"
}
}
};
-export const resourceType: msRest.OperationURLParameter = {
+
+export const resourceType: OperationURLParameter = {
parameterPath: "resourceType",
mapper: {
- required: true,
serializedName: "resourceType",
+ required: true,
type: {
name: "String"
}
}
};
-export const solutionName: msRest.OperationURLParameter = {
- parameterPath: "solutionName",
+
+export const resourceName: OperationURLParameter = {
+ parameterPath: "resourceName",
mapper: {
+ serializedName: "resourceName",
required: true,
- serializedName: "solutionName",
type: {
name: "String"
}
}
};
-export const subscriptionId: msRest.OperationURLParameter = {
- parameterPath: "subscriptionId",
+
+export const managementAssociationName: OperationURLParameter = {
+ parameterPath: "managementAssociationName",
mapper: {
+ serializedName: "managementAssociationName",
+ required: true,
+ type: {
+ name: "String"
+ }
+ }
+};
+
+export const parameters3: OperationParameter = {
+ parameterPath: "parameters",
+ mapper: ManagementConfigurationMapper
+};
+
+export const managementConfigurationName: OperationURLParameter = {
+ parameterPath: "managementConfigurationName",
+ mapper: {
+ serializedName: "managementConfigurationName",
required: true,
- serializedName: "subscriptionId",
type: {
name: "String"
}
diff --git a/sdk/operationsmanagement/arm-operations/src/models/solutionsMappers.ts b/sdk/operationsmanagement/arm-operations/src/models/solutionsMappers.ts
deleted file mode 100644
index 03264e696d61..000000000000
--- a/sdk/operationsmanagement/arm-operations/src/models/solutionsMappers.ts
+++ /dev/null
@@ -1,25 +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 {
- Solution,
- BaseResource,
- SolutionPlan,
- SolutionProperties,
- CodeMessageError,
- CodeMessageErrorError,
- SolutionPropertiesList,
- ManagementAssociationProperties,
- ManagementConfigurationProperties,
- ArmTemplateParameter,
- ManagementAssociation,
- ManagementConfiguration
-} from "../models/mappers";
-
diff --git a/sdk/operationsmanagement/arm-operations/src/operations/index.ts b/sdk/operationsmanagement/arm-operations/src/operations/index.ts
index 83982e260ebc..a328161d308b 100644
--- a/sdk/operationsmanagement/arm-operations/src/operations/index.ts
+++ b/sdk/operationsmanagement/arm-operations/src/operations/index.ts
@@ -1,11 +1,9 @@
/*
- * 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 "./solutions";
diff --git a/sdk/operationsmanagement/arm-operations/src/operations/managementAssociations.ts b/sdk/operationsmanagement/arm-operations/src/operations/managementAssociations.ts
index 78579c531814..5a130abe646e 100644
--- a/sdk/operationsmanagement/arm-operations/src/operations/managementAssociations.ts
+++ b/sdk/operationsmanagement/arm-operations/src/operations/managementAssociations.ts
@@ -1,174 +1,112 @@
/*
- * 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/managementAssociationsMappers";
+import { ManagementAssociations } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { OperationsManagementClientContext } from "../operationsManagementClientContext";
+import {
+ ManagementAssociationsListBySubscriptionOptionalParams,
+ ManagementAssociationsListBySubscriptionResponse,
+ ManagementAssociation,
+ ManagementAssociationsCreateOrUpdateOptionalParams,
+ ManagementAssociationsCreateOrUpdateResponse,
+ ManagementAssociationsDeleteOptionalParams,
+ ManagementAssociationsGetOptionalParams,
+ ManagementAssociationsGetResponse
+} from "../models";
-/** Class representing a ManagementAssociations. */
-export class ManagementAssociations {
+/** Class containing ManagementAssociations operations. */
+export class ManagementAssociationsImpl implements ManagementAssociations {
private readonly client: OperationsManagementClientContext;
/**
- * Create a ManagementAssociations.
- * @param {OperationsManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class ManagementAssociations class.
+ * @param client Reference to the service client
*/
constructor(client: OperationsManagementClientContext) {
this.client = client;
}
/**
- * Retrieves the ManagementAssociatons list.
- * @summary Retrieves the ManagementAssociatons list for the subscription
- * @param [options] The optional parameters
- * @returns Promise
+ * Retrieves the ManagementAssociations list.
+ * @param options The options parameters.
*/
- listBySubscription(options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param callback The callback
- */
- listBySubscription(callback: msRest.ServiceCallback): void;
- /**
- * @param options The optional parameters
- * @param callback The callback
- */
- listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ listBySubscription(
+ options?: ManagementAssociationsListBySubscriptionOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- options
- },
- listBySubscriptionOperationSpec,
- callback) as Promise;
+ { options },
+ listBySubscriptionOperationSpec
+ );
}
/**
* Creates or updates the ManagementAssociation.
- * @summary Create/Update ManagementAssociation.
- * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param managementAssociationName User ManagementAssociation Name.
- * @param parameters The parameters required to create ManagementAssociation extension.
- * @param [options] The optional parameters
- * @returns Promise
- */
- createOrUpdate(resourceGroupName: string, managementAssociationName: string, parameters: Models.ManagementAssociation, options?: msRest.RequestOptionsBase): Promise;
- /**
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
* @param managementAssociationName User ManagementAssociation Name.
* @param parameters The parameters required to create ManagementAssociation extension.
- * @param callback The callback
+ * @param options The options parameters.
*/
- createOrUpdate(resourceGroupName: string, managementAssociationName: string, parameters: Models.ManagementAssociation, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param managementAssociationName User ManagementAssociation Name.
- * @param parameters The parameters required to create ManagementAssociation extension.
- * @param options The optional parameters
- * @param callback The callback
- */
- createOrUpdate(resourceGroupName: string, managementAssociationName: string, parameters: Models.ManagementAssociation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- createOrUpdate(resourceGroupName: string, managementAssociationName: string, parameters: Models.ManagementAssociation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ createOrUpdate(
+ resourceGroupName: string,
+ managementAssociationName: string,
+ parameters: ManagementAssociation,
+ options?: ManagementAssociationsCreateOrUpdateOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- managementAssociationName,
- parameters,
- options
- },
- createOrUpdateOperationSpec,
- callback) as Promise;
+ { resourceGroupName, managementAssociationName, parameters, options },
+ createOrUpdateOperationSpec
+ );
}
/**
* Deletes the ManagementAssociation in the subscription.
- * @summary Deletes the ManagementAssociation
- * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param managementAssociationName User ManagementAssociation Name.
- * @param [options] The optional parameters
- * @returns Promise
- */
- deleteMethod(resourceGroupName: string, managementAssociationName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param managementAssociationName User ManagementAssociation Name.
- * @param callback The callback
- */
- deleteMethod(resourceGroupName: string, managementAssociationName: string, callback: msRest.ServiceCallback): void;
- /**
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
* @param managementAssociationName User ManagementAssociation Name.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- deleteMethod(resourceGroupName: string, managementAssociationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- deleteMethod(resourceGroupName: string, managementAssociationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ delete(
+ resourceGroupName: string,
+ managementAssociationName: string,
+ options?: ManagementAssociationsDeleteOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- managementAssociationName,
- options
- },
- deleteMethodOperationSpec,
- callback);
+ { resourceGroupName, managementAssociationName, options },
+ deleteOperationSpec
+ );
}
/**
* Retrieves the user ManagementAssociation.
- * @summary Retrieve ManagementAssociation.
- * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param managementAssociationName User ManagementAssociation Name.
- * @param [options] The optional parameters
- * @returns Promise
- */
- get(resourceGroupName: string, managementAssociationName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
* @param managementAssociationName User ManagementAssociation Name.
- * @param callback The callback
+ * @param options The options parameters.
*/
- get(resourceGroupName: string, managementAssociationName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param managementAssociationName User ManagementAssociation Name.
- * @param options The optional parameters
- * @param callback The callback
- */
- get(resourceGroupName: string, managementAssociationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- get(resourceGroupName: string, managementAssociationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ get(
+ resourceGroupName: string,
+ managementAssociationName: string,
+ options?: ManagementAssociationsGetOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- managementAssociationName,
- options
- },
- getOperationSpec,
- callback) as Promise;
+ { resourceGroupName, managementAssociationName, options },
+ getOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const listBySubscriptionOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementAssociations",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementAssociations",
- urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.ManagementAssociationPropertiesList
@@ -177,33 +115,15 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CodeMessageError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const createOrUpdateOperationSpec: msRest.OperationSpec = {
+const createOrUpdateOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}",
httpMethod: "PUT",
- path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}",
- urlParameters: [
- Parameters.subscriptionId,
- Parameters.resourceGroupName,
- Parameters.providerName,
- Parameters.resourceType,
- Parameters.resourceName,
- Parameters.managementAssociationName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
- requestBody: {
- parameterPath: "parameters",
- mapper: {
- ...Mappers.ManagementAssociation,
- required: true
- }
- },
responses: {
200: {
bodyMapper: Mappers.ManagementAssociation
@@ -212,13 +132,10 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CodeMessageError
}
},
- serializer
-};
-
-const deleteMethodOperationSpec: msRest.OperationSpec = {
- httpMethod: "DELETE",
- path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}",
+ requestBody: Parameters.parameters2,
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.providerName,
@@ -226,25 +143,23 @@ const deleteMethodOperationSpec: msRest.OperationSpec = {
Parameters.resourceName,
Parameters.managementAssociationName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ headerParameters: [Parameters.contentType, Parameters.accept],
+ mediaType: "json",
+ serializer
+};
+const deleteOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}",
+ httpMethod: "DELETE",
responses: {
200: {},
default: {
bodyMapper: Mappers.CodeMessageError
}
},
- serializer
-};
-
-const getOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.providerName,
@@ -252,12 +167,13 @@ const getOperationSpec: msRest.OperationSpec = {
Parameters.resourceName,
Parameters.managementAssociationName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const getOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}",
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ManagementAssociation
@@ -266,5 +182,16 @@ const getOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CodeMessageError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.providerName,
+ Parameters.resourceType,
+ Parameters.resourceName,
+ Parameters.managementAssociationName
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/operationsmanagement/arm-operations/src/operations/managementConfigurations.ts b/sdk/operationsmanagement/arm-operations/src/operations/managementConfigurations.ts
index 218b3c65ca2e..d27486ec4924 100644
--- a/sdk/operationsmanagement/arm-operations/src/operations/managementConfigurations.ts
+++ b/sdk/operationsmanagement/arm-operations/src/operations/managementConfigurations.ts
@@ -1,26 +1,34 @@
/*
- * 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/managementConfigurationsMappers";
+import { ManagementConfigurations } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { OperationsManagementClientContext } from "../operationsManagementClientContext";
+import {
+ ManagementConfigurationsListBySubscriptionOptionalParams,
+ ManagementConfigurationsListBySubscriptionResponse,
+ ManagementConfiguration,
+ ManagementConfigurationsCreateOrUpdateOptionalParams,
+ ManagementConfigurationsCreateOrUpdateResponse,
+ ManagementConfigurationsDeleteOptionalParams,
+ ManagementConfigurationsGetOptionalParams,
+ ManagementConfigurationsGetResponse
+} from "../models";
-/** Class representing a ManagementConfigurations. */
-export class ManagementConfigurations {
+/** Class containing ManagementConfigurations operations. */
+export class ManagementConfigurationsImpl implements ManagementConfigurations {
private readonly client: OperationsManagementClientContext;
/**
- * Create a ManagementConfigurations.
- * @param {OperationsManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class ManagementConfigurations class.
+ * @param client Reference to the service client
*/
constructor(client: OperationsManagementClientContext) {
this.client = client;
@@ -28,147 +36,77 @@ export class ManagementConfigurations {
/**
* Retrieves the ManagementConfigurations list.
- * @summary Retrieves the ManagementConfigurations list for the subscription
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- listBySubscription(options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param callback The callback
- */
- listBySubscription(callback: msRest.ServiceCallback): void;
- /**
- * @param options The optional parameters
- * @param callback The callback
- */
- listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ listBySubscription(
+ options?: ManagementConfigurationsListBySubscriptionOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- options
- },
- listBySubscriptionOperationSpec,
- callback) as Promise;
+ { options },
+ listBySubscriptionOperationSpec
+ );
}
/**
* Creates or updates the ManagementConfiguration.
- * @summary Create/Update ManagementConfiguration.
- * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param managementConfigurationName User Management Configuration Name.
- * @param parameters The parameters required to create OMS Solution.
- * @param [options] The optional parameters
- * @returns Promise
- */
- createOrUpdate(resourceGroupName: string, managementConfigurationName: string, parameters: Models.ManagementConfiguration, options?: msRest.RequestOptionsBase): Promise;
- /**
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
* @param managementConfigurationName User Management Configuration Name.
* @param parameters The parameters required to create OMS Solution.
- * @param callback The callback
+ * @param options The options parameters.
*/
- createOrUpdate(resourceGroupName: string, managementConfigurationName: string, parameters: Models.ManagementConfiguration, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param managementConfigurationName User Management Configuration Name.
- * @param parameters The parameters required to create OMS Solution.
- * @param options The optional parameters
- * @param callback The callback
- */
- createOrUpdate(resourceGroupName: string, managementConfigurationName: string, parameters: Models.ManagementConfiguration, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- createOrUpdate(resourceGroupName: string, managementConfigurationName: string, parameters: Models.ManagementConfiguration, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ createOrUpdate(
+ resourceGroupName: string,
+ managementConfigurationName: string,
+ parameters: ManagementConfiguration,
+ options?: ManagementConfigurationsCreateOrUpdateOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- managementConfigurationName,
- parameters,
- options
- },
- createOrUpdateOperationSpec,
- callback) as Promise;
+ { resourceGroupName, managementConfigurationName, parameters, options },
+ createOrUpdateOperationSpec
+ );
}
/**
* Deletes the ManagementConfiguration in the subscription.
- * @summary Deletes the ManagementConfiguration
- * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param managementConfigurationName User Management Configuration Name.
- * @param [options] The optional parameters
- * @returns Promise
- */
- deleteMethod(resourceGroupName: string, managementConfigurationName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
* @param managementConfigurationName User Management Configuration Name.
- * @param callback The callback
+ * @param options The options parameters.
*/
- deleteMethod(resourceGroupName: string, managementConfigurationName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param managementConfigurationName User Management Configuration Name.
- * @param options The optional parameters
- * @param callback The callback
- */
- deleteMethod(resourceGroupName: string, managementConfigurationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- deleteMethod(resourceGroupName: string, managementConfigurationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ delete(
+ resourceGroupName: string,
+ managementConfigurationName: string,
+ options?: ManagementConfigurationsDeleteOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- managementConfigurationName,
- options
- },
- deleteMethodOperationSpec,
- callback);
+ { resourceGroupName, managementConfigurationName, options },
+ deleteOperationSpec
+ );
}
/**
* Retrieves the user ManagementConfiguration.
- * @summary Retrieve ManagementConfiguration.
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
* @param managementConfigurationName User Management Configuration Name.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- get(resourceGroupName: string, managementConfigurationName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param managementConfigurationName User Management Configuration Name.
- * @param callback The callback
- */
- get(resourceGroupName: string, managementConfigurationName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param managementConfigurationName User Management Configuration Name.
- * @param options The optional parameters
- * @param callback The callback
- */
- get(resourceGroupName: string, managementConfigurationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- get(resourceGroupName: string, managementConfigurationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ get(
+ resourceGroupName: string,
+ managementConfigurationName: string,
+ options?: ManagementConfigurationsGetOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- managementConfigurationName,
- options
- },
- getOperationSpec,
- callback) as Promise;
+ { resourceGroupName, managementConfigurationName, options },
+ getOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const listBySubscriptionOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementConfigurations",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementConfigurations",
- urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.ManagementConfigurationPropertiesList
@@ -177,30 +115,15 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CodeMessageError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const createOrUpdateOperationSpec: msRest.OperationSpec = {
+const createOrUpdateOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}",
httpMethod: "PUT",
- path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}",
- urlParameters: [
- Parameters.subscriptionId,
- Parameters.resourceGroupName,
- Parameters.managementConfigurationName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
- requestBody: {
- parameterPath: "parameters",
- mapper: {
- ...Mappers.ManagementConfiguration,
- required: true
- }
- },
responses: {
200: {
bodyMapper: Mappers.ManagementConfiguration
@@ -209,46 +132,42 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CodeMessageError
}
},
- serializer
-};
-
-const deleteMethodOperationSpec: msRest.OperationSpec = {
- httpMethod: "DELETE",
- path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}",
+ requestBody: Parameters.parameters3,
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.managementConfigurationName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ headerParameters: [Parameters.contentType, Parameters.accept],
+ mediaType: "json",
+ serializer
+};
+const deleteOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}",
+ httpMethod: "DELETE",
responses: {
200: {},
default: {
bodyMapper: Mappers.CodeMessageError
}
},
- serializer
-};
-
-const getOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.managementConfigurationName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const getOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}",
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ManagementConfiguration
@@ -257,5 +176,13 @@ const getOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CodeMessageError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.managementConfigurationName
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/operationsmanagement/arm-operations/src/operations/operations.ts b/sdk/operationsmanagement/arm-operations/src/operations/operations.ts
index ff000963bc27..2f42d6ff870e 100644
--- a/sdk/operationsmanagement/arm-operations/src/operations/operations.ts
+++ b/sdk/operationsmanagement/arm-operations/src/operations/operations.ts
@@ -1,26 +1,31 @@
/*
- * 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { Operations } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { OperationsManagementClientContext } from "../operationsManagementClientContext";
+import {
+ Operation,
+ OperationsListOptionalParams,
+ OperationsListResponse
+} from "../models";
-/** Class representing a Operations. */
-export class Operations {
+///
+/** Class containing Operations operations. */
+export class OperationsImpl implements Operations {
private readonly client: OperationsManagementClientContext;
/**
- * Create a Operations.
- * @param {OperationsManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class Operations class.
+ * @param client Reference to the service client
*/
constructor(client: OperationsManagementClientContext) {
this.client = client;
@@ -28,47 +33,63 @@ export class Operations {
/**
* Lists all of the available OperationsManagement Rest API 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;
+ public list(
+ options?: OperationsListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listPagingPage(options);
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ options?: OperationsListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(options);
+ yield result.value || [];
+ }
+
+ private async *listPagingAll(
+ options?: OperationsListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(options)) {
+ yield* page;
+ }
+ }
+
/**
- * @param options The optional parameters
- * @param callback The callback
+ * Lists all of the available OperationsManagement Rest API operations.
+ * @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;
+ private _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.OperationsManagement/operations",
httpMethod: "GET",
- path: "providers/Microsoft.OperationsManagement/operations",
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.OperationListResult
- },
- default: {
- bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/operationsmanagement/arm-operations/src/operations/solutions.ts b/sdk/operationsmanagement/arm-operations/src/operations/solutions.ts
index c6088580a276..e513edbe4b3c 100644
--- a/sdk/operationsmanagement/arm-operations/src/operations/solutions.ts
+++ b/sdk/operationsmanagement/arm-operations/src/operations/solutions.ts
@@ -1,27 +1,41 @@
/*
- * 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 msRestAzure from "@azure/ms-rest-azure-js";
-import * as Models from "../models";
-import * as Mappers from "../models/solutionsMappers";
+import { Solutions } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { OperationsManagementClientContext } from "../operationsManagementClientContext";
+import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
+import { LroImpl } from "../lroImpl";
+import {
+ Solution,
+ SolutionsCreateOrUpdateOptionalParams,
+ SolutionsCreateOrUpdateResponse,
+ SolutionPatch,
+ SolutionsUpdateOptionalParams,
+ SolutionsUpdateResponse,
+ SolutionsDeleteOptionalParams,
+ SolutionsGetOptionalParams,
+ SolutionsGetResponse,
+ SolutionsListByResourceGroupOptionalParams,
+ SolutionsListByResourceGroupResponse,
+ SolutionsListBySubscriptionOptionalParams,
+ SolutionsListBySubscriptionResponse
+} from "../models";
-/** Class representing a Solutions. */
-export class Solutions {
+/** Class containing Solutions operations. */
+export class SolutionsImpl implements Solutions {
private readonly client: OperationsManagementClientContext;
/**
- * Create a Solutions.
- * @param {OperationsManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class Solutions class.
+ * @param client Reference to the service client
*/
constructor(client: OperationsManagementClientContext) {
this.client = client;
@@ -29,284 +43,458 @@ export class Solutions {
/**
* Creates or updates the Solution.
- * @summary Create/Update Solution.
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
* @param solutionName User Solution Name.
* @param parameters The parameters required to create OMS Solution.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- createOrUpdate(resourceGroupName: string, solutionName: string, parameters: Models.Solution, options?: msRest.RequestOptionsBase): Promise {
- return this.beginCreateOrUpdate(resourceGroupName,solutionName,parameters,options)
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise;
+ async beginCreateOrUpdate(
+ resourceGroupName: string,
+ solutionName: string,
+ parameters: Solution,
+ options?: SolutionsCreateOrUpdateOptionalParams
+ ): Promise<
+ PollerLike<
+ PollOperationState,
+ SolutionsCreateOrUpdateResponse
+ >
+ > {
+ const directSendOperation = async (
+ args: coreClient.OperationArguments,
+ spec: coreClient.OperationSpec
+ ): Promise => {
+ return this.client.sendOperationRequest(args, spec);
+ };
+ const sendOperation = async (
+ args: coreClient.OperationArguments,
+ spec: coreClient.OperationSpec
+ ) => {
+ let currentRawResponse:
+ | coreClient.FullOperationResponse
+ | undefined = undefined;
+ const providedCallback = args.options?.onResponse;
+ const callback: coreClient.RawResponseCallback = (
+ rawResponse: coreClient.FullOperationResponse,
+ flatResponse: unknown
+ ) => {
+ currentRawResponse = rawResponse;
+ providedCallback?.(rawResponse, flatResponse);
+ };
+ const updatedArgs = {
+ ...args,
+ options: {
+ ...args.options,
+ onResponse: callback
+ }
+ };
+ const flatResponse = await directSendOperation(updatedArgs, spec);
+ return {
+ flatResponse,
+ rawResponse: {
+ statusCode: currentRawResponse!.status,
+ body: currentRawResponse!.parsedBody,
+ headers: currentRawResponse!.headers.toJSON()
+ }
+ };
+ };
+
+ const lro = new LroImpl(
+ sendOperation,
+ { resourceGroupName, solutionName, parameters, options },
+ createOrUpdateOperationSpec
+ );
+ return new LroEngine(lro, {
+ resumeFrom: options?.resumeFrom,
+ intervalInMs: options?.updateIntervalInMs
+ });
}
/**
- * Deletes the solution in the subscription.
- * @summary Deletes the solution
+ * Creates or updates the Solution.
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
* @param solutionName User Solution Name.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param parameters The parameters required to create OMS Solution.
+ * @param options The options parameters.
*/
- deleteMethod(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase): Promise {
- return this.beginDeleteMethod(resourceGroupName,solutionName,options)
- .then(lroPoller => lroPoller.pollUntilFinished());
+ async beginCreateOrUpdateAndWait(
+ resourceGroupName: string,
+ solutionName: string,
+ parameters: Solution,
+ options?: SolutionsCreateOrUpdateOptionalParams
+ ): Promise {
+ const poller = await this.beginCreateOrUpdate(
+ resourceGroupName,
+ solutionName,
+ parameters,
+ options
+ );
+ return poller.pollUntilDone();
}
/**
- * Retrieves the user solution.
- * @summary Retrieve solution.
+ * Patch a Solution. Only updating tags supported.
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
* @param solutionName User Solution Name.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param parameters The parameters required to patch a Solution.
+ * @param options The options parameters.
*/
- get(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase): Promise;
+ async beginUpdate(
+ resourceGroupName: string,
+ solutionName: string,
+ parameters: SolutionPatch,
+ options?: SolutionsUpdateOptionalParams
+ ): Promise<
+ PollerLike<
+ PollOperationState,
+ SolutionsUpdateResponse
+ >
+ > {
+ const directSendOperation = async (
+ args: coreClient.OperationArguments,
+ spec: coreClient.OperationSpec
+ ): Promise => {
+ return this.client.sendOperationRequest(args, spec);
+ };
+ const sendOperation = async (
+ args: coreClient.OperationArguments,
+ spec: coreClient.OperationSpec
+ ) => {
+ let currentRawResponse:
+ | coreClient.FullOperationResponse
+ | undefined = undefined;
+ const providedCallback = args.options?.onResponse;
+ const callback: coreClient.RawResponseCallback = (
+ rawResponse: coreClient.FullOperationResponse,
+ flatResponse: unknown
+ ) => {
+ currentRawResponse = rawResponse;
+ providedCallback?.(rawResponse, flatResponse);
+ };
+ const updatedArgs = {
+ ...args,
+ options: {
+ ...args.options,
+ onResponse: callback
+ }
+ };
+ const flatResponse = await directSendOperation(updatedArgs, spec);
+ return {
+ flatResponse,
+ rawResponse: {
+ statusCode: currentRawResponse!.status,
+ body: currentRawResponse!.parsedBody,
+ headers: currentRawResponse!.headers.toJSON()
+ }
+ };
+ };
+
+ const lro = new LroImpl(
+ sendOperation,
+ { resourceGroupName, solutionName, parameters, options },
+ updateOperationSpec
+ );
+ return new LroEngine(lro, {
+ resumeFrom: options?.resumeFrom,
+ intervalInMs: options?.updateIntervalInMs
+ });
+ }
+
/**
+ * Patch a Solution. Only updating tags supported.
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
* @param solutionName User Solution Name.
- * @param callback The callback
+ * @param parameters The parameters required to patch a Solution.
+ * @param options The options parameters.
*/
- get(resourceGroupName: string, solutionName: string, callback: msRest.ServiceCallback): void;
+ async beginUpdateAndWait(
+ resourceGroupName: string,
+ solutionName: string,
+ parameters: SolutionPatch,
+ options?: SolutionsUpdateOptionalParams
+ ): Promise {
+ const poller = await this.beginUpdate(
+ resourceGroupName,
+ solutionName,
+ parameters,
+ options
+ );
+ return poller.pollUntilDone();
+ }
+
/**
+ * Deletes the solution in the subscription.
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
* @param solutionName User Solution Name.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- get(resourceGroupName: string, solutionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- get(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
- resourceGroupName,
- solutionName,
- options
- },
- getOperationSpec,
- callback) as Promise;
+ async beginDelete(
+ resourceGroupName: string,
+ solutionName: string,
+ options?: SolutionsDeleteOptionalParams
+ ): Promise, void>> {
+ const directSendOperation = async (
+ args: coreClient.OperationArguments,
+ spec: coreClient.OperationSpec
+ ): Promise => {
+ return this.client.sendOperationRequest(args, spec);
+ };
+ const sendOperation = async (
+ args: coreClient.OperationArguments,
+ spec: coreClient.OperationSpec
+ ) => {
+ let currentRawResponse:
+ | coreClient.FullOperationResponse
+ | undefined = undefined;
+ const providedCallback = args.options?.onResponse;
+ const callback: coreClient.RawResponseCallback = (
+ rawResponse: coreClient.FullOperationResponse,
+ flatResponse: unknown
+ ) => {
+ currentRawResponse = rawResponse;
+ providedCallback?.(rawResponse, flatResponse);
+ };
+ const updatedArgs = {
+ ...args,
+ options: {
+ ...args.options,
+ onResponse: callback
+ }
+ };
+ const flatResponse = await directSendOperation(updatedArgs, spec);
+ return {
+ flatResponse,
+ rawResponse: {
+ statusCode: currentRawResponse!.status,
+ body: currentRawResponse!.parsedBody,
+ headers: currentRawResponse!.headers.toJSON()
+ }
+ };
+ };
+
+ const lro = new LroImpl(
+ sendOperation,
+ { resourceGroupName, solutionName, options },
+ deleteOperationSpec
+ );
+ return new LroEngine(lro, {
+ resumeFrom: options?.resumeFrom,
+ intervalInMs: options?.updateIntervalInMs
+ });
}
/**
- * Retrieves the solution list. It will retrieve both first party and third party solutions
- * @summary Retrieves the solution list for the subscription
- * @param resourceGroupName The name of the resource group to get. 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 to get. The name is case insensitive.
- * @param callback The callback
- */
- listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void;
- /**
+ * Deletes the solution in the subscription.
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param options The optional parameters
- * @param callback The callback
+ * @param solutionName User Solution Name.
+ * @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 {
- return this.client.sendOperationRequest(
- {
- resourceGroupName,
- options
- },
- listByResourceGroupOperationSpec,
- callback) as Promise;
+ async beginDeleteAndWait(
+ resourceGroupName: string,
+ solutionName: string,
+ options?: SolutionsDeleteOptionalParams
+ ): Promise {
+ const poller = await this.beginDelete(
+ resourceGroupName,
+ solutionName,
+ options
+ );
+ return poller.pollUntilDone();
}
/**
- * Retrieves the solution list. It will retrieve both first party and third party solutions
- * @summary Retrieves the solution list for the subscription
- * @param [options] The optional parameters
- * @returns Promise
- */
- listBySubscription(options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param callback The callback
- */
- listBySubscription(callback: msRest.ServiceCallback): void;
- /**
- * @param options The optional parameters
- * @param callback The callback
+ * Retrieves the user solution.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param solutionName User Solution Name.
+ * @param options The options parameters.
*/
- listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ get(
+ resourceGroupName: string,
+ solutionName: string,
+ options?: SolutionsGetOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- options
- },
- listBySubscriptionOperationSpec,
- callback) as Promise;
+ { resourceGroupName, solutionName, options },
+ getOperationSpec
+ );
}
/**
- * Creates or updates the Solution.
- * @summary Create/Update Solution.
+ * Retrieves the solution list. It will retrieve both first party and third party solutions
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param solutionName User Solution Name.
- * @param parameters The parameters required to create OMS Solution.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- beginCreateOrUpdate(resourceGroupName: string, solutionName: string, parameters: Models.Solution, options?: msRest.RequestOptionsBase): Promise {
- return this.client.sendLRORequest(
- {
- resourceGroupName,
- solutionName,
- parameters,
- options
- },
- beginCreateOrUpdateOperationSpec,
- options);
+ listByResourceGroup(
+ resourceGroupName: string,
+ options?: SolutionsListByResourceGroupOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroupName, options },
+ listByResourceGroupOperationSpec
+ );
}
/**
- * Deletes the solution in the subscription.
- * @summary Deletes the solution
- * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
- * @param solutionName User Solution Name.
- * @param [options] The optional parameters
- * @returns Promise
+ * Retrieves the solution list. It will retrieve both first party and third party solutions
+ * @param options The options parameters.
*/
- beginDeleteMethod(resourceGroupName: string, solutionName: string, options?: msRest.RequestOptionsBase): Promise {
- return this.client.sendLRORequest(
- {
- resourceGroupName,
- solutionName,
- options
- },
- beginDeleteMethodOperationSpec,
- options);
+ listBySubscription(
+ options?: SolutionsListBySubscriptionOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { options },
+ listBySubscriptionOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const getOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}",
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const createOrUpdateOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}",
+ httpMethod: "PUT",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.Solution
+ },
+ 201: {
+ bodyMapper: Mappers.Solution
+ },
+ 202: {
+ bodyMapper: Mappers.Solution
+ },
+ 204: {
+ bodyMapper: Mappers.Solution
+ },
+ default: {
+ bodyMapper: Mappers.CodeMessageError
+ }
+ },
+ requestBody: Parameters.parameters,
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.solutionName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ headerParameters: [Parameters.contentType, Parameters.accept],
+ mediaType: "json",
+ serializer
+};
+const updateOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}",
+ httpMethod: "PATCH",
responses: {
200: {
bodyMapper: Mappers.Solution
},
+ 201: {
+ bodyMapper: Mappers.Solution
+ },
+ 202: {
+ bodyMapper: Mappers.Solution
+ },
+ 204: {
+ bodyMapper: Mappers.Solution
+ },
default: {
bodyMapper: Mappers.CodeMessageError
}
},
- serializer
-};
-
-const listByResourceGroupOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions",
+ requestBody: Parameters.parameters1,
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
- Parameters.resourceGroupName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
+ Parameters.resourceGroupName,
+ Parameters.solutionName
],
+ headerParameters: [Parameters.contentType, Parameters.accept],
+ mediaType: "json",
+ serializer
+};
+const deleteOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}",
+ httpMethod: "DELETE",
responses: {
- 200: {
- bodyMapper: Mappers.SolutionPropertiesList
- },
+ 200: {},
+ 201: {},
+ 202: {},
+ 204: {},
default: {
bodyMapper: Mappers.CodeMessageError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.solutionName
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listBySubscriptionOperationSpec: msRest.OperationSpec = {
+const getOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/solutions",
- urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
- bodyMapper: Mappers.SolutionPropertiesList
+ bodyMapper: Mappers.Solution
},
default: {
bodyMapper: Mappers.CodeMessageError
}
},
- serializer
-};
-
-const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
- httpMethod: "PUT",
- path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.solutionName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
- requestBody: {
- parameterPath: "parameters",
- mapper: {
- ...Mappers.Solution,
- required: true
- }
- },
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions",
+ httpMethod: "GET",
responses: {
- 201: {
- bodyMapper: Mappers.Solution
+ 200: {
+ bodyMapper: Mappers.SolutionPropertiesList
},
default: {
bodyMapper: Mappers.CodeMessageError
}
},
- serializer
-};
-
-const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
- httpMethod: "DELETE",
- path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
- Parameters.resourceGroupName,
- Parameters.solutionName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
+ Parameters.resourceGroupName
],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/solutions",
+ httpMethod: "GET",
responses: {
- 200: {},
+ 200: {
+ bodyMapper: Mappers.SolutionPropertiesList
+ },
default: {
bodyMapper: Mappers.CodeMessageError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/index.ts b/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/index.ts
new file mode 100644
index 000000000000..a328161d308b
--- /dev/null
+++ b/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/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 "./solutions";
+export * from "./managementAssociations";
+export * from "./managementConfigurations";
+export * from "./operations";
diff --git a/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/managementAssociations.ts b/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/managementAssociations.ts
new file mode 100644
index 000000000000..64d60ad49760
--- /dev/null
+++ b/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/managementAssociations.ts
@@ -0,0 +1,64 @@
+/*
+ * 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 {
+ ManagementAssociationsListBySubscriptionOptionalParams,
+ ManagementAssociationsListBySubscriptionResponse,
+ ManagementAssociation,
+ ManagementAssociationsCreateOrUpdateOptionalParams,
+ ManagementAssociationsCreateOrUpdateResponse,
+ ManagementAssociationsDeleteOptionalParams,
+ ManagementAssociationsGetOptionalParams,
+ ManagementAssociationsGetResponse
+} from "../models";
+
+/** Interface representing a ManagementAssociations. */
+export interface ManagementAssociations {
+ /**
+ * Retrieves the ManagementAssociations list.
+ * @param options The options parameters.
+ */
+ listBySubscription(
+ options?: ManagementAssociationsListBySubscriptionOptionalParams
+ ): Promise;
+ /**
+ * Creates or updates the ManagementAssociation.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param managementAssociationName User ManagementAssociation Name.
+ * @param parameters The parameters required to create ManagementAssociation extension.
+ * @param options The options parameters.
+ */
+ createOrUpdate(
+ resourceGroupName: string,
+ managementAssociationName: string,
+ parameters: ManagementAssociation,
+ options?: ManagementAssociationsCreateOrUpdateOptionalParams
+ ): Promise;
+ /**
+ * Deletes the ManagementAssociation in the subscription.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param managementAssociationName User ManagementAssociation Name.
+ * @param options The options parameters.
+ */
+ delete(
+ resourceGroupName: string,
+ managementAssociationName: string,
+ options?: ManagementAssociationsDeleteOptionalParams
+ ): Promise;
+ /**
+ * Retrieves the user ManagementAssociation.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param managementAssociationName User ManagementAssociation Name.
+ * @param options The options parameters.
+ */
+ get(
+ resourceGroupName: string,
+ managementAssociationName: string,
+ options?: ManagementAssociationsGetOptionalParams
+ ): Promise;
+}
diff --git a/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/managementConfigurations.ts b/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/managementConfigurations.ts
new file mode 100644
index 000000000000..a8b73da37e05
--- /dev/null
+++ b/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/managementConfigurations.ts
@@ -0,0 +1,64 @@
+/*
+ * 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 {
+ ManagementConfigurationsListBySubscriptionOptionalParams,
+ ManagementConfigurationsListBySubscriptionResponse,
+ ManagementConfiguration,
+ ManagementConfigurationsCreateOrUpdateOptionalParams,
+ ManagementConfigurationsCreateOrUpdateResponse,
+ ManagementConfigurationsDeleteOptionalParams,
+ ManagementConfigurationsGetOptionalParams,
+ ManagementConfigurationsGetResponse
+} from "../models";
+
+/** Interface representing a ManagementConfigurations. */
+export interface ManagementConfigurations {
+ /**
+ * Retrieves the ManagementConfigurations list.
+ * @param options The options parameters.
+ */
+ listBySubscription(
+ options?: ManagementConfigurationsListBySubscriptionOptionalParams
+ ): Promise;
+ /**
+ * Creates or updates the ManagementConfiguration.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param managementConfigurationName User Management Configuration Name.
+ * @param parameters The parameters required to create OMS Solution.
+ * @param options The options parameters.
+ */
+ createOrUpdate(
+ resourceGroupName: string,
+ managementConfigurationName: string,
+ parameters: ManagementConfiguration,
+ options?: ManagementConfigurationsCreateOrUpdateOptionalParams
+ ): Promise;
+ /**
+ * Deletes the ManagementConfiguration in the subscription.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param managementConfigurationName User Management Configuration Name.
+ * @param options The options parameters.
+ */
+ delete(
+ resourceGroupName: string,
+ managementConfigurationName: string,
+ options?: ManagementConfigurationsDeleteOptionalParams
+ ): Promise;
+ /**
+ * Retrieves the user ManagementConfiguration.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param managementConfigurationName User Management Configuration Name.
+ * @param options The options parameters.
+ */
+ get(
+ resourceGroupName: string,
+ managementConfigurationName: string,
+ options?: ManagementConfigurationsGetOptionalParams
+ ): Promise;
+}
diff --git a/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/operations.ts b/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/operations.ts
new file mode 100644
index 000000000000..b4b8dbe6da1d
--- /dev/null
+++ b/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/operations.ts
@@ -0,0 +1,22 @@
+/*
+ * 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 { Operation, OperationsListOptionalParams } from "../models";
+
+///
+/** Interface representing a Operations. */
+export interface Operations {
+ /**
+ * Lists all of the available OperationsManagement Rest API operations.
+ * @param options The options parameters.
+ */
+ list(
+ options?: OperationsListOptionalParams
+ ): PagedAsyncIterableIterator;
+}
diff --git a/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/solutions.ts b/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/solutions.ts
new file mode 100644
index 000000000000..7b15ac4900ff
--- /dev/null
+++ b/sdk/operationsmanagement/arm-operations/src/operationsInterfaces/solutions.ts
@@ -0,0 +1,139 @@
+/*
+ * 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 { PollerLike, PollOperationState } from "@azure/core-lro";
+import {
+ Solution,
+ SolutionsCreateOrUpdateOptionalParams,
+ SolutionsCreateOrUpdateResponse,
+ SolutionPatch,
+ SolutionsUpdateOptionalParams,
+ SolutionsUpdateResponse,
+ SolutionsDeleteOptionalParams,
+ SolutionsGetOptionalParams,
+ SolutionsGetResponse,
+ SolutionsListByResourceGroupOptionalParams,
+ SolutionsListByResourceGroupResponse,
+ SolutionsListBySubscriptionOptionalParams,
+ SolutionsListBySubscriptionResponse
+} from "../models";
+
+/** Interface representing a Solutions. */
+export interface Solutions {
+ /**
+ * Creates or updates the Solution.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param solutionName User Solution Name.
+ * @param parameters The parameters required to create OMS Solution.
+ * @param options The options parameters.
+ */
+ beginCreateOrUpdate(
+ resourceGroupName: string,
+ solutionName: string,
+ parameters: Solution,
+ options?: SolutionsCreateOrUpdateOptionalParams
+ ): Promise<
+ PollerLike<
+ PollOperationState,
+ SolutionsCreateOrUpdateResponse
+ >
+ >;
+ /**
+ * Creates or updates the Solution.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param solutionName User Solution Name.
+ * @param parameters The parameters required to create OMS Solution.
+ * @param options The options parameters.
+ */
+ beginCreateOrUpdateAndWait(
+ resourceGroupName: string,
+ solutionName: string,
+ parameters: Solution,
+ options?: SolutionsCreateOrUpdateOptionalParams
+ ): Promise;
+ /**
+ * Patch a Solution. Only updating tags supported.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param solutionName User Solution Name.
+ * @param parameters The parameters required to patch a Solution.
+ * @param options The options parameters.
+ */
+ beginUpdate(
+ resourceGroupName: string,
+ solutionName: string,
+ parameters: SolutionPatch,
+ options?: SolutionsUpdateOptionalParams
+ ): Promise<
+ PollerLike<
+ PollOperationState,
+ SolutionsUpdateResponse
+ >
+ >;
+ /**
+ * Patch a Solution. Only updating tags supported.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param solutionName User Solution Name.
+ * @param parameters The parameters required to patch a Solution.
+ * @param options The options parameters.
+ */
+ beginUpdateAndWait(
+ resourceGroupName: string,
+ solutionName: string,
+ parameters: SolutionPatch,
+ options?: SolutionsUpdateOptionalParams
+ ): Promise;
+ /**
+ * Deletes the solution in the subscription.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param solutionName User Solution Name.
+ * @param options The options parameters.
+ */
+ beginDelete(
+ resourceGroupName: string,
+ solutionName: string,
+ options?: SolutionsDeleteOptionalParams
+ ): Promise, void>>;
+ /**
+ * Deletes the solution in the subscription.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param solutionName User Solution Name.
+ * @param options The options parameters.
+ */
+ beginDeleteAndWait(
+ resourceGroupName: string,
+ solutionName: string,
+ options?: SolutionsDeleteOptionalParams
+ ): Promise;
+ /**
+ * Retrieves the user solution.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param solutionName User Solution Name.
+ * @param options The options parameters.
+ */
+ get(
+ resourceGroupName: string,
+ solutionName: string,
+ options?: SolutionsGetOptionalParams
+ ): Promise;
+ /**
+ * Retrieves the solution list. It will retrieve both first party and third party solutions
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param options The options parameters.
+ */
+ listByResourceGroup(
+ resourceGroupName: string,
+ options?: SolutionsListByResourceGroupOptionalParams
+ ): Promise;
+ /**
+ * Retrieves the solution list. It will retrieve both first party and third party solutions
+ * @param options The options parameters.
+ */
+ listBySubscription(
+ options?: SolutionsListBySubscriptionOptionalParams
+ ): Promise;
+}
diff --git a/sdk/operationsmanagement/arm-operations/src/operationsManagementClient.ts b/sdk/operationsmanagement/arm-operations/src/operationsManagementClient.ts
index cc22a452f329..eefe14a658b5 100644
--- a/sdk/operationsmanagement/arm-operations/src/operationsManagementClient.ts
+++ b/sdk/operationsmanagement/arm-operations/src/operationsManagementClient.ts
@@ -1,52 +1,62 @@
/*
- * 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/mappers";
-import * as operations from "./operations";
+import * as coreAuth from "@azure/core-auth";
+import {
+ SolutionsImpl,
+ ManagementAssociationsImpl,
+ ManagementConfigurationsImpl,
+ OperationsImpl
+} from "./operations";
+import {
+ Solutions,
+ ManagementAssociations,
+ ManagementConfigurations,
+ Operations
+} from "./operationsInterfaces";
import { OperationsManagementClientContext } from "./operationsManagementClientContext";
+import { OperationsManagementClientOptionalParams } from "./models";
-
-class OperationsManagementClient extends OperationsManagementClientContext {
- // Operation groups
- solutions: operations.Solutions;
- managementAssociations: operations.ManagementAssociations;
- managementConfigurations: operations.ManagementConfigurations;
- operations: operations.Operations;
-
+export class OperationsManagementClient extends OperationsManagementClientContext {
/**
* Initializes a new instance of the OperationsManagementClient class.
- * @param credentials Credentials needed for the client to connect to Azure.
+ * @param credentials Subscription credentials which uniquely identify client subscription.
* @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
- * subscription. The subscription ID forms part of the URI for every service call.
+ * subscription. The subscription ID forms part of the URI for every service call.
* @param providerName Provider name for the parent resource.
* @param resourceType Resource type for the parent resource
* @param resourceName Parent resource name.
- * @param [options] The parameter options
+ * @param options The parameter options
*/
- constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: Models.OperationsManagementClientOptions) {
- super(credentials, subscriptionId, providerName, resourceType, resourceName, options);
- this.solutions = new operations.Solutions(this);
- this.managementAssociations = new operations.ManagementAssociations(this);
- this.managementConfigurations = new operations.ManagementConfigurations(this);
- this.operations = new operations.Operations(this);
+ constructor(
+ credentials: coreAuth.TokenCredential,
+ subscriptionId: string,
+ providerName: string,
+ resourceType: string,
+ resourceName: string,
+ options?: OperationsManagementClientOptionalParams
+ ) {
+ super(
+ credentials,
+ subscriptionId,
+ providerName,
+ resourceType,
+ resourceName,
+ options
+ );
+ this.solutions = new SolutionsImpl(this);
+ this.managementAssociations = new ManagementAssociationsImpl(this);
+ this.managementConfigurations = new ManagementConfigurationsImpl(this);
+ this.operations = new OperationsImpl(this);
}
-}
-// Operation Specifications
-
-export {
- OperationsManagementClient,
- OperationsManagementClientContext,
- Models as OperationsManagementModels,
- Mappers as OperationsManagementMappers
-};
-export * from "./operations";
+ solutions: Solutions;
+ managementAssociations: ManagementAssociations;
+ managementConfigurations: ManagementConfigurations;
+ operations: Operations;
+}
diff --git a/sdk/operationsmanagement/arm-operations/src/operationsManagementClientContext.ts b/sdk/operationsmanagement/arm-operations/src/operationsManagementClientContext.ts
index 9902f9b551f6..2fdc68ff158f 100644
--- a/sdk/operationsmanagement/arm-operations/src/operationsManagementClientContext.ts
+++ b/sdk/operationsmanagement/arm-operations/src/operationsManagementClientContext.ts
@@ -1,81 +1,92 @@
/*
- * 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 Models from "./models";
-import * as msRest from "@azure/ms-rest-js";
-import * as msRestAzure from "@azure/ms-rest-azure-js";
+import * as coreClient from "@azure/core-client";
+import * as coreAuth from "@azure/core-auth";
+import { OperationsManagementClientOptionalParams } from "./models";
-const packageName = "@azure/arm-operations";
-const packageVersion = "0.1.0";
-
-export class OperationsManagementClientContext extends msRestAzure.AzureServiceClient {
- credentials: msRest.ServiceClientCredentials;
+export class OperationsManagementClientContext extends coreClient.ServiceClient {
+ $host: string;
subscriptionId: string;
- apiVersion?: string;
+ apiVersion: string;
providerName: string;
resourceType: string;
resourceName: string;
/**
- * Initializes a new instance of the OperationsManagementClient class.
- * @param credentials Credentials needed for the client to connect to Azure.
+ * Initializes a new instance of the OperationsManagementClientContext class.
+ * @param credentials Subscription credentials which uniquely identify client subscription.
* @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
- * subscription. The subscription ID forms part of the URI for every service call.
+ * subscription. The subscription ID forms part of the URI for every service call.
* @param providerName Provider name for the parent resource.
* @param resourceType Resource type for the parent resource
* @param resourceName Parent resource name.
- * @param [options] The parameter options
+ * @param options The parameter options
*/
- constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: Models.OperationsManagementClientOptions) {
- if (credentials == undefined) {
- throw new Error('\'credentials\' cannot be null.');
+ constructor(
+ credentials: coreAuth.TokenCredential,
+ subscriptionId: string,
+ providerName: string,
+ resourceType: string,
+ resourceName: string,
+ options?: OperationsManagementClientOptionalParams
+ ) {
+ if (credentials === undefined) {
+ throw new Error("'credentials' cannot be null");
}
- if (subscriptionId == undefined) {
- throw new Error('\'subscriptionId\' cannot be null.');
+ if (subscriptionId === undefined) {
+ throw new Error("'subscriptionId' cannot be null");
}
- if (providerName == undefined) {
- throw new Error('\'providerName\' cannot be null.');
+ if (providerName === undefined) {
+ throw new Error("'providerName' cannot be null");
}
- if (resourceType == undefined) {
- throw new Error('\'resourceType\' cannot be null.');
+ if (resourceType === undefined) {
+ throw new Error("'resourceType' cannot be null");
}
- if (resourceName == undefined) {
- throw new Error('\'resourceName\' cannot be null.');
+ if (resourceName === undefined) {
+ throw new Error("'resourceName' cannot be null");
}
+ // Initializing default values for options
if (!options) {
options = {};
}
- if(!options.userAgent) {
- const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
- options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
- }
+ const defaults: OperationsManagementClientOptionalParams = {
+ requestContentType: "application/json; charset=utf-8",
+ credential: credentials
+ };
- super(credentials, options);
+ const packageDetails = `azsdk-js-arm-operations/4.0.0-beta.1`;
+ const userAgentPrefix =
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
+ : `${packageDetails}`;
- this.apiVersion = '2015-11-01-preview';
- 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;
+ 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;
this.providerName = providerName;
this.resourceType = resourceType;
this.resourceName = resourceName;
- if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
- this.acceptLanguage = options.acceptLanguage;
- }
- if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
- this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
- }
+ // Assigning values to Constant parameters
+ this.$host = options.$host || "https://management.azure.com";
+ this.apiVersion = options.apiVersion || "2015-11-01-preview";
}
}
diff --git a/sdk/operationsmanagement/arm-operations/test/sampleTest.ts b/sdk/operationsmanagement/arm-operations/test/sampleTest.ts
new file mode 100644
index 000000000000..7ed89b043e1b
--- /dev/null
+++ b/sdk/operationsmanagement/arm-operations/test/sampleTest.ts
@@ -0,0 +1,48 @@
+/*
+ * 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
+} from "@azure-tools/test-recorder";
+import * as assert from "assert";
+
+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: []
+};
+
+describe("My test", () => {
+ let recorder: Recorder;
+
+ beforeEach(async function() {
+ recorder = record(this, recorderEnvSetup);
+ });
+
+ afterEach(async function() {
+ await recorder.stop();
+ });
+
+ it("sample test", async function() {
+ console.log("Hi, I'm a test!");
+ });
+});
diff --git a/sdk/operationsmanagement/arm-operations/tsconfig.json b/sdk/operationsmanagement/arm-operations/tsconfig.json
index 87bbf5b5fa49..6e3251194117 100644
--- a/sdk/operationsmanagement/arm-operations/tsconfig.json
+++ b/sdk/operationsmanagement/arm-operations/tsconfig.json
@@ -3,17 +3,17 @@
"module": "es6",
"moduleResolution": "node",
"strict": true,
- "target": "es5",
+ "target": "es6",
"sourceMap": true,
"declarationMap": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
- "lib": ["es6"],
+ "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/operationsmanagement/ci.yml b/sdk/operationsmanagement/ci.yml
new file mode 100644
index 000000000000..b7d8d98f324e
--- /dev/null
+++ b/sdk/operationsmanagement/ci.yml
@@ -0,0 +1,29 @@
+# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
+trigger:
+ branches:
+ include:
+ - main
+ - release/*
+ - hotfix/*
+ paths:
+ include:
+ - sdk/operationsmanagement/
+
+pr:
+ branches:
+ include:
+ - main
+ - release/*
+ - hotfix/*
+ paths:
+ include:
+ - sdk/operationsmanagement/
+
+extends:
+ template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
+ parameters:
+ ServiceDirectory: operationsmanagement
+ Artifacts:
+ - name: azure-arm-operations
+ safeName: azurearmoperations
+
\ No newline at end of file