From 77263d301dc3d34ef591222960f24b0f6af0b228 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 7 May 2021 03:04:48 +0000 Subject: [PATCH] CodeGen from PR 14299 in Azure/azure-rest-api-specs Merge 225e4a77704766b9b6529c40c2677b22b58da9b9 into 3f1e770aa89c7d306d7cdb4f7aa852819d2f9fa8 --- sdk/policy/arm-policy/LICENSE.txt | 2 +- sdk/policy/arm-policy/README.md | 21 +- sdk/policy/arm-policy/rollup.config.js | 4 +- .../src/models/dataPolicyManifestsMappers.ts | 35 + sdk/policy/arm-policy/src/models/index.ts | 1303 ++++++++++++++++- sdk/policy/arm-policy/src/models/mappers.ts | 602 +++++++- .../arm-policy/src/models/parameters.ts | 72 +- .../src/models/policyAssignmentsMappers.ts | 16 +- .../src/models/policyDefinitionsMappers.ts | 16 +- .../src/models/policyExemptionsMappers.ts | 35 + .../src/models/policySetDefinitionsMappers.ts | 16 +- .../src/operations/dataPolicyManifests.ts | 189 +++ sdk/policy/arm-policy/src/operations/index.ts | 7 +- .../src/operations/policyAssignments.ts | 263 ++-- .../src/operations/policyDefinitions.ts | 148 +- .../src/operations/policyExemptions.ts | 769 ++++++++++ .../src/operations/policySetDefinitions.ts | 146 +- sdk/policy/arm-policy/src/policyClient.ts | 9 +- .../arm-policy/src/policyClientContext.ts | 7 +- 19 files changed, 3352 insertions(+), 308 deletions(-) create mode 100644 sdk/policy/arm-policy/src/models/dataPolicyManifestsMappers.ts create mode 100644 sdk/policy/arm-policy/src/models/policyExemptionsMappers.ts create mode 100644 sdk/policy/arm-policy/src/operations/dataPolicyManifests.ts create mode 100644 sdk/policy/arm-policy/src/operations/policyExemptions.ts diff --git a/sdk/policy/arm-policy/LICENSE.txt b/sdk/policy/arm-policy/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/policy/arm-policy/LICENSE.txt +++ b/sdk/policy/arm-policy/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/policy/arm-policy/README.md b/sdk/policy/arm-policy/README.md index 1bc9c1c86980..4db32281acad 100644 --- a/sdk/policy/arm-policy/README.md +++ b/sdk/policy/arm-policy/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-policy ### How to use -#### nodejs - Authentication, client creation and get policyAssignments as an example written in TypeScript. +#### nodejs - client creation and getByPolicyMode dataPolicyManifests as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -26,18 +26,16 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0" ##### 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 -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { PolicyClient, PolicyModels, PolicyMappers } from "@azure/arm-policy"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { PolicyClient } = require("@azure/arm-policy"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { const client = new PolicyClient(creds, subscriptionId); - const scope = "testscope"; - const policyAssignmentName = "testpolicyAssignmentName"; - client.policyAssignments.get(scope, policyAssignmentName).then((result) => { + const policyMode = "testpolicyMode"; + client.dataPolicyManifests.getByPolicyMode(policyMode).then((result) => { console.log("The result is:"); console.log(result); }); @@ -46,7 +44,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and get policyAssignments as an example written in JavaScript. +#### browser - Authentication, client creation and getByPolicyMode dataPolicyManifests as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth @@ -80,9 +78,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to authManager.login(); } const client = new Azure.ArmPolicy.PolicyClient(res.creds, subscriptionId); - const scope = "testscope"; - const policyAssignmentName = "testpolicyAssignmentName"; - client.policyAssignments.get(scope, policyAssignmentName).then((result) => { + const policyMode = "testpolicyMode"; + client.dataPolicyManifests.getByPolicyMode(policyMode).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { diff --git a/sdk/policy/arm-policy/rollup.config.js b/sdk/policy/arm-policy/rollup.config.js index 8747e388192c..156fb323dbb5 100644 --- a/sdk/policy/arm-policy/rollup.config.js +++ b/sdk/policy/arm-policy/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/policy/arm-policy/src/models/dataPolicyManifestsMappers.ts b/sdk/policy/arm-policy/src/models/dataPolicyManifestsMappers.ts new file mode 100644 index 000000000000..773d4f678d42 --- /dev/null +++ b/sdk/policy/arm-policy/src/models/dataPolicyManifestsMappers.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + Alias, + AliasPath, + AliasPathMetadata, + AliasPattern, + BaseResource, + CloudError, + DataEffect, + DataManifestCustomResourceFunctionDefinition, + DataPolicyManifest, + DataPolicyManifestListResult, + ErrorAdditionalInfo, + ErrorResponse, + Identity, + NonComplianceMessage, + ParameterDefinitionsValue, + ParameterDefinitionsValueMetadata, + ParameterValuesValue, + PolicyAssignment, + PolicyDefinition, + PolicyDefinitionGroup, + PolicyDefinitionReference, + PolicyExemption, + PolicySetDefinition, + ResourceTypeAliases, + SystemData +} from "../models/mappers"; diff --git a/sdk/policy/arm-policy/src/models/index.ts b/sdk/policy/arm-policy/src/models/index.ts index a3c35f1d4fe8..76bb4a3ba4be 100644 --- a/sdk/policy/arm-policy/src/models/index.ts +++ b/sdk/policy/arm-policy/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -28,7 +28,9 @@ export interface ErrorAdditionalInfo { } /** - * The resource management error response. + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.) + * @summary Error Response */ export interface ErrorResponse { /** @@ -58,6 +60,203 @@ export interface ErrorResponse { readonly additionalInfo?: ErrorAdditionalInfo[]; } +/** + * The custom resource function definition. + */ +export interface DataManifestCustomResourceFunctionDefinition { + /** + * The function name as it will appear in the policy rule. eg - 'vault'. + */ + name?: string; + /** + * The fully qualified control plane resource type that this function represents. eg - + * 'Microsoft.KeyVault/vaults'. + */ + fullyQualifiedResourceType?: string; + /** + * The top-level properties that can be selected on the function's output. eg - [ "name", + * "location" ] if vault().name and vault().location are supported + */ + defaultProperties?: string[]; + /** + * A value indicating whether the custom properties within the property bag are allowed. Needs + * api-version to be specified in the policy rule eg - vault('2019-06-01'). + */ + allowCustomProperties?: boolean; +} + +/** + * The data effect definition. + */ +export interface DataEffect { + /** + * The data effect name. + */ + name?: string; + /** + * The data effect details schema. + */ + detailsSchema?: any; +} + +/** + * The type of the pattern for an alias path. + */ +export interface AliasPattern { + /** + * The alias pattern phrase. + */ + phrase?: string; + /** + * The alias pattern variable. + */ + variable?: string; + /** + * The type of alias pattern. Possible values include: 'NotSpecified', 'Extract' + */ + type?: AliasPatternType; +} + +/** + * An interface representing AliasPathMetadata. + */ +export interface AliasPathMetadata { + /** + * The type of the token that the alias path is referring to. Possible values include: + * 'NotSpecified', 'Any', 'String', 'Object', 'Array', 'Integer', 'Number', 'Boolean' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: AliasPathTokenType; + /** + * The attributes of the token that the alias path is referring to. Possible values include: + * 'None', 'Modifiable' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly attributes?: AliasPathAttributes; +} + +/** + * The type of the paths for alias. + */ +export interface AliasPath { + /** + * The path of an alias. + */ + path?: string; + /** + * The API versions. + */ + apiVersions?: string[]; + /** + * The pattern for an alias path. + */ + pattern?: AliasPattern; + /** + * The metadata of the alias path. If missing, fall back to the default metadata of the alias. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly metadata?: AliasPathMetadata; +} + +/** + * The alias type. + */ +export interface Alias { + /** + * The alias name. + */ + name?: string; + /** + * The paths for an alias. + */ + paths?: AliasPath[]; + /** + * The type of the alias. Possible values include: 'NotSpecified', 'PlainText', 'Mask' + */ + type?: AliasType; + /** + * The default path for an alias. + */ + defaultPath?: string; + /** + * The default pattern for an alias. + */ + defaultPattern?: AliasPattern; + /** + * The default alias path metadata. Applies to the default path and to any alias path that + * doesn't have metadata + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly defaultMetadata?: AliasPathMetadata; +} + +/** + * The resource type aliases definition. + */ +export interface ResourceTypeAliases { + /** + * The resource type name. + */ + resourceType?: string; + /** + * The aliases for property names. + */ + aliases?: Alias[]; +} + +/** + * The data policy manifest. + */ +export interface DataPolicyManifest extends BaseResource { + /** + * The list of namespaces for the data policy manifest. + */ + namespaces?: string[]; + /** + * The policy mode of the data policy manifest. + */ + policyMode?: string; + /** + * A value indicating whether policy mode is allowed only in built-in definitions. + */ + isBuiltInOnly?: boolean; + /** + * An array of resource type aliases. + */ + resourceTypeAliases?: ResourceTypeAliases[]; + /** + * The effect definition. + */ + effects?: DataEffect[]; + /** + * The non-alias field accessor values that can be used in the policy rule. + */ + fieldValues?: string[]; + /** + * The standard resource functions (subscription and/or resourceGroup). + */ + standard?: string[]; + /** + * An array of data manifest custom resource definition. + */ + custom?: DataManifestCustomResourceFunctionDefinition[]; + /** + * The ID of the data policy manifest. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the data policy manifest (it's the same as the Policy Mode). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource (Microsoft.Authorization/dataPolicyManifests). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + /** * The value of a parameter. */ @@ -69,17 +268,21 @@ export interface ParameterValuesValue { } /** - * The policy sku. This property is optional, obsolete, and will be ignored. + * A message that describes why a resource is non-compliant with the policy. This is shown in + * 'deny' error messages and on resource's non-compliant compliance results. */ -export interface PolicySku { +export interface NonComplianceMessage { /** - * The name of the policy sku. Possible values are A0 and A1. + * A message that describes why a resource is non-compliant with the policy. This is shown in + * 'deny' error messages and on resource's non-compliant compliance results. */ - name: string; + message: string; /** - * The policy sku tier. Possible values are Free and Standard. + * The policy definition reference ID within a policy set definition the message is intended for. + * This is only applicable if the policy assignment assigns a policy set definition. If this is + * not provided the message applies to all policies assigned by this policy assignment. */ - tier?: string; + policyDefinitionReferenceId?: string; } /** @@ -117,8 +320,9 @@ export interface PolicyAssignment extends BaseResource { policyDefinitionId?: string; /** * The scope for the policy assignment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - scope?: string; + readonly scope?: string; /** * The policy's excluded scopes. */ @@ -138,9 +342,13 @@ export interface PolicyAssignment extends BaseResource { metadata?: any; /** * The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. Possible - * values include: 'Default', 'DoNotEnforce' + * values include: 'Default', 'DoNotEnforce'. Default value: 'Default'. */ enforcementMode?: EnforcementMode; + /** + * The messages that describe why a resource is non-compliant with the policy. + */ + nonComplianceMessages?: NonComplianceMessage[]; /** * The ID of the policy assignment. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -156,10 +364,6 @@ export interface PolicyAssignment extends BaseResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; - /** - * The policy sku. This property is optional, obsolete, and will be ignored. - */ - sku?: PolicySku; /** * The location of the policy assignment. Only required when utilizing managed identity. */ @@ -182,6 +386,17 @@ export interface ParameterDefinitionsValueMetadata { * The description of the parameter. */ description?: string; + /** + * Used when assigning the policy definition through the portal. Provides a context aware list of + * values for the user to choose from. + */ + strongType?: string; + /** + * Set to true to have Azure portal create role assignments on the resource ID or resource scope + * value of this parameter during policy assignment. This property is useful in case you wish to + * assign permissions outside the assignment scope. + */ + assignPermissions?: boolean; /** * Describes unknown properties. The value of an unknown property can be of "any" type. */ @@ -221,7 +436,8 @@ export interface PolicyDefinition extends BaseResource { */ policyType?: PolicyType; /** - * The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data. + * The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data. Default + * value: 'Indexed'. */ mode?: string; /** @@ -363,15 +579,142 @@ export interface PolicySetDefinition extends BaseResource { readonly type?: string; } +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { + /** + * The identity that created the resource. + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: CreatedByType; + /** + * The timestamp of resource creation (UTC). + */ + createdAt?: Date; + /** + * The identity that last modified the resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; +} + +/** + * The policy exemption. + */ +export interface PolicyExemption extends BaseResource { + /** + * The ID of the policy assignment that is being exempted. + */ + policyAssignmentId: string; + /** + * The policy definition reference ID list when the associated policy assignment is an assignment + * of a policy set definition. + */ + policyDefinitionReferenceIds?: string[]; + /** + * The policy exemption category. Possible values are Waiver and Mitigated. Possible values + * include: 'Waiver', 'Mitigated' + */ + exemptionCategory: ExemptionCategory; + /** + * The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy + * exemption. + */ + expiresOn?: Date; + /** + * The display name of the policy exemption. + */ + displayName?: string; + /** + * The description of the policy exemption. + */ + description?: string; + /** + * The policy exemption metadata. Metadata is an open ended object and is typically a collection + * of key value pairs. + */ + metadata?: any; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; + /** + * The ID of the policy exemption. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the policy exemption. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource (Microsoft.Authorization/policyExemptions). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * Optional Parameters. + */ +export interface DataPolicyManifestsListOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Valid values for $filter are: "namespace eq '{value}'". + * If $filter is not provided, no filtering is performed. If $filter=namespace eq '{value}' is + * provided, the returned list only includes all data policy manifests that have a namespace + * matching the provided value. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface DataPolicyManifestsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Valid values for $filter are: "namespace eq '{value}'". + * If $filter is not provided, no filtering is performed. If $filter=namespace eq '{value}' is + * provided, the returned list only includes all data policy manifests that have a namespace + * matching the provided value. + */ + filter?: string; +} + /** * Optional Parameters. */ export interface PolicyAssignmentsListForResourceGroupOptionalParams extends msRest.RequestOptionsBase { /** - * The filter to apply on the operation. Valid values for $filter are: 'atScope()' or - * 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. + * The filter to apply on the operation. Valid values for $filter are: 'atScope()', + * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no + * filtering is performed. If $filter=atScope() is provided, the returned list only includes all + * policy assignments that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy assignments that at the given scope. If + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value}. */ filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; } /** @@ -379,10 +722,43 @@ export interface PolicyAssignmentsListForResourceGroupOptionalParams extends msR */ export interface PolicyAssignmentsListForResourceOptionalParams extends msRest.RequestOptionsBase { /** - * The filter to apply on the operation. Valid values for $filter are: 'atScope()' or - * 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. + * The filter to apply on the operation. Valid values for $filter are: 'atScope()', + * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no + * filtering is performed. If $filter=atScope() is provided, the returned list only includes all + * policy assignments that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy assignments that at the given scope. If + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +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 + * filtering is performed. If $filter=atScope() is provided, the returned list only includes all + * policy assignments that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy assignments that at the given scope. If + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value}. */ filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; } /** @@ -390,8 +766,539 @@ export interface PolicyAssignmentsListForResourceOptionalParams extends msRest.R */ export interface PolicyAssignmentsListOptionalParams extends msRest.RequestOptionsBase { /** - * The filter to apply on the operation. Valid values for $filter are: 'atScope()' or - * 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. + * The filter to apply on the operation. Valid values for $filter are: 'atScope()', + * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no + * filtering is performed. If $filter=atScope() is provided, the returned list only includes all + * policy assignments that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy assignments that at the given scope. If + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +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 + * filtering is performed. If $filter=atScope() is provided, the returned list only includes all + * policy assignments that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy assignments that at the given scope. If + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +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 + * filtering is performed. If $filter=atScope() is provided, the returned list only includes all + * policy assignments that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy assignments that at the given scope. If + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +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 + * filtering is performed. If $filter=atScope() is provided, the returned list only includes all + * policy assignments that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy assignments that at the given scope. If + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface PolicyAssignmentsListNextOptionalParams 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 + * filtering is performed. If $filter=atScope() is provided, the returned list only includes all + * policy assignments that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy assignments that at the given scope. If + * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy + * assignments of the policy definition whose id is {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface PolicyDefinitionsListOptionalParams 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 + * is performed. If $filter=atExactScope() is provided, the returned list only includes all + * policy definitions that at the given scope. If $filter='policyType -eq {value}' is provided, + * the returned list only includes all policy definitions whose type match the {value}. Possible + * policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq + * {value}' is provided, the returned list only includes all policy definitions whose category + * match the {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface PolicyDefinitionsListBuiltInOptionalParams 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 + * is performed. If $filter=atExactScope() is provided, the returned list only includes all + * policy definitions that at the given scope. If $filter='policyType -eq {value}' is provided, + * the returned list only includes all policy definitions whose type match the {value}. Possible + * policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq + * {value}' is provided, the returned list only includes all policy definitions whose category + * match the {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +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 + * is performed. If $filter=atExactScope() is provided, the returned list only includes all + * policy definitions that at the given scope. If $filter='policyType -eq {value}' is provided, + * the returned list only includes all policy definitions whose type match the {value}. Possible + * policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq + * {value}' is provided, the returned list only includes all policy definitions whose category + * match the {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface PolicyDefinitionsListNextOptionalParams 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 + * is performed. If $filter=atExactScope() is provided, the returned list only includes all + * policy definitions that at the given scope. If $filter='policyType -eq {value}' is provided, + * the returned list only includes all policy definitions whose type match the {value}. Possible + * policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq + * {value}' is provided, the returned list only includes all policy definitions whose category + * match the {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface PolicyDefinitionsListBuiltInNextOptionalParams 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 + * is performed. If $filter=atExactScope() is provided, the returned list only includes all + * policy definitions that at the given scope. If $filter='policyType -eq {value}' is provided, + * the returned list only includes all policy definitions whose type match the {value}. Possible + * policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq + * {value}' is provided, the returned list only includes all policy definitions whose category + * match the {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +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 + * is performed. If $filter=atExactScope() is provided, the returned list only includes all + * policy definitions that at the given scope. If $filter='policyType -eq {value}' is provided, + * the returned list only includes all policy definitions whose type match the {value}. Possible + * policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq + * {value}' is provided, the returned list only includes all policy definitions whose category + * match the {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface PolicySetDefinitionsListOptionalParams 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 + * is performed. If $filter=atExactScope() is provided, the returned list only includes all + * policy set definitions that at the given scope. If $filter='policyType -eq {value}' is + * provided, the returned list only includes all policy set definitions whose type match the + * {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If + * $filter='category -eq {value}' is provided, the returned list only includes all policy set + * definitions whose category match the {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface PolicySetDefinitionsListBuiltInOptionalParams 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 + * is performed. If $filter=atExactScope() is provided, the returned list only includes all + * policy set definitions that at the given scope. If $filter='policyType -eq {value}' is + * provided, the returned list only includes all policy set definitions whose type match the + * {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If + * $filter='category -eq {value}' is provided, the returned list only includes all policy set + * definitions whose category match the {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +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 + * is performed. If $filter=atExactScope() is provided, the returned list only includes all + * policy set definitions that at the given scope. If $filter='policyType -eq {value}' is + * provided, the returned list only includes all policy set definitions whose type match the + * {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If + * $filter='category -eq {value}' is provided, the returned list only includes all policy set + * definitions whose category match the {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface PolicySetDefinitionsListNextOptionalParams 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 + * is performed. If $filter=atExactScope() is provided, the returned list only includes all + * policy set definitions that at the given scope. If $filter='policyType -eq {value}' is + * provided, the returned list only includes all policy set definitions whose type match the + * {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If + * $filter='category -eq {value}' is provided, the returned list only includes all policy set + * definitions whose category match the {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +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 + * is performed. If $filter=atExactScope() is provided, the returned list only includes all + * policy set definitions that at the given scope. If $filter='policyType -eq {value}' is + * provided, the returned list only includes all policy set definitions whose type match the + * {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If + * $filter='category -eq {value}' is provided, the returned list only includes all policy set + * definitions whose category match the {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +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 + * is performed. If $filter=atExactScope() is provided, the returned list only includes all + * policy set definitions that at the given scope. If $filter='policyType -eq {value}' is + * provided, the returned list only includes all policy set definitions whose type match the + * {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If + * $filter='category -eq {value}' is provided, the returned list only includes all policy set + * definitions whose category match the {value}. + */ + filter?: string; + /** + * Maximum number of records to return. When the $top filter is not provided, it will return 500 + * records. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface PolicyExemptionsListOptionalParams 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 + * provided, no filtering is performed. If $filter is not provided, the unfiltered list includes + * all policy exemptions associated with the scope, including those that apply directly or apply + * from containing scopes. If $filter=atScope() is provided, the returned list only includes all + * policy exemptions that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy exemptions that at the given scope. If + * $filter=excludeExpired() is provided, the returned list only includes all policy exemptions + * that either haven't expired or didn't set expiration date. If $filter=policyAssignmentId eq + * '{value}' is provided. the returned list only includes all policy exemptions that are + * associated with the give policyAssignmentId. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +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 + * provided, no filtering is performed. If $filter is not provided, the unfiltered list includes + * all policy exemptions associated with the scope, including those that apply directly or apply + * from containing scopes. If $filter=atScope() is provided, the returned list only includes all + * policy exemptions that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy exemptions that at the given scope. If + * $filter=excludeExpired() is provided, the returned list only includes all policy exemptions + * that either haven't expired or didn't set expiration date. If $filter=policyAssignmentId eq + * '{value}' is provided. the returned list only includes all policy exemptions that are + * associated with the give policyAssignmentId. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface PolicyExemptionsListForResourceOptionalParams 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 + * provided, no filtering is performed. If $filter is not provided, the unfiltered list includes + * all policy exemptions associated with the scope, including those that apply directly or apply + * from containing scopes. If $filter=atScope() is provided, the returned list only includes all + * policy exemptions that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy exemptions that at the given scope. If + * $filter=excludeExpired() is provided, the returned list only includes all policy exemptions + * that either haven't expired or didn't set expiration date. If $filter=policyAssignmentId eq + * '{value}' is provided. the returned list only includes all policy exemptions that are + * associated with the give policyAssignmentId. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +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 + * provided, no filtering is performed. If $filter is not provided, the unfiltered list includes + * all policy exemptions associated with the scope, including those that apply directly or apply + * from containing scopes. If $filter=atScope() is provided, the returned list only includes all + * policy exemptions that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy exemptions that at the given scope. If + * $filter=excludeExpired() is provided, the returned list only includes all policy exemptions + * that either haven't expired or didn't set expiration date. If $filter=policyAssignmentId eq + * '{value}' is provided. the returned list only includes all policy exemptions that are + * associated with the give policyAssignmentId. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface PolicyExemptionsListNextOptionalParams 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 + * provided, no filtering is performed. If $filter is not provided, the unfiltered list includes + * all policy exemptions associated with the scope, including those that apply directly or apply + * from containing scopes. If $filter=atScope() is provided, the returned list only includes all + * policy exemptions that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy exemptions that at the given scope. If + * $filter=excludeExpired() is provided, the returned list only includes all policy exemptions + * that either haven't expired or didn't set expiration date. If $filter=policyAssignmentId eq + * '{value}' is provided. the returned list only includes all policy exemptions that are + * associated with the give policyAssignmentId. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +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 + * provided, no filtering is performed. If $filter is not provided, the unfiltered list includes + * all policy exemptions associated with the scope, including those that apply directly or apply + * from containing scopes. If $filter=atScope() is provided, the returned list only includes all + * policy exemptions that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy exemptions that at the given scope. If + * $filter=excludeExpired() is provided, the returned list only includes all policy exemptions + * that either haven't expired or didn't set expiration date. If $filter=policyAssignmentId eq + * '{value}' is provided. the returned list only includes all policy exemptions that are + * associated with the give policyAssignmentId. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +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 + * provided, no filtering is performed. If $filter is not provided, the unfiltered list includes + * all policy exemptions associated with the scope, including those that apply directly or apply + * from containing scopes. If $filter=atScope() is provided, the returned list only includes all + * policy exemptions that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy exemptions that at the given scope. If + * $filter=excludeExpired() is provided, the returned list only includes all policy exemptions + * that either haven't expired or didn't set expiration date. If $filter=policyAssignmentId eq + * '{value}' is provided. the returned list only includes all policy exemptions that are + * associated with the give policyAssignmentId. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +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 + * provided, no filtering is performed. If $filter is not provided, the unfiltered list includes + * all policy exemptions associated with the scope, including those that apply directly or apply + * from containing scopes. If $filter=atScope() is provided, the returned list only includes all + * policy exemptions that apply to the scope, which is everything in the unfiltered list except + * those applied to sub scopes contained within the given scope. If $filter=atExactScope() is + * provided, the returned list only includes all policy exemptions that at the given scope. If + * $filter=excludeExpired() is provided, the returned list only includes all policy exemptions + * that either haven't expired or didn't set expiration date. If $filter=policyAssignmentId eq + * '{value}' is provided. the returned list only includes all policy exemptions that are + * associated with the give policyAssignmentId. */ filter?: string; } @@ -403,6 +1310,18 @@ export interface PolicyClientOptions extends AzureServiceClientOptions { baseUri?: string; } +/** + * @interface + * List of data policy manifests. + * @extends Array + */ +export interface DataPolicyManifestListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + /** * @interface * List of policy assignments. @@ -428,16 +1347,62 @@ export interface PolicyDefinitionListResult extends Array { } /** - * @interface - * List of policy set definitions. - * @extends Array + * @interface + * List of policy set definitions. + * @extends Array + */ +export interface PolicySetDefinitionListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * List of policy exemptions. + * @extends Array + */ +export interface PolicyExemptionListResult extends Array { + /** + * The URL to use for getting the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for AliasPatternType. + * Possible values include: 'NotSpecified', 'Extract' + * @readonly + * @enum {string} + */ +export type AliasPatternType = 'NotSpecified' | 'Extract'; + +/** + * Defines values for AliasPathTokenType. + * Possible values include: 'NotSpecified', 'Any', 'String', 'Object', 'Array', 'Integer', + * 'Number', 'Boolean' + * @readonly + * @enum {string} + */ +export type AliasPathTokenType = 'NotSpecified' | 'Any' | 'String' | 'Object' | 'Array' | 'Integer' | 'Number' | 'Boolean'; + +/** + * Defines values for AliasPathAttributes. + * Possible values include: 'None', 'Modifiable' + * @readonly + * @enum {string} + */ +export type AliasPathAttributes = 'None' | 'Modifiable'; + +/** + * Defines values for AliasType. + * Possible values include: 'NotSpecified', 'PlainText', 'Mask' + * @readonly + * @enum {string} */ -export interface PolicySetDefinitionListResult extends Array { - /** - * The URL to use for getting the next set of results. - */ - nextLink?: string; -} +export type AliasType = 'NotSpecified' | 'PlainText' | 'Mask'; /** * Defines values for EnforcementMode. @@ -471,6 +1436,82 @@ export type PolicyType = 'NotSpecified' | 'BuiltIn' | 'Custom' | 'Static'; */ export type ParameterType = 'String' | 'Array' | 'Object' | 'Boolean' | 'Integer' | 'Float' | 'DateTime'; +/** + * Defines values for ExemptionCategory. + * Possible values include: 'Waiver', 'Mitigated' + * @readonly + * @enum {string} + */ +export type ExemptionCategory = 'Waiver' | 'Mitigated'; + +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Contains response data for the getByPolicyMode operation. + */ +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; + }; +}; + +/** + * Contains response data for the list operation. + */ +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; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +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; + }; +}; + /** * Contains response data for the deleteMethod operation. */ @@ -1190,3 +2231,203 @@ export type PolicySetDefinitionsListByManagementGroupNextResponse = PolicySetDef parsedBody: PolicySetDefinitionListResult; }; }; + +/** + * Contains response data for the createOrUpdate operation. + */ +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; + }; +}; + +/** + * Contains response data for the get operation. + */ +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; + }; +}; + +/** + * Contains response data for the list operation. + */ +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; + }; +}; + +/** + * Contains response data for the listForResourceGroup operation. + */ +export type PolicyExemptionsListForResourceGroupResponse = 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; + }; +}; + +/** + * Contains response data for the listForResource operation. + */ +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; + }; +}; + +/** + * Contains response data for the listForManagementGroup operation. + */ +export type PolicyExemptionsListForManagementGroupResponse = 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; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +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; + }; +}; + +/** + * Contains response data for the listForResourceGroupNext operation. + */ +export type PolicyExemptionsListForResourceGroupNextResponse = 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; + }; +}; + +/** + * Contains response data for the listForResourceNext operation. + */ +export type PolicyExemptionsListForResourceNextResponse = 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; + }; +}; + +/** + * Contains response data for the listForManagementGroupNext operation. + */ +export type PolicyExemptionsListForManagementGroupNextResponse = 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; + }; +}; diff --git a/sdk/policy/arm-policy/src/models/mappers.ts b/sdk/policy/arm-policy/src/models/mappers.ts index f00d602201e3..a52beacaf7f5 100644 --- a/sdk/policy/arm-policy/src/models/mappers.ts +++ b/sdk/policy/arm-policy/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -93,6 +93,365 @@ export const ErrorResponse: msRest.CompositeMapper = { } }; +export const DataManifestCustomResourceFunctionDefinition: msRest.CompositeMapper = { + serializedName: "DataManifestCustomResourceFunctionDefinition", + type: { + name: "Composite", + className: "DataManifestCustomResourceFunctionDefinition", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + fullyQualifiedResourceType: { + serializedName: "fullyQualifiedResourceType", + type: { + name: "String" + } + }, + defaultProperties: { + serializedName: "defaultProperties", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + allowCustomProperties: { + serializedName: "allowCustomProperties", + type: { + name: "Boolean" + } + } + } + } +}; + +export const DataEffect: msRest.CompositeMapper = { + serializedName: "DataEffect", + type: { + name: "Composite", + className: "DataEffect", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + detailsSchema: { + serializedName: "detailsSchema", + type: { + name: "Object" + } + } + } + } +}; + +export const AliasPattern: msRest.CompositeMapper = { + serializedName: "AliasPattern", + type: { + name: "Composite", + className: "AliasPattern", + modelProperties: { + phrase: { + serializedName: "phrase", + type: { + name: "String" + } + }, + variable: { + serializedName: "variable", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "NotSpecified", + "Extract" + ] + } + } + } + } +}; + +export const AliasPathMetadata: msRest.CompositeMapper = { + serializedName: "AliasPathMetadata", + type: { + name: "Composite", + className: "AliasPathMetadata", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + attributes: { + readOnly: true, + serializedName: "attributes", + type: { + name: "String" + } + } + } + } +}; + +export const AliasPath: msRest.CompositeMapper = { + serializedName: "AliasPath", + type: { + name: "Composite", + className: "AliasPath", + modelProperties: { + path: { + serializedName: "path", + type: { + name: "String" + } + }, + apiVersions: { + serializedName: "apiVersions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + pattern: { + serializedName: "pattern", + type: { + name: "Composite", + className: "AliasPattern" + } + }, + metadata: { + readOnly: true, + serializedName: "metadata", + type: { + name: "Composite", + className: "AliasPathMetadata" + } + } + } + } +}; + +export const Alias: msRest.CompositeMapper = { + serializedName: "Alias", + type: { + name: "Composite", + className: "Alias", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + paths: { + serializedName: "paths", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AliasPath" + } + } + } + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "NotSpecified", + "PlainText", + "Mask" + ] + } + }, + defaultPath: { + serializedName: "defaultPath", + type: { + name: "String" + } + }, + defaultPattern: { + serializedName: "defaultPattern", + type: { + name: "Composite", + className: "AliasPattern" + } + }, + defaultMetadata: { + readOnly: true, + serializedName: "defaultMetadata", + type: { + name: "Composite", + className: "AliasPathMetadata" + } + } + } + } +}; + +export const ResourceTypeAliases: msRest.CompositeMapper = { + serializedName: "ResourceTypeAliases", + type: { + name: "Composite", + className: "ResourceTypeAliases", + modelProperties: { + resourceType: { + serializedName: "resourceType", + type: { + name: "String" + } + }, + aliases: { + serializedName: "aliases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Alias" + } + } + } + } + } + } +}; + +export const DataPolicyManifest: msRest.CompositeMapper = { + serializedName: "DataPolicyManifest", + type: { + name: "Composite", + className: "DataPolicyManifest", + modelProperties: { + namespaces: { + serializedName: "properties.namespaces", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + policyMode: { + serializedName: "properties.policyMode", + type: { + name: "String" + } + }, + isBuiltInOnly: { + serializedName: "properties.isBuiltInOnly", + type: { + name: "Boolean" + } + }, + resourceTypeAliases: { + serializedName: "properties.resourceTypeAliases", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceTypeAliases" + } + } + } + }, + effects: { + serializedName: "properties.effects", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataEffect" + } + } + } + }, + fieldValues: { + serializedName: "properties.fieldValues", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + standard: { + serializedName: "properties.resourceFunctions.standard", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + custom: { + serializedName: "properties.resourceFunctions.custom", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataManifestCustomResourceFunctionDefinition" + } + } + } + }, + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + export const ParameterValuesValue: msRest.CompositeMapper = { serializedName: "ParameterValuesValue", type: { @@ -109,21 +468,21 @@ export const ParameterValuesValue: msRest.CompositeMapper = { } }; -export const PolicySku: msRest.CompositeMapper = { - serializedName: "PolicySku", +export const NonComplianceMessage: msRest.CompositeMapper = { + serializedName: "NonComplianceMessage", type: { name: "Composite", - className: "PolicySku", + className: "NonComplianceMessage", modelProperties: { - name: { + message: { required: true, - serializedName: "name", + serializedName: "message", type: { name: "String" } }, - tier: { - serializedName: "tier", + policyDefinitionReferenceId: { + serializedName: "policyDefinitionReferenceId", type: { name: "String" } @@ -185,6 +544,7 @@ export const PolicyAssignment: msRest.CompositeMapper = { } }, scope: { + readOnly: true, serializedName: "properties.scope", type: { name: "String" @@ -227,10 +587,23 @@ export const PolicyAssignment: msRest.CompositeMapper = { }, enforcementMode: { serializedName: "properties.enforcementMode", + defaultValue: 'Default', type: { name: "String" } }, + nonComplianceMessages: { + serializedName: "properties.nonComplianceMessages", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NonComplianceMessage" + } + } + } + }, id: { readOnly: true, serializedName: "id", @@ -252,13 +625,6 @@ export const PolicyAssignment: msRest.CompositeMapper = { name: "String" } }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "PolicySku" - } - }, location: { serializedName: "location", type: { @@ -293,6 +659,18 @@ export const ParameterDefinitionsValueMetadata: msRest.CompositeMapper = { type: { name: "String" } + }, + strongType: { + serializedName: "strongType", + type: { + name: "String" + } + }, + assignPermissions: { + serializedName: "assignPermissions", + type: { + name: "Boolean" + } } }, additionalProperties: { @@ -362,6 +740,7 @@ export const PolicyDefinition: msRest.CompositeMapper = { }, mode: { serializedName: "properties.mode", + defaultValue: 'Indexed', type: { name: "String" } @@ -606,6 +985,168 @@ export const PolicySetDefinition: msRest.CompositeMapper = { } }; +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const PolicyExemption: msRest.CompositeMapper = { + serializedName: "PolicyExemption", + type: { + name: "Composite", + className: "PolicyExemption", + modelProperties: { + policyAssignmentId: { + required: true, + serializedName: "properties.policyAssignmentId", + type: { + name: "String" + } + }, + policyDefinitionReferenceIds: { + serializedName: "properties.policyDefinitionReferenceIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + exemptionCategory: { + required: true, + serializedName: "properties.exemptionCategory", + type: { + name: "String" + } + }, + expiresOn: { + serializedName: "properties.expiresOn", + type: { + name: "DateTime" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + metadata: { + serializedName: "properties.metadata", + type: { + name: "Object" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const DataPolicyManifestListResult: msRest.CompositeMapper = { + serializedName: "DataPolicyManifestListResult", + type: { + name: "Composite", + className: "DataPolicyManifestListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataPolicyManifest" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const PolicyAssignmentListResult: msRest.CompositeMapper = { serializedName: "PolicyAssignmentListResult", type: { @@ -689,3 +1230,32 @@ export const PolicySetDefinitionListResult: msRest.CompositeMapper = { } } }; + +export const PolicyExemptionListResult: msRest.CompositeMapper = { + serializedName: "PolicyExemptionListResult", + type: { + name: "Composite", + className: "PolicyExemptionListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PolicyExemption" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/policy/arm-policy/src/models/parameters.ts b/sdk/policy/arm-policy/src/models/parameters.ts index 2c6297682f08..75c1df6e7ca6 100644 --- a/sdk/policy/arm-policy/src/models/parameters.ts +++ b/sdk/policy/arm-policy/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -20,30 +19,31 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion: msRest.OperationQueryParameter = { +export const apiVersion0: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, + isConstant: true, serializedName: "api-version", + defaultValue: '2020-09-01', type: { name: "String" } } }; -export const filter0: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "filter" - ], +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", mapper: { - serializedName: "$filter", + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2020-07-01-preview', type: { name: "String" } - }, - skipEncoding: true + } }; -export const filter1: msRest.OperationQueryParameter = { +export const filter: msRest.OperationQueryParameter = { parameterPath: [ "options", "filter" @@ -53,16 +53,6 @@ export const filter1: msRest.OperationQueryParameter = { type: { name: "String" } - } -}; -export const filter2: msRest.OperationQueryParameter = { - parameterPath: "filter", - mapper: { - required: true, - serializedName: "$filter", - type: { - name: "String" - } }, skipEncoding: true }; @@ -129,6 +119,26 @@ export const policyDefinitionName: msRest.OperationURLParameter = { } } }; +export const policyExemptionName: msRest.OperationURLParameter = { + parameterPath: "policyExemptionName", + mapper: { + required: true, + serializedName: "policyExemptionName", + type: { + name: "String" + } + } +}; +export const policyMode: msRest.OperationURLParameter = { + parameterPath: "policyMode", + mapper: { + required: true, + serializedName: "policyMode", + type: { + name: "String" + } + } +}; export const policySetDefinitionName: msRest.OperationURLParameter = { parameterPath: "policySetDefinitionName", mapper: { @@ -206,3 +216,19 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; +export const top: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "top" + ], + mapper: { + serializedName: "$top", + constraints: { + InclusiveMaximum: 1000, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } +}; diff --git a/sdk/policy/arm-policy/src/models/policyAssignmentsMappers.ts b/sdk/policy/arm-policy/src/models/policyAssignmentsMappers.ts index cc50c3e4450a..b12434787b8d 100644 --- a/sdk/policy/arm-policy/src/models/policyAssignmentsMappers.ts +++ b/sdk/policy/arm-policy/src/models/policyAssignmentsMappers.ts @@ -1,17 +1,25 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + Alias, + AliasPath, + AliasPathMetadata, + AliasPattern, BaseResource, CloudError, + DataEffect, + DataManifestCustomResourceFunctionDefinition, + DataPolicyManifest, ErrorAdditionalInfo, ErrorResponse, Identity, + NonComplianceMessage, ParameterDefinitionsValue, ParameterDefinitionsValueMetadata, ParameterValuesValue, @@ -20,6 +28,8 @@ export { PolicyDefinition, PolicyDefinitionGroup, PolicyDefinitionReference, + PolicyExemption, PolicySetDefinition, - PolicySku + ResourceTypeAliases, + SystemData } from "../models/mappers"; diff --git a/sdk/policy/arm-policy/src/models/policyDefinitionsMappers.ts b/sdk/policy/arm-policy/src/models/policyDefinitionsMappers.ts index 0c34830d4dc7..a3fd3a9803f4 100644 --- a/sdk/policy/arm-policy/src/models/policyDefinitionsMappers.ts +++ b/sdk/policy/arm-policy/src/models/policyDefinitionsMappers.ts @@ -1,17 +1,25 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + Alias, + AliasPath, + AliasPathMetadata, + AliasPattern, BaseResource, CloudError, + DataEffect, + DataManifestCustomResourceFunctionDefinition, + DataPolicyManifest, ErrorAdditionalInfo, ErrorResponse, Identity, + NonComplianceMessage, ParameterDefinitionsValue, ParameterDefinitionsValueMetadata, ParameterValuesValue, @@ -20,6 +28,8 @@ export { PolicyDefinitionGroup, PolicyDefinitionListResult, PolicyDefinitionReference, + PolicyExemption, PolicySetDefinition, - PolicySku + ResourceTypeAliases, + SystemData } from "../models/mappers"; diff --git a/sdk/policy/arm-policy/src/models/policyExemptionsMappers.ts b/sdk/policy/arm-policy/src/models/policyExemptionsMappers.ts new file mode 100644 index 000000000000..bcd80c1df0e2 --- /dev/null +++ b/sdk/policy/arm-policy/src/models/policyExemptionsMappers.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + Alias, + AliasPath, + AliasPathMetadata, + AliasPattern, + BaseResource, + CloudError, + DataEffect, + DataManifestCustomResourceFunctionDefinition, + DataPolicyManifest, + ErrorAdditionalInfo, + ErrorResponse, + Identity, + NonComplianceMessage, + ParameterDefinitionsValue, + ParameterDefinitionsValueMetadata, + ParameterValuesValue, + PolicyAssignment, + PolicyDefinition, + PolicyDefinitionGroup, + PolicyDefinitionReference, + PolicyExemption, + PolicyExemptionListResult, + PolicySetDefinition, + ResourceTypeAliases, + SystemData +} from "../models/mappers"; diff --git a/sdk/policy/arm-policy/src/models/policySetDefinitionsMappers.ts b/sdk/policy/arm-policy/src/models/policySetDefinitionsMappers.ts index bccfd77f63f7..02ef9565058b 100644 --- a/sdk/policy/arm-policy/src/models/policySetDefinitionsMappers.ts +++ b/sdk/policy/arm-policy/src/models/policySetDefinitionsMappers.ts @@ -1,17 +1,25 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + Alias, + AliasPath, + AliasPathMetadata, + AliasPattern, BaseResource, CloudError, + DataEffect, + DataManifestCustomResourceFunctionDefinition, + DataPolicyManifest, ErrorAdditionalInfo, ErrorResponse, Identity, + NonComplianceMessage, ParameterDefinitionsValue, ParameterDefinitionsValueMetadata, ParameterValuesValue, @@ -19,7 +27,9 @@ export { PolicyDefinition, PolicyDefinitionGroup, PolicyDefinitionReference, + PolicyExemption, PolicySetDefinition, PolicySetDefinitionListResult, - PolicySku + ResourceTypeAliases, + SystemData } from "../models/mappers"; diff --git a/sdk/policy/arm-policy/src/operations/dataPolicyManifests.ts b/sdk/policy/arm-policy/src/operations/dataPolicyManifests.ts new file mode 100644 index 000000000000..ce84e7431a6f --- /dev/null +++ b/sdk/policy/arm-policy/src/operations/dataPolicyManifests.ts @@ -0,0 +1,189 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/dataPolicyManifestsMappers"; +import * as Parameters from "../models/parameters"; +import { PolicyClientContext } from "../policyClientContext"; + +/** Class representing a DataPolicyManifests. */ +export class DataPolicyManifests { + private readonly client: PolicyClientContext; + + /** + * Create a DataPolicyManifests. + * @param {PolicyClientContext} client Reference to the service client. + */ + constructor(client: PolicyClientContext) { + this.client = client; + } + + /** + * This operation retrieves the data policy manifest with the given policy mode. + * @summary Retrieves a data policy manifest. + * @param policyMode The policy mode of the data policy manifest to get. + * @param [options] The optional parameters + * @returns 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; + /** + * @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 { + return this.client.sendOperationRequest( + { + policyMode, + options + }, + getByPolicyModeOperationSpec, + callback) as Promise; + } + + /** + * This operation retrieves a list of all the data policy manifests that match the optional given + * $filter. Valid values for $filter are: "$filter=namespace eq '{0}'". If $filter is not provided, + * the unfiltered list includes all data policy manifests for data resource types. If + * $filter=namespace is provided, the returned list only includes all data policy manifests that + * have a namespace matching the provided value. + * @summary Retrieves data policy manifests + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.DataPolicyManifestsListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @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 { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * This operation retrieves a list of all the data policy manifests that match the optional given + * $filter. Valid values for $filter are: "$filter=namespace eq '{0}'". If $filter is not provided, + * the unfiltered list includes all data policy manifests for data resource types. If + * $filter=namespace is provided, the returned list only includes all data policy manifests that + * have a namespace matching the provided value. + * @summary Retrieves data policy manifests + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns 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; + /** + * @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 { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +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 + ], + responses: { + 200: { + bodyMapper: Mappers.DataPolicyManifest + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Authorization/dataPolicyManifests", + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataPolicyManifestListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataPolicyManifestListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/policy/arm-policy/src/operations/index.ts b/sdk/policy/arm-policy/src/operations/index.ts index 8fab2c121e51..6b7b36b67585 100644 --- a/sdk/policy/arm-policy/src/operations/index.ts +++ b/sdk/policy/arm-policy/src/operations/index.ts @@ -1,13 +1,14 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ +export * from "./dataPolicyManifests"; export * from "./policyAssignments"; export * from "./policyDefinitions"; export * from "./policySetDefinitions"; +export * from "./policyExemptions"; diff --git a/sdk/policy/arm-policy/src/operations/policyAssignments.ts b/sdk/policy/arm-policy/src/operations/policyAssignments.ts index 5faabeda2709..033b5b22f666 100644 --- a/sdk/policy/arm-policy/src/operations/policyAssignments.ts +++ b/sdk/policy/arm-policy/src/operations/policyAssignments.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -173,14 +172,16 @@ export class PolicyAssignments { /** * This operation retrieves the list of all policy assignments associated with the given resource * group in the given subscription that match the optional given $filter. Valid values for $filter - * are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the - * unfiltered list includes all policy assignments associated with the resource group, including - * those that apply directly or apply from containing scopes, as well as any applied to resources - * contained within the resource group. If $filter=atScope() is provided, the returned list - * includes all policy assignments that apply to the resource group, which is everything in the - * unfiltered list except those applied to resources contained within the resource group. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy - * assignments of the policy definition whose id is {value} that apply to the resource group. + * are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not + * provided, the unfiltered list includes all policy assignments associated with the resource + * group, including those that apply directly or apply from containing scopes, as well as any + * applied to resources contained within the resource group. If $filter=atScope() is provided, the + * returned list includes all policy assignments that apply to the resource group, which is + * everything in the unfiltered list except those applied to resources contained within the + * resource group. If $filter=atExactScope() is provided, the returned list only includes all + * policy assignments that at the resource group. If $filter=policyDefinitionId eq '{value}' is + * provided, the returned list includes all policy assignments of the policy definition whose id is + * {value} that apply to the resource group. * @summary Retrieves all policy assignments that apply to a resource group. * @param resourceGroupName The name of the resource group that contains policy assignments. * @param [options] The optional parameters @@ -211,21 +212,22 @@ export class PolicyAssignments { /** * This operation retrieves the list of all policy assignments associated with the specified * resource in the given resource group and subscription that match the optional given $filter. - * Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is - * not provided, the unfiltered list includes all policy assignments associated with the resource, - * including those that apply directly or from all containing scopes, as well as any applied to - * resources contained within the resource. If $filter=atScope() is provided, the returned list - * includes all policy assignments that apply to the resource, which is everything in the - * unfiltered list except those applied to resources contained within the resource. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy - * assignments of the policy definition whose id is {value} that apply to the resource. Three - * parameters plus the resource name are used to identify a specific resource. If the resource is - * not part of a parent resource (the more common case), the parent resource path should not be - * provided (or provided as ''). For example a web app could be specified as - * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == - * 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all - * parameters should be provided. For example a virtual machine DNS name could be specified as - * ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == + * Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq + * '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments + * associated with the resource, including those that apply directly or from all containing scopes, + * as well as any applied to resources contained within the resource. If $filter=atScope() is + * provided, the returned list includes all policy assignments that apply to the resource, which is + * everything in the unfiltered list except those applied to resources contained within the + * resource. If $filter=atExactScope() is provided, the returned list only includes all policy + * assignments that at the resource level. If $filter=policyDefinitionId eq '{value}' is provided, + * the returned list includes all policy assignments of the policy definition whose id is {value} + * that apply to the resource. Three parameters plus the resource name are used to identify a + * specific resource. If the resource is not part of a parent resource (the more common case), the + * parent resource path should not be provided (or provided as ''). For example a web app could be + * specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', + * {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent + * resource, then all parameters should be provided. For example a virtual machine DNS name could + * be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == * 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == * 'MyComputerName'). A convenient alternative to providing the namespace and type name separately * is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', @@ -282,42 +284,34 @@ export class PolicyAssignments { /** * This operation retrieves the list of all policy assignments applicable to the management group - * that match the given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId - * eq '{value}''. If $filter=atScope() is provided, the returned list includes all policy - * assignments that are assigned to the management group or the management group's ancestors. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy - * assignments of the policy definition whose id is {value} that apply to the management group. + * that match the given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or + * 'policyDefinitionId eq '{value}''. If $filter=atScope() is provided, the returned list includes + * all policy assignments that are assigned to the management group or the management group's + * ancestors. If $filter=atExactScope() is provided, the returned list only includes all policy + * assignments that at the management group. If $filter=policyDefinitionId eq '{value}' is + * provided, the returned list includes all policy assignments of the policy definition whose id is + * {value} that apply to the management group. * @summary Retrieves all policy assignments that apply to a management group. * @param managementGroupId The ID of the management group. - * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()' or - * 'policyDefinitionId eq '{value}''. A filter is required when listing policy assignments at - * management group scope. * @param [options] The optional parameters * @returns Promise */ - listForManagementGroup(managementGroupId: string, filter: string, options?: msRest.RequestOptionsBase): Promise; + listForManagementGroup(managementGroupId: string, options?: Models.PolicyAssignmentsListForManagementGroupOptionalParams): Promise; /** * @param managementGroupId The ID of the management group. - * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()' or - * 'policyDefinitionId eq '{value}''. A filter is required when listing policy assignments at - * management group scope. * @param callback The callback */ - listForManagementGroup(managementGroupId: string, filter: string, callback: msRest.ServiceCallback): void; + listForManagementGroup(managementGroupId: string, callback: msRest.ServiceCallback): void; /** * @param managementGroupId The ID of the management group. - * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()' or - * 'policyDefinitionId eq '{value}''. A filter is required when listing policy assignments at - * management group scope. * @param options The optional parameters * @param callback The callback */ - listForManagementGroup(managementGroupId: string, filter: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForManagementGroup(managementGroupId: string, filter: string, options?: msRest.RequestOptionsBase | 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, - filter, options }, listForManagementGroupOperationSpec, @@ -326,15 +320,16 @@ export class PolicyAssignments { /** * This operation retrieves the list of all policy assignments associated with the given - * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or - * 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all - * policy assignments associated with the subscription, including those that apply directly or from - * management groups that contain the given subscription, as well as any applied to objects - * contained within the subscription. If $filter=atScope() is provided, the returned list includes - * all policy assignments that apply to the subscription, which is everything in the unfiltered - * list except those applied to objects contained within the subscription. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy - * assignments of the policy definition whose id is {value}. + * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', + * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the + * unfiltered list includes all policy assignments associated with the subscription, including + * those that apply directly or from management groups that contain the given subscription, as well + * as any applied to objects contained within the subscription. If $filter=atScope() is provided, + * the returned list includes all policy assignments that apply to the subscription, which is + * everything in the unfiltered list except those applied to objects contained within the + * subscription. If $filter=atExactScope() is provided, the returned list only includes all policy + * assignments that at the subscription. If $filter=policyDefinitionId eq '{value}' is provided, + * the returned list includes all policy assignments of the policy definition whose id is {value}. * @summary Retrieves all policy assignments that apply to a subscription. * @param [options] The optional parameters * @returns Promise @@ -482,20 +477,22 @@ export class PolicyAssignments { /** * This operation retrieves the list of all policy assignments associated with the given resource * group in the given subscription that match the optional given $filter. Valid values for $filter - * are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the - * unfiltered list includes all policy assignments associated with the resource group, including - * those that apply directly or apply from containing scopes, as well as any applied to resources - * contained within the resource group. If $filter=atScope() is provided, the returned list - * includes all policy assignments that apply to the resource group, which is everything in the - * unfiltered list except those applied to resources contained within the resource group. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy - * assignments of the policy definition whose id is {value} that apply to the resource group. + * are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not + * provided, the unfiltered list includes all policy assignments associated with the resource + * group, including those that apply directly or apply from containing scopes, as well as any + * applied to resources contained within the resource group. If $filter=atScope() is provided, the + * returned list includes all policy assignments that apply to the resource group, which is + * everything in the unfiltered list except those applied to resources contained within the + * resource group. If $filter=atExactScope() is provided, the returned list only includes all + * policy assignments that at the resource group. If $filter=policyDefinitionId eq '{value}' is + * provided, the returned list includes all policy assignments of the policy definition whose id is + * {value} that apply to the resource group. * @summary Retrieves all policy assignments that apply to a resource group. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listForResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listForResourceGroupNext(nextPageLink: string, options?: Models.PolicyAssignmentsListForResourceGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -506,8 +503,8 @@ export class PolicyAssignments { * @param options The optional parameters * @param callback The callback */ - listForResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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, @@ -520,21 +517,22 @@ export class PolicyAssignments { /** * This operation retrieves the list of all policy assignments associated with the specified * resource in the given resource group and subscription that match the optional given $filter. - * Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is - * not provided, the unfiltered list includes all policy assignments associated with the resource, - * including those that apply directly or from all containing scopes, as well as any applied to - * resources contained within the resource. If $filter=atScope() is provided, the returned list - * includes all policy assignments that apply to the resource, which is everything in the - * unfiltered list except those applied to resources contained within the resource. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy - * assignments of the policy definition whose id is {value} that apply to the resource. Three - * parameters plus the resource name are used to identify a specific resource. If the resource is - * not part of a parent resource (the more common case), the parent resource path should not be - * provided (or provided as ''). For example a web app could be specified as - * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == - * 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all - * parameters should be provided. For example a virtual machine DNS name could be specified as - * ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == + * Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq + * '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments + * associated with the resource, including those that apply directly or from all containing scopes, + * as well as any applied to resources contained within the resource. If $filter=atScope() is + * provided, the returned list includes all policy assignments that apply to the resource, which is + * everything in the unfiltered list except those applied to resources contained within the + * resource. If $filter=atExactScope() is provided, the returned list only includes all policy + * assignments that at the resource level. If $filter=policyDefinitionId eq '{value}' is provided, + * the returned list includes all policy assignments of the policy definition whose id is {value} + * that apply to the resource. Three parameters plus the resource name are used to identify a + * specific resource. If the resource is not part of a parent resource (the more common case), the + * parent resource path should not be provided (or provided as ''). For example a web app could be + * specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', + * {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent + * resource, then all parameters should be provided. For example a virtual machine DNS name could + * be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == * 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == * 'MyComputerName'). A convenient alternative to providing the namespace and type name separately * is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', @@ -545,7 +543,7 @@ export class PolicyAssignments { * @param [options] The optional parameters * @returns Promise */ - listForResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listForResourceNext(nextPageLink: string, options?: Models.PolicyAssignmentsListForResourceNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -556,8 +554,8 @@ export class PolicyAssignments { * @param options The optional parameters * @param callback The callback */ - listForResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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, @@ -569,17 +567,19 @@ export class PolicyAssignments { /** * This operation retrieves the list of all policy assignments applicable to the management group - * that match the given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId - * eq '{value}''. If $filter=atScope() is provided, the returned list includes all policy - * assignments that are assigned to the management group or the management group's ancestors. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy - * assignments of the policy definition whose id is {value} that apply to the management group. + * that match the given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or + * 'policyDefinitionId eq '{value}''. If $filter=atScope() is provided, the returned list includes + * all policy assignments that are assigned to the management group or the management group's + * ancestors. If $filter=atExactScope() is provided, the returned list only includes all policy + * assignments that at the management group. If $filter=policyDefinitionId eq '{value}' is + * provided, the returned list includes all policy assignments of the policy definition whose id is + * {value} that apply to the management group. * @summary Retrieves all policy assignments that apply to a management group. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listForManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listForManagementGroupNext(nextPageLink: string, options?: Models.PolicyAssignmentsListForManagementGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -590,8 +590,8 @@ export class PolicyAssignments { * @param options The optional parameters * @param callback The callback */ - listForManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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, @@ -603,21 +603,22 @@ export class PolicyAssignments { /** * This operation retrieves the list of all policy assignments associated with the given - * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or - * 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all - * policy assignments associated with the subscription, including those that apply directly or from - * management groups that contain the given subscription, as well as any applied to objects - * contained within the subscription. If $filter=atScope() is provided, the returned list includes - * all policy assignments that apply to the subscription, which is everything in the unfiltered - * list except those applied to objects contained within the subscription. If - * $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy - * assignments of the policy definition whose id is {value}. + * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', + * 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the + * unfiltered list includes all policy assignments associated with the subscription, including + * those that apply directly or from management groups that contain the given subscription, as well + * as any applied to objects contained within the subscription. If $filter=atScope() is provided, + * the returned list includes all policy assignments that apply to the subscription, which is + * everything in the unfiltered list except those applied to objects contained within the + * subscription. If $filter=atExactScope() is provided, the returned list only includes all policy + * assignments that at the subscription. If $filter=policyDefinitionId eq '{value}' is provided, + * the returned list includes all policy assignments of the policy definition whose id is {value}. * @summary Retrieves all policy assignments that apply to a subscription. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.PolicyAssignmentsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -628,8 +629,8 @@ export class PolicyAssignments { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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, @@ -650,7 +651,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.policyAssignmentName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -675,7 +676,7 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.policyAssignmentName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -706,7 +707,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.policyAssignmentName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -730,8 +731,9 @@ const listForResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.filter0, - Parameters.apiVersion + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -749,7 +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, @@ -759,8 +761,9 @@ const listForResourceOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.filter1, - Parameters.apiVersion + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -778,13 +781,14 @@ const listForResourceOperationSpec: msRest.OperationSpec = { const listForManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyAssignments", + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyAssignments", urlParameters: [ Parameters.managementGroupId ], queryParameters: [ - Parameters.filter2, - Parameters.apiVersion + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -807,8 +811,9 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.filter1, - Parameters.apiVersion + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -831,7 +836,7 @@ const deleteByIdOperationSpec: msRest.OperationSpec = { Parameters.policyAssignmentId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -855,7 +860,7 @@ const createByIdOperationSpec: msRest.OperationSpec = { Parameters.policyAssignmentId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -885,7 +890,7 @@ const getByIdOperationSpec: msRest.OperationSpec = { Parameters.policyAssignmentId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -908,6 +913,11 @@ const listForResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -929,6 +939,11 @@ const listForResourceNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -950,6 +965,11 @@ const listForManagementGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -971,6 +991,11 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/policy/arm-policy/src/operations/policyDefinitions.ts b/sdk/policy/arm-policy/src/operations/policyDefinitions.ts index b2d5d0e40635..753246d80406 100644 --- a/sdk/policy/arm-policy/src/operations/policyDefinitions.ts +++ b/sdk/policy/arm-policy/src/operations/policyDefinitions.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -253,12 +252,21 @@ export class PolicyDefinitions { } /** - * This operation retrieves a list of all the policy definitions in a given subscription. + * This operation retrieves a list of all the policy definitions in a given subscription that match + * the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType -eq + * {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered list includes + * all policy definitions associated with the subscription, including those that apply directly or + * from management groups that contain the given subscription. If $filter=atExactScope() is + * provided, the returned list only includes all policy definitions that at the given subscription. + * If $filter='policyType -eq {value}' is provided, the returned list only includes all policy + * definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, + * Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only + * includes all policy definitions whose category match the {value}. * @summary Retrieves policy definitions in a subscription * @param [options] The optional parameters * @returns Promise */ - list(options?: msRest.RequestOptionsBase): Promise; + list(options?: Models.PolicyDefinitionsListOptionalParams): Promise; /** * @param callback The callback */ @@ -267,8 +275,8 @@ export class PolicyDefinitions { * @param options The optional parameters * @param callback The callback */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(options: Models.PolicyDefinitionsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.PolicyDefinitionsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -278,12 +286,16 @@ export class PolicyDefinitions { } /** - * This operation retrieves a list of all the built-in policy definitions. + * This operation retrieves a list of all the built-in policy definitions that match the optional + * given $filter. If $filter='policyType -eq {value}' is provided, the returned list only includes + * all built-in policy definitions whose type match the {value}. Possible policyType values are + * NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the + * returned list only includes all built-in policy definitions whose category match the {value}. * @summary Retrieve built-in policy definitions * @param [options] The optional parameters * @returns Promise */ - listBuiltIn(options?: msRest.RequestOptionsBase): Promise; + listBuiltIn(options?: Models.PolicyDefinitionsListBuiltInOptionalParams): Promise; /** * @param callback The callback */ @@ -292,8 +304,8 @@ export class PolicyDefinitions { * @param options The optional parameters * @param callback The callback */ - listBuiltIn(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBuiltIn(options?: msRest.RequestOptionsBase | 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 @@ -303,13 +315,23 @@ export class PolicyDefinitions { } /** - * This operation retrieves a list of all the policy definitions in a given management group. + * This operation retrieves a list of all the policy definitions in a given management group that + * match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType + * -eq {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered list + * includes all policy definitions associated with the management group, including those that apply + * directly or from management groups that contain the given management group. If + * $filter=atExactScope() is provided, the returned list only includes all policy definitions that + * at the given management group. If $filter='policyType -eq {value}' is provided, the returned + * list only includes all policy definitions whose type match the {value}. Possible policyType + * values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is + * provided, the returned list only includes all policy definitions whose category match the + * {value}. * @summary Retrieve policy definitions in a management group * @param managementGroupId The ID of the management group. * @param [options] The optional parameters * @returns Promise */ - listByManagementGroup(managementGroupId: string, options?: msRest.RequestOptionsBase): Promise; + listByManagementGroup(managementGroupId: string, options?: Models.PolicyDefinitionsListByManagementGroupOptionalParams): Promise; /** * @param managementGroupId The ID of the management group. * @param callback The callback @@ -320,8 +342,8 @@ export class PolicyDefinitions { * @param options The optional parameters * @param callback The callback */ - listByManagementGroup(managementGroupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByManagementGroup(managementGroupId: string, options?: msRest.RequestOptionsBase | 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, @@ -332,13 +354,22 @@ export class PolicyDefinitions { } /** - * This operation retrieves a list of all the policy definitions in a given subscription. + * This operation retrieves a list of all the policy definitions in a given subscription that match + * the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType -eq + * {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered list includes + * all policy definitions associated with the subscription, including those that apply directly or + * from management groups that contain the given subscription. If $filter=atExactScope() is + * provided, the returned list only includes all policy definitions that at the given subscription. + * If $filter='policyType -eq {value}' is provided, the returned list only includes all policy + * definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, + * Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only + * includes all policy definitions whose category match the {value}. * @summary Retrieves policy definitions in a subscription * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.PolicyDefinitionsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -349,8 +380,8 @@ export class PolicyDefinitions { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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, @@ -361,13 +392,17 @@ export class PolicyDefinitions { } /** - * This operation retrieves a list of all the built-in policy definitions. + * This operation retrieves a list of all the built-in policy definitions that match the optional + * given $filter. If $filter='policyType -eq {value}' is provided, the returned list only includes + * all built-in policy definitions whose type match the {value}. Possible policyType values are + * NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the + * returned list only includes all built-in policy definitions whose category match the {value}. * @summary Retrieve built-in policy definitions * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listBuiltInNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listBuiltInNext(nextPageLink: string, options?: Models.PolicyDefinitionsListBuiltInNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -378,8 +413,8 @@ export class PolicyDefinitions { * @param options The optional parameters * @param callback The callback */ - listBuiltInNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBuiltInNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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, @@ -390,13 +425,23 @@ export class PolicyDefinitions { } /** - * This operation retrieves a list of all the policy definitions in a given management group. + * This operation retrieves a list of all the policy definitions in a given management group that + * match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType + * -eq {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered list + * includes all policy definitions associated with the management group, including those that apply + * directly or from management groups that contain the given management group. If + * $filter=atExactScope() is provided, the returned list only includes all policy definitions that + * at the given management group. If $filter='policyType -eq {value}' is provided, the returned + * list only includes all policy definitions whose type match the {value}. Possible policyType + * values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is + * provided, the returned list only includes all policy definitions whose category match the + * {value}. * @summary Retrieve policy definitions in a management group * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByManagementGroupNext(nextPageLink: string, options?: Models.PolicyDefinitionsListByManagementGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -407,8 +452,8 @@ export class PolicyDefinitions { * @param options The optional parameters * @param callback The callback */ - listByManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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, @@ -429,7 +474,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -460,7 +505,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -483,7 +528,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -506,7 +551,7 @@ const getBuiltInOperationSpec: msRest.OperationSpec = { Parameters.policyDefinitionName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -524,13 +569,13 @@ const getBuiltInOperationSpec: msRest.OperationSpec = { const createOrUpdateAtManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", urlParameters: [ Parameters.policyDefinitionName, Parameters.managementGroupId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -555,13 +600,13 @@ const createOrUpdateAtManagementGroupOperationSpec: msRest.OperationSpec = { const deleteAtManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", urlParameters: [ Parameters.policyDefinitionName, Parameters.managementGroupId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -578,13 +623,13 @@ const deleteAtManagementGroupOperationSpec: msRest.OperationSpec = { const getAtManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}", urlParameters: [ Parameters.policyDefinitionName, Parameters.managementGroupId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -607,7 +652,9 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0, + Parameters.filter, + Parameters.top ], headerParameters: [ Parameters.acceptLanguage @@ -627,7 +674,9 @@ const listBuiltInOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Authorization/policyDefinitions", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0, + Parameters.filter, + Parameters.top ], headerParameters: [ Parameters.acceptLanguage @@ -645,12 +694,14 @@ const listBuiltInOperationSpec: msRest.OperationSpec = { const listByManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions", + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions", urlParameters: [ Parameters.managementGroupId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0, + Parameters.filter, + Parameters.top ], headerParameters: [ Parameters.acceptLanguage @@ -673,6 +724,11 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], headerParameters: [ Parameters.acceptLanguage ], @@ -694,6 +750,11 @@ const listBuiltInNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], headerParameters: [ Parameters.acceptLanguage ], @@ -715,6 +776,11 @@ const listByManagementGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/policy/arm-policy/src/operations/policyExemptions.ts b/sdk/policy/arm-policy/src/operations/policyExemptions.ts new file mode 100644 index 000000000000..ec979b5c2c0c --- /dev/null +++ b/sdk/policy/arm-policy/src/operations/policyExemptions.ts @@ -0,0 +1,769 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/policyExemptionsMappers"; +import * as Parameters from "../models/parameters"; +import { PolicyClientContext } from "../policyClientContext"; + +/** Class representing a PolicyExemptions. */ +export class PolicyExemptions { + private readonly client: PolicyClientContext; + + /** + * Create a PolicyExemptions. + * @param {PolicyClientContext} client Reference to the service client. + */ + constructor(client: PolicyClientContext) { + this.client = client; + } + + /** + * This operation deletes a policy exemption, given its name and the scope it was created in. The + * scope of a policy exemption is the part of its ID preceding + * '/providers/Microsoft.Authorization/policyExemptions/{policyExemptionName}'. + * @summary Deletes a policy exemption. + * @param scope The scope of the policy exemption. Valid scopes are: management group (format: + * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param policyExemptionName The name of the policy exemption to delete. + * @param [options] The optional parameters + * @returns 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: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param policyExemptionName The name of the policy exemption to delete. + * @param callback The callback + */ + 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: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param policyExemptionName The name of the policy exemption to delete. + * @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 { + return this.client.sendOperationRequest( + { + scope, + policyExemptionName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * This operation creates or updates a policy exemption with the given scope and name. Policy + * exemptions apply to all resources contained within their scope. For example, when you create a + * policy exemption at resource group scope for a policy assignment at the same or above level, the + * exemption exempts to all applicable resources in the resource group. + * @summary Creates or updates a policy exemption. + * @param scope The scope of the policy exemption. Valid scopes are: management group (format: + * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param policyExemptionName The name of the policy exemption to delete. + * @param parameters Parameters for the policy exemption. + * @param [options] The optional parameters + * @returns 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: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param policyExemptionName The name of the policy exemption to delete. + * @param parameters Parameters for the policy exemption. + * @param callback The callback + */ + 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: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param policyExemptionName The name of the policy exemption to delete. + * @param parameters Parameters for the policy exemption. + * @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 { + return this.client.sendOperationRequest( + { + scope, + policyExemptionName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * This operation retrieves a single policy exemption, given its name and the scope it was created + * at. + * @summary Retrieves a policy exemption. + * @param scope The scope of the policy exemption. Valid scopes are: management group (format: + * '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param policyExemptionName The name of the policy exemption to delete. + * @param [options] The optional parameters + * @returns 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: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param policyExemptionName The name of the policy exemption to delete. + * @param callback The callback + */ + 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: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param policyExemptionName The name of the policy exemption to delete. + * @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 { + return this.client.sendOperationRequest( + { + scope, + policyExemptionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * This operation retrieves the list of all policy exemptions associated with the given + * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', + * 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter is not + * provided, the unfiltered list includes all policy exemptions associated with the subscription, + * including those that apply directly or from management groups that contain the given + * subscription, as well as any applied to objects contained within the subscription. + * @summary Retrieves all policy exemptions that apply to a subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.PolicyExemptionsListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @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 { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * This operation retrieves the list of all policy exemptions associated with the given resource + * group in the given subscription that match the optional given $filter. Valid values for $filter + * are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If + * $filter is not provided, the unfiltered list includes all policy exemptions associated with the + * resource group, including those that apply directly or apply from containing scopes, as well as + * any applied to resources contained within the resource group. + * @summary Retrieves all policy exemptions that apply to a resource group. + * @param resourceGroupName The name of the resource group containing the resource. + * @param [options] The optional parameters + * @returns 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; + /** + * @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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listForResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * This operation retrieves the list of all policy exemptions associated with the specified + * resource in the given resource group and subscription that match the optional given $filter. + * Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or + * 'policyAssignmentId eq '{value}''. If $filter is not provided, the unfiltered list includes all + * policy exemptions associated with the resource, including those that apply directly or from all + * containing scopes, as well as any applied to resources contained within the resource. Three + * parameters plus the resource name are used to identify a specific resource. If the resource is + * not part of a parent resource (the more common case), the parent resource path should not be + * provided (or provided as ''). For example a web app could be specified as + * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == + * 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all + * parameters should be provided. For example a virtual machine DNS name could be specified as + * ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == + * 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == + * 'MyComputerName'). A convenient alternative to providing the namespace and type name separately + * is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', + * {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == + * 'MyWebApp'). + * @summary Retrieves all policy exemptions that apply to a resource. + * @param resourceGroupName The name of the resource group containing the resource. + * @param resourceProviderNamespace The namespace of the resource provider. For example, the + * namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines) + * @param parentResourcePath The parent resource path. Use empty string if there is none. + * @param resourceType The resource type name. For example the type name of a web app is 'sites' + * (from Microsoft.Web/sites). + * @param resourceName The name of the resource. + * @param [options] The optional parameters + * @returns 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 + * namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines) + * @param parentResourcePath The parent resource path. Use empty string if there is none. + * @param resourceType The resource type name. For example the type name of a web app is 'sites' + * (from Microsoft.Web/sites). + * @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; + /** + * @param resourceGroupName The name of the resource group containing the resource. + * @param resourceProviderNamespace The namespace of the resource provider. For example, the + * namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines) + * @param parentResourcePath The parent resource path. Use empty string if there is none. + * @param resourceType The resource type name. For example the type name of a web app is 'sites' + * (from Microsoft.Web/sites). + * @param resourceName The name of the resource. + * @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 { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceProviderNamespace, + parentResourcePath, + resourceType, + resourceName, + options + }, + listForResourceOperationSpec, + callback) as Promise; + } + + /** + * This operation retrieves the list of all policy exemptions applicable to the management group + * that match the given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()', + * 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter=atScope() is provided, the + * returned list includes all policy exemptions that are assigned to the management group or the + * management group's ancestors. + * @summary Retrieves all policy exemptions that apply to a management group. + * @param managementGroupId The ID of the management group. + * @param [options] The optional parameters + * @returns 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; + /** + * @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 { + return this.client.sendOperationRequest( + { + managementGroupId, + options + }, + listForManagementGroupOperationSpec, + callback) as Promise; + } + + /** + * This operation retrieves the list of all policy exemptions associated with the given + * subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', + * 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter is not + * provided, the unfiltered list includes all policy exemptions associated with the subscription, + * including those that apply directly or from management groups that contain the given + * subscription, as well as any applied to objects contained within the subscription. + * @summary Retrieves all policy exemptions that apply to a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns 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; + /** + * @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 { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * This operation retrieves the list of all policy exemptions associated with the given resource + * group in the given subscription that match the optional given $filter. Valid values for $filter + * are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If + * $filter is not provided, the unfiltered list includes all policy exemptions associated with the + * resource group, including those that apply directly or apply from containing scopes, as well as + * any applied to resources contained within the resource group. + * @summary Retrieves all policy exemptions that apply to a resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns 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; + /** + * @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 { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listForResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * This operation retrieves the list of all policy exemptions associated with the specified + * resource in the given resource group and subscription that match the optional given $filter. + * Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or + * 'policyAssignmentId eq '{value}''. If $filter is not provided, the unfiltered list includes all + * policy exemptions associated with the resource, including those that apply directly or from all + * containing scopes, as well as any applied to resources contained within the resource. Three + * parameters plus the resource name are used to identify a specific resource. If the resource is + * not part of a parent resource (the more common case), the parent resource path should not be + * provided (or provided as ''). For example a web app could be specified as + * ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == + * 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all + * parameters should be provided. For example a virtual machine DNS name could be specified as + * ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == + * 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == + * 'MyComputerName'). A convenient alternative to providing the namespace and type name separately + * is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', + * {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == + * 'MyWebApp'). + * @summary Retrieves all policy exemptions that apply to a resource. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns 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; + /** + * @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 { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listForResourceNextOperationSpec, + callback) as Promise; + } + + /** + * This operation retrieves the list of all policy exemptions applicable to the management group + * that match the given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()', + * 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter=atScope() is provided, the + * returned list includes all policy exemptions that are assigned to the management group or the + * management group's ancestors. + * @summary Retrieves all policy exemptions that apply to a management group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns 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; + /** + * @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 { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listForManagementGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +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 + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "{scope}/providers/Microsoft.Authorization/policyExemptions/{policyExemptionName}", + urlParameters: [ + Parameters.scope, + Parameters.policyExemptionName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PolicyExemption, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PolicyExemption + }, + 201: { + bodyMapper: Mappers.PolicyExemption + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/policyExemptions/{policyExemptionName}", + urlParameters: [ + Parameters.scope, + Parameters.policyExemptionName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PolicyExemption + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyExemptions", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PolicyExemptionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +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 + ], + responses: { + 200: { + bodyMapper: Mappers.PolicyExemptionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyExemptions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceProviderNamespace, + Parameters.parentResourcePath, + Parameters.resourceType, + Parameters.resourceName + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PolicyExemptionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +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 + ], + responses: { + 200: { + bodyMapper: Mappers.PolicyExemptionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PolicyExemptionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PolicyExemptionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForResourceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PolicyExemptionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForManagementGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PolicyExemptionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/policy/arm-policy/src/operations/policySetDefinitions.ts b/sdk/policy/arm-policy/src/operations/policySetDefinitions.ts index 5cce445c14f0..b0612527cec9 100644 --- a/sdk/policy/arm-policy/src/operations/policySetDefinitions.ts +++ b/sdk/policy/arm-policy/src/operations/policySetDefinitions.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -149,12 +148,21 @@ export class PolicySetDefinitions { } /** - * This operation retrieves a list of all the policy set definitions in the given subscription. + * This operation retrieves a list of all the policy set definitions in a given subscription that + * match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType + * -eq {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered list + * includes all policy set definitions associated with the subscription, including those that apply + * directly or from management groups that contain the given subscription. If + * $filter=atExactScope() is provided, the returned list only includes all policy set definitions + * that at the given subscription. If $filter='policyType -eq {value}' is provided, the returned + * list only includes all policy set definitions whose type match the {value}. Possible policyType + * values are NotSpecified, BuiltIn and Custom. If $filter='category -eq {value}' is provided, the + * returned list only includes all policy set definitions whose category match the {value}. * @summary Retrieves the policy set definitions for a subscription. * @param [options] The optional parameters * @returns Promise */ - list(options?: msRest.RequestOptionsBase): Promise; + list(options?: Models.PolicySetDefinitionsListOptionalParams): Promise; /** * @param callback The callback */ @@ -163,8 +171,8 @@ export class PolicySetDefinitions { * @param options The optional parameters * @param callback The callback */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(options: Models.PolicySetDefinitionsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.PolicySetDefinitionsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -174,12 +182,14 @@ export class PolicySetDefinitions { } /** - * This operation retrieves a list of all the built-in policy set definitions. + * This operation retrieves a list of all the built-in policy set definitions that match the + * optional given $filter. If $filter='category -eq {value}' is provided, the returned list only + * includes all built-in policy set definitions whose category match the {value}. * @summary Retrieves built-in policy set definitions. * @param [options] The optional parameters * @returns Promise */ - listBuiltIn(options?: msRest.RequestOptionsBase): Promise; + listBuiltIn(options?: Models.PolicySetDefinitionsListBuiltInOptionalParams): Promise; /** * @param callback The callback */ @@ -188,8 +198,8 @@ export class PolicySetDefinitions { * @param options The optional parameters * @param callback The callback */ - listBuiltIn(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBuiltIn(options?: msRest.RequestOptionsBase | 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 @@ -305,14 +315,23 @@ export class PolicySetDefinitions { } /** - * This operation retrieves a list of all the a policy set definition in the given management - * group. + * This operation retrieves a list of all the policy set definitions in a given management group + * that match the optional given $filter. Valid values for $filter are: 'atExactScope()', + * 'policyType -eq {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered + * list includes all policy set definitions associated with the management group, including those + * that apply directly or from management groups that contain the given management group. If + * $filter=atExactScope() is provided, the returned list only includes all policy set definitions + * that at the given management group. If $filter='policyType -eq {value}' is provided, the + * returned list only includes all policy set definitions whose type match the {value}. Possible + * policyType values are NotSpecified, BuiltIn and Custom. If $filter='category -eq {value}' is + * provided, the returned list only includes all policy set definitions whose category match the + * {value}. * @summary Retrieves all policy set definitions in management group. * @param managementGroupId The ID of the management group. * @param [options] The optional parameters * @returns Promise */ - listByManagementGroup(managementGroupId: string, options?: msRest.RequestOptionsBase): Promise; + listByManagementGroup(managementGroupId: string, options?: Models.PolicySetDefinitionsListByManagementGroupOptionalParams): Promise; /** * @param managementGroupId The ID of the management group. * @param callback The callback @@ -323,8 +342,8 @@ export class PolicySetDefinitions { * @param options The optional parameters * @param callback The callback */ - listByManagementGroup(managementGroupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByManagementGroup(managementGroupId: string, options?: msRest.RequestOptionsBase | 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, @@ -335,13 +354,22 @@ export class PolicySetDefinitions { } /** - * This operation retrieves a list of all the policy set definitions in the given subscription. + * This operation retrieves a list of all the policy set definitions in a given subscription that + * match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType + * -eq {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered list + * includes all policy set definitions associated with the subscription, including those that apply + * directly or from management groups that contain the given subscription. If + * $filter=atExactScope() is provided, the returned list only includes all policy set definitions + * that at the given subscription. If $filter='policyType -eq {value}' is provided, the returned + * list only includes all policy set definitions whose type match the {value}. Possible policyType + * values are NotSpecified, BuiltIn and Custom. If $filter='category -eq {value}' is provided, the + * returned list only includes all policy set definitions whose category match the {value}. * @summary Retrieves the policy set definitions for a subscription. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.PolicySetDefinitionsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -352,8 +380,8 @@ export class PolicySetDefinitions { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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, @@ -364,13 +392,15 @@ export class PolicySetDefinitions { } /** - * This operation retrieves a list of all the built-in policy set definitions. + * This operation retrieves a list of all the built-in policy set definitions that match the + * optional given $filter. If $filter='category -eq {value}' is provided, the returned list only + * includes all built-in policy set definitions whose category match the {value}. * @summary Retrieves built-in policy set definitions. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listBuiltInNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listBuiltInNext(nextPageLink: string, options?: Models.PolicySetDefinitionsListBuiltInNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -381,8 +411,8 @@ export class PolicySetDefinitions { * @param options The optional parameters * @param callback The callback */ - listBuiltInNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBuiltInNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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, @@ -393,14 +423,23 @@ export class PolicySetDefinitions { } /** - * This operation retrieves a list of all the a policy set definition in the given management - * group. + * This operation retrieves a list of all the policy set definitions in a given management group + * that match the optional given $filter. Valid values for $filter are: 'atExactScope()', + * 'policyType -eq {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered + * list includes all policy set definitions associated with the management group, including those + * that apply directly or from management groups that contain the given management group. If + * $filter=atExactScope() is provided, the returned list only includes all policy set definitions + * that at the given management group. If $filter='policyType -eq {value}' is provided, the + * returned list only includes all policy set definitions whose type match the {value}. Possible + * policyType values are NotSpecified, BuiltIn and Custom. If $filter='category -eq {value}' is + * provided, the returned list only includes all policy set definitions whose category match the + * {value}. * @summary Retrieves all policy set definitions in management group. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByManagementGroupNext(nextPageLink: string, options?: Models.PolicySetDefinitionsListByManagementGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -411,8 +450,8 @@ export class PolicySetDefinitions { * @param options The optional parameters * @param callback The callback */ - listByManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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, @@ -433,7 +472,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -467,7 +506,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -490,7 +529,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -513,7 +552,7 @@ const getBuiltInOperationSpec: msRest.OperationSpec = { Parameters.policySetDefinitionName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -536,7 +575,9 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0, + Parameters.filter, + Parameters.top ], headerParameters: [ Parameters.acceptLanguage @@ -556,7 +597,9 @@ const listBuiltInOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Authorization/policySetDefinitions", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0, + Parameters.filter, + Parameters.top ], headerParameters: [ Parameters.acceptLanguage @@ -574,13 +617,13 @@ const listBuiltInOperationSpec: msRest.OperationSpec = { const createOrUpdateAtManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", urlParameters: [ Parameters.policySetDefinitionName, Parameters.managementGroupId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -608,13 +651,13 @@ const createOrUpdateAtManagementGroupOperationSpec: msRest.OperationSpec = { const deleteAtManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", urlParameters: [ Parameters.policySetDefinitionName, Parameters.managementGroupId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -631,13 +674,13 @@ const deleteAtManagementGroupOperationSpec: msRest.OperationSpec = { const getAtManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}", urlParameters: [ Parameters.policySetDefinitionName, Parameters.managementGroupId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -655,12 +698,14 @@ const getAtManagementGroupOperationSpec: msRest.OperationSpec = { const listByManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions", + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions", urlParameters: [ Parameters.managementGroupId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0, + Parameters.filter, + Parameters.top ], headerParameters: [ Parameters.acceptLanguage @@ -683,6 +728,11 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], headerParameters: [ Parameters.acceptLanguage ], @@ -704,6 +754,11 @@ const listBuiltInNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], headerParameters: [ Parameters.acceptLanguage ], @@ -725,6 +780,11 @@ const listByManagementGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter, + Parameters.top + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/policy/arm-policy/src/policyClient.ts b/sdk/policy/arm-policy/src/policyClient.ts index dc8f8dbde966..ada99d5622a2 100644 --- a/sdk/policy/arm-policy/src/policyClient.ts +++ b/sdk/policy/arm-policy/src/policyClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -17,9 +16,11 @@ import { PolicyClientContext } from "./policyClientContext"; class PolicyClient extends PolicyClientContext { // Operation groups + dataPolicyManifests: operations.DataPolicyManifests; policyAssignments: operations.PolicyAssignments; policyDefinitions: operations.PolicyDefinitions; policySetDefinitions: operations.PolicySetDefinitions; + policyExemptions: operations.PolicyExemptions; /** * Initializes a new instance of the PolicyClient class. @@ -29,9 +30,11 @@ class PolicyClient extends PolicyClientContext { */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PolicyClientOptions) { super(credentials, subscriptionId, options); + this.dataPolicyManifests = new operations.DataPolicyManifests(this); this.policyAssignments = new operations.PolicyAssignments(this); this.policyDefinitions = new operations.PolicyDefinitions(this); this.policySetDefinitions = new operations.PolicySetDefinitions(this); + this.policyExemptions = new operations.PolicyExemptions(this); } } diff --git a/sdk/policy/arm-policy/src/policyClientContext.ts b/sdk/policy/arm-policy/src/policyClientContext.ts index 60c107079f2e..b0f3c71791a7 100644 --- a/sdk/policy/arm-policy/src/policyClientContext.ts +++ b/sdk/policy/arm-policy/src/policyClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -18,7 +17,6 @@ const packageVersion = "3.1.0"; export class PolicyClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; subscriptionId: string; - apiVersion?: string; /** * Initializes a new instance of the PolicyClient class. @@ -44,7 +42,6 @@ export class PolicyClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2019-09-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";