From 8af766b1e195fc0cbaaddde346cfa8ecf2d1ac3f Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 18 Jun 2021 01:31:20 +0000 Subject: [PATCH] CodeGen from PR 14863 in Azure/azure-rest-api-specs [resources] delete useless track1 configuration for python (#14863) * Update readme.python.md * Update readme.md --- sdk/policy/arm-policy/README.md | 115 +- sdk/policy/arm-policy/package.json | 7 +- sdk/policy/arm-policy/rollup.config.js | 10 +- sdk/policy/arm-policy/src/models/index.ts | 1060 ++++++++--------- sdk/policy/arm-policy/src/models/mappers.ts | 20 +- .../arm-policy/src/models/parameters.ts | 16 +- .../src/operations/dataPolicyManifests.ts | 105 +- .../src/operations/policyAssignments.ts | 587 ++++----- .../src/operations/policyDefinitions.ts | 527 ++++---- .../src/operations/policyExemptions.ts | 464 +++----- .../src/operations/policySetDefinitions.ts | 527 ++++---- sdk/policy/arm-policy/src/policyClient.ts | 22 +- .../arm-policy/src/policyClientContext.ts | 27 +- 13 files changed, 1460 insertions(+), 2027 deletions(-) diff --git a/sdk/policy/arm-policy/README.md b/sdk/policy/arm-policy/README.md index ff6733dd79fd..5de9cda3541e 100644 --- a/sdk/policy/arm-policy/README.md +++ b/sdk/policy/arm-policy/README.md @@ -1,66 +1,72 @@ ## Azure PolicyClient SDK for JavaScript -This package contains an isomorphic SDK for PolicyClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for PolicyClient. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-policy` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-policy +npm install --save @azure/arm-policy @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. ### How to use -#### nodejs - client creation and getByPolicyMode dataPolicyManifests as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth - -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. - -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +#### nodejs - Authentication, client creation, and getByPolicyMode dataPolicyManifests as an example written in JavaScript. ##### Sample code -While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package - -```typescript -const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); const { PolicyClient } = require("@azure/arm-policy"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth - .interactiveLogin() - .then((creds) => { - const client = new PolicyClient(creds, subscriptionId); - const policyMode = "testpolicyMode"; - client.dataPolicyManifests.getByPolicyMode(policyMode).then((result) => { - console.log("The result is:"); - console.log(result); - }); - }) - .catch((err) => { - console.error(err); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new PolicyClient(creds, subscriptionId); +const policyMode = "testpolicyMode"; +client.dataPolicyManifests.getByPolicyMode(policyMode).then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); +}); ``` -#### browser - Authentication, client creation and getByPolicyMode dataPolicyManifests as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth +#### browser - Authentication, client creation, and getByPolicyMode dataPolicyManifests as an example written in JavaScript. -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html ```html @@ -68,33 +74,26 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to @azure/arm-policy sample - - + diff --git a/sdk/policy/arm-policy/package.json b/sdk/policy/arm-policy/package.json index 6cecbe858827..06d9423238ed 100644 --- a/sdk/policy/arm-policy/package.json +++ b/sdk/policy/arm-policy/package.json @@ -4,8 +4,9 @@ "description": "PolicyClient Library with typescript type definitions for node.js and browser.", "version": "4.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,7 +21,7 @@ "module": "./esm/policyClient.js", "types": "./esm/policyClient.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", diff --git a/sdk/policy/arm-policy/rollup.config.js b/sdk/policy/arm-policy/rollup.config.js index 24c1a68e6916..156fb323dbb5 100644 --- a/sdk/policy/arm-policy/rollup.config.js +++ b/sdk/policy/arm-policy/rollup.config.js @@ -7,7 +7,10 @@ import sourcemaps from "rollup-plugin-sourcemaps"; */ const config = { input: "./esm/policyClient.js", - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-policy.js", format: "umd", @@ -25,7 +28,10 @@ const config = { * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, - plugins: [nodeResolve({ mainFields: ["module", "main"] }), sourcemaps()] + plugins: [ + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() + ] }; export default config; diff --git a/sdk/policy/arm-policy/src/models/index.ts b/sdk/policy/arm-policy/src/models/index.ts index 7869c5eb0734..76bb4a3ba4be 100644 --- a/sdk/policy/arm-policy/src/models/index.ts +++ b/sdk/policy/arm-policy/src/models/index.ts @@ -698,8 +698,7 @@ export interface DataPolicyManifestsListNextOptionalParams extends msRest.Reques /** * Optional Parameters. */ -export interface PolicyAssignmentsListForResourceGroupOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicyAssignmentsListForResourceGroupOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atScope()', * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no @@ -743,8 +742,7 @@ export interface PolicyAssignmentsListForResourceOptionalParams extends msRest.R /** * Optional Parameters. */ -export interface PolicyAssignmentsListForManagementGroupOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicyAssignmentsListForManagementGroupOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atScope()', * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no @@ -788,8 +786,7 @@ export interface PolicyAssignmentsListOptionalParams extends msRest.RequestOptio /** * Optional Parameters. */ -export interface PolicyAssignmentsListForResourceGroupNextOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicyAssignmentsListForResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atScope()', * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no @@ -811,8 +808,7 @@ export interface PolicyAssignmentsListForResourceGroupNextOptionalParams /** * Optional Parameters. */ -export interface PolicyAssignmentsListForResourceNextOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicyAssignmentsListForResourceNextOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atScope()', * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no @@ -834,8 +830,7 @@ export interface PolicyAssignmentsListForResourceNextOptionalParams /** * Optional Parameters. */ -export interface PolicyAssignmentsListForManagementGroupNextOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicyAssignmentsListForManagementGroupNextOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atScope()', * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no @@ -923,8 +918,7 @@ export interface PolicyDefinitionsListBuiltInOptionalParams extends msRest.Reque /** * Optional Parameters. */ -export interface PolicyDefinitionsListByManagementGroupOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicyDefinitionsListByManagementGroupOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atExactScope()', * 'policyType -eq {value}' or 'category eq '{value}''. If $filter is not provided, no filtering @@ -990,8 +984,7 @@ export interface PolicyDefinitionsListBuiltInNextOptionalParams extends msRest.R /** * Optional Parameters. */ -export interface PolicyDefinitionsListByManagementGroupNextOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicyDefinitionsListByManagementGroupNextOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atExactScope()', * 'policyType -eq {value}' or 'category eq '{value}''. If $filter is not provided, no filtering @@ -1057,8 +1050,7 @@ export interface PolicySetDefinitionsListBuiltInOptionalParams extends msRest.Re /** * Optional Parameters. */ -export interface PolicySetDefinitionsListByManagementGroupOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicySetDefinitionsListByManagementGroupOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atExactScope()', * 'policyType -eq {value}' or 'category eq '{value}''. If $filter is not provided, no filtering @@ -1102,8 +1094,7 @@ export interface PolicySetDefinitionsListNextOptionalParams extends msRest.Reque /** * Optional Parameters. */ -export interface PolicySetDefinitionsListBuiltInNextOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicySetDefinitionsListBuiltInNextOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atExactScope()', * 'policyType -eq {value}' or 'category eq '{value}''. If $filter is not provided, no filtering @@ -1125,8 +1116,7 @@ export interface PolicySetDefinitionsListBuiltInNextOptionalParams /** * Optional Parameters. */ -export interface PolicySetDefinitionsListByManagementGroupNextOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicySetDefinitionsListByManagementGroupNextOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atExactScope()', * 'policyType -eq {value}' or 'category eq '{value}''. If $filter is not provided, no filtering @@ -1169,8 +1159,7 @@ export interface PolicyExemptionsListOptionalParams extends msRest.RequestOption /** * Optional Parameters. */ -export interface PolicyExemptionsListForResourceGroupOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicyExemptionsListForResourceGroupOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atScope()', * 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter is not @@ -1212,8 +1201,7 @@ export interface PolicyExemptionsListForResourceOptionalParams extends msRest.Re /** * Optional Parameters. */ -export interface PolicyExemptionsListForManagementGroupOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicyExemptionsListForManagementGroupOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atScope()', * 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter is not @@ -1255,8 +1243,7 @@ export interface PolicyExemptionsListNextOptionalParams extends msRest.RequestOp /** * Optional Parameters. */ -export interface PolicyExemptionsListForResourceGroupNextOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicyExemptionsListForResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atScope()', * 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter is not @@ -1277,8 +1264,7 @@ export interface PolicyExemptionsListForResourceGroupNextOptionalParams /** * Optional Parameters. */ -export interface PolicyExemptionsListForResourceNextOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicyExemptionsListForResourceNextOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atScope()', * 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter is not @@ -1299,8 +1285,7 @@ export interface PolicyExemptionsListForResourceNextOptionalParams /** * Optional Parameters. */ -export interface PolicyExemptionsListForManagementGroupNextOptionalParams - extends msRest.RequestOptionsBase { +export interface PolicyExemptionsListForManagementGroupNextOptionalParams extends msRest.RequestOptionsBase { /** * The filter to apply on the operation. Valid values for $filter are: 'atScope()', * 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter is not @@ -1392,7 +1377,7 @@ export interface PolicyExemptionListResult extends Array { * @readonly * @enum {string} */ -export type AliasPatternType = "NotSpecified" | "Extract"; +export type AliasPatternType = 'NotSpecified' | 'Extract'; /** * Defines values for AliasPathTokenType. @@ -1401,15 +1386,7 @@ export type AliasPatternType = "NotSpecified" | "Extract"; * @readonly * @enum {string} */ -export type AliasPathTokenType = - | "NotSpecified" - | "Any" - | "String" - | "Object" - | "Array" - | "Integer" - | "Number" - | "Boolean"; +export type AliasPathTokenType = 'NotSpecified' | 'Any' | 'String' | 'Object' | 'Array' | 'Integer' | 'Number' | 'Boolean'; /** * Defines values for AliasPathAttributes. @@ -1417,7 +1394,7 @@ export type AliasPathTokenType = * @readonly * @enum {string} */ -export type AliasPathAttributes = "None" | "Modifiable"; +export type AliasPathAttributes = 'None' | 'Modifiable'; /** * Defines values for AliasType. @@ -1425,7 +1402,7 @@ export type AliasPathAttributes = "None" | "Modifiable"; * @readonly * @enum {string} */ -export type AliasType = "NotSpecified" | "PlainText" | "Mask"; +export type AliasType = 'NotSpecified' | 'PlainText' | 'Mask'; /** * Defines values for EnforcementMode. @@ -1433,7 +1410,7 @@ export type AliasType = "NotSpecified" | "PlainText" | "Mask"; * @readonly * @enum {string} */ -export type EnforcementMode = "Default" | "DoNotEnforce"; +export type EnforcementMode = 'Default' | 'DoNotEnforce'; /** * Defines values for ResourceIdentityType. @@ -1441,7 +1418,7 @@ export type EnforcementMode = "Default" | "DoNotEnforce"; * @readonly * @enum {string} */ -export type ResourceIdentityType = "SystemAssigned" | "None"; +export type ResourceIdentityType = 'SystemAssigned' | 'None'; /** * Defines values for PolicyType. @@ -1449,7 +1426,7 @@ export type ResourceIdentityType = "SystemAssigned" | "None"; * @readonly * @enum {string} */ -export type PolicyType = "NotSpecified" | "BuiltIn" | "Custom" | "Static"; +export type PolicyType = 'NotSpecified' | 'BuiltIn' | 'Custom' | 'Static'; /** * Defines values for ParameterType. @@ -1457,14 +1434,7 @@ export type PolicyType = "NotSpecified" | "BuiltIn" | "Custom" | "Static"; * @readonly * @enum {string} */ -export type ParameterType = - | "String" - | "Array" - | "Object" - | "Boolean" - | "Integer" - | "Float" - | "DateTime"; +export type ParameterType = 'String' | 'Array' | 'Object' | 'Boolean' | 'Integer' | 'Float' | 'DateTime'; /** * Defines values for ExemptionCategory. @@ -1472,7 +1442,7 @@ export type ParameterType = * @readonly * @enum {string} */ -export type ExemptionCategory = "Waiver" | "Mitigated"; +export type ExemptionCategory = 'Waiver' | 'Mitigated'; /** * Defines values for CreatedByType. @@ -1480,7 +1450,7 @@ export type ExemptionCategory = "Waiver" | "Mitigated"; * @readonly * @enum {string} */ -export type CreatedByType = "User" | "Application" | "ManagedIdentity" | "Key"; +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; /** * Contains response data for the getByPolicyMode operation. @@ -1490,16 +1460,16 @@ export type DataPolicyManifestsGetByPolicyModeResponse = DataPolicyManifest & { * 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: DataPolicyManifest; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataPolicyManifest; + }; }; /** @@ -1510,16 +1480,16 @@ export type DataPolicyManifestsListResponse = DataPolicyManifestListResult & { * 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: DataPolicyManifestListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataPolicyManifestListResult; + }; }; /** @@ -1530,16 +1500,16 @@ export type DataPolicyManifestsListNextResponse = DataPolicyManifestListResult & * 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: DataPolicyManifestListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataPolicyManifestListResult; + }; }; /** @@ -1550,16 +1520,16 @@ export type PolicyAssignmentsDeleteMethodResponse = PolicyAssignment & { * 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: PolicyAssignment; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignment; + }; }; /** @@ -1570,16 +1540,16 @@ export type PolicyAssignmentsCreateResponse = PolicyAssignment & { * 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: PolicyAssignment; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignment; + }; }; /** @@ -1590,16 +1560,16 @@ export type PolicyAssignmentsGetResponse = PolicyAssignment & { * 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: PolicyAssignment; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignment; + }; }; /** @@ -1610,16 +1580,16 @@ export type PolicyAssignmentsListForResourceGroupResponse = PolicyAssignmentList * 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: PolicyAssignmentListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignmentListResult; + }; }; /** @@ -1630,16 +1600,16 @@ export type PolicyAssignmentsListForResourceResponse = PolicyAssignmentListResul * 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: PolicyAssignmentListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignmentListResult; + }; }; /** @@ -1650,16 +1620,16 @@ export type PolicyAssignmentsListForManagementGroupResponse = PolicyAssignmentLi * 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: PolicyAssignmentListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignmentListResult; + }; }; /** @@ -1670,16 +1640,16 @@ export type PolicyAssignmentsListResponse = PolicyAssignmentListResult & { * 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: PolicyAssignmentListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignmentListResult; + }; }; /** @@ -1690,16 +1660,16 @@ export type PolicyAssignmentsDeleteByIdResponse = PolicyAssignment & { * 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: PolicyAssignment; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignment; + }; }; /** @@ -1710,16 +1680,16 @@ export type PolicyAssignmentsCreateByIdResponse = PolicyAssignment & { * 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: PolicyAssignment; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignment; + }; }; /** @@ -1730,16 +1700,16 @@ export type PolicyAssignmentsGetByIdResponse = PolicyAssignment & { * 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: PolicyAssignment; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignment; + }; }; /** @@ -1750,16 +1720,16 @@ export type PolicyAssignmentsListForResourceGroupNextResponse = PolicyAssignment * 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: PolicyAssignmentListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignmentListResult; + }; }; /** @@ -1770,16 +1740,16 @@ export type PolicyAssignmentsListForResourceNextResponse = PolicyAssignmentListR * 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: PolicyAssignmentListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignmentListResult; + }; }; /** @@ -1790,16 +1760,16 @@ export type PolicyAssignmentsListForManagementGroupNextResponse = PolicyAssignme * 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: PolicyAssignmentListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignmentListResult; + }; }; /** @@ -1810,16 +1780,16 @@ export type PolicyAssignmentsListNextResponse = PolicyAssignmentListResult & { * 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: PolicyAssignmentListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyAssignmentListResult; + }; }; /** @@ -1830,16 +1800,16 @@ export type PolicyDefinitionsCreateOrUpdateResponse = PolicyDefinition & { * 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: PolicyDefinition; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyDefinition; + }; }; /** @@ -1850,16 +1820,16 @@ export type PolicyDefinitionsGetResponse = PolicyDefinition & { * 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: PolicyDefinition; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyDefinition; + }; }; /** @@ -1870,16 +1840,16 @@ export type PolicyDefinitionsGetBuiltInResponse = PolicyDefinition & { * 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: PolicyDefinition; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyDefinition; + }; }; /** @@ -1890,16 +1860,16 @@ export type PolicyDefinitionsCreateOrUpdateAtManagementGroupResponse = PolicyDef * 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: PolicyDefinition; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyDefinition; + }; }; /** @@ -1910,16 +1880,16 @@ export type PolicyDefinitionsGetAtManagementGroupResponse = PolicyDefinition & { * 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: PolicyDefinition; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyDefinition; + }; }; /** @@ -1930,16 +1900,16 @@ export type PolicyDefinitionsListResponse = PolicyDefinitionListResult & { * 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: PolicyDefinitionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyDefinitionListResult; + }; }; /** @@ -1950,16 +1920,16 @@ export type PolicyDefinitionsListBuiltInResponse = PolicyDefinitionListResult & * 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: PolicyDefinitionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyDefinitionListResult; + }; }; /** @@ -1970,16 +1940,16 @@ export type PolicyDefinitionsListByManagementGroupResponse = PolicyDefinitionLis * 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: PolicyDefinitionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyDefinitionListResult; + }; }; /** @@ -1990,16 +1960,16 @@ export type PolicyDefinitionsListNextResponse = PolicyDefinitionListResult & { * 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: PolicyDefinitionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyDefinitionListResult; + }; }; /** @@ -2010,16 +1980,16 @@ export type PolicyDefinitionsListBuiltInNextResponse = PolicyDefinitionListResul * 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: PolicyDefinitionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyDefinitionListResult; + }; }; /** @@ -2030,16 +2000,16 @@ export type PolicyDefinitionsListByManagementGroupNextResponse = PolicyDefinitio * 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: PolicyDefinitionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyDefinitionListResult; + }; }; /** @@ -2050,16 +2020,16 @@ export type PolicySetDefinitionsCreateOrUpdateResponse = PolicySetDefinition & { * 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: PolicySetDefinition; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicySetDefinition; + }; }; /** @@ -2070,16 +2040,16 @@ export type PolicySetDefinitionsGetResponse = PolicySetDefinition & { * 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: PolicySetDefinition; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicySetDefinition; + }; }; /** @@ -2090,16 +2060,16 @@ export type PolicySetDefinitionsGetBuiltInResponse = PolicySetDefinition & { * 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: PolicySetDefinition; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicySetDefinition; + }; }; /** @@ -2110,16 +2080,16 @@ export type PolicySetDefinitionsListResponse = PolicySetDefinitionListResult & { * 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: PolicySetDefinitionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicySetDefinitionListResult; + }; }; /** @@ -2130,16 +2100,16 @@ export type PolicySetDefinitionsListBuiltInResponse = PolicySetDefinitionListRes * 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: PolicySetDefinitionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicySetDefinitionListResult; + }; }; /** @@ -2150,16 +2120,16 @@ export type PolicySetDefinitionsCreateOrUpdateAtManagementGroupResponse = Policy * 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: PolicySetDefinition; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicySetDefinition; + }; }; /** @@ -2170,16 +2140,16 @@ export type PolicySetDefinitionsGetAtManagementGroupResponse = PolicySetDefiniti * 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: PolicySetDefinition; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicySetDefinition; + }; }; /** @@ -2190,16 +2160,16 @@ export type PolicySetDefinitionsListByManagementGroupResponse = PolicySetDefinit * 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: PolicySetDefinitionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicySetDefinitionListResult; + }; }; /** @@ -2210,16 +2180,16 @@ export type PolicySetDefinitionsListNextResponse = PolicySetDefinitionListResult * 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: PolicySetDefinitionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicySetDefinitionListResult; + }; }; /** @@ -2230,16 +2200,16 @@ export type PolicySetDefinitionsListBuiltInNextResponse = PolicySetDefinitionLis * 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: PolicySetDefinitionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicySetDefinitionListResult; + }; }; /** @@ -2250,16 +2220,16 @@ export type PolicySetDefinitionsListByManagementGroupNextResponse = PolicySetDef * 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: PolicySetDefinitionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicySetDefinitionListResult; + }; }; /** @@ -2270,16 +2240,16 @@ export type PolicyExemptionsCreateOrUpdateResponse = PolicyExemption & { * 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: PolicyExemption; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyExemption; + }; }; /** @@ -2290,16 +2260,16 @@ export type PolicyExemptionsGetResponse = PolicyExemption & { * 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: PolicyExemption; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyExemption; + }; }; /** @@ -2310,16 +2280,16 @@ export type PolicyExemptionsListResponse = PolicyExemptionListResult & { * 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: PolicyExemptionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyExemptionListResult; + }; }; /** @@ -2330,16 +2300,16 @@ export type PolicyExemptionsListForResourceGroupResponse = PolicyExemptionListRe * 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: PolicyExemptionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyExemptionListResult; + }; }; /** @@ -2350,16 +2320,16 @@ export type PolicyExemptionsListForResourceResponse = PolicyExemptionListResult * 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: PolicyExemptionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyExemptionListResult; + }; }; /** @@ -2370,16 +2340,16 @@ export type PolicyExemptionsListForManagementGroupResponse = PolicyExemptionList * 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: PolicyExemptionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyExemptionListResult; + }; }; /** @@ -2390,16 +2360,16 @@ export type PolicyExemptionsListNextResponse = PolicyExemptionListResult & { * 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: PolicyExemptionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyExemptionListResult; + }; }; /** @@ -2410,16 +2380,16 @@ export type PolicyExemptionsListForResourceGroupNextResponse = PolicyExemptionLi * 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: PolicyExemptionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyExemptionListResult; + }; }; /** @@ -2430,16 +2400,16 @@ export type PolicyExemptionsListForResourceNextResponse = PolicyExemptionListRes * 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: PolicyExemptionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyExemptionListResult; + }; }; /** @@ -2450,14 +2420,14 @@ export type PolicyExemptionsListForManagementGroupNextResponse = PolicyExemption * 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: PolicyExemptionListResult; - }; + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PolicyExemptionListResult; + }; }; diff --git a/sdk/policy/arm-policy/src/models/mappers.ts b/sdk/policy/arm-policy/src/models/mappers.ts index 5d65cc75eb5f..a52beacaf7f5 100644 --- a/sdk/policy/arm-policy/src/models/mappers.ts +++ b/sdk/policy/arm-policy/src/models/mappers.ts @@ -176,7 +176,10 @@ export const AliasPattern: msRest.CompositeMapper = { serializedName: "type", type: { name: "Enum", - allowedValues: ["NotSpecified", "Extract"] + allowedValues: [ + "NotSpecified", + "Extract" + ] } } } @@ -277,7 +280,11 @@ export const Alias: msRest.CompositeMapper = { serializedName: "type", type: { name: "Enum", - allowedValues: ["NotSpecified", "PlainText", "Mask"] + allowedValues: [ + "NotSpecified", + "PlainText", + "Mask" + ] } }, defaultPath: { @@ -508,7 +515,10 @@ export const Identity: msRest.CompositeMapper = { serializedName: "type", type: { name: "Enum", - allowedValues: ["SystemAssigned", "None"] + allowedValues: [ + "SystemAssigned", + "None" + ] } } } @@ -577,7 +587,7 @@ export const PolicyAssignment: msRest.CompositeMapper = { }, enforcementMode: { serializedName: "properties.enforcementMode", - defaultValue: "Default", + defaultValue: 'Default', type: { name: "String" } @@ -730,7 +740,7 @@ export const PolicyDefinition: msRest.CompositeMapper = { }, mode: { serializedName: "properties.mode", - defaultValue: "Indexed", + defaultValue: 'Indexed', type: { name: "String" } diff --git a/sdk/policy/arm-policy/src/models/parameters.ts b/sdk/policy/arm-policy/src/models/parameters.ts index a9a001b4fb46..75c1df6e7ca6 100644 --- a/sdk/policy/arm-policy/src/models/parameters.ts +++ b/sdk/policy/arm-policy/src/models/parameters.ts @@ -13,7 +13,7 @@ export const acceptLanguage: msRest.OperationParameter = { parameterPath: "acceptLanguage", mapper: { serializedName: "accept-language", - defaultValue: "en-US", + defaultValue: 'en-US', type: { name: "String" } @@ -25,7 +25,7 @@ export const apiVersion0: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: "2020-09-01", + defaultValue: '2020-09-01', type: { name: "String" } @@ -37,14 +37,17 @@ export const apiVersion1: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: "2020-07-01-preview", + defaultValue: '2020-07-01-preview', type: { name: "String" } } }; export const filter: msRest.OperationQueryParameter = { - parameterPath: ["options", "filter"], + parameterPath: [ + "options", + "filter" + ], mapper: { serializedName: "$filter", type: { @@ -214,7 +217,10 @@ export const subscriptionId: msRest.OperationURLParameter = { } }; export const top: msRest.OperationQueryParameter = { - parameterPath: ["options", "top"], + parameterPath: [ + "options", + "top" + ], mapper: { serializedName: "$top", constraints: { diff --git a/sdk/policy/arm-policy/src/operations/dataPolicyManifests.ts b/sdk/policy/arm-policy/src/operations/dataPolicyManifests.ts index 1b303f4dfae0..ce84e7431a6f 100644 --- a/sdk/policy/arm-policy/src/operations/dataPolicyManifests.ts +++ b/sdk/policy/arm-policy/src/operations/dataPolicyManifests.ts @@ -32,41 +32,26 @@ export class DataPolicyManifests { * @param [options] The optional parameters * @returns Promise */ - getByPolicyMode( - policyMode: string, - options?: msRest.RequestOptionsBase - ): Promise; + getByPolicyMode(policyMode: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policyMode The policy mode of the data policy manifest to get. * @param callback The callback */ - getByPolicyMode( - policyMode: string, - callback: msRest.ServiceCallback - ): void; + getByPolicyMode(policyMode: string, callback: msRest.ServiceCallback): void; /** * @param policyMode The policy mode of the data policy manifest to get. * @param options The optional parameters * @param callback The callback */ - getByPolicyMode( - policyMode: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getByPolicyMode( - policyMode: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + getByPolicyMode(policyMode: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByPolicyMode(policyMode: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policyMode, options }, getByPolicyModeOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -79,9 +64,7 @@ export class DataPolicyManifests { * @param [options] The optional parameters * @returns Promise */ - list( - options?: Models.DataPolicyManifestsListOptionalParams - ): Promise; + list(options?: Models.DataPolicyManifestsListOptionalParams): Promise; /** * @param callback The callback */ @@ -90,23 +73,14 @@ export class DataPolicyManifests { * @param options The optional parameters * @param callback The callback */ - list( - options: Models.DataPolicyManifestsListOptionalParams, - callback: msRest.ServiceCallback - ): void; - list( - options?: - | Models.DataPolicyManifestsListOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(options: Models.DataPolicyManifestsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.DataPolicyManifestsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -120,43 +94,26 @@ export class DataPolicyManifests { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: Models.DataPolicyManifestsListNextOptionalParams - ): Promise; + listNext(nextPageLink: string, options?: Models.DataPolicyManifestsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: Models.DataPolicyManifestsListNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | Models.DataPolicyManifestsListNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: Models.DataPolicyManifestsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.DataPolicyManifestsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -165,9 +122,15 @@ const serializer = new msRest.Serializer(Mappers); const getByPolicyModeOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Authorization/dataPolicyManifests/{policyMode}", - urlParameters: [Parameters.policyMode], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.policyMode + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.DataPolicyManifest @@ -182,8 +145,13 @@ const getByPolicyModeOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Authorization/dataPolicyManifests", - queryParameters: [Parameters.apiVersion0, Parameters.filter], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.DataPolicyManifestListResult @@ -199,9 +167,16 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0, Parameters.filter], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.DataPolicyManifestListResult diff --git a/sdk/policy/arm-policy/src/operations/policyAssignments.ts b/sdk/policy/arm-policy/src/operations/policyAssignments.ts index 23fcfff37602..033b5b22f666 100644 --- a/sdk/policy/arm-policy/src/operations/policyAssignments.ts +++ b/sdk/policy/arm-policy/src/operations/policyAssignments.ts @@ -39,11 +39,7 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - scope: string, - policyAssignmentName: string, - options?: msRest.RequestOptionsBase - ): Promise; + deleteMethod(scope: string, policyAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param scope The scope of the policy assignment. Valid scopes are: management group (format: * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: @@ -53,11 +49,7 @@ export class PolicyAssignments { * @param policyAssignmentName The name of the policy assignment to delete. * @param callback The callback */ - deleteMethod( - scope: string, - policyAssignmentName: string, - callback: msRest.ServiceCallback - ): void; + deleteMethod(scope: string, policyAssignmentName: string, callback: msRest.ServiceCallback): void; /** * @param scope The scope of the policy assignment. Valid scopes are: management group (format: * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: @@ -68,18 +60,8 @@ export class PolicyAssignments { * @param options The optional parameters * @param callback The callback */ - deleteMethod( - scope: string, - policyAssignmentName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deleteMethod( - scope: string, - policyAssignmentName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteMethod(scope: string, policyAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(scope: string, policyAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { scope, @@ -87,8 +69,7 @@ export class PolicyAssignments { options }, deleteMethodOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -106,12 +87,7 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - create( - scope: string, - policyAssignmentName: string, - parameters: Models.PolicyAssignment, - options?: msRest.RequestOptionsBase - ): Promise; + create(scope: string, policyAssignmentName: string, parameters: Models.PolicyAssignment, options?: msRest.RequestOptionsBase): Promise; /** * @param scope The scope of the policy assignment. Valid scopes are: management group (format: * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: @@ -122,12 +98,7 @@ export class PolicyAssignments { * @param parameters Parameters for the policy assignment. * @param callback The callback */ - create( - scope: string, - policyAssignmentName: string, - parameters: Models.PolicyAssignment, - callback: msRest.ServiceCallback - ): void; + create(scope: string, policyAssignmentName: string, parameters: Models.PolicyAssignment, callback: msRest.ServiceCallback): void; /** * @param scope The scope of the policy assignment. Valid scopes are: management group (format: * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: @@ -139,20 +110,8 @@ export class PolicyAssignments { * @param options The optional parameters * @param callback The callback */ - create( - scope: string, - policyAssignmentName: string, - parameters: Models.PolicyAssignment, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - create( - scope: string, - policyAssignmentName: string, - parameters: Models.PolicyAssignment, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + create(scope: string, policyAssignmentName: string, parameters: Models.PolicyAssignment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(scope: string, policyAssignmentName: string, parameters: Models.PolicyAssignment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { scope, @@ -161,8 +120,7 @@ export class PolicyAssignments { options }, createOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -178,11 +136,7 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - get( - scope: string, - policyAssignmentName: string, - options?: msRest.RequestOptionsBase - ): Promise; + get(scope: string, policyAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param scope The scope of the policy assignment. Valid scopes are: management group (format: * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: @@ -192,11 +146,7 @@ export class PolicyAssignments { * @param policyAssignmentName The name of the policy assignment to get. * @param callback The callback */ - get( - scope: string, - policyAssignmentName: string, - callback: msRest.ServiceCallback - ): void; + get(scope: string, policyAssignmentName: string, callback: msRest.ServiceCallback): void; /** * @param scope The scope of the policy assignment. Valid scopes are: management group (format: * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: @@ -207,18 +157,8 @@ export class PolicyAssignments { * @param options The optional parameters * @param callback The callback */ - get( - scope: string, - policyAssignmentName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - scope: string, - policyAssignmentName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(scope: string, policyAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, policyAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { scope, @@ -226,8 +166,7 @@ export class PolicyAssignments { options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -248,43 +187,26 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - listForResourceGroup( - resourceGroupName: string, - options?: Models.PolicyAssignmentsListForResourceGroupOptionalParams - ): Promise; + listForResourceGroup(resourceGroupName: string, options?: Models.PolicyAssignmentsListForResourceGroupOptionalParams): Promise; /** * @param resourceGroupName The name of the resource group that contains policy assignments. * @param callback The callback */ - listForResourceGroup( - resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; + listForResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group that contains policy assignments. * @param options The optional parameters * @param callback The callback */ - listForResourceGroup( - resourceGroupName: string, - options: Models.PolicyAssignmentsListForResourceGroupOptionalParams, - callback: msRest.ServiceCallback - ): void; - listForResourceGroup( - resourceGroupName: string, - options?: - | Models.PolicyAssignmentsListForResourceGroupOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listForResourceGroup(resourceGroupName: string, options: Models.PolicyAssignmentsListForResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listForResourceGroup(resourceGroupName: string, options?: Models.PolicyAssignmentsListForResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, listForResourceGroupOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -322,14 +244,7 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - listForResource( - resourceGroupName: string, - resourceProviderNamespace: string, - parentResourcePath: string, - resourceType: string, - resourceName: string, - options?: Models.PolicyAssignmentsListForResourceOptionalParams - ): Promise; + listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: Models.PolicyAssignmentsListForResourceOptionalParams): Promise; /** * @param resourceGroupName The name of the resource group containing the resource. * @param resourceProviderNamespace The namespace of the resource provider. For example, the @@ -340,14 +255,7 @@ export class PolicyAssignments { * @param resourceName The name of the resource. * @param callback The callback */ - listForResource( - resourceGroupName: string, - resourceProviderNamespace: string, - parentResourcePath: string, - resourceType: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group containing the resource. * @param resourceProviderNamespace The namespace of the resource provider. For example, the @@ -359,26 +267,8 @@ export class PolicyAssignments { * @param options The optional parameters * @param callback The callback */ - listForResource( - resourceGroupName: string, - resourceProviderNamespace: string, - parentResourcePath: string, - resourceType: string, - resourceName: string, - options: Models.PolicyAssignmentsListForResourceOptionalParams, - callback: msRest.ServiceCallback - ): void; - listForResource( - resourceGroupName: string, - resourceProviderNamespace: string, - parentResourcePath: string, - resourceType: string, - resourceName: string, - options?: - | Models.PolicyAssignmentsListForResourceOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options: Models.PolicyAssignmentsListForResourceOptionalParams, callback: msRest.ServiceCallback): void; + listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: Models.PolicyAssignmentsListForResourceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -389,8 +279,7 @@ export class PolicyAssignments { options }, listForResourceOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -407,43 +296,26 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - listForManagementGroup( - managementGroupId: string, - options?: Models.PolicyAssignmentsListForManagementGroupOptionalParams - ): Promise; + listForManagementGroup(managementGroupId: string, options?: Models.PolicyAssignmentsListForManagementGroupOptionalParams): Promise; /** * @param managementGroupId The ID of the management group. * @param callback The callback */ - listForManagementGroup( - managementGroupId: string, - callback: msRest.ServiceCallback - ): void; + listForManagementGroup(managementGroupId: string, callback: msRest.ServiceCallback): void; /** * @param managementGroupId The ID of the management group. * @param options The optional parameters * @param callback The callback */ - listForManagementGroup( - managementGroupId: string, - options: Models.PolicyAssignmentsListForManagementGroupOptionalParams, - callback: msRest.ServiceCallback - ): void; - listForManagementGroup( - managementGroupId: string, - options?: - | Models.PolicyAssignmentsListForManagementGroupOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listForManagementGroup(managementGroupId: string, options: Models.PolicyAssignmentsListForManagementGroupOptionalParams, callback: msRest.ServiceCallback): void; + listForManagementGroup(managementGroupId: string, options?: Models.PolicyAssignmentsListForManagementGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { managementGroupId, options }, listForManagementGroupOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -462,9 +334,7 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - list( - options?: Models.PolicyAssignmentsListOptionalParams - ): Promise; + list(options?: Models.PolicyAssignmentsListOptionalParams): Promise; /** * @param callback The callback */ @@ -473,23 +343,14 @@ export class PolicyAssignments { * @param options The optional parameters * @param callback The callback */ - list( - options: Models.PolicyAssignmentsListOptionalParams, - callback: msRest.ServiceCallback - ): void; - list( - options?: - | Models.PolicyAssignmentsListOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(options: Models.PolicyAssignmentsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.PolicyAssignmentsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -506,43 +367,28 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - deleteById( - policyAssignmentId: string, - options?: msRest.RequestOptionsBase - ): Promise; + deleteById(policyAssignmentId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policyAssignmentId The ID of the policy assignment to delete. Use the format * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * @param callback The callback */ - deleteById( - policyAssignmentId: string, - callback: msRest.ServiceCallback - ): void; + deleteById(policyAssignmentId: string, callback: msRest.ServiceCallback): void; /** * @param policyAssignmentId The ID of the policy assignment to delete. Use the format * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * @param options The optional parameters * @param callback The callback */ - deleteById( - policyAssignmentId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deleteById( - policyAssignmentId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteById(policyAssignmentId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteById(policyAssignmentId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policyAssignmentId, options }, deleteByIdOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -563,22 +409,14 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - createById( - policyAssignmentId: string, - parameters: Models.PolicyAssignment, - options?: msRest.RequestOptionsBase - ): Promise; + createById(policyAssignmentId: string, parameters: Models.PolicyAssignment, options?: msRest.RequestOptionsBase): Promise; /** * @param policyAssignmentId The ID of the policy assignment to create. Use the format * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * @param parameters Parameters for policy assignment. * @param callback The callback */ - createById( - policyAssignmentId: string, - parameters: Models.PolicyAssignment, - callback: msRest.ServiceCallback - ): void; + createById(policyAssignmentId: string, parameters: Models.PolicyAssignment, callback: msRest.ServiceCallback): void; /** * @param policyAssignmentId The ID of the policy assignment to create. Use the format * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. @@ -586,18 +424,8 @@ export class PolicyAssignments { * @param options The optional parameters * @param callback The callback */ - createById( - policyAssignmentId: string, - parameters: Models.PolicyAssignment, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - createById( - policyAssignmentId: string, - parameters: Models.PolicyAssignment, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + createById(policyAssignmentId: string, parameters: Models.PolicyAssignment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createById(policyAssignmentId: string, parameters: Models.PolicyAssignment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policyAssignmentId, @@ -605,8 +433,7 @@ export class PolicyAssignments { options }, createByIdOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -623,43 +450,28 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - getById( - policyAssignmentId: string, - options?: msRest.RequestOptionsBase - ): Promise; + getById(policyAssignmentId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policyAssignmentId The ID of the policy assignment to get. Use the format * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * @param callback The callback */ - getById( - policyAssignmentId: string, - callback: msRest.ServiceCallback - ): void; + getById(policyAssignmentId: string, callback: msRest.ServiceCallback): void; /** * @param policyAssignmentId The ID of the policy assignment to get. Use the format * '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * @param options The optional parameters * @param callback The callback */ - getById( - policyAssignmentId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getById( - policyAssignmentId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + getById(policyAssignmentId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getById(policyAssignmentId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policyAssignmentId, options }, getByIdOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -680,43 +492,26 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - listForResourceGroupNext( - nextPageLink: string, - options?: Models.PolicyAssignmentsListForResourceGroupNextOptionalParams - ): Promise; + listForResourceGroupNext(nextPageLink: string, options?: Models.PolicyAssignmentsListForResourceGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listForResourceGroupNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listForResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listForResourceGroupNext( - nextPageLink: string, - options: Models.PolicyAssignmentsListForResourceGroupNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listForResourceGroupNext( - nextPageLink: string, - options?: - | Models.PolicyAssignmentsListForResourceGroupNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listForResourceGroupNext(nextPageLink: string, options: Models.PolicyAssignmentsListForResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listForResourceGroupNext(nextPageLink: string, options?: Models.PolicyAssignmentsListForResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listForResourceGroupNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -748,43 +543,26 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - listForResourceNext( - nextPageLink: string, - options?: Models.PolicyAssignmentsListForResourceNextOptionalParams - ): Promise; + listForResourceNext(nextPageLink: string, options?: Models.PolicyAssignmentsListForResourceNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listForResourceNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listForResourceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listForResourceNext( - nextPageLink: string, - options: Models.PolicyAssignmentsListForResourceNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listForResourceNext( - nextPageLink: string, - options?: - | Models.PolicyAssignmentsListForResourceNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listForResourceNext(nextPageLink: string, options: Models.PolicyAssignmentsListForResourceNextOptionalParams, callback: msRest.ServiceCallback): void; + listForResourceNext(nextPageLink: string, options?: Models.PolicyAssignmentsListForResourceNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listForResourceNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -801,43 +579,26 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - listForManagementGroupNext( - nextPageLink: string, - options?: Models.PolicyAssignmentsListForManagementGroupNextOptionalParams - ): Promise; + listForManagementGroupNext(nextPageLink: string, options?: Models.PolicyAssignmentsListForManagementGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listForManagementGroupNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listForManagementGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listForManagementGroupNext( - nextPageLink: string, - options: Models.PolicyAssignmentsListForManagementGroupNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listForManagementGroupNext( - nextPageLink: string, - options?: - | Models.PolicyAssignmentsListForManagementGroupNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listForManagementGroupNext(nextPageLink: string, options: Models.PolicyAssignmentsListForManagementGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listForManagementGroupNext(nextPageLink: string, options?: Models.PolicyAssignmentsListForManagementGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listForManagementGroupNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -857,43 +618,26 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: Models.PolicyAssignmentsListNextOptionalParams - ): Promise; + listNext(nextPageLink: string, options?: Models.PolicyAssignmentsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: Models.PolicyAssignmentsListNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | Models.PolicyAssignmentsListNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: Models.PolicyAssignmentsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.PolicyAssignmentsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -902,9 +646,16 @@ const serializer = new msRest.Serializer(Mappers); const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", - urlParameters: [Parameters.scope, Parameters.policyAssignmentName], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.scope, + Parameters.policyAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyAssignment @@ -920,9 +671,16 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const createOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", - urlParameters: [Parameters.scope, Parameters.policyAssignmentName], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.scope, + Parameters.policyAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -944,9 +702,16 @@ const createOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", - urlParameters: [Parameters.scope, Parameters.policyAssignmentName], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.scope, + Parameters.policyAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyAssignment @@ -960,11 +725,19 @@ const getOperationSpec: msRest.OperationSpec = { const listForResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments", - urlParameters: [Parameters.resourceGroupName, Parameters.subscriptionId], - queryParameters: [Parameters.filter, Parameters.top, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyAssignmentListResult @@ -978,8 +751,7 @@ const listForResourceGroupOperationSpec: msRest.OperationSpec = { const listForResourceOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments", urlParameters: [ Parameters.resourceGroupName, Parameters.resourceProviderNamespace, @@ -988,8 +760,14 @@ const listForResourceOperationSpec: msRest.OperationSpec = { Parameters.resourceName, Parameters.subscriptionId ], - queryParameters: [Parameters.filter, Parameters.top, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyAssignmentListResult @@ -1003,11 +781,18 @@ const listForResourceOperationSpec: msRest.OperationSpec = { const listForManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyAssignments", - urlParameters: [Parameters.managementGroupId], - queryParameters: [Parameters.filter, Parameters.top, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyAssignments", + urlParameters: [ + Parameters.managementGroupId + ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyAssignmentListResult @@ -1022,9 +807,17 @@ const listForManagementGroupOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.filter, Parameters.top, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyAssignmentListResult @@ -1039,9 +832,15 @@ const listOperationSpec: msRest.OperationSpec = { const deleteByIdOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "{policyAssignmentId}", - urlParameters: [Parameters.policyAssignmentId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.policyAssignmentId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyAssignment @@ -1057,9 +856,15 @@ const deleteByIdOperationSpec: msRest.OperationSpec = { const createByIdOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "{policyAssignmentId}", - urlParameters: [Parameters.policyAssignmentId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.policyAssignmentId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -1081,9 +886,15 @@ const createByIdOperationSpec: msRest.OperationSpec = { const getByIdOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{policyAssignmentId}", - urlParameters: [Parameters.policyAssignmentId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.policyAssignmentId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyAssignment @@ -1099,9 +910,17 @@ const listForResourceGroupNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.filter, Parameters.top, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyAssignmentListResult @@ -1117,9 +936,17 @@ const listForResourceNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.filter, Parameters.top, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyAssignmentListResult @@ -1135,9 +962,17 @@ const listForManagementGroupNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.filter, Parameters.top, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyAssignmentListResult @@ -1153,9 +988,17 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.filter, Parameters.top, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyAssignmentListResult diff --git a/sdk/policy/arm-policy/src/operations/policyDefinitions.ts b/sdk/policy/arm-policy/src/operations/policyDefinitions.ts index 1dc67b41c038..753246d80406 100644 --- a/sdk/policy/arm-policy/src/operations/policyDefinitions.ts +++ b/sdk/policy/arm-policy/src/operations/policyDefinitions.ts @@ -34,39 +34,21 @@ export class PolicyDefinitions { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate( - policyDefinitionName: string, - parameters: Models.PolicyDefinition, - options?: msRest.RequestOptionsBase - ): Promise; + createOrUpdate(policyDefinitionName: string, parameters: Models.PolicyDefinition, options?: msRest.RequestOptionsBase): Promise; /** * @param policyDefinitionName The name of the policy definition to create. * @param parameters The policy definition properties. * @param callback The callback */ - createOrUpdate( - policyDefinitionName: string, - parameters: Models.PolicyDefinition, - callback: msRest.ServiceCallback - ): void; + createOrUpdate(policyDefinitionName: string, parameters: Models.PolicyDefinition, callback: msRest.ServiceCallback): void; /** * @param policyDefinitionName The name of the policy definition to create. * @param parameters The policy definition properties. * @param options The optional parameters * @param callback The callback */ - createOrUpdate( - policyDefinitionName: string, - parameters: Models.PolicyDefinition, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - createOrUpdate( - policyDefinitionName: string, - parameters: Models.PolicyDefinition, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + createOrUpdate(policyDefinitionName: string, parameters: Models.PolicyDefinition, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(policyDefinitionName: string, parameters: Models.PolicyDefinition, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policyDefinitionName, @@ -74,8 +56,7 @@ export class PolicyDefinitions { options }, createOrUpdateOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -85,10 +66,7 @@ export class PolicyDefinitions { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - policyDefinitionName: string, - options?: msRest.RequestOptionsBase - ): Promise; + deleteMethod(policyDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policyDefinitionName The name of the policy definition to delete. * @param callback The callback @@ -99,24 +77,15 @@ export class PolicyDefinitions { * @param options The optional parameters * @param callback The callback */ - deleteMethod( - policyDefinitionName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deleteMethod( - policyDefinitionName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteMethod(policyDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(policyDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policyDefinitionName, options }, deleteMethodOperationSpec, - callback - ); + callback); } /** @@ -126,41 +95,26 @@ export class PolicyDefinitions { * @param [options] The optional parameters * @returns Promise */ - get( - policyDefinitionName: string, - options?: msRest.RequestOptionsBase - ): Promise; + get(policyDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policyDefinitionName The name of the policy definition to get. * @param callback The callback */ - get( - policyDefinitionName: string, - callback: msRest.ServiceCallback - ): void; + get(policyDefinitionName: string, callback: msRest.ServiceCallback): void; /** * @param policyDefinitionName The name of the policy definition to get. * @param options The optional parameters * @param callback The callback */ - get( - policyDefinitionName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - policyDefinitionName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(policyDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(policyDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policyDefinitionName, options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -170,41 +124,26 @@ export class PolicyDefinitions { * @param [options] The optional parameters * @returns Promise */ - getBuiltIn( - policyDefinitionName: string, - options?: msRest.RequestOptionsBase - ): Promise; + getBuiltIn(policyDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policyDefinitionName The name of the built-in policy definition to get. * @param callback The callback */ - getBuiltIn( - policyDefinitionName: string, - callback: msRest.ServiceCallback - ): void; + getBuiltIn(policyDefinitionName: string, callback: msRest.ServiceCallback): void; /** * @param policyDefinitionName The name of the built-in policy definition to get. * @param options The optional parameters * @param callback The callback */ - getBuiltIn( - policyDefinitionName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getBuiltIn( - policyDefinitionName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + getBuiltIn(policyDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getBuiltIn(policyDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policyDefinitionName, options }, getBuiltInOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -217,24 +156,14 @@ export class PolicyDefinitions { * @param [options] The optional parameters * @returns Promise */ - createOrUpdateAtManagementGroup( - policyDefinitionName: string, - parameters: Models.PolicyDefinition, - managementGroupId: string, - options?: msRest.RequestOptionsBase - ): Promise; + createOrUpdateAtManagementGroup(policyDefinitionName: string, parameters: Models.PolicyDefinition, managementGroupId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policyDefinitionName The name of the policy definition to create. * @param parameters The policy definition properties. * @param managementGroupId The ID of the management group. * @param callback The callback */ - createOrUpdateAtManagementGroup( - policyDefinitionName: string, - parameters: Models.PolicyDefinition, - managementGroupId: string, - callback: msRest.ServiceCallback - ): void; + createOrUpdateAtManagementGroup(policyDefinitionName: string, parameters: Models.PolicyDefinition, managementGroupId: string, callback: msRest.ServiceCallback): void; /** * @param policyDefinitionName The name of the policy definition to create. * @param parameters The policy definition properties. @@ -242,20 +171,8 @@ export class PolicyDefinitions { * @param options The optional parameters * @param callback The callback */ - createOrUpdateAtManagementGroup( - policyDefinitionName: string, - parameters: Models.PolicyDefinition, - managementGroupId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - createOrUpdateAtManagementGroup( - policyDefinitionName: string, - parameters: Models.PolicyDefinition, - managementGroupId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + createOrUpdateAtManagementGroup(policyDefinitionName: string, parameters: Models.PolicyDefinition, managementGroupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdateAtManagementGroup(policyDefinitionName: string, parameters: Models.PolicyDefinition, managementGroupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policyDefinitionName, @@ -264,8 +181,7 @@ export class PolicyDefinitions { options }, createOrUpdateAtManagementGroupOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -276,39 +192,21 @@ export class PolicyDefinitions { * @param [options] The optional parameters * @returns Promise */ - deleteAtManagementGroup( - policyDefinitionName: string, - managementGroupId: string, - options?: msRest.RequestOptionsBase - ): Promise; + deleteAtManagementGroup(policyDefinitionName: string, managementGroupId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policyDefinitionName The name of the policy definition to delete. * @param managementGroupId The ID of the management group. * @param callback The callback */ - deleteAtManagementGroup( - policyDefinitionName: string, - managementGroupId: string, - callback: msRest.ServiceCallback - ): void; + deleteAtManagementGroup(policyDefinitionName: string, managementGroupId: string, callback: msRest.ServiceCallback): void; /** * @param policyDefinitionName The name of the policy definition to delete. * @param managementGroupId The ID of the management group. * @param options The optional parameters * @param callback The callback */ - deleteAtManagementGroup( - policyDefinitionName: string, - managementGroupId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deleteAtManagementGroup( - policyDefinitionName: string, - managementGroupId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteAtManagementGroup(policyDefinitionName: string, managementGroupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteAtManagementGroup(policyDefinitionName: string, managementGroupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policyDefinitionName, @@ -316,8 +214,7 @@ export class PolicyDefinitions { options }, deleteAtManagementGroupOperationSpec, - callback - ); + callback); } /** @@ -329,39 +226,21 @@ export class PolicyDefinitions { * @param [options] The optional parameters * @returns Promise */ - getAtManagementGroup( - policyDefinitionName: string, - managementGroupId: string, - options?: msRest.RequestOptionsBase - ): Promise; + getAtManagementGroup(policyDefinitionName: string, managementGroupId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policyDefinitionName The name of the policy definition to get. * @param managementGroupId The ID of the management group. * @param callback The callback */ - getAtManagementGroup( - policyDefinitionName: string, - managementGroupId: string, - callback: msRest.ServiceCallback - ): void; + getAtManagementGroup(policyDefinitionName: string, managementGroupId: string, callback: msRest.ServiceCallback): void; /** * @param policyDefinitionName The name of the policy definition to get. * @param managementGroupId The ID of the management group. * @param options The optional parameters * @param callback The callback */ - getAtManagementGroup( - policyDefinitionName: string, - managementGroupId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getAtManagementGroup( - policyDefinitionName: string, - managementGroupId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + getAtManagementGroup(policyDefinitionName: string, managementGroupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getAtManagementGroup(policyDefinitionName: string, managementGroupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policyDefinitionName, @@ -369,8 +248,7 @@ export class PolicyDefinitions { options }, getAtManagementGroupOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -388,9 +266,7 @@ export class PolicyDefinitions { * @param [options] The optional parameters * @returns Promise */ - list( - options?: Models.PolicyDefinitionsListOptionalParams - ): Promise; + list(options?: Models.PolicyDefinitionsListOptionalParams): Promise; /** * @param callback The callback */ @@ -399,23 +275,14 @@ export class PolicyDefinitions { * @param options The optional parameters * @param callback The callback */ - list( - options: Models.PolicyDefinitionsListOptionalParams, - callback: msRest.ServiceCallback - ): void; - list( - options?: - | Models.PolicyDefinitionsListOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(options: Models.PolicyDefinitionsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.PolicyDefinitionsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -428,9 +295,7 @@ export class PolicyDefinitions { * @param [options] The optional parameters * @returns Promise */ - listBuiltIn( - options?: Models.PolicyDefinitionsListBuiltInOptionalParams - ): Promise; + listBuiltIn(options?: Models.PolicyDefinitionsListBuiltInOptionalParams): Promise; /** * @param callback The callback */ @@ -439,23 +304,14 @@ export class PolicyDefinitions { * @param options The optional parameters * @param callback The callback */ - listBuiltIn( - options: Models.PolicyDefinitionsListBuiltInOptionalParams, - callback: msRest.ServiceCallback - ): void; - listBuiltIn( - options?: - | Models.PolicyDefinitionsListBuiltInOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listBuiltIn(options: Models.PolicyDefinitionsListBuiltInOptionalParams, callback: msRest.ServiceCallback): void; + listBuiltIn(options?: Models.PolicyDefinitionsListBuiltInOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listBuiltInOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -475,43 +331,26 @@ export class PolicyDefinitions { * @param [options] The optional parameters * @returns Promise */ - listByManagementGroup( - managementGroupId: string, - options?: Models.PolicyDefinitionsListByManagementGroupOptionalParams - ): Promise; + listByManagementGroup(managementGroupId: string, options?: Models.PolicyDefinitionsListByManagementGroupOptionalParams): Promise; /** * @param managementGroupId The ID of the management group. * @param callback The callback */ - listByManagementGroup( - managementGroupId: string, - callback: msRest.ServiceCallback - ): void; + listByManagementGroup(managementGroupId: string, callback: msRest.ServiceCallback): void; /** * @param managementGroupId The ID of the management group. * @param options The optional parameters * @param callback The callback */ - listByManagementGroup( - managementGroupId: string, - options: Models.PolicyDefinitionsListByManagementGroupOptionalParams, - callback: msRest.ServiceCallback - ): void; - listByManagementGroup( - managementGroupId: string, - options?: - | Models.PolicyDefinitionsListByManagementGroupOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listByManagementGroup(managementGroupId: string, options: Models.PolicyDefinitionsListByManagementGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByManagementGroup(managementGroupId: string, options?: Models.PolicyDefinitionsListByManagementGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { managementGroupId, options }, listByManagementGroupOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -530,43 +369,26 @@ export class PolicyDefinitions { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: Models.PolicyDefinitionsListNextOptionalParams - ): Promise; + listNext(nextPageLink: string, options?: Models.PolicyDefinitionsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: Models.PolicyDefinitionsListNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | Models.PolicyDefinitionsListNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: Models.PolicyDefinitionsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.PolicyDefinitionsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -580,43 +402,26 @@ export class PolicyDefinitions { * @param [options] The optional parameters * @returns Promise */ - listBuiltInNext( - nextPageLink: string, - options?: Models.PolicyDefinitionsListBuiltInNextOptionalParams - ): Promise; + listBuiltInNext(nextPageLink: string, options?: Models.PolicyDefinitionsListBuiltInNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listBuiltInNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listBuiltInNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listBuiltInNext( - nextPageLink: string, - options: Models.PolicyDefinitionsListBuiltInNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listBuiltInNext( - nextPageLink: string, - options?: - | Models.PolicyDefinitionsListBuiltInNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listBuiltInNext(nextPageLink: string, options: Models.PolicyDefinitionsListBuiltInNextOptionalParams, callback: msRest.ServiceCallback): void; + listBuiltInNext(nextPageLink: string, options?: Models.PolicyDefinitionsListBuiltInNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listBuiltInNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -636,43 +441,26 @@ export class PolicyDefinitions { * @param [options] The optional parameters * @returns Promise */ - listByManagementGroupNext( - nextPageLink: string, - options?: Models.PolicyDefinitionsListByManagementGroupNextOptionalParams - ): Promise; + listByManagementGroupNext(nextPageLink: string, options?: Models.PolicyDefinitionsListByManagementGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listByManagementGroupNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listByManagementGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listByManagementGroupNext( - nextPageLink: string, - options: Models.PolicyDefinitionsListByManagementGroupNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listByManagementGroupNext( - nextPageLink: string, - options?: - | Models.PolicyDefinitionsListByManagementGroupNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listByManagementGroupNext(nextPageLink: string, options: Models.PolicyDefinitionsListByManagementGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listByManagementGroupNext(nextPageLink: string, options?: Models.PolicyDefinitionsListByManagementGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listByManagementGroupNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -680,11 +468,17 @@ export class PolicyDefinitions { const serializer = new msRest.Serializer(Mappers); const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", - urlParameters: [Parameters.policyDefinitionName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", + urlParameters: [ + Parameters.policyDefinitionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -705,11 +499,17 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", - urlParameters: [Parameters.policyDefinitionName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", + urlParameters: [ + Parameters.policyDefinitionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: {}, 204: {}, @@ -722,11 +522,17 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", - urlParameters: [Parameters.policyDefinitionName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", + urlParameters: [ + Parameters.policyDefinitionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyDefinition @@ -741,9 +547,15 @@ const getOperationSpec: msRest.OperationSpec = { const getBuiltInOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", - urlParameters: [Parameters.policyDefinitionName], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.policyDefinitionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyDefinition @@ -757,11 +569,17 @@ const getBuiltInOperationSpec: msRest.OperationSpec = { const createOrUpdateAtManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: - "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", - urlParameters: [Parameters.policyDefinitionName, Parameters.managementGroupId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", + urlParameters: [ + Parameters.policyDefinitionName, + Parameters.managementGroupId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -782,11 +600,17 @@ const createOrUpdateAtManagementGroupOperationSpec: msRest.OperationSpec = { const deleteAtManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: - "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", - urlParameters: [Parameters.policyDefinitionName, Parameters.managementGroupId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", + urlParameters: [ + Parameters.policyDefinitionName, + Parameters.managementGroupId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: {}, 204: {}, @@ -799,11 +623,17 @@ const deleteAtManagementGroupOperationSpec: msRest.OperationSpec = { const getAtManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", - urlParameters: [Parameters.policyDefinitionName, Parameters.managementGroupId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", + urlParameters: [ + Parameters.policyDefinitionName, + Parameters.managementGroupId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyDefinition @@ -818,9 +648,17 @@ const getAtManagementGroupOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.top], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyDefinitionListResult @@ -835,8 +673,14 @@ const listOperationSpec: msRest.OperationSpec = { const listBuiltInOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Authorization/policyDefinitions", - queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.top], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyDefinitionListResult @@ -850,11 +694,18 @@ const listBuiltInOperationSpec: msRest.OperationSpec = { const listByManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions", - urlParameters: [Parameters.managementGroupId], - queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.top], - headerParameters: [Parameters.acceptLanguage], + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions", + urlParameters: [ + Parameters.managementGroupId + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyDefinitionListResult @@ -870,9 +721,17 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.top], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyDefinitionListResult @@ -888,9 +747,17 @@ const listBuiltInNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.top], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyDefinitionListResult @@ -906,9 +773,17 @@ const listByManagementGroupNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.top], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyDefinitionListResult diff --git a/sdk/policy/arm-policy/src/operations/policyExemptions.ts b/sdk/policy/arm-policy/src/operations/policyExemptions.ts index 871d37124eb7..ec979b5c2c0c 100644 --- a/sdk/policy/arm-policy/src/operations/policyExemptions.ts +++ b/sdk/policy/arm-policy/src/operations/policyExemptions.ts @@ -39,11 +39,7 @@ export class PolicyExemptions { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - scope: string, - policyExemptionName: string, - options?: msRest.RequestOptionsBase - ): Promise; + deleteMethod(scope: string, policyExemptionName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param scope The scope of the policy exemption. Valid scopes are: management group (format: * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: @@ -53,11 +49,7 @@ export class PolicyExemptions { * @param policyExemptionName The name of the policy exemption to delete. * @param callback The callback */ - deleteMethod( - scope: string, - policyExemptionName: string, - callback: msRest.ServiceCallback - ): void; + deleteMethod(scope: string, policyExemptionName: string, callback: msRest.ServiceCallback): void; /** * @param scope The scope of the policy exemption. Valid scopes are: management group (format: * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: @@ -68,18 +60,8 @@ export class PolicyExemptions { * @param options The optional parameters * @param callback The callback */ - deleteMethod( - scope: string, - policyExemptionName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deleteMethod( - scope: string, - policyExemptionName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteMethod(scope: string, policyExemptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(scope: string, policyExemptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { scope, @@ -87,8 +69,7 @@ export class PolicyExemptions { options }, deleteMethodOperationSpec, - callback - ); + callback); } /** @@ -107,12 +88,7 @@ export class PolicyExemptions { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate( - scope: string, - policyExemptionName: string, - parameters: Models.PolicyExemption, - options?: msRest.RequestOptionsBase - ): Promise; + createOrUpdate(scope: string, policyExemptionName: string, parameters: Models.PolicyExemption, options?: msRest.RequestOptionsBase): Promise; /** * @param scope The scope of the policy exemption. Valid scopes are: management group (format: * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: @@ -123,12 +99,7 @@ export class PolicyExemptions { * @param parameters Parameters for the policy exemption. * @param callback The callback */ - createOrUpdate( - scope: string, - policyExemptionName: string, - parameters: Models.PolicyExemption, - callback: msRest.ServiceCallback - ): void; + createOrUpdate(scope: string, policyExemptionName: string, parameters: Models.PolicyExemption, callback: msRest.ServiceCallback): void; /** * @param scope The scope of the policy exemption. Valid scopes are: management group (format: * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: @@ -140,20 +111,8 @@ export class PolicyExemptions { * @param options The optional parameters * @param callback The callback */ - createOrUpdate( - scope: string, - policyExemptionName: string, - parameters: Models.PolicyExemption, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - createOrUpdate( - scope: string, - policyExemptionName: string, - parameters: Models.PolicyExemption, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + createOrUpdate(scope: string, policyExemptionName: string, parameters: Models.PolicyExemption, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(scope: string, policyExemptionName: string, parameters: Models.PolicyExemption, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { scope, @@ -162,8 +121,7 @@ export class PolicyExemptions { options }, createOrUpdateOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -179,11 +137,7 @@ export class PolicyExemptions { * @param [options] The optional parameters * @returns Promise */ - get( - scope: string, - policyExemptionName: string, - options?: msRest.RequestOptionsBase - ): Promise; + get(scope: string, policyExemptionName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param scope The scope of the policy exemption. Valid scopes are: management group (format: * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: @@ -193,11 +147,7 @@ export class PolicyExemptions { * @param policyExemptionName The name of the policy exemption to delete. * @param callback The callback */ - get( - scope: string, - policyExemptionName: string, - callback: msRest.ServiceCallback - ): void; + get(scope: string, policyExemptionName: string, callback: msRest.ServiceCallback): void; /** * @param scope The scope of the policy exemption. Valid scopes are: management group (format: * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: @@ -208,18 +158,8 @@ export class PolicyExemptions { * @param options The optional parameters * @param callback The callback */ - get( - scope: string, - policyExemptionName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - scope: string, - policyExemptionName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(scope: string, policyExemptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, policyExemptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { scope, @@ -227,8 +167,7 @@ export class PolicyExemptions { options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -242,9 +181,7 @@ export class PolicyExemptions { * @param [options] The optional parameters * @returns Promise */ - list( - options?: Models.PolicyExemptionsListOptionalParams - ): Promise; + list(options?: Models.PolicyExemptionsListOptionalParams): Promise; /** * @param callback The callback */ @@ -253,23 +190,14 @@ export class PolicyExemptions { * @param options The optional parameters * @param callback The callback */ - list( - options: Models.PolicyExemptionsListOptionalParams, - callback: msRest.ServiceCallback - ): void; - list( - options?: - | Models.PolicyExemptionsListOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(options: Models.PolicyExemptionsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.PolicyExemptionsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -284,43 +212,26 @@ export class PolicyExemptions { * @param [options] The optional parameters * @returns Promise */ - listForResourceGroup( - resourceGroupName: string, - options?: Models.PolicyExemptionsListForResourceGroupOptionalParams - ): Promise; + listForResourceGroup(resourceGroupName: string, options?: Models.PolicyExemptionsListForResourceGroupOptionalParams): Promise; /** * @param resourceGroupName The name of the resource group containing the resource. * @param callback The callback */ - listForResourceGroup( - resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; + listForResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group containing the resource. * @param options The optional parameters * @param callback The callback */ - listForResourceGroup( - resourceGroupName: string, - options: Models.PolicyExemptionsListForResourceGroupOptionalParams, - callback: msRest.ServiceCallback - ): void; - listForResourceGroup( - resourceGroupName: string, - options?: - | Models.PolicyExemptionsListForResourceGroupOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listForResourceGroup(resourceGroupName: string, options: Models.PolicyExemptionsListForResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listForResourceGroup(resourceGroupName: string, options?: Models.PolicyExemptionsListForResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, listForResourceGroupOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -353,14 +264,7 @@ export class PolicyExemptions { * @param [options] The optional parameters * @returns Promise */ - listForResource( - resourceGroupName: string, - resourceProviderNamespace: string, - parentResourcePath: string, - resourceType: string, - resourceName: string, - options?: Models.PolicyExemptionsListForResourceOptionalParams - ): Promise; + listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: Models.PolicyExemptionsListForResourceOptionalParams): Promise; /** * @param resourceGroupName The name of the resource group containing the resource. * @param resourceProviderNamespace The namespace of the resource provider. For example, the @@ -371,14 +275,7 @@ export class PolicyExemptions { * @param resourceName The name of the resource. * @param callback The callback */ - listForResource( - resourceGroupName: string, - resourceProviderNamespace: string, - parentResourcePath: string, - resourceType: string, - resourceName: string, - callback: msRest.ServiceCallback - ): void; + listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group containing the resource. * @param resourceProviderNamespace The namespace of the resource provider. For example, the @@ -390,26 +287,8 @@ export class PolicyExemptions { * @param options The optional parameters * @param callback The callback */ - listForResource( - resourceGroupName: string, - resourceProviderNamespace: string, - parentResourcePath: string, - resourceType: string, - resourceName: string, - options: Models.PolicyExemptionsListForResourceOptionalParams, - callback: msRest.ServiceCallback - ): void; - listForResource( - resourceGroupName: string, - resourceProviderNamespace: string, - parentResourcePath: string, - resourceType: string, - resourceName: string, - options?: - | Models.PolicyExemptionsListForResourceOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options: Models.PolicyExemptionsListForResourceOptionalParams, callback: msRest.ServiceCallback): void; + listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: Models.PolicyExemptionsListForResourceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -420,8 +299,7 @@ export class PolicyExemptions { options }, listForResourceOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -435,43 +313,26 @@ export class PolicyExemptions { * @param [options] The optional parameters * @returns Promise */ - listForManagementGroup( - managementGroupId: string, - options?: Models.PolicyExemptionsListForManagementGroupOptionalParams - ): Promise; + listForManagementGroup(managementGroupId: string, options?: Models.PolicyExemptionsListForManagementGroupOptionalParams): Promise; /** * @param managementGroupId The ID of the management group. * @param callback The callback */ - listForManagementGroup( - managementGroupId: string, - callback: msRest.ServiceCallback - ): void; + listForManagementGroup(managementGroupId: string, callback: msRest.ServiceCallback): void; /** * @param managementGroupId The ID of the management group. * @param options The optional parameters * @param callback The callback */ - listForManagementGroup( - managementGroupId: string, - options: Models.PolicyExemptionsListForManagementGroupOptionalParams, - callback: msRest.ServiceCallback - ): void; - listForManagementGroup( - managementGroupId: string, - options?: - | Models.PolicyExemptionsListForManagementGroupOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listForManagementGroup(managementGroupId: string, options: Models.PolicyExemptionsListForManagementGroupOptionalParams, callback: msRest.ServiceCallback): void; + listForManagementGroup(managementGroupId: string, options?: Models.PolicyExemptionsListForManagementGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { managementGroupId, options }, listForManagementGroupOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -486,43 +347,26 @@ export class PolicyExemptions { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: Models.PolicyExemptionsListNextOptionalParams - ): Promise; + listNext(nextPageLink: string, options?: Models.PolicyExemptionsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: Models.PolicyExemptionsListNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | Models.PolicyExemptionsListNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: Models.PolicyExemptionsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.PolicyExemptionsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -537,43 +381,26 @@ export class PolicyExemptions { * @param [options] The optional parameters * @returns Promise */ - listForResourceGroupNext( - nextPageLink: string, - options?: Models.PolicyExemptionsListForResourceGroupNextOptionalParams - ): Promise; + listForResourceGroupNext(nextPageLink: string, options?: Models.PolicyExemptionsListForResourceGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listForResourceGroupNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listForResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listForResourceGroupNext( - nextPageLink: string, - options: Models.PolicyExemptionsListForResourceGroupNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listForResourceGroupNext( - nextPageLink: string, - options?: - | Models.PolicyExemptionsListForResourceGroupNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listForResourceGroupNext(nextPageLink: string, options: Models.PolicyExemptionsListForResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listForResourceGroupNext(nextPageLink: string, options?: Models.PolicyExemptionsListForResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listForResourceGroupNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -600,43 +427,26 @@ export class PolicyExemptions { * @param [options] The optional parameters * @returns Promise */ - listForResourceNext( - nextPageLink: string, - options?: Models.PolicyExemptionsListForResourceNextOptionalParams - ): Promise; + listForResourceNext(nextPageLink: string, options?: Models.PolicyExemptionsListForResourceNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listForResourceNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listForResourceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listForResourceNext( - nextPageLink: string, - options: Models.PolicyExemptionsListForResourceNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listForResourceNext( - nextPageLink: string, - options?: - | Models.PolicyExemptionsListForResourceNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listForResourceNext(nextPageLink: string, options: Models.PolicyExemptionsListForResourceNextOptionalParams, callback: msRest.ServiceCallback): void; + listForResourceNext(nextPageLink: string, options?: Models.PolicyExemptionsListForResourceNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listForResourceNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -650,43 +460,26 @@ export class PolicyExemptions { * @param [options] The optional parameters * @returns Promise */ - listForManagementGroupNext( - nextPageLink: string, - options?: Models.PolicyExemptionsListForManagementGroupNextOptionalParams - ): Promise; + listForManagementGroupNext(nextPageLink: string, options?: Models.PolicyExemptionsListForManagementGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listForManagementGroupNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listForManagementGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listForManagementGroupNext( - nextPageLink: string, - options: Models.PolicyExemptionsListForManagementGroupNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listForManagementGroupNext( - nextPageLink: string, - options?: - | Models.PolicyExemptionsListForManagementGroupNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listForManagementGroupNext(nextPageLink: string, options: Models.PolicyExemptionsListForManagementGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listForManagementGroupNext(nextPageLink: string, options?: Models.PolicyExemptionsListForManagementGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listForManagementGroupNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -695,9 +488,16 @@ const serializer = new msRest.Serializer(Mappers); const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "{scope}/providers/Microsoft.Authorization/policyExemptions/{policyExemptionName}", - urlParameters: [Parameters.scope, Parameters.policyExemptionName], - queryParameters: [Parameters.apiVersion1], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.scope, + Parameters.policyExemptionName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: {}, 204: {}, @@ -711,9 +511,16 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "{scope}/providers/Microsoft.Authorization/policyExemptions/{policyExemptionName}", - urlParameters: [Parameters.scope, Parameters.policyExemptionName], - queryParameters: [Parameters.apiVersion1], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.scope, + Parameters.policyExemptionName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -738,9 +545,16 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Authorization/policyExemptions/{policyExemptionName}", - urlParameters: [Parameters.scope, Parameters.policyExemptionName], - queryParameters: [Parameters.apiVersion1], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.scope, + Parameters.policyExemptionName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyExemption @@ -755,9 +569,16 @@ const getOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyExemptions", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.filter, Parameters.apiVersion1], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyExemptionListResult @@ -771,11 +592,18 @@ const listOperationSpec: msRest.OperationSpec = { const listForResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyExemptions", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName], - queryParameters: [Parameters.filter, Parameters.apiVersion1], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyExemptions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyExemptionListResult @@ -789,8 +617,7 @@ const listForResourceGroupOperationSpec: msRest.OperationSpec = { const listForResourceOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyExemptions", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyExemptions", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -799,8 +626,13 @@ const listForResourceOperationSpec: msRest.OperationSpec = { Parameters.resourceType, Parameters.resourceName ], - queryParameters: [Parameters.filter, Parameters.apiVersion1], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyExemptionListResult @@ -814,11 +646,17 @@ const listForResourceOperationSpec: msRest.OperationSpec = { const listForManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyExemptions", - urlParameters: [Parameters.managementGroupId], - queryParameters: [Parameters.filter, Parameters.apiVersion1], - headerParameters: [Parameters.acceptLanguage], + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyExemptions", + urlParameters: [ + Parameters.managementGroupId + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyExemptionListResult @@ -834,9 +672,16 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.filter, Parameters.apiVersion1], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyExemptionListResult @@ -852,9 +697,16 @@ const listForResourceGroupNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.filter, Parameters.apiVersion1], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyExemptionListResult @@ -870,9 +722,16 @@ const listForResourceNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.filter, Parameters.apiVersion1], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyExemptionListResult @@ -888,9 +747,16 @@ const listForManagementGroupNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.filter, Parameters.apiVersion1], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicyExemptionListResult diff --git a/sdk/policy/arm-policy/src/operations/policySetDefinitions.ts b/sdk/policy/arm-policy/src/operations/policySetDefinitions.ts index 9635fcdb9fbb..b0612527cec9 100644 --- a/sdk/policy/arm-policy/src/operations/policySetDefinitions.ts +++ b/sdk/policy/arm-policy/src/operations/policySetDefinitions.ts @@ -34,39 +34,21 @@ export class PolicySetDefinitions { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate( - policySetDefinitionName: string, - parameters: Models.PolicySetDefinition, - options?: msRest.RequestOptionsBase - ): Promise; + createOrUpdate(policySetDefinitionName: string, parameters: Models.PolicySetDefinition, options?: msRest.RequestOptionsBase): Promise; /** * @param policySetDefinitionName The name of the policy set definition to create. * @param parameters The policy set definition properties. * @param callback The callback */ - createOrUpdate( - policySetDefinitionName: string, - parameters: Models.PolicySetDefinition, - callback: msRest.ServiceCallback - ): void; + createOrUpdate(policySetDefinitionName: string, parameters: Models.PolicySetDefinition, callback: msRest.ServiceCallback): void; /** * @param policySetDefinitionName The name of the policy set definition to create. * @param parameters The policy set definition properties. * @param options The optional parameters * @param callback The callback */ - createOrUpdate( - policySetDefinitionName: string, - parameters: Models.PolicySetDefinition, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - createOrUpdate( - policySetDefinitionName: string, - parameters: Models.PolicySetDefinition, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + createOrUpdate(policySetDefinitionName: string, parameters: Models.PolicySetDefinition, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(policySetDefinitionName: string, parameters: Models.PolicySetDefinition, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policySetDefinitionName, @@ -74,8 +56,7 @@ export class PolicySetDefinitions { options }, createOrUpdateOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -85,10 +66,7 @@ export class PolicySetDefinitions { * @param [options] The optional parameters * @returns Promise */ - deleteMethod( - policySetDefinitionName: string, - options?: msRest.RequestOptionsBase - ): Promise; + deleteMethod(policySetDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policySetDefinitionName The name of the policy set definition to delete. * @param callback The callback @@ -99,24 +77,15 @@ export class PolicySetDefinitions { * @param options The optional parameters * @param callback The callback */ - deleteMethod( - policySetDefinitionName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deleteMethod( - policySetDefinitionName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteMethod(policySetDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(policySetDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policySetDefinitionName, options }, deleteMethodOperationSpec, - callback - ); + callback); } /** @@ -127,41 +96,26 @@ export class PolicySetDefinitions { * @param [options] The optional parameters * @returns Promise */ - get( - policySetDefinitionName: string, - options?: msRest.RequestOptionsBase - ): Promise; + get(policySetDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policySetDefinitionName The name of the policy set definition to get. * @param callback The callback */ - get( - policySetDefinitionName: string, - callback: msRest.ServiceCallback - ): void; + get(policySetDefinitionName: string, callback: msRest.ServiceCallback): void; /** * @param policySetDefinitionName The name of the policy set definition to get. * @param options The optional parameters * @param callback The callback */ - get( - policySetDefinitionName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - policySetDefinitionName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + get(policySetDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(policySetDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policySetDefinitionName, options }, getOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -171,41 +125,26 @@ export class PolicySetDefinitions { * @param [options] The optional parameters * @returns Promise */ - getBuiltIn( - policySetDefinitionName: string, - options?: msRest.RequestOptionsBase - ): Promise; + getBuiltIn(policySetDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policySetDefinitionName The name of the policy set definition to get. * @param callback The callback */ - getBuiltIn( - policySetDefinitionName: string, - callback: msRest.ServiceCallback - ): void; + getBuiltIn(policySetDefinitionName: string, callback: msRest.ServiceCallback): void; /** * @param policySetDefinitionName The name of the policy set definition to get. * @param options The optional parameters * @param callback The callback */ - getBuiltIn( - policySetDefinitionName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getBuiltIn( - policySetDefinitionName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + getBuiltIn(policySetDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getBuiltIn(policySetDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policySetDefinitionName, options }, getBuiltInOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -223,9 +162,7 @@ export class PolicySetDefinitions { * @param [options] The optional parameters * @returns Promise */ - list( - options?: Models.PolicySetDefinitionsListOptionalParams - ): Promise; + list(options?: Models.PolicySetDefinitionsListOptionalParams): Promise; /** * @param callback The callback */ @@ -234,23 +171,14 @@ export class PolicySetDefinitions { * @param options The optional parameters * @param callback The callback */ - list( - options: Models.PolicySetDefinitionsListOptionalParams, - callback: msRest.ServiceCallback - ): void; - list( - options?: - | Models.PolicySetDefinitionsListOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + list(options: Models.PolicySetDefinitionsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.PolicySetDefinitionsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -261,9 +189,7 @@ export class PolicySetDefinitions { * @param [options] The optional parameters * @returns Promise */ - listBuiltIn( - options?: Models.PolicySetDefinitionsListBuiltInOptionalParams - ): Promise; + listBuiltIn(options?: Models.PolicySetDefinitionsListBuiltInOptionalParams): Promise; /** * @param callback The callback */ @@ -272,23 +198,14 @@ export class PolicySetDefinitions { * @param options The optional parameters * @param callback The callback */ - listBuiltIn( - options: Models.PolicySetDefinitionsListBuiltInOptionalParams, - callback: msRest.ServiceCallback - ): void; - listBuiltIn( - options?: - | Models.PolicySetDefinitionsListBuiltInOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listBuiltIn(options: Models.PolicySetDefinitionsListBuiltInOptionalParams, callback: msRest.ServiceCallback): void; + listBuiltIn(options?: Models.PolicySetDefinitionsListBuiltInOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listBuiltInOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -301,24 +218,14 @@ export class PolicySetDefinitions { * @param [options] The optional parameters * @returns Promise */ - createOrUpdateAtManagementGroup( - policySetDefinitionName: string, - parameters: Models.PolicySetDefinition, - managementGroupId: string, - options?: msRest.RequestOptionsBase - ): Promise; + createOrUpdateAtManagementGroup(policySetDefinitionName: string, parameters: Models.PolicySetDefinition, managementGroupId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policySetDefinitionName The name of the policy set definition to create. * @param parameters The policy set definition properties. * @param managementGroupId The ID of the management group. * @param callback The callback */ - createOrUpdateAtManagementGroup( - policySetDefinitionName: string, - parameters: Models.PolicySetDefinition, - managementGroupId: string, - callback: msRest.ServiceCallback - ): void; + createOrUpdateAtManagementGroup(policySetDefinitionName: string, parameters: Models.PolicySetDefinition, managementGroupId: string, callback: msRest.ServiceCallback): void; /** * @param policySetDefinitionName The name of the policy set definition to create. * @param parameters The policy set definition properties. @@ -326,20 +233,8 @@ export class PolicySetDefinitions { * @param options The optional parameters * @param callback The callback */ - createOrUpdateAtManagementGroup( - policySetDefinitionName: string, - parameters: Models.PolicySetDefinition, - managementGroupId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - createOrUpdateAtManagementGroup( - policySetDefinitionName: string, - parameters: Models.PolicySetDefinition, - managementGroupId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + createOrUpdateAtManagementGroup(policySetDefinitionName: string, parameters: Models.PolicySetDefinition, managementGroupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdateAtManagementGroup(policySetDefinitionName: string, parameters: Models.PolicySetDefinition, managementGroupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policySetDefinitionName, @@ -348,8 +243,7 @@ export class PolicySetDefinitions { options }, createOrUpdateAtManagementGroupOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -361,39 +255,21 @@ export class PolicySetDefinitions { * @param [options] The optional parameters * @returns Promise */ - deleteAtManagementGroup( - policySetDefinitionName: string, - managementGroupId: string, - options?: msRest.RequestOptionsBase - ): Promise; + deleteAtManagementGroup(policySetDefinitionName: string, managementGroupId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policySetDefinitionName The name of the policy set definition to delete. * @param managementGroupId The ID of the management group. * @param callback The callback */ - deleteAtManagementGroup( - policySetDefinitionName: string, - managementGroupId: string, - callback: msRest.ServiceCallback - ): void; + deleteAtManagementGroup(policySetDefinitionName: string, managementGroupId: string, callback: msRest.ServiceCallback): void; /** * @param policySetDefinitionName The name of the policy set definition to delete. * @param managementGroupId The ID of the management group. * @param options The optional parameters * @param callback The callback */ - deleteAtManagementGroup( - policySetDefinitionName: string, - managementGroupId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - deleteAtManagementGroup( - policySetDefinitionName: string, - managementGroupId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + deleteAtManagementGroup(policySetDefinitionName: string, managementGroupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteAtManagementGroup(policySetDefinitionName: string, managementGroupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policySetDefinitionName, @@ -401,8 +277,7 @@ export class PolicySetDefinitions { options }, deleteAtManagementGroupOperationSpec, - callback - ); + callback); } /** @@ -414,39 +289,21 @@ export class PolicySetDefinitions { * @param [options] The optional parameters * @returns Promise */ - getAtManagementGroup( - policySetDefinitionName: string, - managementGroupId: string, - options?: msRest.RequestOptionsBase - ): Promise; + getAtManagementGroup(policySetDefinitionName: string, managementGroupId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param policySetDefinitionName The name of the policy set definition to get. * @param managementGroupId The ID of the management group. * @param callback The callback */ - getAtManagementGroup( - policySetDefinitionName: string, - managementGroupId: string, - callback: msRest.ServiceCallback - ): void; + getAtManagementGroup(policySetDefinitionName: string, managementGroupId: string, callback: msRest.ServiceCallback): void; /** * @param policySetDefinitionName The name of the policy set definition to get. * @param managementGroupId The ID of the management group. * @param options The optional parameters * @param callback The callback */ - getAtManagementGroup( - policySetDefinitionName: string, - managementGroupId: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getAtManagementGroup( - policySetDefinitionName: string, - managementGroupId: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + getAtManagementGroup(policySetDefinitionName: string, managementGroupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getAtManagementGroup(policySetDefinitionName: string, managementGroupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { policySetDefinitionName, @@ -454,8 +311,7 @@ export class PolicySetDefinitions { options }, getAtManagementGroupOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -475,43 +331,26 @@ export class PolicySetDefinitions { * @param [options] The optional parameters * @returns Promise */ - listByManagementGroup( - managementGroupId: string, - options?: Models.PolicySetDefinitionsListByManagementGroupOptionalParams - ): Promise; + listByManagementGroup(managementGroupId: string, options?: Models.PolicySetDefinitionsListByManagementGroupOptionalParams): Promise; /** * @param managementGroupId The ID of the management group. * @param callback The callback */ - listByManagementGroup( - managementGroupId: string, - callback: msRest.ServiceCallback - ): void; + listByManagementGroup(managementGroupId: string, callback: msRest.ServiceCallback): void; /** * @param managementGroupId The ID of the management group. * @param options The optional parameters * @param callback The callback */ - listByManagementGroup( - managementGroupId: string, - options: Models.PolicySetDefinitionsListByManagementGroupOptionalParams, - callback: msRest.ServiceCallback - ): void; - listByManagementGroup( - managementGroupId: string, - options?: - | Models.PolicySetDefinitionsListByManagementGroupOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listByManagementGroup(managementGroupId: string, options: Models.PolicySetDefinitionsListByManagementGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByManagementGroup(managementGroupId: string, options?: Models.PolicySetDefinitionsListByManagementGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { managementGroupId, options }, listByManagementGroupOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -530,43 +369,26 @@ export class PolicySetDefinitions { * @param [options] The optional parameters * @returns Promise */ - listNext( - nextPageLink: string, - options?: Models.PolicySetDefinitionsListNextOptionalParams - ): Promise; + listNext(nextPageLink: string, options?: Models.PolicySetDefinitionsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext( - nextPageLink: string, - options: Models.PolicySetDefinitionsListNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | Models.PolicySetDefinitionsListNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listNext(nextPageLink: string, options: Models.PolicySetDefinitionsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.PolicySetDefinitionsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -578,43 +400,26 @@ export class PolicySetDefinitions { * @param [options] The optional parameters * @returns Promise */ - listBuiltInNext( - nextPageLink: string, - options?: Models.PolicySetDefinitionsListBuiltInNextOptionalParams - ): Promise; + listBuiltInNext(nextPageLink: string, options?: Models.PolicySetDefinitionsListBuiltInNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listBuiltInNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listBuiltInNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listBuiltInNext( - nextPageLink: string, - options: Models.PolicySetDefinitionsListBuiltInNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listBuiltInNext( - nextPageLink: string, - options?: - | Models.PolicySetDefinitionsListBuiltInNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listBuiltInNext(nextPageLink: string, options: Models.PolicySetDefinitionsListBuiltInNextOptionalParams, callback: msRest.ServiceCallback): void; + listBuiltInNext(nextPageLink: string, options?: Models.PolicySetDefinitionsListBuiltInNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listBuiltInNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } /** @@ -634,43 +439,26 @@ export class PolicySetDefinitions { * @param [options] The optional parameters * @returns Promise */ - listByManagementGroupNext( - nextPageLink: string, - options?: Models.PolicySetDefinitionsListByManagementGroupNextOptionalParams - ): Promise; + listByManagementGroupNext(nextPageLink: string, options?: Models.PolicySetDefinitionsListByManagementGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listByManagementGroupNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + listByManagementGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listByManagementGroupNext( - nextPageLink: string, - options: Models.PolicySetDefinitionsListByManagementGroupNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listByManagementGroupNext( - nextPageLink: string, - options?: - | Models.PolicySetDefinitionsListByManagementGroupNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + listByManagementGroupNext(nextPageLink: string, options: Models.PolicySetDefinitionsListByManagementGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listByManagementGroupNext(nextPageLink: string, options?: Models.PolicySetDefinitionsListByManagementGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listByManagementGroupNextOperationSpec, - callback - ) as Promise; + callback) as Promise; } } @@ -678,11 +466,17 @@ export class PolicySetDefinitions { const serializer = new msRest.Serializer(Mappers); const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", - urlParameters: [Parameters.policySetDefinitionName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", + urlParameters: [ + Parameters.policySetDefinitionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -706,11 +500,17 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", - urlParameters: [Parameters.policySetDefinitionName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", + urlParameters: [ + Parameters.policySetDefinitionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: {}, 204: {}, @@ -723,11 +523,17 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", - urlParameters: [Parameters.policySetDefinitionName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", + urlParameters: [ + Parameters.policySetDefinitionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicySetDefinition @@ -742,9 +548,15 @@ const getOperationSpec: msRest.OperationSpec = { const getBuiltInOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", - urlParameters: [Parameters.policySetDefinitionName], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.policySetDefinitionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicySetDefinition @@ -759,9 +571,17 @@ const getBuiltInOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.top], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicySetDefinitionListResult @@ -776,8 +596,14 @@ const listOperationSpec: msRest.OperationSpec = { const listBuiltInOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Authorization/policySetDefinitions", - queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.top], - headerParameters: [Parameters.acceptLanguage], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicySetDefinitionListResult @@ -791,11 +617,17 @@ const listBuiltInOperationSpec: msRest.OperationSpec = { const createOrUpdateAtManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: - "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", - urlParameters: [Parameters.policySetDefinitionName, Parameters.managementGroupId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", + urlParameters: [ + Parameters.policySetDefinitionName, + Parameters.managementGroupId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], requestBody: { parameterPath: "parameters", mapper: { @@ -819,11 +651,17 @@ const createOrUpdateAtManagementGroupOperationSpec: msRest.OperationSpec = { const deleteAtManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: - "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", - urlParameters: [Parameters.policySetDefinitionName, Parameters.managementGroupId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", + urlParameters: [ + Parameters.policySetDefinitionName, + Parameters.managementGroupId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: {}, 204: {}, @@ -836,11 +674,17 @@ const deleteAtManagementGroupOperationSpec: msRest.OperationSpec = { const getAtManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", - urlParameters: [Parameters.policySetDefinitionName, Parameters.managementGroupId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", + urlParameters: [ + Parameters.policySetDefinitionName, + Parameters.managementGroupId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicySetDefinition @@ -854,11 +698,18 @@ const getAtManagementGroupOperationSpec: msRest.OperationSpec = { const listByManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: - "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions", - urlParameters: [Parameters.managementGroupId], - queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.top], - headerParameters: [Parameters.acceptLanguage], + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions", + urlParameters: [ + Parameters.managementGroupId + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicySetDefinitionListResult @@ -874,9 +725,17 @@ const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.top], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicySetDefinitionListResult @@ -892,9 +751,17 @@ const listBuiltInNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.top], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicySetDefinitionListResult @@ -910,9 +777,17 @@ const listByManagementGroupNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0, Parameters.filter, Parameters.top], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { bodyMapper: Mappers.PolicySetDefinitionListResult diff --git a/sdk/policy/arm-policy/src/policyClient.ts b/sdk/policy/arm-policy/src/policyClient.ts index 4b800b476a99..77adaeb4059b 100644 --- a/sdk/policy/arm-policy/src/policyClient.ts +++ b/sdk/policy/arm-policy/src/policyClient.ts @@ -8,11 +8,13 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; import { PolicyClientContext } from "./policyClientContext"; + class PolicyClient extends PolicyClientContext { // Operation groups dataPolicyManifests: operations.DataPolicyManifests; @@ -23,15 +25,16 @@ class PolicyClient extends PolicyClientContext { /** * Initializes a new instance of the PolicyClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor( - credentials: msRest.ServiceClientCredentials, - subscriptionId: string, - options?: Models.PolicyClientOptions - ) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PolicyClientOptions) { super(credentials, subscriptionId, options); this.dataPolicyManifests = new operations.DataPolicyManifests(this); this.policyAssignments = new operations.PolicyAssignments(this); @@ -43,5 +46,10 @@ class PolicyClient extends PolicyClientContext { // Operation Specifications -export { PolicyClient, PolicyClientContext, Models as PolicyModels, Mappers as PolicyMappers }; +export { + PolicyClient, + PolicyClientContext, + Models as PolicyModels, + Mappers as PolicyMappers +}; export * from "./operations"; diff --git a/sdk/policy/arm-policy/src/policyClientContext.ts b/sdk/policy/arm-policy/src/policyClientContext.ts index 2b09789e656d..e36df0910c09 100644 --- a/sdk/policy/arm-policy/src/policyClientContext.ts +++ b/sdk/policy/arm-policy/src/policyClientContext.ts @@ -10,30 +10,32 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-policy"; const packageVersion = "4.0.0"; export class PolicyClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; /** * Initializes a new instance of the PolicyClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor( - credentials: msRest.ServiceClientCredentials, - subscriptionId: string, - options?: Models.PolicyClientOptions - ) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.PolicyClientOptions) { if (credentials == undefined) { - throw new Error("'credentials' cannot be null."); + throw new Error('\'credentials\' cannot be null.'); } if (subscriptionId == undefined) { - throw new Error("'subscriptionId' cannot be null."); + throw new Error('\'subscriptionId\' cannot be null.'); } if (!options) { @@ -46,7 +48,7 @@ export class PolicyClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.acceptLanguage = "en-US"; + this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; this.requestContentType = "application/json; charset=utf-8"; @@ -56,10 +58,7 @@ export class PolicyClientContext extends msRestAzure.AzureServiceClient { if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if ( - options.longRunningOperationRetryTimeout !== null && - options.longRunningOperationRetryTimeout !== undefined - ) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } }