diff --git a/sdk/authorization/arm-authorization/LICENSE.txt b/sdk/authorization/arm-authorization/LICENSE.txt index b73b4a1293c3..2d3163745319 100644 --- a/sdk/authorization/arm-authorization/LICENSE.txt +++ b/sdk/authorization/arm-authorization/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 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/authorization/arm-authorization/README.md b/sdk/authorization/arm-authorization/README.md index 97a2b1e7248b..dccfe0880694 100644 --- a/sdk/authorization/arm-authorization/README.md +++ b/sdk/authorization/arm-authorization/README.md @@ -1,11 +1,11 @@ ## Azure AuthorizationManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AuthorizationManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for AuthorizationManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-authorization @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,8 +36,7 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - -#### nodejs - Authentication, client creation, and list classicAdministrators as an example written in JavaScript. +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code @@ -51,8 +49,7 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); const client = new AuthorizationManagementClient(creds, subscriptionId); - -client.classicAdministrators.list().then((result) => { +client.operations.list().then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -61,7 +58,7 @@ client.classicAdministrators.list().then((result) => { }); ``` -#### browser - Authentication, client creation, and list classicAdministrators as an example written in JavaScript. +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. @@ -86,10 +83,10 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmAuthorization.AuthorizationManagementClient(creds, subscriptionId); - client.classicAdministrators.list().then((result) => { + client.operations.list().then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { diff --git a/sdk/authorization/arm-authorization/package.json b/sdk/authorization/arm-authorization/package.json index 1548f027e8c2..d36c8f8599c7 100644 --- a/sdk/authorization/arm-authorization/package.json +++ b/sdk/authorization/arm-authorization/package.json @@ -7,7 +7,7 @@ "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", "@azure/core-auth": "^1.1.4", - "tslib": "^1.9.3" + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -22,12 +22,12 @@ "types": "./esm/authorizationManagementClient.d.ts", "devDependencies": { "typescript": "^3.6.0", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/authorization/arm-authorization", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/authorization/arm-authorization", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/authorization/arm-authorization/rollup.config.js b/sdk/authorization/arm-authorization/rollup.config.js index 72dc3f8ec5c7..f7a42353330a 100644 --- a/sdk/authorization/arm-authorization/rollup.config.js +++ b/sdk/authorization/arm-authorization/rollup.config.js @@ -21,15 +21,15 @@ 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. */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/authorization/arm-authorization/src/authorizationManagementClient.ts b/sdk/authorization/arm-authorization/src/authorizationManagementClient.ts index b970948c40cb..de9ebf3a45fd 100644 --- a/sdk/authorization/arm-authorization/src/authorizationManagementClient.ts +++ b/sdk/authorization/arm-authorization/src/authorizationManagementClient.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,13 +17,30 @@ import { AuthorizationManagementClientContext } from "./authorizationManagementC class AuthorizationManagementClient extends AuthorizationManagementClientContext { // Operation groups - classicAdministrators: operations.ClassicAdministrators; - globalAdministrator: operations.GlobalAdministrator; + operations: operations.Operations; + accessReviewScheduleDefinitions: operations.AccessReviewScheduleDefinitions; + accessReviewInstances: operations.AccessReviewInstances; + accessReviewInstance: operations.AccessReviewInstanceOperations; + accessReviewInstanceDecisions: operations.AccessReviewInstanceDecisions; + accessReviewDefaultSettings: operations.AccessReviewDefaultSettingsOperations; + accessReviewScheduleDefinitionsAssignedForMyApproval: operations.AccessReviewScheduleDefinitionsAssignedForMyApproval; + accessReviewInstancesAssignedForMyApproval: operations.AccessReviewInstancesAssignedForMyApproval; + accessReviewInstanceMyDecisions: operations.AccessReviewInstanceMyDecisions; + denyAssignments: operations.DenyAssignments; providerOperationsMetadata: operations.ProviderOperationsMetadataOperations; roleAssignments: operations.RoleAssignments; permissions: operations.Permissions; roleDefinitions: operations.RoleDefinitions; - denyAssignments: operations.DenyAssignments; + roleAssignmentMetrics: operations.RoleAssignmentMetrics; + eligibleChildResources: operations.EligibleChildResources; + roleAssignmentSchedules: operations.RoleAssignmentSchedules; + roleAssignmentScheduleInstances: operations.RoleAssignmentScheduleInstances; + roleAssignmentScheduleRequests: operations.RoleAssignmentScheduleRequests; + roleEligibilitySchedules: operations.RoleEligibilitySchedules; + roleEligibilityScheduleInstances: operations.RoleEligibilityScheduleInstances; + roleEligibilityScheduleRequests: operations.RoleEligibilityScheduleRequests; + roleManagementPolicies: operations.RoleManagementPolicies; + roleManagementPolicyAssignments: operations.RoleManagementPolicyAssignments; /** * Initializes a new instance of the AuthorizationManagementClient class. @@ -39,13 +55,30 @@ class AuthorizationManagementClient extends AuthorizationManagementClientContext */ constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AuthorizationManagementClientOptions) { super(credentials, subscriptionId, options); - this.classicAdministrators = new operations.ClassicAdministrators(this); - this.globalAdministrator = new operations.GlobalAdministrator(this); + this.operations = new operations.Operations(this); + this.accessReviewScheduleDefinitions = new operations.AccessReviewScheduleDefinitions(this); + this.accessReviewInstances = new operations.AccessReviewInstances(this); + this.accessReviewInstance = new operations.AccessReviewInstanceOperations(this); + this.accessReviewInstanceDecisions = new operations.AccessReviewInstanceDecisions(this); + this.accessReviewDefaultSettings = new operations.AccessReviewDefaultSettingsOperations(this); + this.accessReviewScheduleDefinitionsAssignedForMyApproval = new operations.AccessReviewScheduleDefinitionsAssignedForMyApproval(this); + this.accessReviewInstancesAssignedForMyApproval = new operations.AccessReviewInstancesAssignedForMyApproval(this); + this.accessReviewInstanceMyDecisions = new operations.AccessReviewInstanceMyDecisions(this); + this.denyAssignments = new operations.DenyAssignments(this); this.providerOperationsMetadata = new operations.ProviderOperationsMetadataOperations(this); this.roleAssignments = new operations.RoleAssignments(this); this.permissions = new operations.Permissions(this); this.roleDefinitions = new operations.RoleDefinitions(this); - this.denyAssignments = new operations.DenyAssignments(this); + this.roleAssignmentMetrics = new operations.RoleAssignmentMetrics(this); + this.eligibleChildResources = new operations.EligibleChildResources(this); + this.roleAssignmentSchedules = new operations.RoleAssignmentSchedules(this); + this.roleAssignmentScheduleInstances = new operations.RoleAssignmentScheduleInstances(this); + this.roleAssignmentScheduleRequests = new operations.RoleAssignmentScheduleRequests(this); + this.roleEligibilitySchedules = new operations.RoleEligibilitySchedules(this); + this.roleEligibilityScheduleInstances = new operations.RoleEligibilityScheduleInstances(this); + this.roleEligibilityScheduleRequests = new operations.RoleEligibilityScheduleRequests(this); + this.roleManagementPolicies = new operations.RoleManagementPolicies(this); + this.roleManagementPolicyAssignments = new operations.RoleManagementPolicyAssignments(this); } } diff --git a/sdk/authorization/arm-authorization/src/authorizationManagementClientContext.ts b/sdk/authorization/arm-authorization/src/authorizationManagementClientContext.ts index 9abaf013ad51..fe6fee62c99a 100644 --- a/sdk/authorization/arm-authorization/src/authorizationManagementClientContext.ts +++ b/sdk/authorization/arm-authorization/src/authorizationManagementClientContext.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 @@ -10,8 +9,8 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-authorization"; const packageVersion = "8.4.1"; diff --git a/sdk/authorization/arm-authorization/src/models/accessReviewDefaultSettingsOperationsMappers.ts b/sdk/authorization/arm-authorization/src/models/accessReviewDefaultSettingsOperationsMappers.ts new file mode 100644 index 000000000000..142a32162266 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/accessReviewDefaultSettingsOperationsMappers.ts @@ -0,0 +1,24 @@ +/* + * 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 { + discriminators, + AccessReviewDecision, + AccessReviewDefaultSettings, + AccessReviewInstance, + AccessReviewRecurrencePattern, + AccessReviewRecurrenceRange, + AccessReviewRecurrenceSettings, + AccessReviewReviewer, + AccessReviewScheduleDefinition, + AccessReviewScheduleSettings, + BaseResource, + ErrorDefinition, + ErrorDefinitionProperties, + RoleAssignment +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/accessReviewInstanceDecisionsMappers.ts b/sdk/authorization/arm-authorization/src/models/accessReviewInstanceDecisionsMappers.ts new file mode 100644 index 000000000000..0bf99427617e --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/accessReviewInstanceDecisionsMappers.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AccessReviewDecision, + AccessReviewDecisionListResult, + AccessReviewDefaultSettings, + AccessReviewInstance, + AccessReviewReviewer, + AccessReviewScheduleDefinition, + BaseResource, + ErrorDefinition, + ErrorDefinitionProperties, + RoleAssignment +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/accessReviewInstanceMyDecisionsMappers.ts b/sdk/authorization/arm-authorization/src/models/accessReviewInstanceMyDecisionsMappers.ts new file mode 100644 index 000000000000..ffb3235067a3 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/accessReviewInstanceMyDecisionsMappers.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AccessReviewDecision, + AccessReviewDecisionListResult, + AccessReviewDecisionProperties, + AccessReviewDefaultSettings, + AccessReviewInstance, + AccessReviewReviewer, + AccessReviewScheduleDefinition, + BaseResource, + ErrorDefinition, + ErrorDefinitionProperties, + RoleAssignment +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/globalAdministratorMappers.ts b/sdk/authorization/arm-authorization/src/models/accessReviewInstanceOperationsMappers.ts similarity index 53% rename from sdk/authorization/arm-authorization/src/models/globalAdministratorMappers.ts rename to sdk/authorization/arm-authorization/src/models/accessReviewInstanceOperationsMappers.ts index 67c5a45e0449..3c22911ce802 100644 --- a/sdk/authorization/arm-authorization/src/models/globalAdministratorMappers.ts +++ b/sdk/authorization/arm-authorization/src/models/accessReviewInstanceOperationsMappers.ts @@ -1,11 +1,13 @@ /* - * 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 { - CloudError + discriminators, + ErrorDefinition, + ErrorDefinitionProperties } from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/accessReviewInstancesAssignedForMyApprovalMappers.ts b/sdk/authorization/arm-authorization/src/models/accessReviewInstancesAssignedForMyApprovalMappers.ts new file mode 100644 index 000000000000..b46b9928dfab --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/accessReviewInstancesAssignedForMyApprovalMappers.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AccessReviewDecision, + AccessReviewDefaultSettings, + AccessReviewInstance, + AccessReviewInstanceListResult, + AccessReviewReviewer, + AccessReviewScheduleDefinition, + BaseResource, + ErrorDefinition, + ErrorDefinitionProperties, + RoleAssignment +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/accessReviewInstancesMappers.ts b/sdk/authorization/arm-authorization/src/models/accessReviewInstancesMappers.ts new file mode 100644 index 000000000000..b46b9928dfab --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/accessReviewInstancesMappers.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AccessReviewDecision, + AccessReviewDefaultSettings, + AccessReviewInstance, + AccessReviewInstanceListResult, + AccessReviewReviewer, + AccessReviewScheduleDefinition, + BaseResource, + ErrorDefinition, + ErrorDefinitionProperties, + RoleAssignment +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/accessReviewScheduleDefinitionsAssignedForMyApprovalMappers.ts b/sdk/authorization/arm-authorization/src/models/accessReviewScheduleDefinitionsAssignedForMyApprovalMappers.ts new file mode 100644 index 000000000000..075a2b6439e7 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/accessReviewScheduleDefinitionsAssignedForMyApprovalMappers.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AccessReviewDecision, + AccessReviewDefaultSettings, + AccessReviewInstance, + AccessReviewReviewer, + AccessReviewScheduleDefinition, + AccessReviewScheduleDefinitionListResult, + BaseResource, + ErrorDefinition, + ErrorDefinitionProperties, + RoleAssignment +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/accessReviewScheduleDefinitionsMappers.ts b/sdk/authorization/arm-authorization/src/models/accessReviewScheduleDefinitionsMappers.ts new file mode 100644 index 000000000000..5cbdca24b035 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/accessReviewScheduleDefinitionsMappers.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AccessReviewDecision, + AccessReviewDefaultSettings, + AccessReviewInstance, + AccessReviewReviewer, + AccessReviewScheduleDefinition, + AccessReviewScheduleDefinitionListResult, + AccessReviewScheduleDefinitionProperties, + BaseResource, + ErrorDefinition, + ErrorDefinitionProperties, + RoleAssignment +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/classicAdministratorsMappers.ts b/sdk/authorization/arm-authorization/src/models/classicAdministratorsMappers.ts deleted file mode 100644 index 327162fe1492..000000000000 --- a/sdk/authorization/arm-authorization/src/models/classicAdministratorsMappers.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - ClassicAdministrator, - ClassicAdministratorListResult, - CloudError -} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/denyAssignmentsMappers.ts b/sdk/authorization/arm-authorization/src/models/denyAssignmentsMappers.ts index 9754178e9a9e..2c2c81ce567d 100644 --- a/sdk/authorization/arm-authorization/src/models/denyAssignmentsMappers.ts +++ b/sdk/authorization/arm-authorization/src/models/denyAssignmentsMappers.ts @@ -1,15 +1,18 @@ /* - * 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 { - CloudError, + discriminators, DenyAssignment, DenyAssignmentListResult, DenyAssignmentPermission, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, Principal } from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/eligibleChildResourcesMappers.ts b/sdk/authorization/arm-authorization/src/models/eligibleChildResourcesMappers.ts new file mode 100644 index 000000000000..1e078d054368 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/eligibleChildResourcesMappers.ts @@ -0,0 +1,14 @@ +/* + * 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 { + discriminators, + CloudError, + EligibleChildResource, + EligibleChildResourcesListResult +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/index.ts b/sdk/authorization/arm-authorization/src/models/index.ts index 36ef6945f8f9..4831f13b62b2 100644 --- a/sdk/authorization/arm-authorization/src/models/index.ts +++ b/sdk/authorization/arm-authorization/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. @@ -12,631 +12,4777 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * Classic Administrators + * Settings of an Access Review. */ -export interface ClassicAdministrator { +export interface AccessReviewScheduleSettings { /** - * The ID of the administrator. + * Flag to indicate whether sending mails to reviewers and the review creator is enabled. */ - id?: string; - /** - * The name of the administrator. - */ - name?: string; + mailNotificationsEnabled?: boolean; /** - * The type of the administrator. + * Flag to indicate whether sending reminder emails to reviewers are enabled. */ - type?: string; - /** - * The email address of the administrator. - */ - emailAddress?: string; + reminderNotificationsEnabled?: boolean; /** - * The role of the administrator. + * Flag to indicate whether reviewers are required to provide a justification when reviewing + * access. */ - role?: string; -} - -/** - * Operation - */ -export interface ProviderOperation { + defaultDecisionEnabled?: boolean; /** - * The operation name. + * Flag to indicate whether the reviewer is required to pass justification when recording a + * decision. */ - name?: string; + justificationRequiredOnApproval?: boolean; /** - * The operation display name. + * This specifies the behavior for the autoReview feature when an access review completes. + * Possible values include: 'Approve', 'Deny', 'Recommendation' */ - displayName?: string; + defaultDecision?: DefaultDecisionType; /** - * The operation description. + * Flag to indicate whether auto-apply capability, to automatically change the target object + * access resource, is enabled. If not enabled, a user must, after the review completes, apply + * the access review. */ - description?: string; + autoApplyDecisionsEnabled?: boolean; /** - * The operation origin. + * Flag to indicate whether showing recommendations to reviewers is enabled. */ - origin?: string; + recommendationsEnabled?: boolean; /** - * The operation properties. + * The duration in days for an instance. */ - properties?: any; + instanceDurationInDays?: number; /** - * The dataAction flag to specify the operation type. + * Access Review Settings. */ - isDataAction?: boolean; + recurrence?: AccessReviewRecurrenceSettings; } /** - * Resource Type + * Descriptor for what needs to be reviewed */ -export interface ResourceType { - /** - * The resource type name. - */ - name?: string; +export interface AccessReviewReviewer { /** - * The resource type display name. + * The id of the reviewer(user/servicePrincipal) */ - displayName?: string; + principalId?: string; /** - * The resource type operations. + * The identity type : user/servicePrincipal. Possible values include: 'user', 'servicePrincipal' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - operations?: ProviderOperation[]; + readonly principalType?: AccessReviewReviewerType; } /** - * Provider Operations metadata + * Access Review Instance. */ -export interface ProviderOperationsMetadata { +export interface AccessReviewInstance extends BaseResource { /** - * The provider id. + * The access review instance id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - id?: string; + readonly id?: string; /** - * The provider name. + * The access review instance name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - name?: string; + readonly name?: string; /** - * The provider type. + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - type?: string; + readonly type?: string; /** - * The provider display name. + * This read-only field specifies the status of an access review instance. Possible values + * include: 'NotStarted', 'InProgress', 'Completed', 'Applied', 'Initializing', 'Applying', + * 'Completing', 'Scheduled', 'AutoReviewing', 'AutoReviewed', 'Starting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - displayName?: string; + readonly status?: AccessReviewInstanceStatus; /** - * The provider resource types + * The DateTime when the review instance is scheduled to be start. */ - resourceTypes?: ResourceType[]; + startDateTime?: Date; /** - * The provider operations. + * The DateTime when the review instance is scheduled to end. */ - operations?: ProviderOperation[]; + endDateTime?: Date; } /** - * Role Assignments filter + * Access Review. */ -export interface RoleAssignmentFilter { +export interface AccessReviewScheduleDefinitionProperties { /** - * Returns role assignment of the specific principal. + * The display name for the schedule definition. */ - principalId?: string; + displayName?: string; + /** + * This read-only field specifies the status of an accessReview. Possible values include: + * 'NotStarted', 'InProgress', 'Completed', 'Applied', 'Initializing', 'Applying', 'Completing', + * 'Scheduled', 'AutoReviewing', 'AutoReviewed', 'Starting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: AccessReviewScheduleDefinitionStatus; /** - * The Delegation flag for the role assignment + * The description provided by the access review creator and visible to admins. */ - canDelegate?: boolean; -} - -/** - * Role Assignments - */ -export interface RoleAssignment { + descriptionForAdmins?: string; /** - * The role assignment ID. + * The description provided by the access review creator to be shown to reviewers. + */ + descriptionForReviewers?: string; + /** + * The identity id * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly principalId?: string; /** - * The role assignment name. + * The identity type : user/servicePrincipal. Possible values include: 'user', 'servicePrincipal' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly principalType?: AccessReviewActorIdentityType; /** - * The role assignment type. + * The identity display name * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly principalName?: string; /** - * The role assignment scope. + * The user principal name(if valid) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - scope?: string; + readonly userPrincipalName?: string; /** - * The role definition ID. + * Flag to indicate whether sending mails to reviewers and the review creator is enabled. */ - roleDefinitionId?: string; + mailNotificationsEnabled?: boolean; /** - * The principal ID. + * Flag to indicate whether sending reminder emails to reviewers are enabled. */ - principalId?: string; + reminderNotificationsEnabled?: boolean; /** - * The principal type of the assigned principal ID. Possible values include: 'User', 'Group', - * 'ServicePrincipal', 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', 'Application', 'MSI', - * 'DirectoryObjectOrGroup', 'Everyone' + * Flag to indicate whether reviewers are required to provide a justification when reviewing + * access. */ - principalType?: PrincipalType; + defaultDecisionEnabled?: boolean; /** - * The Delegation flag for the role assignment + * Flag to indicate whether the reviewer is required to pass justification when recording a + * decision. */ - canDelegate?: boolean; -} - -/** - * Role assignment create parameters. - */ -export interface RoleAssignmentCreateParameters { + justificationRequiredOnApproval?: boolean; /** - * The role definition ID used in the role assignment. + * This specifies the behavior for the autoReview feature when an access review completes. + * Possible values include: 'Approve', 'Deny', 'Recommendation' */ - roleDefinitionId: string; + defaultDecision?: DefaultDecisionType; /** - * The principal ID assigned to the role. This maps to the ID inside the Active Directory. It can - * point to a user, service principal, or security group. + * Flag to indicate whether auto-apply capability, to automatically change the target object + * access resource, is enabled. If not enabled, a user must, after the review completes, apply + * the access review. */ - principalId: string; + autoApplyDecisionsEnabled?: boolean; /** - * The principal type of the assigned principal ID. Possible values include: 'User', 'Group', - * 'ServicePrincipal', 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', 'Application', 'MSI', - * 'DirectoryObjectOrGroup', 'Everyone' + * Flag to indicate whether showing recommendations to reviewers is enabled. */ - principalType?: PrincipalType; + recommendationsEnabled?: boolean; /** - * The delegation flag used for creating a role assignment + * The duration in days for an instance. */ - canDelegate?: boolean; -} - -/** - * Role Definitions filter - */ -export interface RoleDefinitionFilter { + instanceDurationInDays?: number; /** - * Returns role definition with the specific name. + * The recurrence type : weekly, monthly, etc. Possible values include: 'weekly', + * 'absoluteMonthly' */ - roleName?: string; + type?: AccessReviewRecurrencePatternType; /** - * Returns role definition with the specific type. + * The interval for recurrence. For a quarterly review, the interval is 3 for type : + * absoluteMonthly. */ - type?: string; -} - -/** - * Role definition permissions. - */ -export interface Permission { + interval?: number; /** - * Allowed actions. + * The recurrence range type. The possible values are: endDate, noEnd, numbered. Possible values + * include: 'endDate', 'noEnd', 'numbered' */ - actions?: string[]; + type1?: AccessReviewRecurrenceRangeType; /** - * Denied actions. + * The number of times to repeat the access review. Required and must be positive if type is + * numbered. */ - notActions?: string[]; + numberOfOccurrences?: number; /** - * Allowed Data actions. + * The DateTime when the review is scheduled to be start. This could be a date in the future. + * Required on create. */ - dataActions?: string[]; + startDate?: Date; /** - * Denied Data actions. + * The DateTime when the review is scheduled to end. Required if type is endDate */ - notDataActions?: string[]; + endDate?: Date; + /** + * ResourceId in which this review is getting created + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceId?: string; + /** + * This is used to indicate the role being reviewed + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly roleDefinitionId?: string; + /** + * The identity type user/servicePrincipal to review. Possible values include: 'user', + * 'servicePrincipal' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalType1?: AccessReviewScopePrincipalType; + /** + * This is the collection of reviewers. + */ + reviewers?: AccessReviewReviewer[]; + /** + * This field specifies the type of reviewers for a review. Usually for a review, reviewers are + * explicitly assigned. However, in some cases, the reviewers may not be assigned and instead be + * chosen dynamically. For example managers review or self review. Possible values include: + * 'Assigned', 'Self', 'Managers' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reviewersType?: AccessReviewScheduleDefinitionReviewersType; + /** + * This is the collection of instances returned when one does an expand on it. + */ + instances?: AccessReviewInstance[]; } /** - * Role definition. + * Access Review Schedule Definition. */ -export interface RoleDefinition { +export interface AccessReviewScheduleDefinition extends BaseResource { /** - * The role definition ID. + * The access review schedule definition id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * The role definition name. + * The access review schedule definition unique id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * The role definition type. + * The resource type. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * The role name. + * The display name for the schedule definition. */ - roleName?: string; + displayName?: string; /** - * The role definition description. + * This read-only field specifies the status of an accessReview. Possible values include: + * 'NotStarted', 'InProgress', 'Completed', 'Applied', 'Initializing', 'Applying', 'Completing', + * 'Scheduled', 'AutoReviewing', 'AutoReviewed', 'Starting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - description?: string; + readonly status?: AccessReviewScheduleDefinitionStatus; /** - * The role type. + * The description provided by the access review creator and visible to admins. */ - roleType?: string; + descriptionForAdmins?: string; /** - * Role definition permissions. + * The description provided by the access review creator to be shown to reviewers. */ - permissions?: Permission[]; + descriptionForReviewers?: string; /** - * Role definition assignable scopes. + * The identity id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - assignableScopes?: string[]; -} - -/** - * Deny Assignments filter - */ -export interface DenyAssignmentFilter { + readonly principalId?: string; /** - * Return deny assignment with specified name. + * The identity type : user/servicePrincipal. Possible values include: 'user', 'servicePrincipal' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - denyAssignmentName?: string; + readonly principalType?: AccessReviewActorIdentityType; /** - * Return all deny assignments where the specified principal is listed in the principals list of - * deny assignments. + * The identity display name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - principalId?: string; + readonly principalName?: string; /** - * Return all deny assignments where the specified principal is listed either in the principals - * list or exclude principals list of deny assignments. + * The user principal name(if valid) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - gdprExportPrincipalId?: string; -} - -/** - * Deny assignment permissions. - */ -export interface DenyAssignmentPermission { + readonly userPrincipalName?: string; /** - * Actions to which the deny assignment does not grant access. + * Flag to indicate whether sending mails to reviewers and the review creator is enabled. */ - actions?: string[]; + mailNotificationsEnabled?: boolean; /** - * Actions to exclude from that the deny assignment does not grant access. + * Flag to indicate whether sending reminder emails to reviewers are enabled. */ - notActions?: string[]; + reminderNotificationsEnabled?: boolean; /** - * Data actions to which the deny assignment does not grant access. + * Flag to indicate whether reviewers are required to provide a justification when reviewing + * access. */ - dataActions?: string[]; + defaultDecisionEnabled?: boolean; /** - * Data actions to exclude from that the deny assignment does not grant access. + * Flag to indicate whether the reviewer is required to pass justification when recording a + * decision. */ - notDataActions?: string[]; -} - -/** - * Deny assignment principal. - */ -export interface Principal { + justificationRequiredOnApproval?: boolean; /** - * Object ID of the Azure AD principal (user, group, or service principal) to which the deny - * assignment applies. An empty guid '00000000-0000-0000-0000-000000000000' as principal id and - * principal type as 'Everyone' represents all users, groups and service principals. + * This specifies the behavior for the autoReview feature when an access review completes. + * Possible values include: 'Approve', 'Deny', 'Recommendation' + */ + defaultDecision?: DefaultDecisionType; + /** + * Flag to indicate whether auto-apply capability, to automatically change the target object + * access resource, is enabled. If not enabled, a user must, after the review completes, apply + * the access review. + */ + autoApplyDecisionsEnabled?: boolean; + /** + * Flag to indicate whether showing recommendations to reviewers is enabled. + */ + recommendationsEnabled?: boolean; + /** + * The duration in days for an instance. + */ + instanceDurationInDays?: number; + /** + * The recurrence type : weekly, monthly, etc. Possible values include: 'weekly', + * 'absoluteMonthly' + */ + type1?: AccessReviewRecurrencePatternType; + /** + * The interval for recurrence. For a quarterly review, the interval is 3 for type : + * absoluteMonthly. + */ + interval?: number; + /** + * The recurrence range type. The possible values are: endDate, noEnd, numbered. Possible values + * include: 'endDate', 'noEnd', 'numbered' + */ + type2?: AccessReviewRecurrenceRangeType; + /** + * The number of times to repeat the access review. Required and must be positive if type is + * numbered. + */ + numberOfOccurrences?: number; + /** + * The DateTime when the review is scheduled to be start. This could be a date in the future. + * Required on create. + */ + startDate?: Date; + /** + * The DateTime when the review is scheduled to end. Required if type is endDate + */ + endDate?: Date; + /** + * ResourceId in which this review is getting created * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly resourceId?: string; /** - * Type of object represented by principal id (user, group, or service principal). An empty guid - * '00000000-0000-0000-0000-000000000000' as principal id and principal type as 'Everyone' - * represents all users, groups and service principals. + * This is used to indicate the role being reviewed * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly roleDefinitionId?: string; + /** + * The identity type user/servicePrincipal to review. Possible values include: 'user', + * 'servicePrincipal' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalType1?: AccessReviewScopePrincipalType; + /** + * This is the collection of reviewers. + */ + reviewers?: AccessReviewReviewer[]; + /** + * This field specifies the type of reviewers for a review. Usually for a review, reviewers are + * explicitly assigned. However, in some cases, the reviewers may not be assigned and instead be + * chosen dynamically. For example managers review or self review. Possible values include: + * 'Assigned', 'Self', 'Managers' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reviewersType?: AccessReviewScheduleDefinitionReviewersType; + /** + * This is the collection of instances returned when one does an expand on it. + */ + instances?: AccessReviewInstance[]; } /** - * Deny Assignment + * Access Review Default Settings. */ -export interface DenyAssignment { +export interface AccessReviewDefaultSettings extends BaseResource { /** - * The deny assignment ID. + * The access review default settings id. This is only going to be default * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * The deny assignment name. + * The access review default settings name. This is always going to be Access Review Default + * Settings * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * The deny assignment type. + * The resource type. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * The display name of the deny assignment. + * Flag to indicate whether sending mails to reviewers and the review creator is enabled. */ - denyAssignmentName?: string; + mailNotificationsEnabled?: boolean; /** - * The description of the deny assignment. + * Flag to indicate whether sending reminder emails to reviewers are enabled. */ - description?: string; + reminderNotificationsEnabled?: boolean; /** - * An array of permissions that are denied by the deny assignment. + * Flag to indicate whether reviewers are required to provide a justification when reviewing + * access. */ - permissions?: DenyAssignmentPermission[]; + defaultDecisionEnabled?: boolean; /** - * The deny assignment scope. + * Flag to indicate whether the reviewer is required to pass justification when recording a + * decision. */ - scope?: string; + justificationRequiredOnApproval?: boolean; /** - * Determines if the deny assignment applies to child scopes. Default value is false. + * This specifies the behavior for the autoReview feature when an access review completes. + * Possible values include: 'Approve', 'Deny', 'Recommendation' */ - doNotApplyToChildScopes?: boolean; + defaultDecision?: DefaultDecisionType; /** - * Array of principals to which the deny assignment applies. + * Flag to indicate whether auto-apply capability, to automatically change the target object + * access resource, is enabled. If not enabled, a user must, after the review completes, apply + * the access review. */ - principals?: Principal[]; + autoApplyDecisionsEnabled?: boolean; /** - * Array of principals to which the deny assignment does not apply. + * Flag to indicate whether showing recommendations to reviewers is enabled. */ - excludePrincipals?: Principal[]; + recommendationsEnabled?: boolean; /** - * Specifies whether this deny assignment was created by Azure and cannot be edited or deleted. + * The duration in days for an instance. */ - isSystemProtected?: boolean; -} - -/** - * Optional Parameters. - */ -export interface ProviderOperationsMetadataGetOptionalParams extends msRest.RequestOptionsBase { + instanceDurationInDays?: number; /** - * Specifies whether to expand the values. Default value: 'resourceTypes'. + * The recurrence type : weekly, monthly, etc. Possible values include: 'weekly', + * 'absoluteMonthly' */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface ProviderOperationsMetadataListOptionalParams extends msRest.RequestOptionsBase { + type1?: AccessReviewRecurrencePatternType; /** - * Specifies whether to expand the values. Default value: 'resourceTypes'. + * The interval for recurrence. For a quarterly review, the interval is 3 for type : + * absoluteMonthly. */ - expand?: string; + interval?: number; + /** + * The recurrence range type. The possible values are: endDate, noEnd, numbered. Possible values + * include: 'endDate', 'noEnd', 'numbered' + */ + type2?: AccessReviewRecurrenceRangeType; + /** + * The number of times to repeat the access review. Required and must be positive if type is + * numbered. + */ + numberOfOccurrences?: number; + /** + * The DateTime when the review is scheduled to be start. This could be a date in the future. + * Required on create. + */ + startDate?: Date; + /** + * The DateTime when the review is scheduled to end. Required if type is endDate + */ + endDate?: Date; } /** - * Optional Parameters. + * Contains the possible cases for AccessReviewDecisionTarget. */ -export interface RoleAssignmentsListForResourceOptionalParams extends msRest.RequestOptionsBase { - /** - * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at - * or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above - * or below the scope for the specified principal. - */ - filter?: string; -} +export type AccessReviewDecisionTargetUnion = AccessReviewDecisionTarget | UserDecisionTarget | ServicePrincipalDecisionTarget; /** - * Optional Parameters. + * Target of the decision. */ -export interface RoleAssignmentsListForResourceGroupOptionalParams extends msRest.RequestOptionsBase { +export interface AccessReviewDecisionTarget { /** - * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at - * or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above - * or below the scope for the specified principal. + * Polymorphic Discriminator */ - filter?: string; + type: "AccessReviewDecisionTarget"; } /** - * Optional Parameters. + * Approval Step. */ -export interface RoleAssignmentsListOptionalParams extends msRest.RequestOptionsBase { +export interface AccessReviewDecisionProperties { /** - * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at - * or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above - * or below the scope for the specified principal. + * Polymorphic Discriminator */ - filter?: string; + type: string; + /** + * The feature- generated recommendation shown to the reviewer. Possible values include: + * 'Approve', 'Deny', 'NoInfoAvailable' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recommendation?: AccessRecommendationType; + /** + * The decision on the approval step. This value is initially set to NotReviewed. Approvers can + * take action of Approve/Deny. Possible values include: 'Approve', 'Deny', 'NotReviewed', + * 'DontKnow', 'NotNotified' + */ + decision?: AccessReviewResult; + /** + * Justification provided by approvers for their action + */ + justification?: string; + /** + * Date Time when a decision was taken. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reviewedDateTime?: Date; + /** + * The identity id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The identity type : user/servicePrincipal. Possible values include: 'user', 'servicePrincipal' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalType?: AccessReviewActorIdentityType; + /** + * The identity display name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalName?: string; + /** + * The user principal name(if valid) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly userPrincipalName?: string; + /** + * The outcome of applying the decision. Possible values include: 'New', 'Applying', + * 'AppliedSuccessfully', 'AppliedWithUnknownFailure', 'AppliedSuccessfullyButObjectNotFound', + * 'ApplyNotSupported' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly applyResult?: AccessReviewApplyResult; + /** + * The date and time when the review decision was applied. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly appliedDateTime?: Date; + /** + * The identity id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId1?: string; + /** + * The identity type : user/servicePrincipal. Possible values include: 'user', 'servicePrincipal' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalType1?: AccessReviewActorIdentityType; + /** + * The identity display name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalName1?: string; + /** + * The user principal name(if valid) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly userPrincipalName1?: string; } /** - * Optional Parameters. + * Access Review. */ -export interface RoleAssignmentsListForScopeOptionalParams extends msRest.RequestOptionsBase { +export interface AccessReviewDecision extends BaseResource { /** - * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at - * or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above - * or below the scope for the specified principal. + * The access review decision id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly id?: string; + /** + * The access review decision name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Polymorphic Discriminator + */ + type1: string; + /** + * The feature- generated recommendation shown to the reviewer. Possible values include: + * 'Approve', 'Deny', 'NoInfoAvailable' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recommendation?: AccessRecommendationType; + /** + * The decision on the approval step. This value is initially set to NotReviewed. Approvers can + * take action of Approve/Deny. Possible values include: 'Approve', 'Deny', 'NotReviewed', + * 'DontKnow', 'NotNotified' + */ + decision?: AccessReviewResult; + /** + * Justification provided by approvers for their action + */ + justification?: string; + /** + * Date Time when a decision was taken. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reviewedDateTime?: Date; + /** + * The identity id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The identity type : user/servicePrincipal. Possible values include: 'user', 'servicePrincipal' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalType?: AccessReviewActorIdentityType; + /** + * The identity display name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalName?: string; + /** + * The user principal name(if valid) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly userPrincipalName?: string; + /** + * The outcome of applying the decision. Possible values include: 'New', 'Applying', + * 'AppliedSuccessfully', 'AppliedWithUnknownFailure', 'AppliedSuccessfullyButObjectNotFound', + * 'ApplyNotSupported' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly applyResult?: AccessReviewApplyResult; + /** + * The date and time when the review decision was applied. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly appliedDateTime?: Date; + /** + * The identity id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId1?: string; + /** + * The identity type : user/servicePrincipal. Possible values include: 'user', 'servicePrincipal' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalType1?: AccessReviewActorIdentityType; + /** + * The identity display name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalName1?: string; + /** + * The user principal name(if valid) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly userPrincipalName1?: string; } /** - * Optional Parameters. + * User Decision Target */ -export interface RoleDefinitionsListOptionalParams extends msRest.RequestOptionsBase { +export interface UserDecisionTarget { /** - * The filter to apply on the operation. Use atScopeAndBelow filter to search below the given - * scope as well. + * Polymorphic Discriminator */ - filter?: string; + type: "user"; + /** + * The id of user whose access was reviewed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The display name of the user whose access was reviewed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalName?: string; + /** + * The user principal name of the user whose access was reviewed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly userPrincipalName?: string; } /** - * Optional Parameters. + * Service Principal Decision Target */ -export interface DenyAssignmentsListForResourceOptionalParams extends msRest.RequestOptionsBase { +export interface ServicePrincipalDecisionTarget { /** - * The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at - * or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by - * name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, - * above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq - * '{id}' to return all deny assignments at, above and below the scope for the specified - * principal. This filter is different from the principalId filter as it returns not only those - * deny assignments that contain the specified principal is the Principals list but also those - * deny assignments that contain the specified principal is the ExcludePrincipals list. - * Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and - * description properties are returned. + * Polymorphic Discriminator */ - filter?: string; + type: "servicePrincipal"; + /** + * The id of service principal whose access is reviewed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The display name of the service principal whose access was reviewed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalName?: string; + /** + * The appId for the service principal entity being reviewed + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly appId?: string; } /** - * Optional Parameters. + * Error description and code explaining why an operation failed. + * @summary Error */ -export interface DenyAssignmentsListForResourceGroupOptionalParams extends msRest.RequestOptionsBase { +export interface ErrorDefinitionProperties { /** - * The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at - * or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by - * name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, - * above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq - * '{id}' to return all deny assignments at, above and below the scope for the specified - * principal. This filter is different from the principalId filter as it returns not only those - * deny assignments that contain the specified principal is the Principals list but also those - * deny assignments that contain the specified principal is the ExcludePrincipals list. - * Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and - * description properties are returned. + * Description of the error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly message?: string; + /** + * Error code of list gateway. + */ + code?: string; } /** - * Optional Parameters. + * Error description and code explaining why an operation failed. + * @summary Error */ -export interface DenyAssignmentsListOptionalParams extends msRest.RequestOptionsBase { +export interface ErrorDefinition { /** - * The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at - * or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by - * name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, - * above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq - * '{id}' to return all deny assignments at, above and below the scope for the specified - * principal. This filter is different from the principalId filter as it returns not only those - * deny assignments that contain the specified principal is the Principals list but also those - * deny assignments that contain the specified principal is the ExcludePrincipals list. - * Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and - * description properties are returned. + * Error of the list gateway status. */ - filter?: string; + error?: ErrorDefinitionProperties; } /** - * Optional Parameters. + * The display information for a Microsoft.Authorization operation. */ -export interface DenyAssignmentsListForScopeOptionalParams extends msRest.RequestOptionsBase { +export interface OperationDisplay { /** - * The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at - * or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by - * name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, - * above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq - * '{id}' to return all deny assignments at, above and below the scope for the specified - * principal. This filter is different from the principalId filter as it returns not only those - * deny assignments that contain the specified principal is the Principals list but also those - * deny assignments that contain the specified principal is the ExcludePrincipals list. - * Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and - * description properties are returned. + * The resource provider name: Microsoft.Authorization. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly provider?: string; + /** + * The resource on which the operation is performed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resource?: string; + /** + * The operation that users can perform. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operation?: string; + /** + * The description for the operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; } /** - * An interface representing AuthorizationManagementClientOptions. + * The definition of a Microsoft.Authorization operation. */ -export interface AuthorizationManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; +export interface Operation { + /** + * Name of the operation + */ + name?: string; + /** + * Indicates whether the operation is a data action + */ + isDataAction?: boolean; + /** + * Display of the operation + */ + display?: OperationDisplay; + /** + * Origin of the operation + */ + origin?: string; } /** - * @interface - * ClassicAdministrator list result information. - * @extends Array + * Deny Assignments filter */ -export interface ClassicAdministratorListResult extends Array { +export interface DenyAssignmentFilter { /** - * The URL to use for getting the next set of results. + * Return deny assignment with specified name. */ - nextLink?: string; + denyAssignmentName?: string; + /** + * Return all deny assignments where the specified principal is listed in the principals list of + * deny assignments. + */ + principalId?: string; + /** + * Return all deny assignments where the specified principal is listed either in the principals + * list or exclude principals list of deny assignments. + */ + gdprExportPrincipalId?: string; } /** - * @interface - * Provider operations metadata list - * @extends Array + * Deny assignment permissions. */ -export interface ProviderOperationsMetadataListResult extends Array { +export interface DenyAssignmentPermission { /** - * The URL to use for getting the next set of results. + * Actions to which the deny assignment does not grant access. */ - nextLink?: string; + actions?: string[]; + /** + * Actions to exclude from that the deny assignment does not grant access. + */ + notActions?: string[]; + /** + * Data actions to which the deny assignment does not grant access. + */ + dataActions?: string[]; + /** + * Data actions to exclude from that the deny assignment does not grant access. + */ + notDataActions?: string[]; +} + +/** + * The name of the entity last modified it + */ +export interface Principal { + /** + * The id of the principal made changes + */ + id?: string; + /** + * The name of the principal made changes + */ + displayName?: string; + /** + * Type of principal such as user , group etc + */ + type?: string; + /** + * Email of principal + */ + email?: string; +} + +/** + * Deny Assignment + */ +export interface DenyAssignment { + /** + * The deny assignment ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The deny assignment name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The deny assignment type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The display name of the deny assignment. + */ + denyAssignmentName?: string; + /** + * The description of the deny assignment. + */ + description?: string; + /** + * An array of permissions that are denied by the deny assignment. + */ + permissions?: DenyAssignmentPermission[]; + /** + * The deny assignment scope. + */ + scope?: string; + /** + * Determines if the deny assignment applies to child scopes. Default value is false. + */ + doNotApplyToChildScopes?: boolean; + /** + * Array of principals to which the deny assignment applies. + */ + principals?: Principal[]; + /** + * Array of principals to which the deny assignment does not apply. + */ + excludePrincipals?: Principal[]; + /** + * Specifies whether this deny assignment was created by Azure and cannot be edited or deleted. + */ + isSystemProtected?: boolean; +} + +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; +} + +/** + * The error detail. + */ +export interface ErrorDetail { + /** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** + * 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 { + /** + * The error object. + */ + error?: ErrorDetail; +} + +/** + * Operation + */ +export interface ProviderOperation { + /** + * The operation name. + */ + name?: string; + /** + * The operation display name. + */ + displayName?: string; + /** + * The operation description. + */ + description?: string; + /** + * The operation origin. + */ + origin?: string; + /** + * The operation properties. + */ + properties?: any; + /** + * The dataAction flag to specify the operation type. + */ + isDataAction?: boolean; +} + +/** + * Resource Type + */ +export interface ResourceType { + /** + * The resource type name. + */ + name?: string; + /** + * The resource type display name. + */ + displayName?: string; + /** + * The resource type operations. + */ + operations?: ProviderOperation[]; +} + +/** + * Provider Operations metadata + */ +export interface ProviderOperationsMetadata { + /** + * The provider id. + */ + id?: string; + /** + * The provider name. + */ + name?: string; + /** + * The provider type. + */ + type?: string; + /** + * The provider display name. + */ + displayName?: string; + /** + * The provider resource types + */ + resourceTypes?: ResourceType[]; + /** + * The provider operations. + */ + operations?: ProviderOperation[]; +} + +/** + * Failed validation result details + */ +export interface ValidationResponseErrorInfo { + /** + * Error code indicating why validation failed + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * Message indicating why validation failed + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; +} + +/** + * Validation response + */ +export interface ValidationResponse { + /** + * Whether or not validation succeeded + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isValid?: boolean; + /** + * Failed validation result details + */ + errorInfo?: ValidationResponseErrorInfo; +} + +/** + * Role Assignments filter + */ +export interface RoleAssignmentFilter { + /** + * Returns role assignment of the specific principal. + */ + principalId?: string; } /** - * @interface - * Role assignment list operation result. - * @extends Array + * Role Assignments + */ +export interface RoleAssignment extends BaseResource { + /** + * The role assignment ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The role assignment name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The role assignment type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The role assignment scope. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scope?: string; + /** + * The role definition ID. + */ + roleDefinitionId: string; + /** + * The principal ID. + */ + principalId: string; + /** + * The principal type of the assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'ForeignGroup', 'Device'. Default value: 'User'. + */ + principalType?: PrincipalType; + /** + * Description of role assignment + */ + description?: string; + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: + * @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] + * StringEqualsIgnoreCase 'foo_storage_container' + */ + condition?: string; + /** + * Version of the condition. Currently accepted value is '2.0' + */ + conditionVersion?: string; + /** + * Time it was created + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdOn?: Date; + /** + * Time it was updated + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly updatedOn?: Date; + /** + * Id of the user who created the assignment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdBy?: string; + /** + * Id of the user who updated the assignment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly updatedBy?: string; + /** + * Id of the delegated managed identity resource + */ + delegatedManagedIdentityResourceId?: string; +} + +/** + * Role assignment create parameters. + */ +export interface RoleAssignmentCreateParameters { + /** + * The role assignment scope. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scope?: string; + /** + * The role definition ID. + */ + roleDefinitionId: string; + /** + * The principal ID. + */ + principalId: string; + /** + * The principal type of the assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'ForeignGroup', 'Device'. Default value: 'User'. + */ + principalType?: PrincipalType; + /** + * Description of role assignment + */ + description?: string; + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: + * @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] + * StringEqualsIgnoreCase 'foo_storage_container' + */ + condition?: string; + /** + * Version of the condition. Currently accepted value is '2.0' + */ + conditionVersion?: string; + /** + * Time it was created + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdOn?: Date; + /** + * Time it was updated + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly updatedOn?: Date; + /** + * Id of the user who created the assignment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdBy?: string; + /** + * Id of the user who updated the assignment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly updatedBy?: string; + /** + * Id of the delegated managed identity resource + */ + delegatedManagedIdentityResourceId?: string; +} + +/** + * Role Definitions filter + */ +export interface RoleDefinitionFilter { + /** + * Returns role definition with the specific name. + */ + roleName?: string; + /** + * Returns role definition with the specific type. + */ + type?: string; +} + +/** + * Role definition permissions. + */ +export interface Permission { + /** + * Allowed actions. + */ + actions?: string[]; + /** + * Denied actions. + */ + notActions?: string[]; + /** + * Allowed Data actions. + */ + dataActions?: string[]; + /** + * Denied Data actions. + */ + notDataActions?: string[]; +} + +/** + * Role definition. + */ +export interface RoleDefinition { + /** + * The role definition ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The role definition name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The role definition type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The role name. + */ + roleName?: string; + /** + * The role definition description. + */ + description?: string; + /** + * The role type. + */ + roleType?: string; + /** + * Role definition permissions. + */ + permissions?: Permission[]; + /** + * Role definition assignable scopes. + */ + assignableScopes?: string[]; +} + +/** + * Role Assignment Metrics + */ +export interface RoleAssignmentMetricsResult { + /** + * The subscription ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subscriptionId?: string; + /** + * The role assignment limit. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly roleAssignmentsLimit?: number; + /** + * The number of current role assignments. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly roleAssignmentsCurrentCount?: number; + /** + * The number of remaining role assignments available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly roleAssignmentsRemainingCount?: number; +} + +/** + * Eligible child resource + */ +export interface EligibleChildResource { + /** + * The resource scope Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * Role assignment schedule filter + */ +export interface RoleAssignmentScheduleFilter { + /** + * Returns role assignment schedule of the specific principal. + */ + principalId?: string; + /** + * Returns role assignment schedule of the specific role definition. + */ + roleDefinitionId?: string; + /** + * Returns role assignment schedule instances of the specific status. + */ + status?: string; +} + +/** + * Details of the resource scope + */ +export interface ExpandedPropertiesScope { + /** + * Scope id of the resource + */ + id?: string; + /** + * Display name of the resource + */ + displayName?: string; + /** + * Type of the resource + */ + type?: string; +} + +/** + * Details of role definition + */ +export interface ExpandedPropertiesRoleDefinition { + /** + * Id of the role definition + */ + id?: string; + /** + * Display name of the role definition + */ + displayName?: string; + /** + * Type of the role definition + */ + type?: string; +} + +/** + * Details of the principal + */ +export interface ExpandedPropertiesPrincipal { + /** + * Id of the principal + */ + id?: string; + /** + * Display name of the principal + */ + displayName?: string; + /** + * Email id of the principal + */ + email?: string; + /** + * Type of the principal + */ + type?: string; +} + +/** + * An interface representing ExpandedProperties. + */ +export interface ExpandedProperties { + /** + * Details of the resource scope + */ + scope?: ExpandedPropertiesScope; + /** + * Details of role definition + */ + roleDefinition?: ExpandedPropertiesRoleDefinition; + /** + * Details of the principal + */ + principal?: ExpandedPropertiesPrincipal; +} + +/** + * Role Assignment schedule + */ +export interface RoleAssignmentSchedule { + /** + * The role assignment schedule Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The role assignment schedule name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The role assignment schedule type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The role assignment schedule scope. + */ + scope?: string; + /** + * The role definition ID. + */ + roleDefinitionId?: string; + /** + * The principal ID. + */ + principalId?: string; + /** + * The principal type of the assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'ForeignGroup', 'Device' + */ + principalType?: PrincipalType; + /** + * The id of roleAssignmentScheduleRequest used to create this roleAssignmentSchedule + */ + roleAssignmentScheduleRequestId?: string; + /** + * The id of roleEligibilitySchedule used to activated this roleAssignmentSchedule + */ + linkedRoleEligibilityScheduleId?: string; + /** + * Assignment type of the role assignment schedule. Possible values include: 'Activated', + * 'Assigned' + */ + assignmentType?: AssignmentType; + /** + * Membership type of the role assignment schedule. Possible values include: 'Inherited', + * 'Direct', 'Group' + */ + memberType?: MemberType; + /** + * The status of the role assignment schedule. Possible values include: 'Accepted', + * 'PendingEvaluation', 'Granted', 'Denied', 'PendingProvisioning', 'Provisioned', + * 'PendingRevocation', 'Revoked', 'Canceled', 'Failed', 'PendingApprovalProvisioning', + * 'PendingApproval', 'FailedAsResourceIsLocked', 'PendingAdminDecision', 'AdminApproved', + * 'AdminDenied', 'TimedOut', 'ProvisioningStarted', 'Invalid', 'PendingScheduleCreation', + * 'ScheduleCreated', 'PendingExternalProvisioning' + */ + status?: Status; + /** + * Start DateTime when role assignment schedule + */ + startDateTime?: Date; + /** + * End DateTime when role assignment schedule + */ + endDateTime?: Date; + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: + * @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] + * StringEqualsIgnoreCase 'foo_storage_container' + */ + condition?: string; + /** + * Version of the condition. Currently accepted value is '2.0' + */ + conditionVersion?: string; + /** + * DateTime when role assignment schedule was created + */ + createdOn?: Date; + /** + * DateTime when role assignment schedule was modified + */ + updatedOn?: Date; + /** + * Additional properties of principal, scope and role definition + */ + expandedProperties?: ExpandedProperties; +} + +/** + * Role assignment schedule instance filter + */ +export interface RoleAssignmentScheduleInstanceFilter { + /** + * Returns role assignment schedule instances of the specific principal. + */ + principalId?: string; + /** + * Returns role assignment schedule instances of the specific role definition. + */ + roleDefinitionId?: string; + /** + * Returns role assignment schedule instances of the specific status. + */ + status?: string; + /** + * Returns role assignment schedule instances belonging to a specific role assignment schedule. + */ + roleAssignmentScheduleId?: string; +} + +/** + * Information about current or upcoming role assignment schedule instance + */ +export interface RoleAssignmentScheduleInstance { + /** + * The role assignment schedule instance ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The role assignment schedule instance name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The role assignment schedule instance type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The role assignment schedule scope. + */ + scope?: string; + /** + * The role definition ID. + */ + roleDefinitionId?: string; + /** + * The principal ID. + */ + principalId?: string; + /** + * The principal type of the assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'ForeignGroup', 'Device' + */ + principalType?: PrincipalType; + /** + * Id of the master role assignment schedule + */ + roleAssignmentScheduleId?: string; + /** + * Role Assignment Id in external system + */ + originRoleAssignmentId?: string; + /** + * The status of the role assignment schedule instance. Possible values include: 'Accepted', + * 'PendingEvaluation', 'Granted', 'Denied', 'PendingProvisioning', 'Provisioned', + * 'PendingRevocation', 'Revoked', 'Canceled', 'Failed', 'PendingApprovalProvisioning', + * 'PendingApproval', 'FailedAsResourceIsLocked', 'PendingAdminDecision', 'AdminApproved', + * 'AdminDenied', 'TimedOut', 'ProvisioningStarted', 'Invalid', 'PendingScheduleCreation', + * 'ScheduleCreated', 'PendingExternalProvisioning' + */ + status?: Status; + /** + * The startDateTime of the role assignment schedule instance + */ + startDateTime?: Date; + /** + * The endDateTime of the role assignment schedule instance + */ + endDateTime?: Date; + /** + * roleEligibilityScheduleId used to activate + */ + linkedRoleEligibilityScheduleId?: string; + /** + * roleEligibilityScheduleInstanceId linked to this roleAssignmentScheduleInstance + */ + linkedRoleEligibilityScheduleInstanceId?: string; + /** + * Assignment type of the role assignment schedule. Possible values include: 'Activated', + * 'Assigned' + */ + assignmentType?: AssignmentType; + /** + * Membership type of the role assignment schedule. Possible values include: 'Inherited', + * 'Direct', 'Group' + */ + memberType?: MemberType; + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: + * @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] + * StringEqualsIgnoreCase 'foo_storage_container' + */ + condition?: string; + /** + * Version of the condition. Currently accepted value is '2.0' + */ + conditionVersion?: string; + /** + * DateTime when role assignment schedule was created + */ + createdOn?: Date; + /** + * Additional properties of principal, scope and role definition + */ + expandedProperties?: ExpandedProperties; +} + +/** + * Role assignment schedule request filter + */ +export interface RoleAssignmentScheduleRequestFilter { + /** + * Returns role assignment requests of the specific principal. + */ + principalId?: string; + /** + * Returns role assignment requests of the specific role definition. + */ + roleDefinitionId?: string; + /** + * Returns role assignment requests created by specific principal. + */ + requestorId?: string; + /** + * Returns role assignment requests of specific status. + */ + status?: string; +} + +/** + * Expiration of the role assignment schedule + */ +export interface RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration { + /** + * Type of the role assignment schedule expiration. Possible values include: 'AfterDuration', + * 'AfterDateTime', 'NoExpiration' + */ + type?: Type; + /** + * End DateTime of the role assignment schedule. + */ + endDateTime?: Date; + /** + * Duration of the role assignment schedule in TimeSpan. + */ + duration?: string; +} + +/** + * Schedule info of the role assignment schedule + */ +export interface RoleAssignmentScheduleRequestPropertiesScheduleInfo { + /** + * Start DateTime of the role assignment schedule. + */ + startDateTime?: Date; + /** + * Expiration of the role assignment schedule + */ + expiration?: RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration; +} + +/** + * Ticket Info of the role assignment + */ +export interface RoleAssignmentScheduleRequestPropertiesTicketInfo { + /** + * Ticket number for the role assignment + */ + ticketNumber?: string; + /** + * Ticket system name for the role assignment + */ + ticketSystem?: string; +} + +/** + * Role Assignment schedule request + */ +export interface RoleAssignmentScheduleRequest { + /** + * The role assignment schedule request ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The role assignment schedule request name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The role assignment schedule request type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The role assignment schedule request scope. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scope?: string; + /** + * The role definition ID. + */ + roleDefinitionId: string; + /** + * The principal ID. + */ + principalId: string; + /** + * The principal type of the assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'ForeignGroup', 'Device' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalType?: PrincipalType; + /** + * The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc. Possible + * values include: 'AdminAssign', 'AdminRemove', 'AdminUpdate', 'AdminExtend', 'AdminRenew', + * 'SelfActivate', 'SelfDeactivate', 'SelfExtend', 'SelfRenew' + */ + requestType: RequestType; + /** + * The status of the role assignment schedule request. Possible values include: 'Accepted', + * 'PendingEvaluation', 'Granted', 'Denied', 'PendingProvisioning', 'Provisioned', + * 'PendingRevocation', 'Revoked', 'Canceled', 'Failed', 'PendingApprovalProvisioning', + * 'PendingApproval', 'FailedAsResourceIsLocked', 'PendingAdminDecision', 'AdminApproved', + * 'AdminDenied', 'TimedOut', 'ProvisioningStarted', 'Invalid', 'PendingScheduleCreation', + * 'ScheduleCreated', 'PendingExternalProvisioning' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: Status; + /** + * The approvalId of the role assignment schedule request. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly approvalId?: string; + /** + * The resultant role assignment schedule id or the role assignment schedule id being updated + */ + targetRoleAssignmentScheduleId?: string; + /** + * The role assignment schedule instance id being updated + */ + targetRoleAssignmentScheduleInstanceId?: string; + /** + * Schedule info of the role assignment schedule + */ + scheduleInfo?: RoleAssignmentScheduleRequestPropertiesScheduleInfo; + /** + * The linked role eligibility schedule id - to activate an eligibility. + */ + linkedRoleEligibilityScheduleId?: string; + /** + * Justification for the role assignment + */ + justification?: string; + /** + * Ticket Info of the role assignment + */ + ticketInfo?: RoleAssignmentScheduleRequestPropertiesTicketInfo; + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: + * @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] + * StringEqualsIgnoreCase 'foo_storage_container' + */ + condition?: string; + /** + * Version of the condition. Currently accepted value is '2.0' + */ + conditionVersion?: string; + /** + * DateTime when role assignment schedule request was created + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdOn?: Date; + /** + * Id of the user who created this request + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requestorId?: string; + /** + * Additional properties of principal, scope and role definition + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expandedProperties?: ExpandedProperties; +} + +/** + * Role eligibility schedule filter + */ +export interface RoleEligibilityScheduleFilter { + /** + * Returns role eligibility schedule of the specific principal. + */ + principalId?: string; + /** + * Returns role eligibility schedule of the specific role definition. + */ + roleDefinitionId?: string; + /** + * Returns role eligibility schedule of the specific status. + */ + status?: string; +} + +/** + * Role eligibility schedule + */ +export interface RoleEligibilitySchedule { + /** + * The role eligibility schedule Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The role eligibility schedule name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The role eligibility schedule type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The role eligibility schedule scope. + */ + scope?: string; + /** + * The role definition ID. + */ + roleDefinitionId?: string; + /** + * The principal ID. + */ + principalId?: string; + /** + * The principal type of the assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'ForeignGroup', 'Device' + */ + principalType?: PrincipalType; + /** + * The id of roleEligibilityScheduleRequest used to create this roleAssignmentSchedule + */ + roleEligibilityScheduleRequestId?: string; + /** + * Membership type of the role eligibility schedule. Possible values include: 'Inherited', + * 'Direct', 'Group' + */ + memberType?: MemberType; + /** + * The status of the role eligibility schedule. Possible values include: 'Accepted', + * 'PendingEvaluation', 'Granted', 'Denied', 'PendingProvisioning', 'Provisioned', + * 'PendingRevocation', 'Revoked', 'Canceled', 'Failed', 'PendingApprovalProvisioning', + * 'PendingApproval', 'FailedAsResourceIsLocked', 'PendingAdminDecision', 'AdminApproved', + * 'AdminDenied', 'TimedOut', 'ProvisioningStarted', 'Invalid', 'PendingScheduleCreation', + * 'ScheduleCreated', 'PendingExternalProvisioning' + */ + status?: Status; + /** + * Start DateTime when role eligibility schedule + */ + startDateTime?: Date; + /** + * End DateTime when role eligibility schedule + */ + endDateTime?: Date; + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: + * @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] + * StringEqualsIgnoreCase 'foo_storage_container' + */ + condition?: string; + /** + * Version of the condition. Currently accepted value is '2.0' + */ + conditionVersion?: string; + /** + * DateTime when role eligibility schedule was created + */ + createdOn?: Date; + /** + * DateTime when role eligibility schedule was modified + */ + updatedOn?: Date; + /** + * Additional properties of principal, scope and role definition + */ + expandedProperties?: ExpandedProperties; +} + +/** + * Role eligibility schedule instance filter + */ +export interface RoleEligibilityScheduleInstanceFilter { + /** + * Returns role eligibility schedule instances of the specific principal. + */ + principalId?: string; + /** + * Returns role eligibility schedule instances of the specific role definition. + */ + roleDefinitionId?: string; + /** + * Returns role eligibility schedule instances of the specific status. + */ + status?: string; + /** + * Returns role eligibility schedule instances belonging to a specific role eligibility schedule. + */ + roleEligibilityScheduleId?: string; +} + +/** + * Information about current or upcoming role eligibility schedule instance + */ +export interface RoleEligibilityScheduleInstance { + /** + * The role eligibility schedule instance ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The role eligibility schedule instance name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The role eligibility schedule instance type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The role eligibility schedule scope. + */ + scope?: string; + /** + * The role definition ID. + */ + roleDefinitionId?: string; + /** + * The principal ID. + */ + principalId?: string; + /** + * The principal type of the assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'ForeignGroup', 'Device' + */ + principalType?: PrincipalType; + /** + * Id of the master role eligibility schedule + */ + roleEligibilityScheduleId?: string; + /** + * The status of the role eligibility schedule instance. Possible values include: 'Accepted', + * 'PendingEvaluation', 'Granted', 'Denied', 'PendingProvisioning', 'Provisioned', + * 'PendingRevocation', 'Revoked', 'Canceled', 'Failed', 'PendingApprovalProvisioning', + * 'PendingApproval', 'FailedAsResourceIsLocked', 'PendingAdminDecision', 'AdminApproved', + * 'AdminDenied', 'TimedOut', 'ProvisioningStarted', 'Invalid', 'PendingScheduleCreation', + * 'ScheduleCreated', 'PendingExternalProvisioning' + */ + status?: Status; + /** + * The startDateTime of the role eligibility schedule instance + */ + startDateTime?: Date; + /** + * The endDateTime of the role eligibility schedule instance + */ + endDateTime?: Date; + /** + * Membership type of the role eligibility schedule. Possible values include: 'Inherited', + * 'Direct', 'Group' + */ + memberType?: MemberType; + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: + * @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] + * StringEqualsIgnoreCase 'foo_storage_container' + */ + condition?: string; + /** + * Version of the condition. Currently accepted value is '2.0' + */ + conditionVersion?: string; + /** + * DateTime when role eligibility schedule was created + */ + createdOn?: Date; + /** + * Additional properties of principal, scope and role definition + */ + expandedProperties?: ExpandedProperties; +} + +/** + * Role eligibility schedule request filter + */ +export interface RoleEligibilityScheduleRequestFilter { + /** + * Returns role eligibility requests of the specific principal. + */ + principalId?: string; + /** + * Returns role eligibility requests of the specific role definition. + */ + roleDefinitionId?: string; + /** + * Returns role eligibility requests created by specific principal. + */ + requestorId?: string; + /** + * Returns role eligibility requests of specific status. + */ + status?: string; +} + +/** + * Expiration of the role eligibility schedule + */ +export interface RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration { + /** + * Type of the role eligibility schedule expiration. Possible values include: 'AfterDuration', + * 'AfterDateTime', 'NoExpiration' + */ + type?: Type; + /** + * End DateTime of the role eligibility schedule. + */ + endDateTime?: Date; + /** + * Duration of the role eligibility schedule in TimeSpan. + */ + duration?: string; +} + +/** + * Schedule info of the role eligibility schedule + */ +export interface RoleEligibilityScheduleRequestPropertiesScheduleInfo { + /** + * Start DateTime of the role eligibility schedule. + */ + startDateTime?: Date; + /** + * Expiration of the role eligibility schedule + */ + expiration?: RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration; +} + +/** + * Ticket Info of the role eligibility + */ +export interface RoleEligibilityScheduleRequestPropertiesTicketInfo { + /** + * Ticket number for the role eligibility + */ + ticketNumber?: string; + /** + * Ticket system name for the role eligibility + */ + ticketSystem?: string; +} + +/** + * Role Eligibility schedule request + */ +export interface RoleEligibilityScheduleRequest { + /** + * The role eligibility schedule request ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The role eligibility schedule request name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The role eligibility schedule request type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The role eligibility schedule request scope. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scope?: string; + /** + * The role definition ID. + */ + roleDefinitionId: string; + /** + * The principal ID. + */ + principalId: string; + /** + * The principal type of the assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'ForeignGroup', 'Device' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalType?: PrincipalType; + /** + * The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc. Possible + * values include: 'AdminAssign', 'AdminRemove', 'AdminUpdate', 'AdminExtend', 'AdminRenew', + * 'SelfActivate', 'SelfDeactivate', 'SelfExtend', 'SelfRenew' + */ + requestType: RequestType; + /** + * The status of the role eligibility schedule request. Possible values include: 'Accepted', + * 'PendingEvaluation', 'Granted', 'Denied', 'PendingProvisioning', 'Provisioned', + * 'PendingRevocation', 'Revoked', 'Canceled', 'Failed', 'PendingApprovalProvisioning', + * 'PendingApproval', 'FailedAsResourceIsLocked', 'PendingAdminDecision', 'AdminApproved', + * 'AdminDenied', 'TimedOut', 'ProvisioningStarted', 'Invalid', 'PendingScheduleCreation', + * 'ScheduleCreated', 'PendingExternalProvisioning' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: Status; + /** + * The approvalId of the role eligibility schedule request. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly approvalId?: string; + /** + * Schedule info of the role eligibility schedule + */ + scheduleInfo?: RoleEligibilityScheduleRequestPropertiesScheduleInfo; + /** + * The resultant role eligibility schedule id or the role eligibility schedule id being updated + */ + targetRoleEligibilityScheduleId?: string; + /** + * The role eligibility schedule instance id being updated + */ + targetRoleEligibilityScheduleInstanceId?: string; + /** + * Justification for the role eligibility + */ + justification?: string; + /** + * Ticket Info of the role eligibility + */ + ticketInfo?: RoleEligibilityScheduleRequestPropertiesTicketInfo; + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: + * @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] + * StringEqualsIgnoreCase 'foo_storage_container' + */ + condition?: string; + /** + * Version of the condition. Currently accepted value is '2.0' + */ + conditionVersion?: string; + /** + * DateTime when role eligibility schedule request was created + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdOn?: Date; + /** + * Id of the user who created this request + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requestorId?: string; + /** + * Additional properties of principal, scope and role definition + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expandedProperties?: ExpandedProperties; +} + +/** + * The role management policy rule target. + */ +export interface RoleManagementPolicyRuleTarget { + /** + * The caller of the setting. + */ + caller?: string; + /** + * The type of operation. + */ + operations?: string[]; + /** + * The assignment level to which it is applied. + */ + level?: string; + /** + * The list of target objects. + */ + targetObjects?: string[]; + /** + * The list of inheritable settings. + */ + inheritableSettings?: string[]; + /** + * The list of enforced settings. + */ + enforcedSettings?: string[]; +} + +/** + * Contains the possible cases for RoleManagementPolicyRule. + */ +export type RoleManagementPolicyRuleUnion = RoleManagementPolicyRule | RoleManagementPolicyApprovalRule | RoleManagementPolicyAuthenticationContextRule | RoleManagementPolicyEnablementRule | RoleManagementPolicyExpirationRule | RoleManagementPolicyNotificationRule; + +/** + * The role management policy rule. + */ +export interface RoleManagementPolicyRule { + /** + * Polymorphic Discriminator + */ + ruleType: "RoleManagementPolicyRule"; + /** + * The id of the rule. + */ + id?: string; + /** + * The target of the current rule. + */ + target?: RoleManagementPolicyRuleTarget; +} + +/** + * Details of the resource scope + */ +export interface PolicyPropertiesScope { + /** + * Scope id of the resource + */ + id?: string; + /** + * Display name of the resource + */ + displayName?: string; + /** + * Type of the resource + */ + type?: string; +} + +/** + * An interface representing PolicyProperties. + */ +export interface PolicyProperties { + /** + * Details of the resource scope + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scope?: PolicyPropertiesScope; +} + +/** + * Role management policy + */ +export interface RoleManagementPolicy { + /** + * The role management policy Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The role management policy name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The role management policy type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The role management policy scope. + */ + scope?: string; + /** + * The role management policy display name. + */ + displayName?: string; + /** + * The role management policy description. + */ + description?: string; + /** + * The role management policy is default policy. + */ + isOrganizationDefault?: boolean; + lastModifiedBy?: Principal; + /** + * The last modified date time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastModifiedDateTime?: Date; + /** + * The rule applied to the policy. + */ + rules?: RoleManagementPolicyRuleUnion[]; + /** + * The readonly computed rule applied to the policy. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly effectiveRules?: RoleManagementPolicyRuleUnion[]; + /** + * Additional properties of scope + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly policyProperties?: PolicyProperties; +} + +/** + * The detail of a user. + */ +export interface UserSet { + /** + * The type of user. Possible values include: 'User', 'Group' + */ + userType?: UserType; + /** + * The value indicating whether the user is a backup fallback approver + */ + isBackup?: boolean; + /** + * The object id of the user. + */ + id?: string; + /** + * The description of the user. + */ + description?: string; +} + +/** + * The approval stage. + */ +export interface ApprovalStage { + /** + * The time in days when approval request would be timed out. + */ + approvalStageTimeOutInDays?: number; + /** + * Determine whether approver need to provide justification for his decision. + */ + isApproverJustificationRequired?: boolean; + /** + * The time in minutes when the approval request would be escalated if the primary approver does + * not approves. + */ + escalationTimeInMinutes?: number; + /** + * The primary approver of the request. + */ + primaryApprovers?: UserSet[]; + /** + * The value determine whether escalation feature is enabled. + */ + isEscalationEnabled?: boolean; + /** + * The escalation approver of the request. + */ + escalationApprovers?: UserSet[]; +} + +/** + * The approval settings. + */ +export interface ApprovalSettings { + /** + * Determine whether approval is required or not. + */ + isApprovalRequired?: boolean; + /** + * Determine whether approval is required for assignment extension. + */ + isApprovalRequiredForExtension?: boolean; + /** + * Determine whether requestor justification required. + */ + isRequestorJustificationRequired?: boolean; + /** + * The type of rule. Possible values include: 'SingleStage', 'Serial', 'Parallel', 'NoApproval' + */ + approvalMode?: ApprovalMode; + /** + * The approval stages of the request. + */ + approvalStages?: ApprovalStage[]; +} + +/** + * The role management policy rule. + */ +export interface RoleManagementPolicyApprovalRule { + /** + * Polymorphic Discriminator + */ + ruleType: "RoleManagementPolicyApprovalRule"; + /** + * The id of the rule. + */ + id?: string; + /** + * The target of the current rule. + */ + target?: RoleManagementPolicyRuleTarget; + /** + * The approval setting + */ + setting?: ApprovalSettings; +} + +/** + * The role management policy rule. + */ +export interface RoleManagementPolicyAuthenticationContextRule { + /** + * Polymorphic Discriminator + */ + ruleType: "RoleManagementPolicyAuthenticationContextRule"; + /** + * The id of the rule. + */ + id?: string; + /** + * The target of the current rule. + */ + target?: RoleManagementPolicyRuleTarget; + /** + * The value indicating if rule is enabled. + */ + isEnabled?: boolean; + /** + * The claim value. + */ + claimValue?: string; +} + +/** + * The role management policy rule. + */ +export interface RoleManagementPolicyEnablementRule { + /** + * Polymorphic Discriminator + */ + ruleType: "RoleManagementPolicyEnablementRule"; + /** + * The id of the rule. + */ + id?: string; + /** + * The target of the current rule. + */ + target?: RoleManagementPolicyRuleTarget; + /** + * The list of enabled rules. + */ + enabledRules?: EnablementRules[]; +} + +/** + * The role management policy rule. + */ +export interface RoleManagementPolicyExpirationRule { + /** + * Polymorphic Discriminator + */ + ruleType: "RoleManagementPolicyExpirationRule"; + /** + * The id of the rule. + */ + id?: string; + /** + * The target of the current rule. + */ + target?: RoleManagementPolicyRuleTarget; + /** + * The value indicating whether expiration is required. + */ + isExpirationRequired?: boolean; + /** + * The maximum duration of expiration in timespan. + */ + maximumDuration?: string; +} + +/** + * The role management policy rule. + */ +export interface RoleManagementPolicyNotificationRule { + /** + * Polymorphic Discriminator + */ + ruleType: "RoleManagementPolicyNotificationRule"; + /** + * The id of the rule. + */ + id?: string; + /** + * The target of the current rule. + */ + target?: RoleManagementPolicyRuleTarget; + /** + * The type of notification. Possible values include: 'Email' + */ + notificationType?: NotificationDeliveryMechanism; + /** + * The notification level. Possible values include: 'None', 'Critical', 'All' + */ + notificationLevel?: NotificationLevel; + /** + * The recipient type. Possible values include: 'Requestor', 'Approver', 'Admin' + */ + recipientType?: RecipientType; + /** + * The list notification recipients. + */ + notificationRecipients?: string[]; + /** + * Its value determine if the notification need to be sent to the recipient type specified in + * policy rule. + */ + isDefaultRecipientsEnabled?: boolean; +} + +/** + * Details of the resource scope + */ +export interface PolicyAssignmentPropertiesScope { + /** + * Scope id of the resource + */ + id?: string; + /** + * Display name of the resource + */ + displayName?: string; + /** + * Type of the resource + */ + type?: string; +} + +/** + * Details of role definition + */ +export interface PolicyAssignmentPropertiesRoleDefinition { + /** + * Id of the role definition + */ + id?: string; + /** + * Display name of the role definition + */ + displayName?: string; + /** + * Type of the role definition + */ + type?: string; +} + +/** + * Details of the policy + */ +export interface PolicyAssignmentPropertiesPolicy { + /** + * Id of the policy + */ + id?: string; + lastModifiedBy?: Principal; + /** + * The last modified date time. + */ + lastModifiedDateTime?: Date; +} + +/** + * An interface representing PolicyAssignmentProperties. + */ +export interface PolicyAssignmentProperties { + /** + * Details of the resource scope + */ + scope?: PolicyAssignmentPropertiesScope; + /** + * Details of role definition + */ + roleDefinition?: PolicyAssignmentPropertiesRoleDefinition; + /** + * Details of the policy + */ + policy?: PolicyAssignmentPropertiesPolicy; +} + +/** + * Role management policy + */ +export interface RoleManagementPolicyAssignment { + /** + * The role management policy Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The role management policy name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The role management policy type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The role management policy scope. + */ + scope?: string; + /** + * The role definition of management policy assignment. + */ + roleDefinitionId?: string; + /** + * The policy id role management policy assignment. + */ + policyId?: string; + /** + * Additional properties of scope, role definition and policy + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly policyAssignmentProperties?: PolicyAssignmentProperties; +} + +/** + * Optional Parameters. + */ +export interface DenyAssignmentsListForResourceOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at + * or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by + * name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, + * above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq + * '{id}' to return all deny assignments at, above and below the scope for the specified + * principal. This filter is different from the principalId filter as it returns not only those + * deny assignments that contain the specified principal is the Principals list but also those + * deny assignments that contain the specified principal is the ExcludePrincipals list. + * Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and + * description properties are returned. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface DenyAssignmentsListForResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at + * or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by + * name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, + * above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq + * '{id}' to return all deny assignments at, above and below the scope for the specified + * principal. This filter is different from the principalId filter as it returns not only those + * deny assignments that contain the specified principal is the Principals list but also those + * deny assignments that contain the specified principal is the ExcludePrincipals list. + * Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and + * description properties are returned. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface DenyAssignmentsListOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at + * or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by + * name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, + * above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq + * '{id}' to return all deny assignments at, above and below the scope for the specified + * principal. This filter is different from the principalId filter as it returns not only those + * deny assignments that contain the specified principal is the Principals list but also those + * deny assignments that contain the specified principal is the ExcludePrincipals list. + * Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and + * description properties are returned. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface DenyAssignmentsListForScopeOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at + * or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by + * name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, + * above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq + * '{id}' to return all deny assignments at, above and below the scope for the specified + * principal. This filter is different from the principalId filter as it returns not only those + * deny assignments that contain the specified principal is the Principals list but also those + * deny assignments that contain the specified principal is the ExcludePrincipals list. + * Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and + * description properties are returned. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface DenyAssignmentsListForResourceNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at + * or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by + * name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, + * above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq + * '{id}' to return all deny assignments at, above and below the scope for the specified + * principal. This filter is different from the principalId filter as it returns not only those + * deny assignments that contain the specified principal is the Principals list but also those + * deny assignments that contain the specified principal is the ExcludePrincipals list. + * Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and + * description properties are returned. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface DenyAssignmentsListForResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at + * or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by + * name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, + * above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq + * '{id}' to return all deny assignments at, above and below the scope for the specified + * principal. This filter is different from the principalId filter as it returns not only those + * deny assignments that contain the specified principal is the Principals list but also those + * deny assignments that contain the specified principal is the ExcludePrincipals list. + * Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and + * description properties are returned. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface DenyAssignmentsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at + * or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by + * name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, + * above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq + * '{id}' to return all deny assignments at, above and below the scope for the specified + * principal. This filter is different from the principalId filter as it returns not only those + * deny assignments that contain the specified principal is the Principals list but also those + * deny assignments that contain the specified principal is the ExcludePrincipals list. + * Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and + * description properties are returned. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface DenyAssignmentsListForScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at + * or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by + * name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, + * above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq + * '{id}' to return all deny assignments at, above and below the scope for the specified + * principal. This filter is different from the principalId filter as it returns not only those + * deny assignments that contain the specified principal is the Principals list but also those + * deny assignments that contain the specified principal is the ExcludePrincipals list. + * Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and + * description properties are returned. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface ProviderOperationsMetadataGetOptionalParams extends msRest.RequestOptionsBase { + /** + * Specifies whether to expand the values. Default value: 'resourceTypes'. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface ProviderOperationsMetadataListOptionalParams extends msRest.RequestOptionsBase { + /** + * Specifies whether to expand the values. Default value: 'resourceTypes'. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface ProviderOperationsMetadataListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Specifies whether to expand the values. Default value: 'resourceTypes'. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentsListForSubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at + * or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above + * or below the scope for the specified principal. + */ + filter?: string; + /** + * Tenant ID for cross-tenant request + */ + tenantId?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentsListForResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at + * or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above + * or below the scope for the specified principal. + */ + filter?: string; + /** + * Tenant ID for cross-tenant request + */ + tenantId?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentsListForResourceOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at + * or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above + * or below the scope for the specified principal. + */ + filter?: string; + /** + * Tenant ID for cross-tenant request + */ + tenantId?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * Tenant ID for cross-tenant request + */ + tenantId?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentsDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * Tenant ID for cross-tenant request + */ + tenantId?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentsListForScopeOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at + * or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above + * or below the scope for the specified principal. + */ + filter?: string; + /** + * Tenant ID for cross-tenant request + */ + tenantId?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentsGetByIdOptionalParams extends msRest.RequestOptionsBase { + /** + * Tenant ID for cross-tenant request + */ + tenantId?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentsDeleteByIdOptionalParams extends msRest.RequestOptionsBase { + /** + * Tenant ID for cross-tenant request + */ + tenantId?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentsListForSubscriptionNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at + * or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above + * or below the scope for the specified principal. + */ + filter?: string; + /** + * Tenant ID for cross-tenant request + */ + tenantId?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentsListForResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at + * or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above + * or below the scope for the specified principal. + */ + filter?: string; + /** + * Tenant ID for cross-tenant request + */ + tenantId?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentsListForResourceNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at + * or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above + * or below the scope for the specified principal. + */ + filter?: string; + /** + * Tenant ID for cross-tenant request + */ + tenantId?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentsListForScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at + * or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above + * or below the scope for the specified principal. + */ + filter?: string; + /** + * Tenant ID for cross-tenant request + */ + tenantId?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleDefinitionsListOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use atScopeAndBelow filter to search below the given + * scope as well. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleDefinitionsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use atScopeAndBelow filter to search below the given + * scope as well. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface EligibleChildResourcesGetOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=resourceType+eq+'Subscription' to filter on + * only resource of type = 'Subscription'. Use + * $filter=resourceType+eq+'subscription'+or+resourceType+eq+'resourcegroup' to filter on + * resource of type = 'Subscription' or 'ResourceGroup' + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface EligibleChildResourcesGetNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=resourceType+eq+'Subscription' to filter on + * only resource of type = 'Subscription'. Use + * $filter=resourceType+eq+'subscription'+or+resourceType+eq+'resourcegroup' to filter on + * resource of type = 'Subscription' or 'ResourceGroup' + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentSchedulesListForScopeOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignment + * schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment + * schedules at, above or below the scope for the specified principal. Use + * $filter=assignedTo('{userId}') to return all role assignment schedules for the current user. + * Use $filter=asTarget() to return all role assignment schedules created for the current user. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentSchedulesListForScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignment + * schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment + * schedules at, above or below the scope for the specified principal. Use + * $filter=assignedTo('{userId}') to return all role assignment schedules for the current user. + * Use $filter=asTarget() to return all role assignment schedules created for the current user. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentScheduleInstancesListForScopeOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignment + * schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment + * schedules at, above or below the scope for the specified principal. Use + * $filter=assignedTo('{userId}') to return all role assignment schedule instances for the user. + * Use $filter=asTarget() to return all role assignment schedule instances created for the + * current user. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentScheduleInstancesListForScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignment + * schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment + * schedules at, above or below the scope for the specified principal. Use + * $filter=assignedTo('{userId}') to return all role assignment schedule instances for the user. + * Use $filter=asTarget() to return all role assignment schedule instances created for the + * current user. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentScheduleRequestsListForScopeOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignment + * schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role + * assignment schedule requests at, above or below the scope for the specified principal. Use + * $filter=asRequestor() to return all role assignment schedule requests requested by the current + * user. Use $filter=asTarget() to return all role assignment schedule requests created for the + * current user. Use $filter=asApprover() to return all role assignment schedule requests where + * the current user is an approver. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleAssignmentScheduleRequestsListForScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignment + * schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role + * assignment schedule requests at, above or below the scope for the specified principal. Use + * $filter=asRequestor() to return all role assignment schedule requests requested by the current + * user. Use $filter=asTarget() to return all role assignment schedule requests created for the + * current user. Use $filter=asApprover() to return all role assignment schedule requests where + * the current user is an approver. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleEligibilitySchedulesListForScopeOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role eligibility + * schedules at or above the scope. Use $filter=principalId eq {id} to return all role + * eligibility schedules at, above or below the scope for the specified principal. Use + * $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use + * $filter=asTarget() to return all role eligibility schedules created for the current user. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleEligibilitySchedulesListForScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role eligibility + * schedules at or above the scope. Use $filter=principalId eq {id} to return all role + * eligibility schedules at, above or below the scope for the specified principal. Use + * $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use + * $filter=asTarget() to return all role eligibility schedules created for the current user. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleEligibilityScheduleInstancesListForScopeOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignment + * schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment + * schedules at, above or below the scope for the specified principal. Use + * $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use + * $filter=asTarget() to return all role eligibility schedules created for the current user. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleEligibilityScheduleInstancesListForScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignment + * schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment + * schedules at, above or below the scope for the specified principal. Use + * $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use + * $filter=asTarget() to return all role eligibility schedules created for the current user. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleEligibilityScheduleRequestsListForScopeOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role eligibility + * schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role + * eligibility schedule requests at, above or below the scope for the specified principal. Use + * $filter=asRequestor() to return all role eligibility schedule requests requested by the + * current user. Use $filter=asTarget() to return all role eligibility schedule requests created + * for the current user. Use $filter=asApprover() to return all role eligibility schedule + * requests where the current user is an approver. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface RoleEligibilityScheduleRequestsListForScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role eligibility + * schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role + * eligibility schedule requests at, above or below the scope for the specified principal. Use + * $filter=asRequestor() to return all role eligibility schedule requests requested by the + * current user. Use $filter=asTarget() to return all role eligibility schedule requests created + * for the current user. Use $filter=asApprover() to return all role eligibility schedule + * requests where the current user is an approver. + */ + filter?: string; +} + +/** + * An interface representing AuthorizationManagementClientOptions. + */ +export interface AuthorizationManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * The result of a request to list Microsoft.Authorization operations. + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * The URI that can be used to request the next set of paged results. + */ + nextLink?: string; +} + +/** + * @interface + * List of Access Review Schedule Definitions. + * @extends Array + */ +export interface AccessReviewScheduleDefinitionListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * List of Access Review Instances. + * @extends Array + */ +export interface AccessReviewInstanceListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * List of access review decisions. + * @extends Array + */ +export interface AccessReviewDecisionListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Deny assignment list operation result. + * @extends Array + */ +export interface DenyAssignmentListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Provider operations metadata list + * @extends Array + */ +export interface ProviderOperationsMetadataListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Role assignment list operation result. + * @extends Array + */ +export interface RoleAssignmentListResult 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; +} + +/** + * @interface + * Permissions information. + * @extends Array + */ +export interface PermissionGetResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Role definition list operation result. + * @extends Array + */ +export interface RoleDefinitionListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Eligible child resources list operation result. + * @extends Array + */ +export interface EligibleChildResourcesListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Role assignment schedule list operation result. + * @extends Array + */ +export interface RoleAssignmentScheduleListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Role assignment schedule instance list operation result. + * @extends Array + */ +export interface RoleAssignmentScheduleInstanceListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Role assignment schedule request list operation result. + * @extends Array + */ +export interface RoleAssignmentScheduleRequestListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * role eligibility schedule list operation result. + * @extends Array + */ +export interface RoleEligibilityScheduleListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Role eligibility schedule instance list operation result. + * @extends Array + */ +export interface RoleEligibilityScheduleInstanceListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Role eligibility schedule request list operation result. + * @extends Array + */ +export interface RoleEligibilityScheduleRequestListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Role management policy list operation result. + * @extends Array + */ +export interface RoleManagementPolicyListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * Role management policy assignment list operation result. + * @extends Array + */ +export interface RoleManagementPolicyAssignmentListResult extends Array { + /** + * The URL to use for getting the next set of results. + */ + nextLink?: string; +} + +/** + * Defines values for AccessReviewScheduleDefinitionStatus. + * Possible values include: 'NotStarted', 'InProgress', 'Completed', 'Applied', 'Initializing', + * 'Applying', 'Completing', 'Scheduled', 'AutoReviewing', 'AutoReviewed', 'Starting' + * @readonly + * @enum {string} + */ +export type AccessReviewScheduleDefinitionStatus = 'NotStarted' | 'InProgress' | 'Completed' | 'Applied' | 'Initializing' | 'Applying' | 'Completing' | 'Scheduled' | 'AutoReviewing' | 'AutoReviewed' | 'Starting'; + +/** + * Defines values for AccessReviewActorIdentityType. + * Possible values include: 'user', 'servicePrincipal' + * @readonly + * @enum {string} + */ +export type AccessReviewActorIdentityType = 'user' | 'servicePrincipal'; + +/** + * Defines values for DefaultDecisionType. + * Possible values include: 'Approve', 'Deny', 'Recommendation' + * @readonly + * @enum {string} + */ +export type DefaultDecisionType = 'Approve' | 'Deny' | 'Recommendation'; + +/** + * Defines values for AccessReviewRecurrencePatternType. + * Possible values include: 'weekly', 'absoluteMonthly' + * @readonly + * @enum {string} + */ +export type AccessReviewRecurrencePatternType = 'weekly' | 'absoluteMonthly'; + +/** + * Defines values for AccessReviewRecurrenceRangeType. + * Possible values include: 'endDate', 'noEnd', 'numbered' + * @readonly + * @enum {string} + */ +export type AccessReviewRecurrenceRangeType = 'endDate' | 'noEnd' | 'numbered'; + +/** + * Defines values for AccessReviewScopePrincipalType. + * Possible values include: 'user', 'servicePrincipal' + * @readonly + * @enum {string} + */ +export type AccessReviewScopePrincipalType = 'user' | 'servicePrincipal'; + +/** + * Defines values for AccessReviewReviewerType. + * Possible values include: 'user', 'servicePrincipal' + * @readonly + * @enum {string} + */ +export type AccessReviewReviewerType = 'user' | 'servicePrincipal'; + +/** + * Defines values for AccessReviewScheduleDefinitionReviewersType. + * Possible values include: 'Assigned', 'Self', 'Managers' + * @readonly + * @enum {string} + */ +export type AccessReviewScheduleDefinitionReviewersType = 'Assigned' | 'Self' | 'Managers'; + +/** + * Defines values for AccessReviewInstanceStatus. + * Possible values include: 'NotStarted', 'InProgress', 'Completed', 'Applied', 'Initializing', + * 'Applying', 'Completing', 'Scheduled', 'AutoReviewing', 'AutoReviewed', 'Starting' + * @readonly + * @enum {string} + */ +export type AccessReviewInstanceStatus = 'NotStarted' | 'InProgress' | 'Completed' | 'Applied' | 'Initializing' | 'Applying' | 'Completing' | 'Scheduled' | 'AutoReviewing' | 'AutoReviewed' | 'Starting'; + +/** + * Defines values for AccessRecommendationType. + * Possible values include: 'Approve', 'Deny', 'NoInfoAvailable' + * @readonly + * @enum {string} + */ +export type AccessRecommendationType = 'Approve' | 'Deny' | 'NoInfoAvailable'; + +/** + * Defines values for AccessReviewResult. + * Possible values include: 'Approve', 'Deny', 'NotReviewed', 'DontKnow', 'NotNotified' + * @readonly + * @enum {string} + */ +export type AccessReviewResult = 'Approve' | 'Deny' | 'NotReviewed' | 'DontKnow' | 'NotNotified'; + +/** + * Defines values for AccessReviewApplyResult. + * Possible values include: 'New', 'Applying', 'AppliedSuccessfully', 'AppliedWithUnknownFailure', + * 'AppliedSuccessfullyButObjectNotFound', 'ApplyNotSupported' + * @readonly + * @enum {string} + */ +export type AccessReviewApplyResult = 'New' | 'Applying' | 'AppliedSuccessfully' | 'AppliedWithUnknownFailure' | 'AppliedSuccessfullyButObjectNotFound' | 'ApplyNotSupported'; + +/** + * Defines values for PrincipalType. + * Possible values include: 'User', 'Group', 'ServicePrincipal', 'ForeignGroup', 'Device' + * @readonly + * @enum {string} + */ +export type PrincipalType = 'User' | 'Group' | 'ServicePrincipal' | 'ForeignGroup' | 'Device'; + +/** + * Defines values for AssignmentType. + * Possible values include: 'Activated', 'Assigned' + * @readonly + * @enum {string} + */ +export type AssignmentType = 'Activated' | 'Assigned'; + +/** + * Defines values for MemberType. + * Possible values include: 'Inherited', 'Direct', 'Group' + * @readonly + * @enum {string} + */ +export type MemberType = 'Inherited' | 'Direct' | 'Group'; + +/** + * Defines values for Status. + * Possible values include: 'Accepted', 'PendingEvaluation', 'Granted', 'Denied', + * 'PendingProvisioning', 'Provisioned', 'PendingRevocation', 'Revoked', 'Canceled', 'Failed', + * 'PendingApprovalProvisioning', 'PendingApproval', 'FailedAsResourceIsLocked', + * 'PendingAdminDecision', 'AdminApproved', 'AdminDenied', 'TimedOut', 'ProvisioningStarted', + * 'Invalid', 'PendingScheduleCreation', 'ScheduleCreated', 'PendingExternalProvisioning' + * @readonly + * @enum {string} + */ +export type Status = 'Accepted' | 'PendingEvaluation' | 'Granted' | 'Denied' | 'PendingProvisioning' | 'Provisioned' | 'PendingRevocation' | 'Revoked' | 'Canceled' | 'Failed' | 'PendingApprovalProvisioning' | 'PendingApproval' | 'FailedAsResourceIsLocked' | 'PendingAdminDecision' | 'AdminApproved' | 'AdminDenied' | 'TimedOut' | 'ProvisioningStarted' | 'Invalid' | 'PendingScheduleCreation' | 'ScheduleCreated' | 'PendingExternalProvisioning'; + +/** + * Defines values for RequestType. + * Possible values include: 'AdminAssign', 'AdminRemove', 'AdminUpdate', 'AdminExtend', + * 'AdminRenew', 'SelfActivate', 'SelfDeactivate', 'SelfExtend', 'SelfRenew' + * @readonly + * @enum {string} + */ +export type RequestType = 'AdminAssign' | 'AdminRemove' | 'AdminUpdate' | 'AdminExtend' | 'AdminRenew' | 'SelfActivate' | 'SelfDeactivate' | 'SelfExtend' | 'SelfRenew'; + +/** + * Defines values for Type. + * Possible values include: 'AfterDuration', 'AfterDateTime', 'NoExpiration' + * @readonly + * @enum {string} + */ +export type Type = 'AfterDuration' | 'AfterDateTime' | 'NoExpiration'; + +/** + * Defines values for ApprovalMode. + * Possible values include: 'SingleStage', 'Serial', 'Parallel', 'NoApproval' + * @readonly + * @enum {string} + */ +export type ApprovalMode = 'SingleStage' | 'Serial' | 'Parallel' | 'NoApproval'; + +/** + * Defines values for UserType. + * Possible values include: 'User', 'Group' + * @readonly + * @enum {string} + */ +export type UserType = 'User' | 'Group'; + +/** + * Defines values for EnablementRules. + * Possible values include: 'MultiFactorAuthentication', 'Justification', 'Ticketing' + * @readonly + * @enum {string} + */ +export type EnablementRules = 'MultiFactorAuthentication' | 'Justification' | 'Ticketing'; + +/** + * Defines values for NotificationDeliveryMechanism. + * Possible values include: 'Email' + * @readonly + * @enum {string} + */ +export type NotificationDeliveryMechanism = 'Email'; + +/** + * Defines values for NotificationLevel. + * Possible values include: 'None', 'Critical', 'All' + * @readonly + * @enum {string} + */ +export type NotificationLevel = 'None' | 'Critical' | 'All'; + +/** + * Defines values for RecipientType. + * Possible values include: 'Requestor', 'Approver', 'Admin' + * @readonly + * @enum {string} + */ +export type RecipientType = 'Requestor' | 'Approver' | 'Admin'; + +/** + * Defines values for RoleManagementPolicyRuleType. + * Possible values include: 'RoleManagementPolicyApprovalRule', + * 'RoleManagementPolicyAuthenticationContextRule', 'RoleManagementPolicyEnablementRule', + * 'RoleManagementPolicyExpirationRule', 'RoleManagementPolicyNotificationRule' + * @readonly + * @enum {string} + */ +export type RoleManagementPolicyRuleType = 'RoleManagementPolicyApprovalRule' | 'RoleManagementPolicyAuthenticationContextRule' | 'RoleManagementPolicyEnablementRule' | 'RoleManagementPolicyExpirationRule' | 'RoleManagementPolicyNotificationRule'; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AccessReviewScheduleDefinitionsListResponse = AccessReviewScheduleDefinitionListResult & { + /** + * 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: AccessReviewScheduleDefinitionListResult; + }; +}; + +/** + * Contains response data for the getById operation. + */ +export type AccessReviewScheduleDefinitionsGetByIdResponse = AccessReviewScheduleDefinition & { + /** + * 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: AccessReviewScheduleDefinition; + }; +}; + +/** + * Contains response data for the createOrUpdateById operation. + */ +export type AccessReviewScheduleDefinitionsCreateOrUpdateByIdResponse = AccessReviewScheduleDefinition & { + /** + * 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: AccessReviewScheduleDefinition; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AccessReviewScheduleDefinitionsListNextResponse = AccessReviewScheduleDefinitionListResult & { + /** + * 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: AccessReviewScheduleDefinitionListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AccessReviewInstancesListResponse = AccessReviewInstanceListResult & { + /** + * 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: AccessReviewInstanceListResult; + }; +}; + +/** + * Contains response data for the getById operation. + */ +export type AccessReviewInstancesGetByIdResponse = AccessReviewInstance & { + /** + * 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: AccessReviewInstance; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AccessReviewInstancesListNextResponse = AccessReviewInstanceListResult & { + /** + * 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: AccessReviewInstanceListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AccessReviewInstanceDecisionsListResponse = AccessReviewDecisionListResult & { + /** + * 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: AccessReviewDecisionListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AccessReviewInstanceDecisionsListNextResponse = AccessReviewDecisionListResult & { + /** + * 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: AccessReviewDecisionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AccessReviewDefaultSettingsGetResponse = AccessReviewDefaultSettings & { + /** + * 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: AccessReviewDefaultSettings; + }; +}; + +/** + * Contains response data for the put operation. + */ +export type AccessReviewDefaultSettingsPutResponse = AccessReviewDefaultSettings & { + /** + * 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: AccessReviewDefaultSettings; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AccessReviewScheduleDefinitionsAssignedForMyApprovalListResponse = AccessReviewScheduleDefinitionListResult & { + /** + * 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: AccessReviewScheduleDefinitionListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AccessReviewScheduleDefinitionsAssignedForMyApprovalListNextResponse = AccessReviewScheduleDefinitionListResult & { + /** + * 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: AccessReviewScheduleDefinitionListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AccessReviewInstancesAssignedForMyApprovalListResponse = AccessReviewInstanceListResult & { + /** + * 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: AccessReviewInstanceListResult; + }; +}; + +/** + * Contains response data for the getById operation. + */ +export type AccessReviewInstancesAssignedForMyApprovalGetByIdResponse = AccessReviewInstance & { + /** + * 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: AccessReviewInstance; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AccessReviewInstancesAssignedForMyApprovalListNextResponse = AccessReviewInstanceListResult & { + /** + * 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: AccessReviewInstanceListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AccessReviewInstanceMyDecisionsListResponse = AccessReviewDecisionListResult & { + /** + * 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: AccessReviewDecisionListResult; + }; +}; + +/** + * Contains response data for the getById operation. + */ +export type AccessReviewInstanceMyDecisionsGetByIdResponse = AccessReviewDecision & { + /** + * 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: AccessReviewDecision; + }; +}; + +/** + * Contains response data for the patch operation. + */ +export type AccessReviewInstanceMyDecisionsPatchResponse = AccessReviewDecision & { + /** + * 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: AccessReviewDecision; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AccessReviewInstanceMyDecisionsListNextResponse = AccessReviewDecisionListResult & { + /** + * 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: AccessReviewDecisionListResult; + }; +}; + +/** + * Contains response data for the listForResource operation. + */ +export type DenyAssignmentsListForResourceResponse = DenyAssignmentListResult & { + /** + * 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: DenyAssignmentListResult; + }; +}; + +/** + * Contains response data for the listForResourceGroup operation. + */ +export type DenyAssignmentsListForResourceGroupResponse = DenyAssignmentListResult & { + /** + * 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: DenyAssignmentListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type DenyAssignmentsListResponse = DenyAssignmentListResult & { + /** + * 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: DenyAssignmentListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DenyAssignmentsGetResponse = DenyAssignment & { + /** + * 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: DenyAssignment; + }; +}; + +/** + * Contains response data for the getById operation. + */ +export type DenyAssignmentsGetByIdResponse = DenyAssignment & { + /** + * 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: DenyAssignment; + }; +}; + +/** + * Contains response data for the listForScope operation. + */ +export type DenyAssignmentsListForScopeResponse = DenyAssignmentListResult & { + /** + * 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: DenyAssignmentListResult; + }; +}; + +/** + * Contains response data for the listForResourceNext operation. + */ +export type DenyAssignmentsListForResourceNextResponse = DenyAssignmentListResult & { + /** + * 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: DenyAssignmentListResult; + }; +}; + +/** + * Contains response data for the listForResourceGroupNext operation. + */ +export type DenyAssignmentsListForResourceGroupNextResponse = DenyAssignmentListResult & { + /** + * 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: DenyAssignmentListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type DenyAssignmentsListNextResponse = DenyAssignmentListResult & { + /** + * 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: DenyAssignmentListResult; + }; +}; + +/** + * Contains response data for the listForScopeNext operation. + */ +export type DenyAssignmentsListForScopeNextResponse = DenyAssignmentListResult & { + /** + * 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: DenyAssignmentListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ProviderOperationsMetadataGetResponse = ProviderOperationsMetadata & { + /** + * 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: ProviderOperationsMetadata; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ProviderOperationsMetadataListResponse = ProviderOperationsMetadataListResult & { + /** + * 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: ProviderOperationsMetadataListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ProviderOperationsMetadataListNextResponse = ProviderOperationsMetadataListResult & { + /** + * 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: ProviderOperationsMetadataListResult; + }; +}; + +/** + * Contains response data for the listForSubscription operation. + */ +export type RoleAssignmentsListForSubscriptionResponse = RoleAssignmentListResult & { + /** + * 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: RoleAssignmentListResult; + }; +}; + +/** + * Contains response data for the listForResourceGroup operation. + */ +export type RoleAssignmentsListForResourceGroupResponse = RoleAssignmentListResult & { + /** + * 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: RoleAssignmentListResult; + }; +}; + +/** + * Contains response data for the listForResource operation. + */ +export type RoleAssignmentsListForResourceResponse = RoleAssignmentListResult & { + /** + * 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: RoleAssignmentListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RoleAssignmentsGetResponse = RoleAssignment & { + /** + * 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: RoleAssignment; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type RoleAssignmentsCreateResponse = RoleAssignment & { + /** + * 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: RoleAssignment; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type RoleAssignmentsDeleteMethodResponse = RoleAssignment & { + /** + * 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: RoleAssignment; + }; +}; + +/** + * Contains response data for the validate operation. + */ +export type RoleAssignmentsValidateResponse = ValidationResponse & { + /** + * 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: ValidationResponse; + }; +}; + +/** + * Contains response data for the listForScope operation. + */ +export type RoleAssignmentsListForScopeResponse = RoleAssignmentListResult & { + /** + * 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: RoleAssignmentListResult; + }; +}; + +/** + * Contains response data for the getById operation. + */ +export type RoleAssignmentsGetByIdResponse = RoleAssignment & { + /** + * 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: RoleAssignment; + }; +}; + +/** + * Contains response data for the createById operation. + */ +export type RoleAssignmentsCreateByIdResponse = RoleAssignment & { + /** + * 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: RoleAssignment; + }; +}; + +/** + * Contains response data for the deleteById operation. + */ +export type RoleAssignmentsDeleteByIdResponse = RoleAssignment & { + /** + * 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: RoleAssignment; + }; +}; + +/** + * Contains response data for the validateById operation. + */ +export type RoleAssignmentsValidateByIdResponse = ValidationResponse & { + /** + * 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: ValidationResponse; + }; +}; + +/** + * Contains response data for the listForSubscriptionNext operation. + */ +export type RoleAssignmentsListForSubscriptionNextResponse = RoleAssignmentListResult & { + /** + * 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: RoleAssignmentListResult; + }; +}; + +/** + * Contains response data for the listForResourceGroupNext operation. + */ +export type RoleAssignmentsListForResourceGroupNextResponse = RoleAssignmentListResult & { + /** + * 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: RoleAssignmentListResult; + }; +}; + +/** + * Contains response data for the listForResourceNext operation. */ -export interface RoleAssignmentListResult extends Array { +export type RoleAssignmentsListForResourceNextResponse = RoleAssignmentListResult & { /** - * The URL to use for getting the next set of results. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: RoleAssignmentListResult; + }; +}; /** - * @interface - * Permissions information. - * @extends Array + * Contains response data for the listForScopeNext operation. */ -export interface PermissionGetResult extends Array { +export type RoleAssignmentsListForScopeNextResponse = RoleAssignmentListResult & { /** - * The URL to use for getting the next set of results. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: RoleAssignmentListResult; + }; +}; /** - * @interface - * Role definition list operation result. - * @extends Array + * Contains response data for the listForResourceGroup operation. */ -export interface RoleDefinitionListResult extends Array { +export type PermissionsListForResourceGroupResponse = PermissionGetResult & { /** - * The URL to use for getting the next set of results. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PermissionGetResult; + }; +}; /** - * @interface - * Deny assignment list operation result. - * @extends Array + * Contains response data for the listForResource operation. */ -export interface DenyAssignmentListResult extends Array { +export type PermissionsListForResourceResponse = PermissionGetResult & { /** - * The URL to use for getting the next set of results. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for PrincipalType. - * Possible values include: 'User', 'Group', 'ServicePrincipal', 'Unknown', - * 'DirectoryRoleTemplate', 'ForeignGroup', 'Application', 'MSI', 'DirectoryObjectOrGroup', - * 'Everyone' - * @readonly - * @enum {string} - */ -export type PrincipalType = 'User' | 'Group' | 'ServicePrincipal' | 'Unknown' | 'DirectoryRoleTemplate' | 'ForeignGroup' | 'Application' | 'MSI' | 'DirectoryObjectOrGroup' | 'Everyone'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PermissionGetResult; + }; +}; /** - * Contains response data for the list operation. + * Contains response data for the listForResourceGroupNext operation. */ -export type ClassicAdministratorsListResponse = ClassicAdministratorListResult & { +export type PermissionsListForResourceGroupNextResponse = PermissionGetResult & { /** * The underlying HTTP response. */ @@ -649,14 +4795,14 @@ export type ClassicAdministratorsListResponse = ClassicAdministratorListResult & /** * The response body as parsed JSON or XML */ - parsedBody: ClassicAdministratorListResult; + parsedBody: PermissionGetResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listForResourceNext operation. */ -export type ClassicAdministratorsListNextResponse = ClassicAdministratorListResult & { +export type PermissionsListForResourceNextResponse = PermissionGetResult & { /** * The underlying HTTP response. */ @@ -669,14 +4815,14 @@ export type ClassicAdministratorsListNextResponse = ClassicAdministratorListResu /** * The response body as parsed JSON or XML */ - parsedBody: ClassicAdministratorListResult; + parsedBody: PermissionGetResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the deleteMethod operation. */ -export type ProviderOperationsMetadataGetResponse = ProviderOperationsMetadata & { +export type RoleDefinitionsDeleteMethodResponse = RoleDefinition & { /** * The underlying HTTP response. */ @@ -689,14 +4835,14 @@ export type ProviderOperationsMetadataGetResponse = ProviderOperationsMetadata & /** * The response body as parsed JSON or XML */ - parsedBody: ProviderOperationsMetadata; + parsedBody: RoleDefinition; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type ProviderOperationsMetadataListResponse = ProviderOperationsMetadataListResult & { +export type RoleDefinitionsGetResponse = RoleDefinition & { /** * The underlying HTTP response. */ @@ -709,14 +4855,14 @@ export type ProviderOperationsMetadataListResponse = ProviderOperationsMetadataL /** * The response body as parsed JSON or XML */ - parsedBody: ProviderOperationsMetadataListResult; + parsedBody: RoleDefinition; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the createOrUpdate operation. */ -export type ProviderOperationsMetadataListNextResponse = ProviderOperationsMetadataListResult & { +export type RoleDefinitionsCreateOrUpdateResponse = RoleDefinition & { /** * The underlying HTTP response. */ @@ -729,14 +4875,14 @@ export type ProviderOperationsMetadataListNextResponse = ProviderOperationsMetad /** * The response body as parsed JSON or XML */ - parsedBody: ProviderOperationsMetadataListResult; + parsedBody: RoleDefinition; }; }; /** - * Contains response data for the listForResource operation. + * Contains response data for the list operation. */ -export type RoleAssignmentsListForResourceResponse = RoleAssignmentListResult & { +export type RoleDefinitionsListResponse = RoleDefinitionListResult & { /** * The underlying HTTP response. */ @@ -749,14 +4895,14 @@ export type RoleAssignmentsListForResourceResponse = RoleAssignmentListResult & /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignmentListResult; + parsedBody: RoleDefinitionListResult; }; }; /** - * Contains response data for the listForResourceGroup operation. + * Contains response data for the getById operation. */ -export type RoleAssignmentsListForResourceGroupResponse = RoleAssignmentListResult & { +export type RoleDefinitionsGetByIdResponse = RoleDefinition & { /** * The underlying HTTP response. */ @@ -769,14 +4915,14 @@ export type RoleAssignmentsListForResourceGroupResponse = RoleAssignmentListResu /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignmentListResult; + parsedBody: RoleDefinition; }; }; /** - * Contains response data for the deleteMethod operation. + * Contains response data for the listNext operation. */ -export type RoleAssignmentsDeleteMethodResponse = RoleAssignment & { +export type RoleDefinitionsListNextResponse = RoleDefinitionListResult & { /** * The underlying HTTP response. */ @@ -789,14 +4935,14 @@ export type RoleAssignmentsDeleteMethodResponse = RoleAssignment & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignment; + parsedBody: RoleDefinitionListResult; }; }; /** - * Contains response data for the create operation. + * Contains response data for the getMetricsForSubscription operation. */ -export type RoleAssignmentsCreateResponse = RoleAssignment & { +export type RoleAssignmentMetricsGetMetricsForSubscriptionResponse = RoleAssignmentMetricsResult & { /** * The underlying HTTP response. */ @@ -809,14 +4955,14 @@ export type RoleAssignmentsCreateResponse = RoleAssignment & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignment; + parsedBody: RoleAssignmentMetricsResult; }; }; /** * Contains response data for the get operation. */ -export type RoleAssignmentsGetResponse = RoleAssignment & { +export type EligibleChildResourcesGetResponse = EligibleChildResourcesListResult & { /** * The underlying HTTP response. */ @@ -829,14 +4975,14 @@ export type RoleAssignmentsGetResponse = RoleAssignment & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignment; + parsedBody: EligibleChildResourcesListResult; }; }; /** - * Contains response data for the deleteById operation. + * Contains response data for the getNext operation. */ -export type RoleAssignmentsDeleteByIdResponse = RoleAssignment & { +export type EligibleChildResourcesGetNextResponse = EligibleChildResourcesListResult & { /** * The underlying HTTP response. */ @@ -849,14 +4995,14 @@ export type RoleAssignmentsDeleteByIdResponse = RoleAssignment & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignment; + parsedBody: EligibleChildResourcesListResult; }; }; /** - * Contains response data for the createById operation. + * Contains response data for the get operation. */ -export type RoleAssignmentsCreateByIdResponse = RoleAssignment & { +export type RoleAssignmentSchedulesGetResponse = RoleAssignmentSchedule & { /** * The underlying HTTP response. */ @@ -869,14 +5015,14 @@ export type RoleAssignmentsCreateByIdResponse = RoleAssignment & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignment; + parsedBody: RoleAssignmentSchedule; }; }; /** - * Contains response data for the getById operation. + * Contains response data for the listForScope operation. */ -export type RoleAssignmentsGetByIdResponse = RoleAssignment & { +export type RoleAssignmentSchedulesListForScopeResponse = RoleAssignmentScheduleListResult & { /** * The underlying HTTP response. */ @@ -889,14 +5035,14 @@ export type RoleAssignmentsGetByIdResponse = RoleAssignment & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignment; + parsedBody: RoleAssignmentScheduleListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listForScopeNext operation. */ -export type RoleAssignmentsListResponse = RoleAssignmentListResult & { +export type RoleAssignmentSchedulesListForScopeNextResponse = RoleAssignmentScheduleListResult & { /** * The underlying HTTP response. */ @@ -909,14 +5055,14 @@ export type RoleAssignmentsListResponse = RoleAssignmentListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignmentListResult; + parsedBody: RoleAssignmentScheduleListResult; }; }; /** * Contains response data for the listForScope operation. */ -export type RoleAssignmentsListForScopeResponse = RoleAssignmentListResult & { +export type RoleAssignmentScheduleInstancesListForScopeResponse = RoleAssignmentScheduleInstanceListResult & { /** * The underlying HTTP response. */ @@ -929,14 +5075,14 @@ export type RoleAssignmentsListForScopeResponse = RoleAssignmentListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignmentListResult; + parsedBody: RoleAssignmentScheduleInstanceListResult; }; }; /** - * Contains response data for the listForResourceNext operation. + * Contains response data for the get operation. */ -export type RoleAssignmentsListForResourceNextResponse = RoleAssignmentListResult & { +export type RoleAssignmentScheduleInstancesGetResponse = RoleAssignmentScheduleInstance & { /** * The underlying HTTP response. */ @@ -949,14 +5095,14 @@ export type RoleAssignmentsListForResourceNextResponse = RoleAssignmentListResul /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignmentListResult; + parsedBody: RoleAssignmentScheduleInstance; }; }; /** - * Contains response data for the listForResourceGroupNext operation. + * Contains response data for the listForScopeNext operation. */ -export type RoleAssignmentsListForResourceGroupNextResponse = RoleAssignmentListResult & { +export type RoleAssignmentScheduleInstancesListForScopeNextResponse = RoleAssignmentScheduleInstanceListResult & { /** * The underlying HTTP response. */ @@ -969,14 +5115,14 @@ export type RoleAssignmentsListForResourceGroupNextResponse = RoleAssignmentList /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignmentListResult; + parsedBody: RoleAssignmentScheduleInstanceListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the create operation. */ -export type RoleAssignmentsListNextResponse = RoleAssignmentListResult & { +export type RoleAssignmentScheduleRequestsCreateResponse = RoleAssignmentScheduleRequest & { /** * The underlying HTTP response. */ @@ -989,14 +5135,14 @@ export type RoleAssignmentsListNextResponse = RoleAssignmentListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignmentListResult; + parsedBody: RoleAssignmentScheduleRequest; }; }; /** - * Contains response data for the listForScopeNext operation. + * Contains response data for the get operation. */ -export type RoleAssignmentsListForScopeNextResponse = RoleAssignmentListResult & { +export type RoleAssignmentScheduleRequestsGetResponse = RoleAssignmentScheduleRequest & { /** * The underlying HTTP response. */ @@ -1009,14 +5155,14 @@ export type RoleAssignmentsListForScopeNextResponse = RoleAssignmentListResult & /** * The response body as parsed JSON or XML */ - parsedBody: RoleAssignmentListResult; + parsedBody: RoleAssignmentScheduleRequest; }; }; /** - * Contains response data for the listForResourceGroup operation. + * Contains response data for the listForScope operation. */ -export type PermissionsListForResourceGroupResponse = PermissionGetResult & { +export type RoleAssignmentScheduleRequestsListForScopeResponse = RoleAssignmentScheduleRequestListResult & { /** * The underlying HTTP response. */ @@ -1029,14 +5175,14 @@ export type PermissionsListForResourceGroupResponse = PermissionGetResult & { /** * The response body as parsed JSON or XML */ - parsedBody: PermissionGetResult; + parsedBody: RoleAssignmentScheduleRequestListResult; }; }; /** - * Contains response data for the listForResource operation. + * Contains response data for the listForScopeNext operation. */ -export type PermissionsListForResourceResponse = PermissionGetResult & { +export type RoleAssignmentScheduleRequestsListForScopeNextResponse = RoleAssignmentScheduleRequestListResult & { /** * The underlying HTTP response. */ @@ -1049,14 +5195,14 @@ export type PermissionsListForResourceResponse = PermissionGetResult & { /** * The response body as parsed JSON or XML */ - parsedBody: PermissionGetResult; + parsedBody: RoleAssignmentScheduleRequestListResult; }; }; /** - * Contains response data for the listForResourceGroupNext operation. + * Contains response data for the get operation. */ -export type PermissionsListForResourceGroupNextResponse = PermissionGetResult & { +export type RoleEligibilitySchedulesGetResponse = RoleEligibilitySchedule & { /** * The underlying HTTP response. */ @@ -1069,14 +5215,14 @@ export type PermissionsListForResourceGroupNextResponse = PermissionGetResult & /** * The response body as parsed JSON or XML */ - parsedBody: PermissionGetResult; + parsedBody: RoleEligibilitySchedule; }; }; /** - * Contains response data for the listForResourceNext operation. + * Contains response data for the listForScope operation. */ -export type PermissionsListForResourceNextResponse = PermissionGetResult & { +export type RoleEligibilitySchedulesListForScopeResponse = RoleEligibilityScheduleListResult & { /** * The underlying HTTP response. */ @@ -1089,14 +5235,14 @@ export type PermissionsListForResourceNextResponse = PermissionGetResult & { /** * The response body as parsed JSON or XML */ - parsedBody: PermissionGetResult; + parsedBody: RoleEligibilityScheduleListResult; }; }; /** - * Contains response data for the deleteMethod operation. + * Contains response data for the listForScopeNext operation. */ -export type RoleDefinitionsDeleteMethodResponse = RoleDefinition & { +export type RoleEligibilitySchedulesListForScopeNextResponse = RoleEligibilityScheduleListResult & { /** * The underlying HTTP response. */ @@ -1109,14 +5255,14 @@ export type RoleDefinitionsDeleteMethodResponse = RoleDefinition & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleDefinition; + parsedBody: RoleEligibilityScheduleListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listForScope operation. */ -export type RoleDefinitionsGetResponse = RoleDefinition & { +export type RoleEligibilityScheduleInstancesListForScopeResponse = RoleEligibilityScheduleInstanceListResult & { /** * The underlying HTTP response. */ @@ -1129,14 +5275,14 @@ export type RoleDefinitionsGetResponse = RoleDefinition & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleDefinition; + parsedBody: RoleEligibilityScheduleInstanceListResult; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the get operation. */ -export type RoleDefinitionsCreateOrUpdateResponse = RoleDefinition & { +export type RoleEligibilityScheduleInstancesGetResponse = RoleEligibilityScheduleInstance & { /** * The underlying HTTP response. */ @@ -1149,14 +5295,14 @@ export type RoleDefinitionsCreateOrUpdateResponse = RoleDefinition & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleDefinition; + parsedBody: RoleEligibilityScheduleInstance; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listForScopeNext operation. */ -export type RoleDefinitionsListResponse = RoleDefinitionListResult & { +export type RoleEligibilityScheduleInstancesListForScopeNextResponse = RoleEligibilityScheduleInstanceListResult & { /** * The underlying HTTP response. */ @@ -1169,14 +5315,14 @@ export type RoleDefinitionsListResponse = RoleDefinitionListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleDefinitionListResult; + parsedBody: RoleEligibilityScheduleInstanceListResult; }; }; /** - * Contains response data for the getById operation. + * Contains response data for the create operation. */ -export type RoleDefinitionsGetByIdResponse = RoleDefinition & { +export type RoleEligibilityScheduleRequestsCreateResponse = RoleEligibilityScheduleRequest & { /** * The underlying HTTP response. */ @@ -1189,14 +5335,14 @@ export type RoleDefinitionsGetByIdResponse = RoleDefinition & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleDefinition; + parsedBody: RoleEligibilityScheduleRequest; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type RoleDefinitionsListNextResponse = RoleDefinitionListResult & { +export type RoleEligibilityScheduleRequestsGetResponse = RoleEligibilityScheduleRequest & { /** * The underlying HTTP response. */ @@ -1209,14 +5355,14 @@ export type RoleDefinitionsListNextResponse = RoleDefinitionListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: RoleDefinitionListResult; + parsedBody: RoleEligibilityScheduleRequest; }; }; /** - * Contains response data for the listForResource operation. + * Contains response data for the listForScope operation. */ -export type DenyAssignmentsListForResourceResponse = DenyAssignmentListResult & { +export type RoleEligibilityScheduleRequestsListForScopeResponse = RoleEligibilityScheduleRequestListResult & { /** * The underlying HTTP response. */ @@ -1229,14 +5375,14 @@ export type DenyAssignmentsListForResourceResponse = DenyAssignmentListResult & /** * The response body as parsed JSON or XML */ - parsedBody: DenyAssignmentListResult; + parsedBody: RoleEligibilityScheduleRequestListResult; }; }; /** - * Contains response data for the listForResourceGroup operation. + * Contains response data for the listForScopeNext operation. */ -export type DenyAssignmentsListForResourceGroupResponse = DenyAssignmentListResult & { +export type RoleEligibilityScheduleRequestsListForScopeNextResponse = RoleEligibilityScheduleRequestListResult & { /** * The underlying HTTP response. */ @@ -1249,14 +5395,14 @@ export type DenyAssignmentsListForResourceGroupResponse = DenyAssignmentListResu /** * The response body as parsed JSON or XML */ - parsedBody: DenyAssignmentListResult; + parsedBody: RoleEligibilityScheduleRequestListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type DenyAssignmentsListResponse = DenyAssignmentListResult & { +export type RoleManagementPoliciesGetResponse = RoleManagementPolicy & { /** * The underlying HTTP response. */ @@ -1269,14 +5415,14 @@ export type DenyAssignmentsListResponse = DenyAssignmentListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DenyAssignmentListResult; + parsedBody: RoleManagementPolicy; }; }; /** - * Contains response data for the get operation. + * Contains response data for the update operation. */ -export type DenyAssignmentsGetResponse = DenyAssignment & { +export type RoleManagementPoliciesUpdateResponse = RoleManagementPolicy & { /** * The underlying HTTP response. */ @@ -1289,14 +5435,14 @@ export type DenyAssignmentsGetResponse = DenyAssignment & { /** * The response body as parsed JSON or XML */ - parsedBody: DenyAssignment; + parsedBody: RoleManagementPolicy; }; }; /** - * Contains response data for the getById operation. + * Contains response data for the listForScope operation. */ -export type DenyAssignmentsGetByIdResponse = DenyAssignment & { +export type RoleManagementPoliciesListForScopeResponse = RoleManagementPolicyListResult & { /** * The underlying HTTP response. */ @@ -1309,14 +5455,14 @@ export type DenyAssignmentsGetByIdResponse = DenyAssignment & { /** * The response body as parsed JSON or XML */ - parsedBody: DenyAssignment; + parsedBody: RoleManagementPolicyListResult; }; }; /** - * Contains response data for the listForScope operation. + * Contains response data for the listForScopeNext operation. */ -export type DenyAssignmentsListForScopeResponse = DenyAssignmentListResult & { +export type RoleManagementPoliciesListForScopeNextResponse = RoleManagementPolicyListResult & { /** * The underlying HTTP response. */ @@ -1329,14 +5475,14 @@ export type DenyAssignmentsListForScopeResponse = DenyAssignmentListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DenyAssignmentListResult; + parsedBody: RoleManagementPolicyListResult; }; }; /** - * Contains response data for the listForResourceNext operation. + * Contains response data for the get operation. */ -export type DenyAssignmentsListForResourceNextResponse = DenyAssignmentListResult & { +export type RoleManagementPolicyAssignmentsGetResponse = RoleManagementPolicyAssignment & { /** * The underlying HTTP response. */ @@ -1349,14 +5495,14 @@ export type DenyAssignmentsListForResourceNextResponse = DenyAssignmentListResul /** * The response body as parsed JSON or XML */ - parsedBody: DenyAssignmentListResult; + parsedBody: RoleManagementPolicyAssignment; }; }; /** - * Contains response data for the listForResourceGroupNext operation. + * Contains response data for the create operation. */ -export type DenyAssignmentsListForResourceGroupNextResponse = DenyAssignmentListResult & { +export type RoleManagementPolicyAssignmentsCreateResponse = RoleManagementPolicyAssignment & { /** * The underlying HTTP response. */ @@ -1369,14 +5515,14 @@ export type DenyAssignmentsListForResourceGroupNextResponse = DenyAssignmentList /** * The response body as parsed JSON or XML */ - parsedBody: DenyAssignmentListResult; + parsedBody: RoleManagementPolicyAssignment; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listForScope operation. */ -export type DenyAssignmentsListNextResponse = DenyAssignmentListResult & { +export type RoleManagementPolicyAssignmentsListForScopeResponse = RoleManagementPolicyAssignmentListResult & { /** * The underlying HTTP response. */ @@ -1389,14 +5535,14 @@ export type DenyAssignmentsListNextResponse = DenyAssignmentListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DenyAssignmentListResult; + parsedBody: RoleManagementPolicyAssignmentListResult; }; }; /** * Contains response data for the listForScopeNext operation. */ -export type DenyAssignmentsListForScopeNextResponse = DenyAssignmentListResult & { +export type RoleManagementPolicyAssignmentsListForScopeNextResponse = RoleManagementPolicyAssignmentListResult & { /** * The underlying HTTP response. */ @@ -1409,6 +5555,6 @@ export type DenyAssignmentsListForScopeNextResponse = DenyAssignmentListResult & /** * The response body as parsed JSON or XML */ - parsedBody: DenyAssignmentListResult; + parsedBody: RoleManagementPolicyAssignmentListResult; }; }; diff --git a/sdk/authorization/arm-authorization/src/models/mappers.ts b/sdk/authorization/arm-authorization/src/models/mappers.ts index ee2cfdc282cc..04db0048df61 100644 --- a/sdk/authorization/arm-authorization/src/models/mappers.ts +++ b/sdk/authorization/arm-authorization/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. @@ -12,118 +12,3649 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const ClassicAdministrator: msRest.CompositeMapper = { - serializedName: "ClassicAdministrator", +export const AccessReviewScheduleSettings: msRest.CompositeMapper = { + serializedName: "AccessReviewScheduleSettings", type: { name: "Composite", - className: "ClassicAdministrator", + className: "AccessReviewScheduleSettings", + modelProperties: { + mailNotificationsEnabled: { + serializedName: "mailNotificationsEnabled", + type: { + name: "Boolean" + } + }, + reminderNotificationsEnabled: { + serializedName: "reminderNotificationsEnabled", + type: { + name: "Boolean" + } + }, + defaultDecisionEnabled: { + serializedName: "defaultDecisionEnabled", + type: { + name: "Boolean" + } + }, + justificationRequiredOnApproval: { + serializedName: "justificationRequiredOnApproval", + type: { + name: "Boolean" + } + }, + defaultDecision: { + serializedName: "defaultDecision", + type: { + name: "String" + } + }, + autoApplyDecisionsEnabled: { + serializedName: "autoApplyDecisionsEnabled", + type: { + name: "Boolean" + } + }, + recommendationsEnabled: { + serializedName: "recommendationsEnabled", + type: { + name: "Boolean" + } + }, + instanceDurationInDays: { + serializedName: "instanceDurationInDays", + type: { + name: "Number" + } + }, + recurrence: { + serializedName: "recurrence", + type: { + name: "Composite", + className: "AccessReviewRecurrenceSettings" + } + } + } + } +}; + +export const AccessReviewReviewer: msRest.CompositeMapper = { + serializedName: "AccessReviewReviewer", + type: { + name: "Composite", + className: "AccessReviewReviewer", + modelProperties: { + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + }, + principalType: { + readOnly: true, + serializedName: "principalType", + type: { + name: "String" + } + } + } + } +}; + +export const AccessReviewInstance: msRest.CompositeMapper = { + serializedName: "AccessReviewInstance", + type: { + name: "Composite", + className: "AccessReviewInstance", modelProperties: { id: { + readOnly: true, serializedName: "id", type: { name: "String" } }, name: { + readOnly: true, serializedName: "name", type: { name: "String" } }, type: { + readOnly: true, serializedName: "type", type: { name: "String" } }, - emailAddress: { - serializedName: "properties.emailAddress", + status: { + readOnly: true, + serializedName: "properties.status", type: { name: "String" } }, - role: { - serializedName: "properties.role", + startDateTime: { + nullable: false, + serializedName: "properties.startDateTime", type: { - name: "String" + name: "DateTime" + } + }, + endDateTime: { + nullable: false, + serializedName: "properties.endDateTime", + type: { + name: "DateTime" } } } } }; -export const ProviderOperation: msRest.CompositeMapper = { - serializedName: "ProviderOperation", +export const AccessReviewScheduleDefinitionProperties: msRest.CompositeMapper = { + serializedName: "AccessReviewScheduleDefinitionProperties", type: { name: "Composite", - className: "ProviderOperation", + className: "AccessReviewScheduleDefinitionProperties", modelProperties: { - name: { - serializedName: "name", + displayName: { + serializedName: "displayName", type: { name: "String" } }, - displayName: { - serializedName: "displayName", + status: { + readOnly: true, + serializedName: "status", type: { name: "String" } }, - description: { - serializedName: "description", + descriptionForAdmins: { + serializedName: "descriptionForAdmins", type: { name: "String" } }, - origin: { - serializedName: "origin", + descriptionForReviewers: { + serializedName: "descriptionForReviewers", type: { name: "String" } }, - properties: { - serializedName: "properties", + principalId: { + readOnly: true, + serializedName: "createdBy.principalId", type: { - name: "Object" + name: "String" } }, - isDataAction: { - serializedName: "isDataAction", + principalType: { + readOnly: true, + serializedName: "createdBy.principalType", + type: { + name: "String" + } + }, + principalName: { + readOnly: true, + serializedName: "createdBy.principalName", + type: { + name: "String" + } + }, + userPrincipalName: { + readOnly: true, + serializedName: "createdBy.userPrincipalName", + type: { + name: "String" + } + }, + mailNotificationsEnabled: { + serializedName: "settings.mailNotificationsEnabled", + type: { + name: "Boolean" + } + }, + reminderNotificationsEnabled: { + serializedName: "settings.reminderNotificationsEnabled", + type: { + name: "Boolean" + } + }, + defaultDecisionEnabled: { + serializedName: "settings.defaultDecisionEnabled", + type: { + name: "Boolean" + } + }, + justificationRequiredOnApproval: { + serializedName: "settings.justificationRequiredOnApproval", + type: { + name: "Boolean" + } + }, + defaultDecision: { + serializedName: "settings.defaultDecision", + type: { + name: "String" + } + }, + autoApplyDecisionsEnabled: { + serializedName: "settings.autoApplyDecisionsEnabled", + type: { + name: "Boolean" + } + }, + recommendationsEnabled: { + serializedName: "settings.recommendationsEnabled", type: { name: "Boolean" } + }, + instanceDurationInDays: { + serializedName: "settings.instanceDurationInDays", + type: { + name: "Number" + } + }, + type: { + serializedName: "settings.recurrence.pattern.type", + type: { + name: "String" + } + }, + interval: { + serializedName: "settings.recurrence.pattern.interval", + type: { + name: "Number" + } + }, + type1: { + serializedName: "settings.recurrence.range.type", + type: { + name: "String" + } + }, + numberOfOccurrences: { + serializedName: "settings.recurrence.range.numberOfOccurrences", + type: { + name: "Number" + } + }, + startDate: { + nullable: true, + serializedName: "settings.recurrence.range.startDate", + type: { + name: "DateTime" + } + }, + endDate: { + nullable: true, + serializedName: "settings.recurrence.range.endDate", + type: { + name: "DateTime" + } + }, + resourceId: { + readOnly: true, + serializedName: "scope.resourceId", + type: { + name: "String" + } + }, + roleDefinitionId: { + readOnly: true, + serializedName: "scope.roleDefinitionId", + type: { + name: "String" + } + }, + principalType1: { + readOnly: true, + serializedName: "scope.principalType", + type: { + name: "String" + } + }, + reviewers: { + serializedName: "reviewers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessReviewReviewer" + } + } + } + }, + reviewersType: { + readOnly: true, + serializedName: "reviewersType", + type: { + name: "String" + } + }, + instances: { + serializedName: "instances", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessReviewInstance" + } + } + } } } } }; -export const ResourceType: msRest.CompositeMapper = { - serializedName: "ResourceType", +export const AccessReviewScheduleDefinition: msRest.CompositeMapper = { + serializedName: "AccessReviewScheduleDefinition", type: { name: "Composite", - className: "ResourceType", + className: "AccessReviewScheduleDefinition", modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, name: { + readOnly: true, serializedName: "name", type: { name: "String" } }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, displayName: { - serializedName: "displayName", + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + descriptionForAdmins: { + serializedName: "properties.descriptionForAdmins", + type: { + name: "String" + } + }, + descriptionForReviewers: { + serializedName: "properties.descriptionForReviewers", + type: { + name: "String" + } + }, + principalId: { + readOnly: true, + serializedName: "properties.createdBy.principalId", + type: { + name: "String" + } + }, + principalType: { + readOnly: true, + serializedName: "properties.createdBy.principalType", + type: { + name: "String" + } + }, + principalName: { + readOnly: true, + serializedName: "properties.createdBy.principalName", + type: { + name: "String" + } + }, + userPrincipalName: { + readOnly: true, + serializedName: "properties.createdBy.userPrincipalName", type: { name: "String" } }, - operations: { - serializedName: "operations", + mailNotificationsEnabled: { + serializedName: "properties.settings.mailNotificationsEnabled", + type: { + name: "Boolean" + } + }, + reminderNotificationsEnabled: { + serializedName: "properties.settings.reminderNotificationsEnabled", + type: { + name: "Boolean" + } + }, + defaultDecisionEnabled: { + serializedName: "properties.settings.defaultDecisionEnabled", + type: { + name: "Boolean" + } + }, + justificationRequiredOnApproval: { + serializedName: "properties.settings.justificationRequiredOnApproval", + type: { + name: "Boolean" + } + }, + defaultDecision: { + serializedName: "properties.settings.defaultDecision", + type: { + name: "String" + } + }, + autoApplyDecisionsEnabled: { + serializedName: "properties.settings.autoApplyDecisionsEnabled", + type: { + name: "Boolean" + } + }, + recommendationsEnabled: { + serializedName: "properties.settings.recommendationsEnabled", + type: { + name: "Boolean" + } + }, + instanceDurationInDays: { + serializedName: "properties.settings.instanceDurationInDays", + type: { + name: "Number" + } + }, + type1: { + serializedName: "properties.settings.recurrence.pattern.type", + type: { + name: "String" + } + }, + interval: { + serializedName: "properties.settings.recurrence.pattern.interval", + type: { + name: "Number" + } + }, + type2: { + serializedName: "properties.settings.recurrence.range.type", + type: { + name: "String" + } + }, + numberOfOccurrences: { + serializedName: "properties.settings.recurrence.range.numberOfOccurrences", + type: { + name: "Number" + } + }, + startDate: { + nullable: true, + serializedName: "properties.settings.recurrence.range.startDate", + type: { + name: "DateTime" + } + }, + endDate: { + nullable: true, + serializedName: "properties.settings.recurrence.range.endDate", + type: { + name: "DateTime" + } + }, + resourceId: { + readOnly: true, + serializedName: "properties.scope.resourceId", + type: { + name: "String" + } + }, + roleDefinitionId: { + readOnly: true, + serializedName: "properties.scope.roleDefinitionId", + type: { + name: "String" + } + }, + principalType1: { + readOnly: true, + serializedName: "properties.scope.principalType", + type: { + name: "String" + } + }, + reviewers: { + serializedName: "properties.reviewers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessReviewReviewer" + } + } + } + }, + reviewersType: { + readOnly: true, + serializedName: "properties.reviewersType", + type: { + name: "String" + } + }, + instances: { + serializedName: "properties.instances", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessReviewInstance" + } + } + } + } + } + } +}; + +export const AccessReviewDefaultSettings: msRest.CompositeMapper = { + serializedName: "AccessReviewDefaultSettings", + type: { + name: "Composite", + className: "AccessReviewDefaultSettings", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + mailNotificationsEnabled: { + serializedName: "properties.mailNotificationsEnabled", + type: { + name: "Boolean" + } + }, + reminderNotificationsEnabled: { + serializedName: "properties.reminderNotificationsEnabled", + type: { + name: "Boolean" + } + }, + defaultDecisionEnabled: { + serializedName: "properties.defaultDecisionEnabled", + type: { + name: "Boolean" + } + }, + justificationRequiredOnApproval: { + serializedName: "properties.justificationRequiredOnApproval", + type: { + name: "Boolean" + } + }, + defaultDecision: { + serializedName: "properties.defaultDecision", + type: { + name: "String" + } + }, + autoApplyDecisionsEnabled: { + serializedName: "properties.autoApplyDecisionsEnabled", + type: { + name: "Boolean" + } + }, + recommendationsEnabled: { + serializedName: "properties.recommendationsEnabled", + type: { + name: "Boolean" + } + }, + instanceDurationInDays: { + serializedName: "properties.instanceDurationInDays", + type: { + name: "Number" + } + }, + type1: { + serializedName: "properties.recurrence.pattern.type", + type: { + name: "String" + } + }, + interval: { + serializedName: "properties.recurrence.pattern.interval", + type: { + name: "Number" + } + }, + type2: { + serializedName: "properties.recurrence.range.type", + type: { + name: "String" + } + }, + numberOfOccurrences: { + serializedName: "properties.recurrence.range.numberOfOccurrences", + type: { + name: "Number" + } + }, + startDate: { + nullable: true, + serializedName: "properties.recurrence.range.startDate", + type: { + name: "DateTime" + } + }, + endDate: { + nullable: true, + serializedName: "properties.recurrence.range.endDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AccessReviewDecisionTarget: msRest.CompositeMapper = { + serializedName: "AccessReviewDecisionTarget", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + uberParent: "AccessReviewDecisionTarget", + className: "AccessReviewDecisionTarget", + modelProperties: { + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const AccessReviewDecisionProperties: msRest.CompositeMapper = { + serializedName: "AccessReviewDecisionProperties", + type: { + name: "Composite", + className: "AccessReviewDecisionProperties", + modelProperties: { + type: { + required: true, + serializedName: "target.type", + type: { + name: "String" + } + }, + recommendation: { + readOnly: true, + serializedName: "recommendation", + type: { + name: "String" + } + }, + decision: { + serializedName: "decision", + type: { + name: "String" + } + }, + justification: { + serializedName: "justification", + type: { + name: "String" + } + }, + reviewedDateTime: { + nullable: true, + readOnly: true, + serializedName: "reviewedDateTime", + type: { + name: "DateTime" + } + }, + principalId: { + readOnly: true, + serializedName: "reviewedBy.principalId", + type: { + name: "String" + } + }, + principalType: { + readOnly: true, + serializedName: "reviewedBy.principalType", + type: { + name: "String" + } + }, + principalName: { + readOnly: true, + serializedName: "reviewedBy.principalName", + type: { + name: "String" + } + }, + userPrincipalName: { + readOnly: true, + serializedName: "reviewedBy.userPrincipalName", + type: { + name: "String" + } + }, + applyResult: { + readOnly: true, + serializedName: "applyResult", + type: { + name: "String" + } + }, + appliedDateTime: { + nullable: true, + readOnly: true, + serializedName: "appliedDateTime", + type: { + name: "DateTime" + } + }, + principalId1: { + readOnly: true, + serializedName: "appliedBy.principalId", + type: { + name: "String" + } + }, + principalType1: { + readOnly: true, + serializedName: "appliedBy.principalType", + type: { + name: "String" + } + }, + principalName1: { + readOnly: true, + serializedName: "appliedBy.principalName", + type: { + name: "String" + } + }, + userPrincipalName1: { + readOnly: true, + serializedName: "appliedBy.userPrincipalName", + type: { + name: "String" + } + } + } + } +}; + +export const AccessReviewDecision: msRest.CompositeMapper = { + serializedName: "AccessReviewDecision", + type: { + name: "Composite", + className: "AccessReviewDecision", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + type1: { + required: true, + serializedName: "properties.target.type", + type: { + name: "String" + } + }, + recommendation: { + readOnly: true, + serializedName: "properties.recommendation", + type: { + name: "String" + } + }, + decision: { + serializedName: "properties.decision", + type: { + name: "String" + } + }, + justification: { + serializedName: "properties.justification", + type: { + name: "String" + } + }, + reviewedDateTime: { + nullable: true, + readOnly: true, + serializedName: "properties.reviewedDateTime", + type: { + name: "DateTime" + } + }, + principalId: { + readOnly: true, + serializedName: "properties.reviewedBy.principalId", + type: { + name: "String" + } + }, + principalType: { + readOnly: true, + serializedName: "properties.reviewedBy.principalType", + type: { + name: "String" + } + }, + principalName: { + readOnly: true, + serializedName: "properties.reviewedBy.principalName", + type: { + name: "String" + } + }, + userPrincipalName: { + readOnly: true, + serializedName: "properties.reviewedBy.userPrincipalName", + type: { + name: "String" + } + }, + applyResult: { + readOnly: true, + serializedName: "properties.applyResult", + type: { + name: "String" + } + }, + appliedDateTime: { + nullable: true, + readOnly: true, + serializedName: "properties.appliedDateTime", + type: { + name: "DateTime" + } + }, + principalId1: { + readOnly: true, + serializedName: "properties.appliedBy.principalId", + type: { + name: "String" + } + }, + principalType1: { + readOnly: true, + serializedName: "properties.appliedBy.principalType", + type: { + name: "String" + } + }, + principalName1: { + readOnly: true, + serializedName: "properties.appliedBy.principalName", + type: { + name: "String" + } + }, + userPrincipalName1: { + readOnly: true, + serializedName: "properties.appliedBy.userPrincipalName", + type: { + name: "String" + } + } + } + } +}; + +export const UserDecisionTarget: msRest.CompositeMapper = { + serializedName: "user", + type: { + name: "Composite", + polymorphicDiscriminator: AccessReviewDecisionTarget.type.polymorphicDiscriminator, + uberParent: "AccessReviewDecisionTarget", + className: "UserDecisionTarget", + modelProperties: { + ...AccessReviewDecisionTarget.type.modelProperties, + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + principalName: { + readOnly: true, + serializedName: "principalName", + type: { + name: "String" + } + }, + userPrincipalName: { + readOnly: true, + serializedName: "userPrincipalName", + type: { + name: "String" + } + } + } + } +}; + +export const ServicePrincipalDecisionTarget: msRest.CompositeMapper = { + serializedName: "servicePrincipal", + type: { + name: "Composite", + polymorphicDiscriminator: AccessReviewDecisionTarget.type.polymorphicDiscriminator, + uberParent: "AccessReviewDecisionTarget", + className: "ServicePrincipalDecisionTarget", + modelProperties: { + ...AccessReviewDecisionTarget.type.modelProperties, + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + principalName: { + readOnly: true, + serializedName: "principalName", + type: { + name: "String" + } + }, + appId: { + readOnly: true, + serializedName: "appId", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorDefinitionProperties: msRest.CompositeMapper = { + serializedName: "ErrorDefinitionProperties", + type: { + name: "Composite", + className: "ErrorDefinitionProperties", + modelProperties: { + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + code: { + serializedName: "code", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorDefinition: msRest.CompositeMapper = { + serializedName: "ErrorDefinition", + type: { + name: "Composite", + className: "ErrorDefinition", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDefinitionProperties" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + } + } + } +}; + +export const DenyAssignmentFilter: msRest.CompositeMapper = { + serializedName: "DenyAssignmentFilter", + type: { + name: "Composite", + className: "DenyAssignmentFilter", + modelProperties: { + denyAssignmentName: { + serializedName: "denyAssignmentName", + type: { + name: "String" + } + }, + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + }, + gdprExportPrincipalId: { + serializedName: "gdprExportPrincipalId", + type: { + name: "String" + } + } + } + } +}; + +export const DenyAssignmentPermission: msRest.CompositeMapper = { + serializedName: "DenyAssignmentPermission", + type: { + name: "Composite", + className: "DenyAssignmentPermission", + modelProperties: { + actions: { + serializedName: "actions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + notActions: { + serializedName: "notActions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + dataActions: { + serializedName: "dataActions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + notDataActions: { + serializedName: "notDataActions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Principal: msRest.CompositeMapper = { + serializedName: "Principal", + type: { + name: "Composite", + className: "Principal", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + email: { + serializedName: "email", + type: { + name: "String" + } + } + } + } +}; + +export const DenyAssignment: msRest.CompositeMapper = { + serializedName: "DenyAssignment", + type: { + name: "Composite", + className: "DenyAssignment", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + denyAssignmentName: { + serializedName: "properties.denyAssignmentName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + permissions: { + serializedName: "properties.permissions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DenyAssignmentPermission" + } + } + } + }, + scope: { + serializedName: "properties.scope", + type: { + name: "String" + } + }, + doNotApplyToChildScopes: { + serializedName: "properties.doNotApplyToChildScopes", + type: { + name: "Boolean" + } + }, + principals: { + serializedName: "properties.principals", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Principal" + } + } + } + }, + excludePrincipals: { + serializedName: "properties.excludePrincipals", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Principal" + } + } + } + }, + isSystemProtected: { + serializedName: "properties.isSystemProtected", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + +export const ErrorDetail: msRest.CompositeMapper = { + serializedName: "ErrorDetail", + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ProviderOperation: msRest.CompositeMapper = { + serializedName: "ProviderOperation", + type: { + name: "Composite", + className: "ProviderOperation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Object" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ResourceType: msRest.CompositeMapper = { + serializedName: "ResourceType", + type: { + name: "Composite", + className: "ResourceType", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + operations: { + serializedName: "operations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProviderOperation" + } + } + } + } + } + } +}; + +export const ProviderOperationsMetadata: msRest.CompositeMapper = { + serializedName: "ProviderOperationsMetadata", + type: { + name: "Composite", + className: "ProviderOperationsMetadata", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + resourceTypes: { + serializedName: "resourceTypes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceType" + } + } + } + }, + operations: { + serializedName: "operations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProviderOperation" + } + } + } + } + } + } +}; + +export const ValidationResponseErrorInfo: msRest.CompositeMapper = { + serializedName: "ValidationResponseErrorInfo", + type: { + name: "Composite", + className: "ValidationResponseErrorInfo", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ValidationResponse: msRest.CompositeMapper = { + serializedName: "ValidationResponse", + type: { + name: "Composite", + className: "ValidationResponse", + modelProperties: { + isValid: { + readOnly: true, + serializedName: "isValid", + type: { + name: "Boolean" + } + }, + errorInfo: { + serializedName: "errorInfo", + type: { + name: "Composite", + className: "ValidationResponseErrorInfo" + } + } + } + } +}; + +export const RoleAssignmentFilter: msRest.CompositeMapper = { + serializedName: "RoleAssignmentFilter", + type: { + name: "Composite", + className: "RoleAssignmentFilter", + modelProperties: { + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + } + } + } +}; + +export const RoleAssignment: msRest.CompositeMapper = { + serializedName: "RoleAssignment", + type: { + name: "Composite", + className: "RoleAssignment", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + scope: { + readOnly: true, + serializedName: "properties.scope", + type: { + name: "String" + } + }, + roleDefinitionId: { + required: true, + serializedName: "properties.roleDefinitionId", + type: { + name: "String" + } + }, + principalId: { + required: true, + serializedName: "properties.principalId", + type: { + name: "String" + } + }, + principalType: { + serializedName: "properties.principalType", + defaultValue: 'User', + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + condition: { + serializedName: "properties.condition", + type: { + name: "String" + } + }, + conditionVersion: { + serializedName: "properties.conditionVersion", + type: { + name: "String" + } + }, + createdOn: { + readOnly: true, + serializedName: "properties.createdOn", + type: { + name: "DateTime" + } + }, + updatedOn: { + readOnly: true, + serializedName: "properties.updatedOn", + type: { + name: "DateTime" + } + }, + createdBy: { + readOnly: true, + serializedName: "properties.createdBy", + type: { + name: "String" + } + }, + updatedBy: { + readOnly: true, + serializedName: "properties.updatedBy", + type: { + name: "String" + } + }, + delegatedManagedIdentityResourceId: { + serializedName: "properties.delegatedManagedIdentityResourceId", + type: { + name: "String" + } + } + } + } +}; + +export const RoleAssignmentCreateParameters: msRest.CompositeMapper = { + serializedName: "RoleAssignmentCreateParameters", + type: { + name: "Composite", + className: "RoleAssignmentCreateParameters", + modelProperties: { + scope: { + readOnly: true, + serializedName: "properties.scope", + type: { + name: "String" + } + }, + roleDefinitionId: { + required: true, + serializedName: "properties.roleDefinitionId", + type: { + name: "String" + } + }, + principalId: { + required: true, + serializedName: "properties.principalId", + type: { + name: "String" + } + }, + principalType: { + serializedName: "properties.principalType", + defaultValue: 'User', + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + condition: { + serializedName: "properties.condition", + type: { + name: "String" + } + }, + conditionVersion: { + serializedName: "properties.conditionVersion", + type: { + name: "String" + } + }, + createdOn: { + readOnly: true, + serializedName: "properties.createdOn", + type: { + name: "DateTime" + } + }, + updatedOn: { + readOnly: true, + serializedName: "properties.updatedOn", + type: { + name: "DateTime" + } + }, + createdBy: { + readOnly: true, + serializedName: "properties.createdBy", + type: { + name: "String" + } + }, + updatedBy: { + readOnly: true, + serializedName: "properties.updatedBy", + type: { + name: "String" + } + }, + delegatedManagedIdentityResourceId: { + serializedName: "properties.delegatedManagedIdentityResourceId", + type: { + name: "String" + } + } + } + } +}; + +export const RoleDefinitionFilter: msRest.CompositeMapper = { + serializedName: "RoleDefinitionFilter", + type: { + name: "Composite", + className: "RoleDefinitionFilter", + modelProperties: { + roleName: { + serializedName: "roleName", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const Permission: msRest.CompositeMapper = { + serializedName: "Permission", + type: { + name: "Composite", + className: "Permission", + modelProperties: { + actions: { + serializedName: "actions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + notActions: { + serializedName: "notActions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + dataActions: { + serializedName: "dataActions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + notDataActions: { + serializedName: "notDataActions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RoleDefinition: msRest.CompositeMapper = { + serializedName: "RoleDefinition", + type: { + name: "Composite", + className: "RoleDefinition", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + roleName: { + serializedName: "properties.roleName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + roleType: { + serializedName: "properties.type", + type: { + name: "String" + } + }, + permissions: { + serializedName: "properties.permissions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Permission" + } + } + } + }, + assignableScopes: { + serializedName: "properties.assignableScopes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RoleAssignmentMetricsResult: msRest.CompositeMapper = { + serializedName: "RoleAssignmentMetricsResult", + type: { + name: "Composite", + className: "RoleAssignmentMetricsResult", + modelProperties: { + subscriptionId: { + readOnly: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + roleAssignmentsLimit: { + readOnly: true, + serializedName: "roleAssignmentsLimit", + type: { + name: "Number" + } + }, + roleAssignmentsCurrentCount: { + readOnly: true, + serializedName: "roleAssignmentsCurrentCount", + type: { + name: "Number" + } + }, + roleAssignmentsRemainingCount: { + readOnly: true, + serializedName: "roleAssignmentsRemainingCount", + type: { + name: "Number" + } + } + } + } +}; + +export const EligibleChildResource: msRest.CompositeMapper = { + serializedName: "EligibleChildResource", + type: { + name: "Composite", + className: "EligibleChildResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const RoleAssignmentScheduleFilter: msRest.CompositeMapper = { + serializedName: "RoleAssignmentScheduleFilter", + type: { + name: "Composite", + className: "RoleAssignmentScheduleFilter", + modelProperties: { + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + }, + roleDefinitionId: { + serializedName: "roleDefinitionId", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const ExpandedPropertiesScope: msRest.CompositeMapper = { + serializedName: "ExpandedProperties_scope", + type: { + name: "Composite", + className: "ExpandedPropertiesScope", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ExpandedPropertiesRoleDefinition: msRest.CompositeMapper = { + serializedName: "ExpandedProperties_roleDefinition", + type: { + name: "Composite", + className: "ExpandedPropertiesRoleDefinition", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ExpandedPropertiesPrincipal: msRest.CompositeMapper = { + serializedName: "ExpandedProperties_principal", + type: { + name: "Composite", + className: "ExpandedPropertiesPrincipal", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + email: { + serializedName: "email", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ExpandedProperties: msRest.CompositeMapper = { + serializedName: "ExpandedProperties", + type: { + name: "Composite", + className: "ExpandedProperties", + modelProperties: { + scope: { + serializedName: "scope", + type: { + name: "Composite", + className: "ExpandedPropertiesScope" + } + }, + roleDefinition: { + serializedName: "roleDefinition", + type: { + name: "Composite", + className: "ExpandedPropertiesRoleDefinition" + } + }, + principal: { + serializedName: "principal", + type: { + name: "Composite", + className: "ExpandedPropertiesPrincipal" + } + } + } + } +}; + +export const RoleAssignmentSchedule: msRest.CompositeMapper = { + serializedName: "RoleAssignmentSchedule", + type: { + name: "Composite", + className: "RoleAssignmentSchedule", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + type: { + name: "String" + } + }, + roleDefinitionId: { + serializedName: "properties.roleDefinitionId", + type: { + name: "String" + } + }, + principalId: { + serializedName: "properties.principalId", + type: { + name: "String" + } + }, + principalType: { + serializedName: "properties.principalType", + type: { + name: "String" + } + }, + roleAssignmentScheduleRequestId: { + serializedName: "properties.roleAssignmentScheduleRequestId", + type: { + name: "String" + } + }, + linkedRoleEligibilityScheduleId: { + serializedName: "properties.linkedRoleEligibilityScheduleId", + type: { + name: "String" + } + }, + assignmentType: { + serializedName: "properties.assignmentType", + type: { + name: "String" + } + }, + memberType: { + serializedName: "properties.memberType", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + startDateTime: { + serializedName: "properties.startDateTime", + type: { + name: "DateTime" + } + }, + endDateTime: { + serializedName: "properties.endDateTime", + type: { + name: "DateTime" + } + }, + condition: { + serializedName: "properties.condition", + type: { + name: "String" + } + }, + conditionVersion: { + serializedName: "properties.conditionVersion", + type: { + name: "String" + } + }, + createdOn: { + serializedName: "properties.createdOn", + type: { + name: "DateTime" + } + }, + updatedOn: { + serializedName: "properties.updatedOn", + type: { + name: "DateTime" + } + }, + expandedProperties: { + serializedName: "properties.expandedProperties", + type: { + name: "Composite", + className: "ExpandedProperties" + } + } + } + } +}; + +export const RoleAssignmentScheduleInstanceFilter: msRest.CompositeMapper = { + serializedName: "RoleAssignmentScheduleInstanceFilter", + type: { + name: "Composite", + className: "RoleAssignmentScheduleInstanceFilter", + modelProperties: { + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + }, + roleDefinitionId: { + serializedName: "roleDefinitionId", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + roleAssignmentScheduleId: { + serializedName: "roleAssignmentScheduleId", + type: { + name: "String" + } + } + } + } +}; + +export const RoleAssignmentScheduleInstance: msRest.CompositeMapper = { + serializedName: "RoleAssignmentScheduleInstance", + type: { + name: "Composite", + className: "RoleAssignmentScheduleInstance", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + type: { + name: "String" + } + }, + roleDefinitionId: { + serializedName: "properties.roleDefinitionId", + type: { + name: "String" + } + }, + principalId: { + serializedName: "properties.principalId", + type: { + name: "String" + } + }, + principalType: { + serializedName: "properties.principalType", + type: { + name: "String" + } + }, + roleAssignmentScheduleId: { + serializedName: "properties.roleAssignmentScheduleId", + type: { + name: "String" + } + }, + originRoleAssignmentId: { + serializedName: "properties.originRoleAssignmentId", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + startDateTime: { + serializedName: "properties.startDateTime", + type: { + name: "DateTime" + } + }, + endDateTime: { + serializedName: "properties.endDateTime", + type: { + name: "DateTime" + } + }, + linkedRoleEligibilityScheduleId: { + serializedName: "properties.linkedRoleEligibilityScheduleId", + type: { + name: "String" + } + }, + linkedRoleEligibilityScheduleInstanceId: { + serializedName: "properties.linkedRoleEligibilityScheduleInstanceId", + type: { + name: "String" + } + }, + assignmentType: { + serializedName: "properties.assignmentType", + type: { + name: "String" + } + }, + memberType: { + serializedName: "properties.memberType", + type: { + name: "String" + } + }, + condition: { + serializedName: "properties.condition", + type: { + name: "String" + } + }, + conditionVersion: { + serializedName: "properties.conditionVersion", + type: { + name: "String" + } + }, + createdOn: { + serializedName: "properties.createdOn", + type: { + name: "DateTime" + } + }, + expandedProperties: { + serializedName: "properties.expandedProperties", + type: { + name: "Composite", + className: "ExpandedProperties" + } + } + } + } +}; + +export const RoleAssignmentScheduleRequestFilter: msRest.CompositeMapper = { + serializedName: "RoleAssignmentScheduleRequestFilter", + type: { + name: "Composite", + className: "RoleAssignmentScheduleRequestFilter", + modelProperties: { + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + }, + roleDefinitionId: { + serializedName: "roleDefinitionId", + type: { + name: "String" + } + }, + requestorId: { + serializedName: "requestorId", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration: msRest.CompositeMapper = { + serializedName: "RoleAssignmentScheduleRequestProperties_scheduleInfo_expiration", + type: { + name: "Composite", + className: "RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + endDateTime: { + serializedName: "endDateTime", + type: { + name: "DateTime" + } + }, + duration: { + serializedName: "duration", + type: { + name: "String" + } + } + } + } +}; + +export const RoleAssignmentScheduleRequestPropertiesScheduleInfo: msRest.CompositeMapper = { + serializedName: "RoleAssignmentScheduleRequestProperties_scheduleInfo", + type: { + name: "Composite", + className: "RoleAssignmentScheduleRequestPropertiesScheduleInfo", + modelProperties: { + startDateTime: { + serializedName: "startDateTime", + type: { + name: "DateTime" + } + }, + expiration: { + serializedName: "expiration", + type: { + name: "Composite", + className: "RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration" + } + } + } + } +}; + +export const RoleAssignmentScheduleRequestPropertiesTicketInfo: msRest.CompositeMapper = { + serializedName: "RoleAssignmentScheduleRequestProperties_ticketInfo", + type: { + name: "Composite", + className: "RoleAssignmentScheduleRequestPropertiesTicketInfo", + modelProperties: { + ticketNumber: { + serializedName: "ticketNumber", + type: { + name: "String" + } + }, + ticketSystem: { + serializedName: "ticketSystem", + type: { + name: "String" + } + } + } + } +}; + +export const RoleAssignmentScheduleRequest: msRest.CompositeMapper = { + serializedName: "RoleAssignmentScheduleRequest", + type: { + name: "Composite", + className: "RoleAssignmentScheduleRequest", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + scope: { + readOnly: true, + serializedName: "properties.scope", + type: { + name: "String" + } + }, + roleDefinitionId: { + required: true, + serializedName: "properties.roleDefinitionId", + type: { + name: "String" + } + }, + principalId: { + required: true, + serializedName: "properties.principalId", + type: { + name: "String" + } + }, + principalType: { + readOnly: true, + serializedName: "properties.principalType", + type: { + name: "String" + } + }, + requestType: { + required: true, + serializedName: "properties.requestType", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + approvalId: { + readOnly: true, + serializedName: "properties.approvalId", + type: { + name: "String" + } + }, + targetRoleAssignmentScheduleId: { + serializedName: "properties.targetRoleAssignmentScheduleId", + type: { + name: "String" + } + }, + targetRoleAssignmentScheduleInstanceId: { + serializedName: "properties.targetRoleAssignmentScheduleInstanceId", + type: { + name: "String" + } + }, + scheduleInfo: { + serializedName: "properties.scheduleInfo", + type: { + name: "Composite", + className: "RoleAssignmentScheduleRequestPropertiesScheduleInfo" + } + }, + linkedRoleEligibilityScheduleId: { + serializedName: "properties.linkedRoleEligibilityScheduleId", + type: { + name: "String" + } + }, + justification: { + serializedName: "properties.justification", + type: { + name: "String" + } + }, + ticketInfo: { + serializedName: "properties.ticketInfo", + type: { + name: "Composite", + className: "RoleAssignmentScheduleRequestPropertiesTicketInfo" + } + }, + condition: { + serializedName: "properties.condition", + type: { + name: "String" + } + }, + conditionVersion: { + serializedName: "properties.conditionVersion", + type: { + name: "String" + } + }, + createdOn: { + readOnly: true, + serializedName: "properties.createdOn", + type: { + name: "DateTime" + } + }, + requestorId: { + readOnly: true, + serializedName: "properties.requestorId", + type: { + name: "String" + } + }, + expandedProperties: { + readOnly: true, + serializedName: "properties.expandedProperties", + type: { + name: "Composite", + className: "ExpandedProperties" + } + } + } + } +}; + +export const RoleEligibilityScheduleFilter: msRest.CompositeMapper = { + serializedName: "RoleEligibilityScheduleFilter", + type: { + name: "Composite", + className: "RoleEligibilityScheduleFilter", + modelProperties: { + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + }, + roleDefinitionId: { + serializedName: "roleDefinitionId", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const RoleEligibilitySchedule: msRest.CompositeMapper = { + serializedName: "RoleEligibilitySchedule", + type: { + name: "Composite", + className: "RoleEligibilitySchedule", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + type: { + name: "String" + } + }, + roleDefinitionId: { + serializedName: "properties.roleDefinitionId", + type: { + name: "String" + } + }, + principalId: { + serializedName: "properties.principalId", + type: { + name: "String" + } + }, + principalType: { + serializedName: "properties.principalType", + type: { + name: "String" + } + }, + roleEligibilityScheduleRequestId: { + serializedName: "properties.roleEligibilityScheduleRequestId", + type: { + name: "String" + } + }, + memberType: { + serializedName: "properties.memberType", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + startDateTime: { + serializedName: "properties.startDateTime", + type: { + name: "DateTime" + } + }, + endDateTime: { + serializedName: "properties.endDateTime", + type: { + name: "DateTime" + } + }, + condition: { + serializedName: "properties.condition", + type: { + name: "String" + } + }, + conditionVersion: { + serializedName: "properties.conditionVersion", + type: { + name: "String" + } + }, + createdOn: { + serializedName: "properties.createdOn", + type: { + name: "DateTime" + } + }, + updatedOn: { + serializedName: "properties.updatedOn", + type: { + name: "DateTime" + } + }, + expandedProperties: { + serializedName: "properties.expandedProperties", + type: { + name: "Composite", + className: "ExpandedProperties" + } + } + } + } +}; + +export const RoleEligibilityScheduleInstanceFilter: msRest.CompositeMapper = { + serializedName: "RoleEligibilityScheduleInstanceFilter", + type: { + name: "Composite", + className: "RoleEligibilityScheduleInstanceFilter", + modelProperties: { + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + }, + roleDefinitionId: { + serializedName: "roleDefinitionId", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + roleEligibilityScheduleId: { + serializedName: "roleEligibilityScheduleId", + type: { + name: "String" + } + } + } + } +}; + +export const RoleEligibilityScheduleInstance: msRest.CompositeMapper = { + serializedName: "RoleEligibilityScheduleInstance", + type: { + name: "Composite", + className: "RoleEligibilityScheduleInstance", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + type: { + name: "String" + } + }, + roleDefinitionId: { + serializedName: "properties.roleDefinitionId", + type: { + name: "String" + } + }, + principalId: { + serializedName: "properties.principalId", + type: { + name: "String" + } + }, + principalType: { + serializedName: "properties.principalType", + type: { + name: "String" + } + }, + roleEligibilityScheduleId: { + serializedName: "properties.roleEligibilityScheduleId", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + startDateTime: { + serializedName: "properties.startDateTime", + type: { + name: "DateTime" + } + }, + endDateTime: { + serializedName: "properties.endDateTime", + type: { + name: "DateTime" + } + }, + memberType: { + serializedName: "properties.memberType", + type: { + name: "String" + } + }, + condition: { + serializedName: "properties.condition", + type: { + name: "String" + } + }, + conditionVersion: { + serializedName: "properties.conditionVersion", + type: { + name: "String" + } + }, + createdOn: { + serializedName: "properties.createdOn", + type: { + name: "DateTime" + } + }, + expandedProperties: { + serializedName: "properties.expandedProperties", + type: { + name: "Composite", + className: "ExpandedProperties" + } + } + } + } +}; + +export const RoleEligibilityScheduleRequestFilter: msRest.CompositeMapper = { + serializedName: "RoleEligibilityScheduleRequestFilter", + type: { + name: "Composite", + className: "RoleEligibilityScheduleRequestFilter", + modelProperties: { + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + }, + roleDefinitionId: { + serializedName: "roleDefinitionId", + type: { + name: "String" + } + }, + requestorId: { + serializedName: "requestorId", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration: msRest.CompositeMapper = { + serializedName: "RoleEligibilityScheduleRequestProperties_scheduleInfo_expiration", + type: { + name: "Composite", + className: "RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + endDateTime: { + serializedName: "endDateTime", + type: { + name: "DateTime" + } + }, + duration: { + serializedName: "duration", + type: { + name: "String" + } + } + } + } +}; + +export const RoleEligibilityScheduleRequestPropertiesScheduleInfo: msRest.CompositeMapper = { + serializedName: "RoleEligibilityScheduleRequestProperties_scheduleInfo", + type: { + name: "Composite", + className: "RoleEligibilityScheduleRequestPropertiesScheduleInfo", + modelProperties: { + startDateTime: { + serializedName: "startDateTime", + type: { + name: "DateTime" + } + }, + expiration: { + serializedName: "expiration", + type: { + name: "Composite", + className: "RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration" + } + } + } + } +}; + +export const RoleEligibilityScheduleRequestPropertiesTicketInfo: msRest.CompositeMapper = { + serializedName: "RoleEligibilityScheduleRequestProperties_ticketInfo", + type: { + name: "Composite", + className: "RoleEligibilityScheduleRequestPropertiesTicketInfo", + modelProperties: { + ticketNumber: { + serializedName: "ticketNumber", + type: { + name: "String" + } + }, + ticketSystem: { + serializedName: "ticketSystem", + type: { + name: "String" + } + } + } + } +}; + +export const RoleEligibilityScheduleRequest: msRest.CompositeMapper = { + serializedName: "RoleEligibilityScheduleRequest", + type: { + name: "Composite", + className: "RoleEligibilityScheduleRequest", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + scope: { + readOnly: true, + serializedName: "properties.scope", + type: { + name: "String" + } + }, + roleDefinitionId: { + required: true, + serializedName: "properties.roleDefinitionId", + type: { + name: "String" + } + }, + principalId: { + required: true, + serializedName: "properties.principalId", + type: { + name: "String" + } + }, + principalType: { + readOnly: true, + serializedName: "properties.principalType", + type: { + name: "String" + } + }, + requestType: { + required: true, + serializedName: "properties.requestType", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + approvalId: { + readOnly: true, + serializedName: "properties.approvalId", + type: { + name: "String" + } + }, + scheduleInfo: { + serializedName: "properties.scheduleInfo", + type: { + name: "Composite", + className: "RoleEligibilityScheduleRequestPropertiesScheduleInfo" + } + }, + targetRoleEligibilityScheduleId: { + serializedName: "properties.targetRoleEligibilityScheduleId", + type: { + name: "String" + } + }, + targetRoleEligibilityScheduleInstanceId: { + serializedName: "properties.targetRoleEligibilityScheduleInstanceId", + type: { + name: "String" + } + }, + justification: { + serializedName: "properties.justification", + type: { + name: "String" + } + }, + ticketInfo: { + serializedName: "properties.ticketInfo", + type: { + name: "Composite", + className: "RoleEligibilityScheduleRequestPropertiesTicketInfo" + } + }, + condition: { + serializedName: "properties.condition", + type: { + name: "String" + } + }, + conditionVersion: { + serializedName: "properties.conditionVersion", + type: { + name: "String" + } + }, + createdOn: { + readOnly: true, + serializedName: "properties.createdOn", + type: { + name: "DateTime" + } + }, + requestorId: { + readOnly: true, + serializedName: "properties.requestorId", + type: { + name: "String" + } + }, + expandedProperties: { + readOnly: true, + serializedName: "properties.expandedProperties", + type: { + name: "Composite", + className: "ExpandedProperties" + } + } + } + } +}; + +export const RoleManagementPolicyRuleTarget: msRest.CompositeMapper = { + serializedName: "RoleManagementPolicyRuleTarget", + type: { + name: "Composite", + className: "RoleManagementPolicyRuleTarget", + modelProperties: { + caller: { + serializedName: "caller", + type: { + name: "String" + } + }, + operations: { + serializedName: "operations", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + level: { + serializedName: "level", + type: { + name: "String" + } + }, + targetObjects: { + serializedName: "targetObjects", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + inheritableSettings: { + serializedName: "inheritableSettings", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + enforcedSettings: { + serializedName: "enforcedSettings", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RoleManagementPolicyRule: msRest.CompositeMapper = { + serializedName: "RoleManagementPolicyRule", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "ruleType", + clientName: "ruleType" + }, + uberParent: "RoleManagementPolicyRule", + className: "RoleManagementPolicyRule", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "Composite", + className: "RoleManagementPolicyRuleTarget" + } + }, + ruleType: { + required: true, + serializedName: "ruleType", + type: { + name: "String" + } + } + } + } +}; + +export const PolicyPropertiesScope: msRest.CompositeMapper = { + serializedName: "PolicyProperties_scope", + type: { + name: "Composite", + className: "PolicyPropertiesScope", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const PolicyProperties: msRest.CompositeMapper = { + serializedName: "PolicyProperties", + type: { + name: "Composite", + className: "PolicyProperties", + modelProperties: { + scope: { + readOnly: true, + serializedName: "scope", + type: { + name: "Composite", + className: "PolicyPropertiesScope" + } + } + } + } +}; + +export const RoleManagementPolicy: msRest.CompositeMapper = { + serializedName: "RoleManagementPolicy", + type: { + name: "Composite", + className: "RoleManagementPolicy", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + isOrganizationDefault: { + serializedName: "properties.isOrganizationDefault", + type: { + name: "Boolean" + } + }, + lastModifiedBy: { + serializedName: "properties.lastModifiedBy", + type: { + name: "Composite", + className: "Principal" + } + }, + lastModifiedDateTime: { + readOnly: true, + serializedName: "properties.lastModifiedDateTime", + type: { + name: "DateTime" + } + }, + rules: { + serializedName: "properties.rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RoleManagementPolicyRule" + } + } + } + }, + effectiveRules: { + readOnly: true, + serializedName: "properties.effectiveRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RoleManagementPolicyRule" + } + } + } + }, + policyProperties: { + readOnly: true, + serializedName: "properties.policyProperties", + type: { + name: "Composite", + className: "PolicyProperties" + } + } + } + } +}; + +export const UserSet: msRest.CompositeMapper = { + serializedName: "UserSet", + type: { + name: "Composite", + className: "UserSet", + modelProperties: { + userType: { + serializedName: "userType", + type: { + name: "String" + } + }, + isBackup: { + serializedName: "isBackup", + type: { + name: "Boolean" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const ApprovalStage: msRest.CompositeMapper = { + serializedName: "ApprovalStage", + type: { + name: "Composite", + className: "ApprovalStage", + modelProperties: { + approvalStageTimeOutInDays: { + serializedName: "approvalStageTimeOutInDays", + type: { + name: "Number" + } + }, + isApproverJustificationRequired: { + serializedName: "isApproverJustificationRequired", + type: { + name: "Boolean" + } + }, + escalationTimeInMinutes: { + serializedName: "escalationTimeInMinutes", + type: { + name: "Number" + } + }, + primaryApprovers: { + serializedName: "primaryApprovers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserSet" + } + } + } + }, + isEscalationEnabled: { + serializedName: "isEscalationEnabled", + type: { + name: "Boolean" + } + }, + escalationApprovers: { + serializedName: "escalationApprovers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ProviderOperation" + className: "UserSet" } } } @@ -132,56 +3663,113 @@ export const ResourceType: msRest.CompositeMapper = { } }; -export const ProviderOperationsMetadata: msRest.CompositeMapper = { - serializedName: "ProviderOperationsMetadata", +export const ApprovalSettings: msRest.CompositeMapper = { + serializedName: "ApprovalSettings", type: { name: "Composite", - className: "ProviderOperationsMetadata", + className: "ApprovalSettings", modelProperties: { - id: { - serializedName: "id", + isApprovalRequired: { + serializedName: "isApprovalRequired", type: { - name: "String" + name: "Boolean" } }, - name: { - serializedName: "name", + isApprovalRequiredForExtension: { + serializedName: "isApprovalRequiredForExtension", type: { - name: "String" + name: "Boolean" } }, - type: { - serializedName: "type", + isRequestorJustificationRequired: { + serializedName: "isRequestorJustificationRequired", type: { - name: "String" + name: "Boolean" } }, - displayName: { - serializedName: "displayName", + approvalMode: { + serializedName: "approvalMode", type: { name: "String" } }, - resourceTypes: { - serializedName: "resourceTypes", + approvalStages: { + serializedName: "approvalStages", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ResourceType" + className: "ApprovalStage" } } } + } + } + } +}; + +export const RoleManagementPolicyApprovalRule: msRest.CompositeMapper = { + serializedName: "RoleManagementPolicyApprovalRule", + type: { + name: "Composite", + polymorphicDiscriminator: RoleManagementPolicyRule.type.polymorphicDiscriminator, + uberParent: "RoleManagementPolicyRule", + className: "RoleManagementPolicyApprovalRule", + modelProperties: { + ...RoleManagementPolicyRule.type.modelProperties, + setting: { + serializedName: "setting", + type: { + name: "Composite", + className: "ApprovalSettings" + } + } + } + } +}; + +export const RoleManagementPolicyAuthenticationContextRule: msRest.CompositeMapper = { + serializedName: "RoleManagementPolicyAuthenticationContextRule", + type: { + name: "Composite", + polymorphicDiscriminator: RoleManagementPolicyRule.type.polymorphicDiscriminator, + uberParent: "RoleManagementPolicyRule", + className: "RoleManagementPolicyAuthenticationContextRule", + modelProperties: { + ...RoleManagementPolicyRule.type.modelProperties, + isEnabled: { + serializedName: "isEnabled", + type: { + name: "Boolean" + } }, - operations: { - serializedName: "operations", + claimValue: { + serializedName: "claimValue", + type: { + name: "String" + } + } + } + } +}; + +export const RoleManagementPolicyEnablementRule: msRest.CompositeMapper = { + serializedName: "RoleManagementPolicyEnablementRule", + type: { + name: "Composite", + polymorphicDiscriminator: RoleManagementPolicyRule.type.polymorphicDiscriminator, + uberParent: "RoleManagementPolicyRule", + className: "RoleManagementPolicyEnablementRule", + modelProperties: { + ...RoleManagementPolicyRule.type.modelProperties, + enabledRules: { + serializedName: "enabledRules", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ProviderOperation" + name: "String" } } } @@ -190,206 +3778,200 @@ export const ProviderOperationsMetadata: msRest.CompositeMapper = { } }; -export const RoleAssignmentFilter: msRest.CompositeMapper = { - serializedName: "RoleAssignmentFilter", +export const RoleManagementPolicyExpirationRule: msRest.CompositeMapper = { + serializedName: "RoleManagementPolicyExpirationRule", type: { name: "Composite", - className: "RoleAssignmentFilter", + polymorphicDiscriminator: RoleManagementPolicyRule.type.polymorphicDiscriminator, + uberParent: "RoleManagementPolicyRule", + className: "RoleManagementPolicyExpirationRule", modelProperties: { - principalId: { - serializedName: "principalId", + ...RoleManagementPolicyRule.type.modelProperties, + isExpirationRequired: { + serializedName: "isExpirationRequired", type: { - name: "String" + name: "Boolean" } }, - canDelegate: { - serializedName: "canDelegate", + maximumDuration: { + serializedName: "maximumDuration", type: { - name: "Boolean" + name: "String" } } } } }; -export const RoleAssignment: msRest.CompositeMapper = { - serializedName: "RoleAssignment", +export const RoleManagementPolicyNotificationRule: msRest.CompositeMapper = { + serializedName: "RoleManagementPolicyNotificationRule", type: { name: "Composite", - className: "RoleAssignment", + polymorphicDiscriminator: RoleManagementPolicyRule.type.polymorphicDiscriminator, + uberParent: "RoleManagementPolicyRule", + className: "RoleManagementPolicyNotificationRule", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + ...RoleManagementPolicyRule.type.modelProperties, + notificationType: { + serializedName: "notificationType", type: { name: "String" } }, - name: { - readOnly: true, - serializedName: "name", + notificationLevel: { + serializedName: "notificationLevel", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + recipientType: { + serializedName: "recipientType", type: { name: "String" } }, - scope: { - serializedName: "properties.scope", + notificationRecipients: { + serializedName: "notificationRecipients", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - roleDefinitionId: { - serializedName: "properties.roleDefinitionId", + isDefaultRecipientsEnabled: { + serializedName: "isDefaultRecipientsEnabled", type: { - name: "String" + name: "Boolean" } - }, - principalId: { - serializedName: "properties.principalId", + } + } + } +}; + +export const PolicyAssignmentPropertiesScope: msRest.CompositeMapper = { + serializedName: "PolicyAssignmentProperties_scope", + type: { + name: "Composite", + className: "PolicyAssignmentPropertiesScope", + modelProperties: { + id: { + serializedName: "id", type: { name: "String" } }, - principalType: { - serializedName: "properties.principalType", + displayName: { + serializedName: "displayName", type: { name: "String" } }, - canDelegate: { - serializedName: "properties.canDelegate", + type: { + serializedName: "type", type: { - name: "Boolean" + name: "String" } } } } }; -export const RoleAssignmentCreateParameters: msRest.CompositeMapper = { - serializedName: "RoleAssignmentCreateParameters", +export const PolicyAssignmentPropertiesRoleDefinition: msRest.CompositeMapper = { + serializedName: "PolicyAssignmentProperties_roleDefinition", type: { name: "Composite", - className: "RoleAssignmentCreateParameters", + className: "PolicyAssignmentPropertiesRoleDefinition", modelProperties: { - roleDefinitionId: { - required: true, - serializedName: "properties.roleDefinitionId", + id: { + serializedName: "id", type: { name: "String" } }, - principalId: { - required: true, - serializedName: "properties.principalId", + displayName: { + serializedName: "displayName", type: { name: "String" } }, - principalType: { - serializedName: "properties.principalType", + type: { + serializedName: "type", type: { name: "String" } - }, - canDelegate: { - serializedName: "properties.canDelegate", - type: { - name: "Boolean" - } } } } }; -export const RoleDefinitionFilter: msRest.CompositeMapper = { - serializedName: "RoleDefinitionFilter", +export const PolicyAssignmentPropertiesPolicy: msRest.CompositeMapper = { + serializedName: "PolicyAssignmentProperties_policy", type: { name: "Composite", - className: "RoleDefinitionFilter", + className: "PolicyAssignmentPropertiesPolicy", modelProperties: { - roleName: { - serializedName: "roleName", + id: { + serializedName: "id", type: { name: "String" } }, - type: { - serializedName: "type", + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { - name: "String" + name: "Composite", + className: "Principal" + } + }, + lastModifiedDateTime: { + serializedName: "lastModifiedDateTime", + type: { + name: "DateTime" } } } } }; -export const Permission: msRest.CompositeMapper = { - serializedName: "Permission", +export const PolicyAssignmentProperties: msRest.CompositeMapper = { + serializedName: "PolicyAssignmentProperties", type: { name: "Composite", - className: "Permission", + className: "PolicyAssignmentProperties", modelProperties: { - actions: { - serializedName: "actions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - notActions: { - serializedName: "notActions", + scope: { + serializedName: "scope", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "PolicyAssignmentPropertiesScope" } }, - dataActions: { - serializedName: "dataActions", + roleDefinition: { + serializedName: "roleDefinition", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "PolicyAssignmentPropertiesRoleDefinition" } }, - notDataActions: { - serializedName: "notDataActions", + policy: { + serializedName: "policy", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "PolicyAssignmentPropertiesPolicy" } } } } }; -export const RoleDefinition: msRest.CompositeMapper = { - serializedName: "RoleDefinition", +export const RoleManagementPolicyAssignment: msRest.CompositeMapper = { + serializedName: "RoleManagementPolicyAssignment", type: { name: "Composite", - className: "RoleDefinition", + className: "RoleManagementPolicyAssignment", modelProperties: { id: { readOnly: true, @@ -412,71 +3994,140 @@ export const RoleDefinition: msRest.CompositeMapper = { name: "String" } }, - roleName: { - serializedName: "properties.roleName", + scope: { + serializedName: "properties.scope", type: { name: "String" } }, - description: { - serializedName: "properties.description", + roleDefinitionId: { + serializedName: "properties.roleDefinitionId", type: { name: "String" } }, - roleType: { - serializedName: "properties.type", + policyId: { + serializedName: "properties.policyId", type: { name: "String" } }, - permissions: { - serializedName: "properties.permissions", + policyAssignmentProperties: { + readOnly: true, + serializedName: "properties.policyAssignmentProperties", + type: { + name: "Composite", + className: "PolicyAssignmentProperties" + } + } + } + } +}; + +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Permission" + className: "Operation" } } } }, - assignableScopes: { - serializedName: "properties.assignableScopes", + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AccessReviewScheduleDefinitionListResult: msRest.CompositeMapper = { + serializedName: "AccessReviewScheduleDefinitionListResult", + type: { + name: "Composite", + className: "AccessReviewScheduleDefinitionListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessReviewScheduleDefinition" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AccessReviewInstanceListResult: msRest.CompositeMapper = { + serializedName: "AccessReviewInstanceListResult", + type: { + name: "Composite", + className: "AccessReviewInstanceListResult", + modelProperties: { + value: { + serializedName: "", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "AccessReviewInstance" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const DenyAssignmentFilter: msRest.CompositeMapper = { - serializedName: "DenyAssignmentFilter", +export const AccessReviewDecisionListResult: msRest.CompositeMapper = { + serializedName: "AccessReviewDecisionListResult", type: { name: "Composite", - className: "DenyAssignmentFilter", + className: "AccessReviewDecisionListResult", modelProperties: { - denyAssignmentName: { - serializedName: "denyAssignmentName", - type: { - name: "String" - } - }, - principalId: { - serializedName: "principalId", + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessReviewDecision" + } + } } }, - gdprExportPrincipalId: { - serializedName: "gdprExportPrincipalId", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -485,76 +4136,83 @@ export const DenyAssignmentFilter: msRest.CompositeMapper = { } }; -export const DenyAssignmentPermission: msRest.CompositeMapper = { - serializedName: "DenyAssignmentPermission", +export const DenyAssignmentListResult: msRest.CompositeMapper = { + serializedName: "DenyAssignmentListResult", type: { name: "Composite", - className: "DenyAssignmentPermission", + className: "DenyAssignmentListResult", modelProperties: { - actions: { - serializedName: "actions", + value: { + serializedName: "", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "DenyAssignment" } } } }, - notActions: { - serializedName: "notActions", + nextLink: { + serializedName: "nextLink", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } - }, - dataActions: { - serializedName: "dataActions", + } + } + } +}; + +export const ProviderOperationsMetadataListResult: msRest.CompositeMapper = { + serializedName: "ProviderOperationsMetadataListResult", + type: { + name: "Composite", + className: "ProviderOperationsMetadataListResult", + modelProperties: { + value: { + serializedName: "", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ProviderOperationsMetadata" } } } }, - notDataActions: { - serializedName: "notDataActions", + nextLink: { + serializedName: "nextLink", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const Principal: msRest.CompositeMapper = { - serializedName: "Principal", +export const RoleAssignmentListResult: msRest.CompositeMapper = { + serializedName: "RoleAssignmentListResult", type: { name: "Composite", - className: "Principal", + className: "RoleAssignmentListResult", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RoleAssignment" + } + } } }, - type: { + nextLink: { readOnly: true, - serializedName: "type", + serializedName: "nextLink", type: { name: "String" } @@ -563,108 +4221,151 @@ export const Principal: msRest.CompositeMapper = { } }; -export const DenyAssignment: msRest.CompositeMapper = { - serializedName: "DenyAssignment", +export const PermissionGetResult: msRest.CompositeMapper = { + serializedName: "PermissionGetResult", type: { name: "Composite", - className: "DenyAssignment", + className: "PermissionGetResult", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Permission" + } + } } }, - type: { - readOnly: true, - serializedName: "type", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - denyAssignmentName: { - serializedName: "properties.denyAssignmentName", + } + } + } +}; + +export const RoleDefinitionListResult: msRest.CompositeMapper = { + serializedName: "RoleDefinitionListResult", + type: { + name: "Composite", + className: "RoleDefinitionListResult", + modelProperties: { + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RoleDefinition" + } + } } }, - description: { - serializedName: "properties.description", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - permissions: { - serializedName: "properties.permissions", + } + } + } +}; + +export const EligibleChildResourcesListResult: msRest.CompositeMapper = { + serializedName: "EligibleChildResourcesListResult", + type: { + name: "Composite", + className: "EligibleChildResourcesListResult", + modelProperties: { + value: { + serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DenyAssignmentPermission" + className: "EligibleChildResource" } } } }, - scope: { - serializedName: "properties.scope", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - doNotApplyToChildScopes: { - serializedName: "properties.doNotApplyToChildScopes", - type: { - name: "Boolean" - } - }, - principals: { - serializedName: "properties.principals", + } + } + } +}; + +export const RoleAssignmentScheduleListResult: msRest.CompositeMapper = { + serializedName: "RoleAssignmentScheduleListResult", + type: { + name: "Composite", + className: "RoleAssignmentScheduleListResult", + modelProperties: { + value: { + serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Principal" + className: "RoleAssignmentSchedule" } } } }, - excludePrincipals: { - serializedName: "properties.excludePrincipals", + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RoleAssignmentScheduleInstanceListResult: msRest.CompositeMapper = { + serializedName: "RoleAssignmentScheduleInstanceListResult", + type: { + name: "Composite", + className: "RoleAssignmentScheduleInstanceListResult", + modelProperties: { + value: { + serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Principal" + className: "RoleAssignmentScheduleInstance" } } } }, - isSystemProtected: { - serializedName: "properties.isSystemProtected", + nextLink: { + serializedName: "nextLink", type: { - name: "Boolean" + name: "String" } } } } }; -export const ClassicAdministratorListResult: msRest.CompositeMapper = { - serializedName: "ClassicAdministratorListResult", +export const RoleAssignmentScheduleRequestListResult: msRest.CompositeMapper = { + serializedName: "RoleAssignmentScheduleRequestListResult", type: { name: "Composite", - className: "ClassicAdministratorListResult", + className: "RoleAssignmentScheduleRequestListResult", modelProperties: { value: { serializedName: "", @@ -673,7 +4374,7 @@ export const ClassicAdministratorListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ClassicAdministrator" + className: "RoleAssignmentScheduleRequest" } } } @@ -688,11 +4389,11 @@ export const ClassicAdministratorListResult: msRest.CompositeMapper = { } }; -export const ProviderOperationsMetadataListResult: msRest.CompositeMapper = { - serializedName: "ProviderOperationsMetadataListResult", +export const RoleEligibilityScheduleListResult: msRest.CompositeMapper = { + serializedName: "RoleEligibilityScheduleListResult", type: { name: "Composite", - className: "ProviderOperationsMetadataListResult", + className: "RoleEligibilityScheduleListResult", modelProperties: { value: { serializedName: "", @@ -701,7 +4402,7 @@ export const ProviderOperationsMetadataListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ProviderOperationsMetadata" + className: "RoleEligibilitySchedule" } } } @@ -716,11 +4417,11 @@ export const ProviderOperationsMetadataListResult: msRest.CompositeMapper = { } }; -export const RoleAssignmentListResult: msRest.CompositeMapper = { - serializedName: "RoleAssignmentListResult", +export const RoleEligibilityScheduleInstanceListResult: msRest.CompositeMapper = { + serializedName: "RoleEligibilityScheduleInstanceListResult", type: { name: "Composite", - className: "RoleAssignmentListResult", + className: "RoleEligibilityScheduleInstanceListResult", modelProperties: { value: { serializedName: "", @@ -729,7 +4430,7 @@ export const RoleAssignmentListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "RoleAssignment" + className: "RoleEligibilityScheduleInstance" } } } @@ -744,11 +4445,11 @@ export const RoleAssignmentListResult: msRest.CompositeMapper = { } }; -export const PermissionGetResult: msRest.CompositeMapper = { - serializedName: "PermissionGetResult", +export const RoleEligibilityScheduleRequestListResult: msRest.CompositeMapper = { + serializedName: "RoleEligibilityScheduleRequestListResult", type: { name: "Composite", - className: "PermissionGetResult", + className: "RoleEligibilityScheduleRequestListResult", modelProperties: { value: { serializedName: "", @@ -757,7 +4458,7 @@ export const PermissionGetResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Permission" + className: "RoleEligibilityScheduleRequest" } } } @@ -772,11 +4473,11 @@ export const PermissionGetResult: msRest.CompositeMapper = { } }; -export const RoleDefinitionListResult: msRest.CompositeMapper = { - serializedName: "RoleDefinitionListResult", +export const RoleManagementPolicyListResult: msRest.CompositeMapper = { + serializedName: "RoleManagementPolicyListResult", type: { name: "Composite", - className: "RoleDefinitionListResult", + className: "RoleManagementPolicyListResult", modelProperties: { value: { serializedName: "", @@ -785,7 +4486,7 @@ export const RoleDefinitionListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "RoleDefinition" + className: "RoleManagementPolicy" } } } @@ -800,11 +4501,11 @@ export const RoleDefinitionListResult: msRest.CompositeMapper = { } }; -export const DenyAssignmentListResult: msRest.CompositeMapper = { - serializedName: "DenyAssignmentListResult", +export const RoleManagementPolicyAssignmentListResult: msRest.CompositeMapper = { + serializedName: "RoleManagementPolicyAssignmentListResult", type: { name: "Composite", - className: "DenyAssignmentListResult", + className: "RoleManagementPolicyAssignmentListResult", modelProperties: { value: { serializedName: "", @@ -813,7 +4514,7 @@ export const DenyAssignmentListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "DenyAssignment" + className: "RoleManagementPolicyAssignment" } } } @@ -827,3 +4528,16 @@ export const DenyAssignmentListResult: msRest.CompositeMapper = { } } }; + +export const discriminators = { + 'AccessReviewDecisionTarget' : AccessReviewDecisionTarget, + 'AccessReviewDecisionTarget.user' : UserDecisionTarget, + 'AccessReviewDecisionTarget.servicePrincipal' : ServicePrincipalDecisionTarget, + 'RoleManagementPolicyRule' : RoleManagementPolicyRule, + 'RoleManagementPolicyRule.RoleManagementPolicyApprovalRule' : RoleManagementPolicyApprovalRule, + 'RoleManagementPolicyRule.RoleManagementPolicyAuthenticationContextRule' : RoleManagementPolicyAuthenticationContextRule, + 'RoleManagementPolicyRule.RoleManagementPolicyEnablementRule' : RoleManagementPolicyEnablementRule, + 'RoleManagementPolicyRule.RoleManagementPolicyExpirationRule' : RoleManagementPolicyExpirationRule, + 'RoleManagementPolicyRule.RoleManagementPolicyNotificationRule' : RoleManagementPolicyNotificationRule + +}; diff --git a/sdk/authorization/arm-authorization/src/models/operationsMappers.ts b/sdk/authorization/arm-authorization/src/models/operationsMappers.ts new file mode 100644 index 000000000000..4e9fe5872d87 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/operationsMappers.ts @@ -0,0 +1,16 @@ +/* + * 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 { + discriminators, + ErrorDefinition, + ErrorDefinitionProperties, + Operation, + OperationDisplay, + OperationListResult +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/parameters.ts b/sdk/authorization/arm-authorization/src/models/parameters.ts index f6016339a51d..096e0d89eaba 100644 --- a/sdk/authorization/arm-authorization/src/models/parameters.ts +++ b/sdk/authorization/arm-authorization/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 @@ -26,7 +25,7 @@ export const apiVersion0: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2015-06-01', + defaultValue: '2018-05-01-preview', type: { name: "String" } @@ -38,7 +37,10 @@ export const apiVersion1: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2015-07-01', + defaultValue: '2018-07-01-preview', + constraints: { + MinLength: 1 + }, type: { name: "String" } @@ -51,6 +53,9 @@ export const apiVersion2: msRest.OperationQueryParameter = { isConstant: true, serializedName: "api-version", defaultValue: '2018-01-01-preview', + constraints: { + MinLength: 1 + }, type: { name: "String" } @@ -62,7 +67,10 @@ export const apiVersion3: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2018-09-01-preview', + defaultValue: '2020-10-01-preview', + constraints: { + MinLength: 1 + }, type: { name: "String" } @@ -74,7 +82,20 @@ export const apiVersion4: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2018-07-01-preview', + defaultValue: '2019-08-01-preview', + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const decisionId: msRest.OperationURLParameter = { + parameterPath: "decisionId", + mapper: { + required: true, + serializedName: "decisionId", type: { name: "String" } @@ -114,7 +135,7 @@ export const expand: msRest.OperationQueryParameter = { } } }; -export const filter: msRest.OperationQueryParameter = { +export const filter0: msRest.OperationQueryParameter = { parameterPath: [ "options", "filter" @@ -126,6 +147,29 @@ export const filter: msRest.OperationQueryParameter = { } } }; +export const filter1: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "filter" + ], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const id: msRest.OperationURLParameter = { + parameterPath: "id", + mapper: { + required: true, + serializedName: "id", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -153,12 +197,16 @@ export const resourceGroupName: msRest.OperationURLParameter = { mapper: { required: true, serializedName: "resourceGroupName", + constraints: { + MaxLength: 90, + MinLength: 1 + }, type: { name: "String" } } }; -export const resourceName: msRest.OperationURLParameter = { +export const resourceName0: msRest.OperationURLParameter = { parameterPath: "resourceName", mapper: { required: true, @@ -168,6 +216,17 @@ export const resourceName: msRest.OperationURLParameter = { } } }; +export const resourceName1: msRest.OperationURLParameter = { + parameterPath: "resourceName", + mapper: { + required: true, + serializedName: "resourceName", + type: { + name: "String" + } + }, + skipEncoding: true +}; export const resourceProviderNamespace: msRest.OperationURLParameter = { parameterPath: "resourceProviderNamespace", mapper: { @@ -176,7 +235,8 @@ export const resourceProviderNamespace: msRest.OperationURLParameter = { type: { name: "String" } - } + }, + skipEncoding: true }; export const resourceType: msRest.OperationURLParameter = { parameterPath: "resourceType", @@ -189,6 +249,17 @@ export const resourceType: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const roleAssignmentId: msRest.OperationURLParameter = { + parameterPath: "roleAssignmentId", + mapper: { + required: true, + serializedName: "roleAssignmentId", + type: { + name: "String" + } + }, + skipEncoding: true +}; export const roleAssignmentName: msRest.OperationURLParameter = { parameterPath: "roleAssignmentName", mapper: { @@ -197,6 +268,37 @@ export const roleAssignmentName: msRest.OperationURLParameter = { type: { name: "String" } + }, + skipEncoding: true +}; +export const roleAssignmentScheduleInstanceName: msRest.OperationURLParameter = { + parameterPath: "roleAssignmentScheduleInstanceName", + mapper: { + required: true, + serializedName: "roleAssignmentScheduleInstanceName", + type: { + name: "String" + } + } +}; +export const roleAssignmentScheduleName: msRest.OperationURLParameter = { + parameterPath: "roleAssignmentScheduleName", + mapper: { + required: true, + serializedName: "roleAssignmentScheduleName", + type: { + name: "String" + } + } +}; +export const roleAssignmentScheduleRequestName: msRest.OperationURLParameter = { + parameterPath: "roleAssignmentScheduleRequestName", + mapper: { + required: true, + serializedName: "roleAssignmentScheduleRequestName", + type: { + name: "String" + } } }; export const roleDefinitionId: msRest.OperationURLParameter = { @@ -209,6 +311,36 @@ export const roleDefinitionId: msRest.OperationURLParameter = { } } }; +export const roleEligibilityScheduleInstanceName: msRest.OperationURLParameter = { + parameterPath: "roleEligibilityScheduleInstanceName", + mapper: { + required: true, + serializedName: "roleEligibilityScheduleInstanceName", + type: { + name: "String" + } + } +}; +export const roleEligibilityScheduleName: msRest.OperationURLParameter = { + parameterPath: "roleEligibilityScheduleName", + mapper: { + required: true, + serializedName: "roleEligibilityScheduleName", + type: { + name: "String" + } + } +}; +export const roleEligibilityScheduleRequestName: msRest.OperationURLParameter = { + parameterPath: "roleEligibilityScheduleRequestName", + mapper: { + required: true, + serializedName: "roleEligibilityScheduleRequestName", + type: { + name: "String" + } + } +}; export const roleId: msRest.OperationURLParameter = { parameterPath: "roleId", mapper: { @@ -220,6 +352,36 @@ export const roleId: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const roleManagementPolicyAssignmentName: msRest.OperationURLParameter = { + parameterPath: "roleManagementPolicyAssignmentName", + mapper: { + required: true, + serializedName: "roleManagementPolicyAssignmentName", + type: { + name: "String" + } + } +}; +export const roleManagementPolicyName: msRest.OperationURLParameter = { + parameterPath: "roleManagementPolicyName", + mapper: { + required: true, + serializedName: "roleManagementPolicyName", + type: { + name: "String" + } + } +}; +export const scheduleDefinitionId: msRest.OperationURLParameter = { + parameterPath: "scheduleDefinitionId", + mapper: { + required: true, + serializedName: "scheduleDefinitionId", + type: { + name: "String" + } + } +}; export const scope: msRest.OperationURLParameter = { parameterPath: "scope", mapper: { @@ -236,6 +398,21 @@ export const subscriptionId: msRest.OperationURLParameter = { mapper: { required: true, serializedName: "subscriptionId", + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const tenantId: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "tenantId" + ], + mapper: { + serializedName: "tenantId", type: { name: "String" } diff --git a/sdk/authorization/arm-authorization/src/models/permissionsMappers.ts b/sdk/authorization/arm-authorization/src/models/permissionsMappers.ts index 2ca29685b7d7..b89909f4132d 100644 --- a/sdk/authorization/arm-authorization/src/models/permissionsMappers.ts +++ b/sdk/authorization/arm-authorization/src/models/permissionsMappers.ts @@ -1,13 +1,16 @@ /* - * 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 { - CloudError, + discriminators, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, Permission, PermissionGetResult } from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/providerOperationsMetadataOperationsMappers.ts b/sdk/authorization/arm-authorization/src/models/providerOperationsMetadataOperationsMappers.ts index 7bfe52496e1d..cd359d514f51 100644 --- a/sdk/authorization/arm-authorization/src/models/providerOperationsMetadataOperationsMappers.ts +++ b/sdk/authorization/arm-authorization/src/models/providerOperationsMetadataOperationsMappers.ts @@ -1,13 +1,16 @@ /* - * 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 { - CloudError, + discriminators, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, ProviderOperation, ProviderOperationsMetadata, ProviderOperationsMetadataListResult, diff --git a/sdk/authorization/arm-authorization/src/models/roleAssignmentMetricsMappers.ts b/sdk/authorization/arm-authorization/src/models/roleAssignmentMetricsMappers.ts new file mode 100644 index 000000000000..d5fef908027d --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/roleAssignmentMetricsMappers.ts @@ -0,0 +1,15 @@ +/* + * 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 { + discriminators, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + RoleAssignmentMetricsResult +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/roleAssignmentScheduleInstancesMappers.ts b/sdk/authorization/arm-authorization/src/models/roleAssignmentScheduleInstancesMappers.ts new file mode 100644 index 000000000000..2b486cc5bb43 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/roleAssignmentScheduleInstancesMappers.ts @@ -0,0 +1,18 @@ +/* + * 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 { + discriminators, + CloudError, + ExpandedProperties, + ExpandedPropertiesPrincipal, + ExpandedPropertiesRoleDefinition, + ExpandedPropertiesScope, + RoleAssignmentScheduleInstance, + RoleAssignmentScheduleInstanceListResult +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/roleAssignmentScheduleRequestsMappers.ts b/sdk/authorization/arm-authorization/src/models/roleAssignmentScheduleRequestsMappers.ts new file mode 100644 index 000000000000..cf97556927c9 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/roleAssignmentScheduleRequestsMappers.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CloudError, + ExpandedProperties, + ExpandedPropertiesPrincipal, + ExpandedPropertiesRoleDefinition, + ExpandedPropertiesScope, + RoleAssignmentScheduleRequest, + RoleAssignmentScheduleRequestListResult, + RoleAssignmentScheduleRequestPropertiesScheduleInfo, + RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration, + RoleAssignmentScheduleRequestPropertiesTicketInfo +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/roleAssignmentSchedulesMappers.ts b/sdk/authorization/arm-authorization/src/models/roleAssignmentSchedulesMappers.ts new file mode 100644 index 000000000000..71e76072c2ad --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/roleAssignmentSchedulesMappers.ts @@ -0,0 +1,18 @@ +/* + * 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 { + discriminators, + CloudError, + ExpandedProperties, + ExpandedPropertiesPrincipal, + ExpandedPropertiesRoleDefinition, + ExpandedPropertiesScope, + RoleAssignmentSchedule, + RoleAssignmentScheduleListResult +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/roleAssignmentsMappers.ts b/sdk/authorization/arm-authorization/src/models/roleAssignmentsMappers.ts index 9a3e7d0c7a2c..895e662691c3 100644 --- a/sdk/authorization/arm-authorization/src/models/roleAssignmentsMappers.ts +++ b/sdk/authorization/arm-authorization/src/models/roleAssignmentsMappers.ts @@ -1,14 +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 { - CloudError, + discriminators, + AccessReviewDecision, + AccessReviewDefaultSettings, + AccessReviewInstance, + AccessReviewReviewer, + AccessReviewScheduleDefinition, + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, RoleAssignment, RoleAssignmentCreateParameters, - RoleAssignmentListResult + RoleAssignmentListResult, + ValidationResponse, + ValidationResponseErrorInfo } from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/roleDefinitionsMappers.ts b/sdk/authorization/arm-authorization/src/models/roleDefinitionsMappers.ts index c64320ffca61..17c2c78697be 100644 --- a/sdk/authorization/arm-authorization/src/models/roleDefinitionsMappers.ts +++ b/sdk/authorization/arm-authorization/src/models/roleDefinitionsMappers.ts @@ -1,13 +1,16 @@ /* - * 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 { - CloudError, + discriminators, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, Permission, RoleDefinition, RoleDefinitionListResult diff --git a/sdk/authorization/arm-authorization/src/models/roleEligibilityScheduleInstancesMappers.ts b/sdk/authorization/arm-authorization/src/models/roleEligibilityScheduleInstancesMappers.ts new file mode 100644 index 000000000000..49bdef49715d --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/roleEligibilityScheduleInstancesMappers.ts @@ -0,0 +1,18 @@ +/* + * 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 { + discriminators, + CloudError, + ExpandedProperties, + ExpandedPropertiesPrincipal, + ExpandedPropertiesRoleDefinition, + ExpandedPropertiesScope, + RoleEligibilityScheduleInstance, + RoleEligibilityScheduleInstanceListResult +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/roleEligibilityScheduleRequestsMappers.ts b/sdk/authorization/arm-authorization/src/models/roleEligibilityScheduleRequestsMappers.ts new file mode 100644 index 000000000000..15601002099c --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/roleEligibilityScheduleRequestsMappers.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CloudError, + ExpandedProperties, + ExpandedPropertiesPrincipal, + ExpandedPropertiesRoleDefinition, + ExpandedPropertiesScope, + RoleEligibilityScheduleRequest, + RoleEligibilityScheduleRequestListResult, + RoleEligibilityScheduleRequestPropertiesScheduleInfo, + RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration, + RoleEligibilityScheduleRequestPropertiesTicketInfo +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/roleEligibilitySchedulesMappers.ts b/sdk/authorization/arm-authorization/src/models/roleEligibilitySchedulesMappers.ts new file mode 100644 index 000000000000..15b69d601db1 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/roleEligibilitySchedulesMappers.ts @@ -0,0 +1,18 @@ +/* + * 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 { + discriminators, + CloudError, + ExpandedProperties, + ExpandedPropertiesPrincipal, + ExpandedPropertiesRoleDefinition, + ExpandedPropertiesScope, + RoleEligibilitySchedule, + RoleEligibilityScheduleListResult +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/roleManagementPoliciesMappers.ts b/sdk/authorization/arm-authorization/src/models/roleManagementPoliciesMappers.ts new file mode 100644 index 000000000000..2bf74b5992c9 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/roleManagementPoliciesMappers.ts @@ -0,0 +1,27 @@ +/* + * 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 { + discriminators, + ApprovalSettings, + ApprovalStage, + CloudError, + PolicyProperties, + PolicyPropertiesScope, + Principal, + RoleManagementPolicy, + RoleManagementPolicyApprovalRule, + RoleManagementPolicyAuthenticationContextRule, + RoleManagementPolicyEnablementRule, + RoleManagementPolicyExpirationRule, + RoleManagementPolicyListResult, + RoleManagementPolicyNotificationRule, + RoleManagementPolicyRule, + RoleManagementPolicyRuleTarget, + UserSet +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/models/roleManagementPolicyAssignmentsMappers.ts b/sdk/authorization/arm-authorization/src/models/roleManagementPolicyAssignmentsMappers.ts new file mode 100644 index 000000000000..7e6ed8648145 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/models/roleManagementPolicyAssignmentsMappers.ts @@ -0,0 +1,19 @@ +/* + * 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 { + discriminators, + CloudError, + PolicyAssignmentProperties, + PolicyAssignmentPropertiesPolicy, + PolicyAssignmentPropertiesRoleDefinition, + PolicyAssignmentPropertiesScope, + Principal, + RoleManagementPolicyAssignment, + RoleManagementPolicyAssignmentListResult +} from "../models/mappers"; diff --git a/sdk/authorization/arm-authorization/src/operations/accessReviewDefaultSettingsOperations.ts b/sdk/authorization/arm-authorization/src/operations/accessReviewDefaultSettingsOperations.ts new file mode 100644 index 000000000000..ede9185cd587 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/accessReviewDefaultSettingsOperations.ts @@ -0,0 +1,134 @@ +/* + * 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/accessReviewDefaultSettingsOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a AccessReviewDefaultSettingsOperations. */ +export class AccessReviewDefaultSettingsOperations { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a AccessReviewDefaultSettingsOperations. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Get access review default settings for the subscription + * @param [options] The optional parameters + * @returns Promise + */ + get(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + get(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + get(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Get access review default settings for the subscription + * @param properties Access review schedule settings. + * @param [options] The optional parameters + * @returns Promise + */ + put(properties: Models.AccessReviewScheduleSettings, options?: msRest.RequestOptionsBase): Promise; + /** + * @param properties Access review schedule settings. + * @param callback The callback + */ + put(properties: Models.AccessReviewScheduleSettings, callback: msRest.ServiceCallback): void; + /** + * @param properties Access review schedule settings. + * @param options The optional parameters + * @param callback The callback + */ + put(properties: Models.AccessReviewScheduleSettings, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + put(properties: Models.AccessReviewScheduleSettings, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + properties, + options + }, + putOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleSettings/default", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewDefaultSettings + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const putOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleSettings/default", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.AccessReviewScheduleSettings, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AccessReviewDefaultSettings + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/accessReviewInstanceDecisions.ts b/sdk/authorization/arm-authorization/src/operations/accessReviewInstanceDecisions.ts new file mode 100644 index 000000000000..823811873f4b --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/accessReviewInstanceDecisions.ts @@ -0,0 +1,138 @@ +/* + * 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/accessReviewInstanceDecisionsMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a AccessReviewInstanceDecisions. */ +export class AccessReviewInstanceDecisions { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a AccessReviewInstanceDecisions. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Get access review instance decisions + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param [options] The optional parameters + * @returns Promise + */ + list(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param callback The callback + */ + list(scheduleDefinitionId: string, id: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param options The optional parameters + * @param callback The callback + */ + list(scheduleDefinitionId: string, id: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + id, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get access review instance decisions + * @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; + /** + * @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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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 listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/instances/{id}/decisions", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.id, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewDecisionListResult + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewDecisionListResult + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/accessReviewInstanceMyDecisions.ts b/sdk/authorization/arm-authorization/src/operations/accessReviewInstanceMyDecisions.ts new file mode 100644 index 000000000000..d8cc4938b65d --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/accessReviewInstanceMyDecisions.ts @@ -0,0 +1,270 @@ +/* + * 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/accessReviewInstanceMyDecisionsMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a AccessReviewInstanceMyDecisions. */ +export class AccessReviewInstanceMyDecisions { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a AccessReviewInstanceMyDecisions. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Get my access review instance decisions. + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param [options] The optional parameters + * @returns Promise + */ + list(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param callback The callback + */ + list(scheduleDefinitionId: string, id: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param options The optional parameters + * @param callback The callback + */ + list(scheduleDefinitionId: string, id: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + id, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get my single access review instance decision. + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param decisionId The id of the decision record. + * @param [options] The optional parameters + * @returns Promise + */ + getById(scheduleDefinitionId: string, id: string, decisionId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param decisionId The id of the decision record. + * @param callback The callback + */ + getById(scheduleDefinitionId: string, id: string, decisionId: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param decisionId The id of the decision record. + * @param options The optional parameters + * @param callback The callback + */ + getById(scheduleDefinitionId: string, id: string, decisionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getById(scheduleDefinitionId: string, id: string, decisionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + id, + decisionId, + options + }, + getByIdOperationSpec, + callback) as Promise; + } + + /** + * Record a decision. + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param decisionId The id of the decision record. + * @param properties Access review decision properties to patch. + * @param [options] The optional parameters + * @returns Promise + */ + patch(scheduleDefinitionId: string, id: string, decisionId: string, properties: Models.AccessReviewDecisionProperties, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param decisionId The id of the decision record. + * @param properties Access review decision properties to patch. + * @param callback The callback + */ + patch(scheduleDefinitionId: string, id: string, decisionId: string, properties: Models.AccessReviewDecisionProperties, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param decisionId The id of the decision record. + * @param properties Access review decision properties to patch. + * @param options The optional parameters + * @param callback The callback + */ + patch(scheduleDefinitionId: string, id: string, decisionId: string, properties: Models.AccessReviewDecisionProperties, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + patch(scheduleDefinitionId: string, id: string, decisionId: string, properties: Models.AccessReviewDecisionProperties, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + id, + decisionId, + properties, + options + }, + patchOperationSpec, + callback) as Promise; + } + + /** + * Get my access review instance decisions. + * @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; + /** + * @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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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 listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/instances/{id}/decisions", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.id + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewDecisionListResult + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const getByIdOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/instances/{id}/decisions/{decisionId}", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.id, + Parameters.decisionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewDecision + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const patchOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/instances/{id}/decisions/{decisionId}", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.id, + Parameters.decisionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.AccessReviewDecisionProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AccessReviewDecision + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewDecisionListResult + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/accessReviewInstanceOperations.ts b/sdk/authorization/arm-authorization/src/operations/accessReviewInstanceOperations.ts new file mode 100644 index 000000000000..d4e7c1c4eed3 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/accessReviewInstanceOperations.ts @@ -0,0 +1,302 @@ +/* + * 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 Mappers from "../models/accessReviewInstanceOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a AccessReviewInstanceOperations. */ +export class AccessReviewInstanceOperations { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a AccessReviewInstanceOperations. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * An action to stop an access review instance. + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param [options] The optional parameters + * @returns Promise + */ + stop(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param callback The callback + */ + stop(scheduleDefinitionId: string, id: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param options The optional parameters + * @param callback The callback + */ + stop(scheduleDefinitionId: string, id: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + stop(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + id, + options + }, + stopOperationSpec, + callback); + } + + /** + * An action to reset all decisions for an access review instance. + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param [options] The optional parameters + * @returns Promise + */ + resetDecisions(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param callback The callback + */ + resetDecisions(scheduleDefinitionId: string, id: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param options The optional parameters + * @param callback The callback + */ + resetDecisions(scheduleDefinitionId: string, id: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + resetDecisions(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + id, + options + }, + resetDecisionsOperationSpec, + callback); + } + + /** + * An action to apply all decisions for an access review instance. + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param [options] The optional parameters + * @returns Promise + */ + applyDecisions(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param callback The callback + */ + applyDecisions(scheduleDefinitionId: string, id: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param options The optional parameters + * @param callback The callback + */ + applyDecisions(scheduleDefinitionId: string, id: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + applyDecisions(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + id, + options + }, + applyDecisionsOperationSpec, + callback); + } + + /** + * An action to send reminders for an access review instance. + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param [options] The optional parameters + * @returns Promise + */ + sendReminders(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param callback The callback + */ + sendReminders(scheduleDefinitionId: string, id: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param options The optional parameters + * @param callback The callback + */ + sendReminders(scheduleDefinitionId: string, id: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + sendReminders(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + id, + options + }, + sendRemindersOperationSpec, + callback); + } + + /** + * An action to accept recommendations for decision in an access review instance. + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param [options] The optional parameters + * @returns Promise + */ + acceptRecommendations(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param callback The callback + */ + acceptRecommendations(scheduleDefinitionId: string, id: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param options The optional parameters + * @param callback The callback + */ + acceptRecommendations(scheduleDefinitionId: string, id: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + acceptRecommendations(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + id, + options + }, + acceptRecommendationsOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const stopOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/instances/{id}/stop", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.id, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const resetDecisionsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/instances/{id}/resetDecisions", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.id, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const applyDecisionsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/instances/{id}/applyDecisions", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.id, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const sendRemindersOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/instances/{id}/sendReminders", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.id, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const acceptRecommendationsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/instances/{id}/acceptRecommendations", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.id + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/accessReviewInstances.ts b/sdk/authorization/arm-authorization/src/operations/accessReviewInstances.ts new file mode 100644 index 000000000000..35b53814607b --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/accessReviewInstances.ts @@ -0,0 +1,190 @@ +/* + * 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/accessReviewInstancesMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a AccessReviewInstances. */ +export class AccessReviewInstances { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a AccessReviewInstances. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Get access review instances + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param [options] The optional parameters + * @returns Promise + */ + list(scheduleDefinitionId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param callback The callback + */ + list(scheduleDefinitionId: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param options The optional parameters + * @param callback The callback + */ + list(scheduleDefinitionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scheduleDefinitionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get access review instances + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param [options] The optional parameters + * @returns Promise + */ + getById(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param callback The callback + */ + getById(scheduleDefinitionId: string, id: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param options The optional parameters + * @param callback The callback + */ + getById(scheduleDefinitionId: string, id: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getById(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + id, + options + }, + getByIdOperationSpec, + callback) as Promise; + } + + /** + * Get access review instances + * @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; + /** + * @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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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 listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/instances", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const getByIdOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/instances/{id}", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.id, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewInstance + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/accessReviewInstancesAssignedForMyApproval.ts b/sdk/authorization/arm-authorization/src/operations/accessReviewInstancesAssignedForMyApproval.ts new file mode 100644 index 000000000000..b23fda890322 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/accessReviewInstancesAssignedForMyApproval.ts @@ -0,0 +1,188 @@ +/* + * 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/accessReviewInstancesAssignedForMyApprovalMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a AccessReviewInstancesAssignedForMyApproval. */ +export class AccessReviewInstancesAssignedForMyApproval { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a AccessReviewInstancesAssignedForMyApproval. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Get access review instances assigned for my approval. + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param [options] The optional parameters + * @returns Promise + */ + list(scheduleDefinitionId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param callback The callback + */ + list(scheduleDefinitionId: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param options The optional parameters + * @param callback The callback + */ + list(scheduleDefinitionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scheduleDefinitionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get single access review instance assigned for my approval. + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param [options] The optional parameters + * @returns Promise + */ + getById(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param callback The callback + */ + getById(scheduleDefinitionId: string, id: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param id The id of the access review instance. + * @param options The optional parameters + * @param callback The callback + */ + getById(scheduleDefinitionId: string, id: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getById(scheduleDefinitionId: string, id: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + id, + options + }, + getByIdOperationSpec, + callback) as Promise; + } + + /** + * Get access review instances assigned for my approval. + * @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; + /** + * @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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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 listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/instances", + urlParameters: [ + Parameters.scheduleDefinitionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const getByIdOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/instances/{id}", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.id + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewInstance + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/accessReviewScheduleDefinitions.ts b/sdk/authorization/arm-authorization/src/operations/accessReviewScheduleDefinitions.ts new file mode 100644 index 000000000000..b77ad51cfa46 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/accessReviewScheduleDefinitions.ts @@ -0,0 +1,344 @@ +/* + * 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/accessReviewScheduleDefinitionsMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a AccessReviewScheduleDefinitions. */ +export class AccessReviewScheduleDefinitions { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a AccessReviewScheduleDefinitions. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Get access review schedule definitions + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get single access review definition + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param [options] The optional parameters + * @returns Promise + */ + getById(scheduleDefinitionId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param callback The callback + */ + getById(scheduleDefinitionId: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param options The optional parameters + * @param callback The callback + */ + getById(scheduleDefinitionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getById(scheduleDefinitionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + options + }, + getByIdOperationSpec, + callback) as Promise; + } + + /** + * Delete access review schedule definition + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param [options] The optional parameters + * @returns Promise + */ + deleteById(scheduleDefinitionId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param callback The callback + */ + deleteById(scheduleDefinitionId: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param options The optional parameters + * @param callback The callback + */ + deleteById(scheduleDefinitionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteById(scheduleDefinitionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + options + }, + deleteByIdOperationSpec, + callback); + } + + /** + * Create or Update access review schedule definition. + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param properties Access review schedule definition properties. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdateById(scheduleDefinitionId: string, properties: Models.AccessReviewScheduleDefinitionProperties, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param properties Access review schedule definition properties. + * @param callback The callback + */ + createOrUpdateById(scheduleDefinitionId: string, properties: Models.AccessReviewScheduleDefinitionProperties, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param properties Access review schedule definition properties. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdateById(scheduleDefinitionId: string, properties: Models.AccessReviewScheduleDefinitionProperties, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdateById(scheduleDefinitionId: string, properties: Models.AccessReviewScheduleDefinitionProperties, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + properties, + options + }, + createOrUpdateByIdOperationSpec, + callback) as Promise; + } + + /** + * Stop access review definition + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param [options] The optional parameters + * @returns Promise + */ + stop(scheduleDefinitionId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param callback The callback + */ + stop(scheduleDefinitionId: string, callback: msRest.ServiceCallback): void; + /** + * @param scheduleDefinitionId The id of the access review schedule definition. + * @param options The optional parameters + * @param callback The callback + */ + stop(scheduleDefinitionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + stop(scheduleDefinitionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scheduleDefinitionId, + options + }, + stopOperationSpec, + callback); + } + + /** + * Get access review schedule definitions + * @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; + /** + * @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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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 listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleDefinitions", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewScheduleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const getByIdOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewScheduleDefinition + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const deleteByIdOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const createOrUpdateByIdOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.AccessReviewScheduleDefinitionProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AccessReviewScheduleDefinition + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const stopOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/{scheduleDefinitionId}/stop", + urlParameters: [ + Parameters.scheduleDefinitionId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewScheduleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/accessReviewScheduleDefinitionsAssignedForMyApproval.ts b/sdk/authorization/arm-authorization/src/operations/accessReviewScheduleDefinitionsAssignedForMyApproval.ts new file mode 100644 index 000000000000..112d8f5d861c --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/accessReviewScheduleDefinitionsAssignedForMyApproval.ts @@ -0,0 +1,125 @@ +/* + * 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/accessReviewScheduleDefinitionsAssignedForMyApprovalMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a AccessReviewScheduleDefinitionsAssignedForMyApproval. */ +export class AccessReviewScheduleDefinitionsAssignedForMyApproval { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a AccessReviewScheduleDefinitionsAssignedForMyApproval. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Get access review instances assigned for my approval. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get access review instances assigned for my approval. + * @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; + /** + * @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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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 listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Authorization/accessReviewScheduleDefinitions", + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewScheduleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccessReviewScheduleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorDefinition + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/denyAssignments.ts b/sdk/authorization/arm-authorization/src/operations/denyAssignments.ts index e864b8780f9c..607ec350299f 100644 --- a/sdk/authorization/arm-authorization/src/operations/denyAssignments.ts +++ b/sdk/authorization/arm-authorization/src/operations/denyAssignments.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 @@ -28,7 +27,7 @@ export class DenyAssignments { /** * Gets deny assignments for a resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceProviderNamespace The namespace of the resource provider. * @param parentResourcePath The parent resource identity. * @param resourceType The resource type of the resource. @@ -38,7 +37,7 @@ export class DenyAssignments { */ listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: Models.DenyAssignmentsListForResourceOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceProviderNamespace The namespace of the resource provider. * @param parentResourcePath The parent resource identity. * @param resourceType The resource type of the resource. @@ -47,7 +46,7 @@ export class DenyAssignments { */ listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceProviderNamespace The namespace of the resource provider. * @param parentResourcePath The parent resource identity. * @param resourceType The resource type of the resource. @@ -72,18 +71,18 @@ export class DenyAssignments { /** * Gets deny assignments for a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listForResourceGroup(resourceGroupName: string, options?: Models.DenyAssignmentsListForResourceGroupOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ listForResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -228,7 +227,7 @@ export class DenyAssignments { * @param [options] The optional parameters * @returns Promise */ - listForResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listForResourceNext(nextPageLink: string, options?: Models.DenyAssignmentsListForResourceNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -239,8 +238,8 @@ export class DenyAssignments { * @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.DenyAssignmentsListForResourceNextOptionalParams, callback: msRest.ServiceCallback): void; + listForResourceNext(nextPageLink: string, options?: Models.DenyAssignmentsListForResourceNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -256,7 +255,7 @@ export class DenyAssignments { * @param [options] The optional parameters * @returns Promise */ - listForResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listForResourceGroupNext(nextPageLink: string, options?: Models.DenyAssignmentsListForResourceGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -267,8 +266,8 @@ export class DenyAssignments { * @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.DenyAssignmentsListForResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listForResourceGroupNext(nextPageLink: string, options?: Models.DenyAssignmentsListForResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -284,7 +283,7 @@ export class DenyAssignments { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.DenyAssignmentsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -295,8 +294,8 @@ export class DenyAssignments { * @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.DenyAssignmentsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.DenyAssignmentsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -312,7 +311,7 @@ export class DenyAssignments { * @param [options] The optional parameters * @returns Promise */ - listForScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listForScopeNext(nextPageLink: string, options?: Models.DenyAssignmentsListForScopeNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -323,8 +322,8 @@ export class DenyAssignments { * @param options The optional parameters * @param callback The callback */ - listForScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listForScopeNext(nextPageLink: string, options: Models.DenyAssignmentsListForScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listForScopeNext(nextPageLink: string, options?: Models.DenyAssignmentsListForScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -346,11 +345,11 @@ const listForResourceOperationSpec: msRest.OperationSpec = { Parameters.resourceProviderNamespace, Parameters.parentResourcePath, Parameters.resourceType, - Parameters.resourceName + Parameters.resourceName0 ], queryParameters: [ - Parameters.apiVersion4, - Parameters.filter + Parameters.apiVersion1, + Parameters.filter0 ], headerParameters: [ Parameters.acceptLanguage @@ -360,7 +359,7 @@ const listForResourceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DenyAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -374,8 +373,8 @@ const listForResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion4, - Parameters.filter + Parameters.apiVersion1, + Parameters.filter0 ], headerParameters: [ Parameters.acceptLanguage @@ -385,7 +384,7 @@ const listForResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DenyAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -398,8 +397,8 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion4, - Parameters.filter + Parameters.apiVersion1, + Parameters.filter0 ], headerParameters: [ Parameters.acceptLanguage @@ -409,7 +408,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DenyAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -423,7 +422,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.denyAssignmentId0 ], queryParameters: [ - Parameters.apiVersion4 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -433,7 +432,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DenyAssignment }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -446,7 +445,7 @@ const getByIdOperationSpec: msRest.OperationSpec = { Parameters.denyAssignmentId1 ], queryParameters: [ - Parameters.apiVersion4 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -456,7 +455,7 @@ const getByIdOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DenyAssignment }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -469,8 +468,8 @@ const listForScopeOperationSpec: msRest.OperationSpec = { Parameters.scope ], queryParameters: [ - Parameters.apiVersion4, - Parameters.filter + Parameters.apiVersion1, + Parameters.filter0 ], headerParameters: [ Parameters.acceptLanguage @@ -480,7 +479,7 @@ const listForScopeOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DenyAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -493,6 +492,10 @@ const listForResourceNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion1, + Parameters.filter0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -501,7 +504,7 @@ const listForResourceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DenyAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -514,6 +517,10 @@ const listForResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion1, + Parameters.filter0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -522,7 +529,7 @@ const listForResourceGroupNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DenyAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -535,6 +542,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion1, + Parameters.filter0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -543,7 +554,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DenyAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -556,6 +567,10 @@ const listForScopeNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion1, + Parameters.filter0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -564,7 +579,7 @@ const listForScopeNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DenyAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/authorization/arm-authorization/src/operations/eligibleChildResources.ts b/sdk/authorization/arm-authorization/src/operations/eligibleChildResources.ts new file mode 100644 index 000000000000..7bfaf9b6973d --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/eligibleChildResources.ts @@ -0,0 +1,134 @@ +/* + * 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/eligibleChildResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a EligibleChildResources. */ +export class EligibleChildResources { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a EligibleChildResources. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Get the child resources of a resource on which user has eligible access + * @param scope The scope of the role management policy. + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, options?: Models.EligibleChildResourcesGetOptionalParams): Promise; + /** + * @param scope The scope of the role management policy. + * @param callback The callback + */ + get(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role management policy. + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, options: Models.EligibleChildResourcesGetOptionalParams, callback: msRest.ServiceCallback): void; + get(scope: string, options?: Models.EligibleChildResourcesGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Get the child resources of a resource on which user has eligible access + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + getNext(nextPageLink: string, options?: Models.EligibleChildResourcesGetNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + getNext(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 + */ + getNext(nextPageLink: string, options: Models.EligibleChildResourcesGetNextOptionalParams, callback: msRest.ServiceCallback): void; + getNext(nextPageLink: string, options?: Models.EligibleChildResourcesGetNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + getNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/eligibleChildResources", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.EligibleChildResourcesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.EligibleChildResourcesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/globalAdministrator.ts b/sdk/authorization/arm-authorization/src/operations/globalAdministrator.ts deleted file mode 100644 index 0023d794b235..000000000000 --- a/sdk/authorization/arm-authorization/src/operations/globalAdministrator.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Mappers from "../models/globalAdministratorMappers"; -import * as Parameters from "../models/parameters"; -import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; - -/** Class representing a GlobalAdministrator. */ -export class GlobalAdministrator { - private readonly client: AuthorizationManagementClientContext; - - /** - * Create a GlobalAdministrator. - * @param {AuthorizationManagementClientContext} client Reference to the service client. - */ - constructor(client: AuthorizationManagementClientContext) { - this.client = client; - } - - /** - * Elevates access for a Global Administrator. - * @param [options] The optional parameters - * @returns Promise - */ - elevateAccess(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - elevateAccess(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - elevateAccess(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - elevateAccess(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - elevateAccessOperationSpec, - callback); - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const elevateAccessOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.Authorization/elevateAccess", - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/authorization/arm-authorization/src/operations/index.ts b/sdk/authorization/arm-authorization/src/operations/index.ts index 666b593b53b8..5580a83a6bca 100644 --- a/sdk/authorization/arm-authorization/src/operations/index.ts +++ b/sdk/authorization/arm-authorization/src/operations/index.ts @@ -1,17 +1,33 @@ /* - * 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 "./classicAdministrators"; -export * from "./globalAdministrator"; +export * from "./operations"; +export * from "./accessReviewScheduleDefinitions"; +export * from "./accessReviewInstances"; +export * from "./accessReviewInstanceOperations"; +export * from "./accessReviewInstanceDecisions"; +export * from "./accessReviewDefaultSettingsOperations"; +export * from "./accessReviewScheduleDefinitionsAssignedForMyApproval"; +export * from "./accessReviewInstancesAssignedForMyApproval"; +export * from "./accessReviewInstanceMyDecisions"; +export * from "./denyAssignments"; export * from "./providerOperationsMetadataOperations"; export * from "./roleAssignments"; export * from "./permissions"; export * from "./roleDefinitions"; -export * from "./denyAssignments"; +export * from "./roleAssignmentMetrics"; +export * from "./eligibleChildResources"; +export * from "./roleAssignmentSchedules"; +export * from "./roleAssignmentScheduleInstances"; +export * from "./roleAssignmentScheduleRequests"; +export * from "./roleEligibilitySchedules"; +export * from "./roleEligibilityScheduleInstances"; +export * from "./roleEligibilityScheduleRequests"; +export * from "./roleManagementPolicies"; +export * from "./roleManagementPolicyAssignments"; diff --git a/sdk/authorization/arm-authorization/src/operations/classicAdministrators.ts b/sdk/authorization/arm-authorization/src/operations/operations.ts similarity index 56% rename from sdk/authorization/arm-authorization/src/operations/classicAdministrators.ts rename to sdk/authorization/arm-authorization/src/operations/operations.ts index d9d06e7c6bfe..030bd1d817d8 100644 --- a/sdk/authorization/arm-authorization/src/operations/classicAdministrators.ts +++ b/sdk/authorization/arm-authorization/src/operations/operations.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 @@ -10,16 +9,16 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; -import * as Mappers from "../models/classicAdministratorsMappers"; +import * as Mappers from "../models/operationsMappers"; import * as Parameters from "../models/parameters"; import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; -/** Class representing a ClassicAdministrators. */ -export class ClassicAdministrators { +/** Class representing a Operations. */ +export class Operations { private readonly client: AuthorizationManagementClientContext; /** - * Create a ClassicAdministrators. + * Create a Operations. * @param {AuthorizationManagementClientContext} client Reference to the service client. */ constructor(client: AuthorizationManagementClientContext) { @@ -27,55 +26,55 @@ export class ClassicAdministrators { } /** - * Gets service administrator, account administrator, and co-administrators for the subscription. + * Lists the operations available from this provider. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(options?: msRest.RequestOptionsBase): Promise; + list(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + list(callback: msRest.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listOperationSpec, - callback) as Promise; + callback) as Promise; } /** - * Gets service administrator, account administrator, and co-administrators for the subscription. + * Lists the operations available from this provider. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback) as Promise; } } @@ -83,10 +82,7 @@ export class ClassicAdministrators { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/classicAdministrators", - urlParameters: [ - Parameters.subscriptionId - ], + path: "providers/Microsoft.Authorization/operations", queryParameters: [ Parameters.apiVersion0 ], @@ -95,10 +91,10 @@ const listOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.ClassicAdministratorListResult + bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorDefinition } }, serializer @@ -111,15 +107,18 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ClassicAdministratorListResult + bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorDefinition } }, serializer diff --git a/sdk/authorization/arm-authorization/src/operations/permissions.ts b/sdk/authorization/arm-authorization/src/operations/permissions.ts index 95de3b3b1a05..9ea09ddd739a 100644 --- a/sdk/authorization/arm-authorization/src/operations/permissions.ts +++ b/sdk/authorization/arm-authorization/src/operations/permissions.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 @@ -28,18 +27,18 @@ export class Permissions { /** * Gets all permissions the caller has for a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listForResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ listForResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -56,7 +55,7 @@ export class Permissions { /** * Gets all permissions the caller has for a resource. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceProviderNamespace The namespace of the resource provider. * @param parentResourcePath The parent resource identity. * @param resourceType The resource type of the resource. @@ -66,7 +65,7 @@ export class Permissions { */ listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceProviderNamespace The namespace of the resource provider. * @param parentResourcePath The parent resource identity. * @param resourceType The resource type of the resource. @@ -75,7 +74,7 @@ export class Permissions { */ listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceProviderNamespace The namespace of the resource provider. * @param parentResourcePath The parent resource identity. * @param resourceType The resource type of the resource. @@ -175,7 +174,7 @@ const listForResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PermissionGetResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -189,7 +188,7 @@ const listForResourceOperationSpec: msRest.OperationSpec = { Parameters.resourceProviderNamespace, Parameters.parentResourcePath, Parameters.resourceType, - Parameters.resourceName, + Parameters.resourceName0, Parameters.subscriptionId ], queryParameters: [ @@ -203,7 +202,7 @@ const listForResourceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PermissionGetResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -216,6 +215,9 @@ const listForResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion2 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -224,7 +226,7 @@ const listForResourceGroupNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PermissionGetResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -237,6 +239,9 @@ const listForResourceNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion2 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -245,7 +250,7 @@ const listForResourceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PermissionGetResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/authorization/arm-authorization/src/operations/providerOperationsMetadataOperations.ts b/sdk/authorization/arm-authorization/src/operations/providerOperationsMetadataOperations.ts index 7643d6706222..8e46773a0afc 100644 --- a/sdk/authorization/arm-authorization/src/operations/providerOperationsMetadataOperations.ts +++ b/sdk/authorization/arm-authorization/src/operations/providerOperationsMetadataOperations.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 @@ -84,7 +83,7 @@ export class ProviderOperationsMetadataOperations { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.ProviderOperationsMetadataListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -95,8 +94,8 @@ export class ProviderOperationsMetadataOperations { * @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.ProviderOperationsMetadataListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.ProviderOperationsMetadataListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -127,7 +126,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ProviderOperationsMetadata }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -148,7 +147,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ProviderOperationsMetadataListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -161,6 +160,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion2, + Parameters.expand + ], headerParameters: [ Parameters.acceptLanguage ], @@ -169,7 +172,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ProviderOperationsMetadataListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/authorization/arm-authorization/src/operations/roleAssignmentMetrics.ts b/sdk/authorization/arm-authorization/src/operations/roleAssignmentMetrics.ts new file mode 100644 index 000000000000..2514126db593 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/roleAssignmentMetrics.ts @@ -0,0 +1,76 @@ +/* + * 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/roleAssignmentMetricsMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a RoleAssignmentMetrics. */ +export class RoleAssignmentMetrics { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a RoleAssignmentMetrics. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Get role assignment usage metrics for a subscription + * @param [options] The optional parameters + * @returns Promise + */ + getMetricsForSubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + getMetricsForSubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + getMetricsForSubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getMetricsForSubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + getMetricsForSubscriptionOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getMetricsForSubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleAssignmentsUsageMetrics", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion4 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleAssignmentMetricsResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/roleAssignmentScheduleInstances.ts b/sdk/authorization/arm-authorization/src/operations/roleAssignmentScheduleInstances.ts new file mode 100644 index 000000000000..893496ea5480 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/roleAssignmentScheduleInstances.ts @@ -0,0 +1,193 @@ +/* + * 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/roleAssignmentScheduleInstancesMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a RoleAssignmentScheduleInstances. */ +export class RoleAssignmentScheduleInstances { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a RoleAssignmentScheduleInstances. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Gets role assignment schedule instances of a role assignment schedule. + * @param scope The scope of the role assignment schedule. + * @param [options] The optional parameters + * @returns Promise + */ + listForScope(scope: string, options?: Models.RoleAssignmentScheduleInstancesListForScopeOptionalParams): Promise; + /** + * @param scope The scope of the role assignment schedule. + * @param callback The callback + */ + listForScope(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role assignment schedule. + * @param options The optional parameters + * @param callback The callback + */ + listForScope(scope: string, options: Models.RoleAssignmentScheduleInstancesListForScopeOptionalParams, callback: msRest.ServiceCallback): void; + listForScope(scope: string, options?: Models.RoleAssignmentScheduleInstancesListForScopeOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listForScopeOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified role assignment schedule instance. + * @param scope The scope of the role assignments schedules. + * @param roleAssignmentScheduleInstanceName The name (hash of schedule name + time) of the role + * assignment schedule to get. + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, roleAssignmentScheduleInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role assignments schedules. + * @param roleAssignmentScheduleInstanceName The name (hash of schedule name + time) of the role + * assignment schedule to get. + * @param callback The callback + */ + get(scope: string, roleAssignmentScheduleInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role assignments schedules. + * @param roleAssignmentScheduleInstanceName The name (hash of schedule name + time) of the role + * assignment schedule to get. + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, roleAssignmentScheduleInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, roleAssignmentScheduleInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleAssignmentScheduleInstanceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets role assignment schedule instances of a role assignment schedule. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listForScopeNext(nextPageLink: string, options?: Models.RoleAssignmentScheduleInstancesListForScopeNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listForScopeNext(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 + */ + listForScopeNext(nextPageLink: string, options: Models.RoleAssignmentScheduleInstancesListForScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listForScopeNext(nextPageLink: string, options?: Models.RoleAssignmentScheduleInstancesListForScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listForScopeNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listForScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleInstances", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleAssignmentScheduleInstanceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleInstances/{roleAssignmentScheduleInstanceName}", + urlParameters: [ + Parameters.scope, + Parameters.roleAssignmentScheduleInstanceName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleAssignmentScheduleInstance + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleAssignmentScheduleInstanceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/roleAssignmentScheduleRequests.ts b/sdk/authorization/arm-authorization/src/operations/roleAssignmentScheduleRequests.ts new file mode 100644 index 000000000000..ac00acd76a48 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/roleAssignmentScheduleRequests.ts @@ -0,0 +1,335 @@ +/* + * 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/roleAssignmentScheduleRequestsMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a RoleAssignmentScheduleRequests. */ +export class RoleAssignmentScheduleRequests { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a RoleAssignmentScheduleRequests. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Creates a role assignment schedule request. + * @param scope The scope of the role assignment schedule request to create. The scope can be any + * REST resource instance. For example, use + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/' for a subscription, + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' + * for a resource group, and + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' + * for a resource. + * @param roleAssignmentScheduleRequestName The name of the role assignment to create. It can be + * any valid GUID. + * @param parameters Parameters for the role assignment schedule request. + * @param [options] The optional parameters + * @returns Promise + */ + create(scope: string, roleAssignmentScheduleRequestName: string, parameters: Models.RoleAssignmentScheduleRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role assignment schedule request to create. The scope can be any + * REST resource instance. For example, use + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/' for a subscription, + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' + * for a resource group, and + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' + * for a resource. + * @param roleAssignmentScheduleRequestName The name of the role assignment to create. It can be + * any valid GUID. + * @param parameters Parameters for the role assignment schedule request. + * @param callback The callback + */ + create(scope: string, roleAssignmentScheduleRequestName: string, parameters: Models.RoleAssignmentScheduleRequest, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role assignment schedule request to create. The scope can be any + * REST resource instance. For example, use + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/' for a subscription, + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' + * for a resource group, and + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' + * for a resource. + * @param roleAssignmentScheduleRequestName The name of the role assignment to create. It can be + * any valid GUID. + * @param parameters Parameters for the role assignment schedule request. + * @param options The optional parameters + * @param callback The callback + */ + create(scope: string, roleAssignmentScheduleRequestName: string, parameters: Models.RoleAssignmentScheduleRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(scope: string, roleAssignmentScheduleRequestName: string, parameters: Models.RoleAssignmentScheduleRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleAssignmentScheduleRequestName, + parameters, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Get the specified role assignment schedule request. + * @param scope The scope of the role assignment schedule request. + * @param roleAssignmentScheduleRequestName The name (guid) of the role assignment schedule request + * to get. + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, roleAssignmentScheduleRequestName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role assignment schedule request. + * @param roleAssignmentScheduleRequestName The name (guid) of the role assignment schedule request + * to get. + * @param callback The callback + */ + get(scope: string, roleAssignmentScheduleRequestName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role assignment schedule request. + * @param roleAssignmentScheduleRequestName The name (guid) of the role assignment schedule request + * to get. + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, roleAssignmentScheduleRequestName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, roleAssignmentScheduleRequestName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleAssignmentScheduleRequestName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets role assignment schedule requests for a scope. + * @param scope The scope of the role assignments schedule requests. + * @param [options] The optional parameters + * @returns Promise + */ + listForScope(scope: string, options?: Models.RoleAssignmentScheduleRequestsListForScopeOptionalParams): Promise; + /** + * @param scope The scope of the role assignments schedule requests. + * @param callback The callback + */ + listForScope(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role assignments schedule requests. + * @param options The optional parameters + * @param callback The callback + */ + listForScope(scope: string, options: Models.RoleAssignmentScheduleRequestsListForScopeOptionalParams, callback: msRest.ServiceCallback): void; + listForScope(scope: string, options?: Models.RoleAssignmentScheduleRequestsListForScopeOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listForScopeOperationSpec, + callback) as Promise; + } + + /** + * Cancels a pending role assignment schedule request. + * @param scope The scope of the role assignment request to cancel. + * @param roleAssignmentScheduleRequestName The name of the role assignment request to cancel. + * @param [options] The optional parameters + * @returns Promise + */ + cancel(scope: string, roleAssignmentScheduleRequestName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role assignment request to cancel. + * @param roleAssignmentScheduleRequestName The name of the role assignment request to cancel. + * @param callback The callback + */ + cancel(scope: string, roleAssignmentScheduleRequestName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role assignment request to cancel. + * @param roleAssignmentScheduleRequestName The name of the role assignment request to cancel. + * @param options The optional parameters + * @param callback The callback + */ + cancel(scope: string, roleAssignmentScheduleRequestName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + cancel(scope: string, roleAssignmentScheduleRequestName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleAssignmentScheduleRequestName, + options + }, + cancelOperationSpec, + callback); + } + + /** + * Gets role assignment schedule requests for a scope. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listForScopeNext(nextPageLink: string, options?: Models.RoleAssignmentScheduleRequestsListForScopeNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listForScopeNext(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 + */ + listForScopeNext(nextPageLink: string, options: Models.RoleAssignmentScheduleRequestsListForScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listForScopeNext(nextPageLink: string, options?: Models.RoleAssignmentScheduleRequestsListForScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listForScopeNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}", + urlParameters: [ + Parameters.scope, + Parameters.roleAssignmentScheduleRequestName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.RoleAssignmentScheduleRequest, + required: true + } + }, + responses: { + 201: { + bodyMapper: Mappers.RoleAssignmentScheduleRequest + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}", + urlParameters: [ + Parameters.scope, + Parameters.roleAssignmentScheduleRequestName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleAssignmentScheduleRequest + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleAssignmentScheduleRequestListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const cancelOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}/cancel", + urlParameters: [ + Parameters.scope, + Parameters.roleAssignmentScheduleRequestName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleAssignmentScheduleRequestListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/roleAssignmentSchedules.ts b/sdk/authorization/arm-authorization/src/operations/roleAssignmentSchedules.ts new file mode 100644 index 000000000000..941cdf6ed195 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/roleAssignmentSchedules.ts @@ -0,0 +1,190 @@ +/* + * 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/roleAssignmentSchedulesMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a RoleAssignmentSchedules. */ +export class RoleAssignmentSchedules { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a RoleAssignmentSchedules. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Get the specified role assignment schedule for a resource scope + * @param scope The scope of the role assignment schedule. + * @param roleAssignmentScheduleName The name (guid) of the role assignment schedule to get. + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, roleAssignmentScheduleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role assignment schedule. + * @param roleAssignmentScheduleName The name (guid) of the role assignment schedule to get. + * @param callback The callback + */ + get(scope: string, roleAssignmentScheduleName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role assignment schedule. + * @param roleAssignmentScheduleName The name (guid) of the role assignment schedule to get. + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, roleAssignmentScheduleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, roleAssignmentScheduleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleAssignmentScheduleName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets role assignment schedules for a resource scope. + * @param scope The scope of the role assignments schedules. + * @param [options] The optional parameters + * @returns Promise + */ + listForScope(scope: string, options?: Models.RoleAssignmentSchedulesListForScopeOptionalParams): Promise; + /** + * @param scope The scope of the role assignments schedules. + * @param callback The callback + */ + listForScope(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role assignments schedules. + * @param options The optional parameters + * @param callback The callback + */ + listForScope(scope: string, options: Models.RoleAssignmentSchedulesListForScopeOptionalParams, callback: msRest.ServiceCallback): void; + listForScope(scope: string, options?: Models.RoleAssignmentSchedulesListForScopeOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listForScopeOperationSpec, + callback) as Promise; + } + + /** + * Gets role assignment schedules for a resource scope. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listForScopeNext(nextPageLink: string, options?: Models.RoleAssignmentSchedulesListForScopeNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listForScopeNext(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 + */ + listForScopeNext(nextPageLink: string, options: Models.RoleAssignmentSchedulesListForScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listForScopeNext(nextPageLink: string, options?: Models.RoleAssignmentSchedulesListForScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listForScopeNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleAssignmentSchedules/{roleAssignmentScheduleName}", + urlParameters: [ + Parameters.scope, + Parameters.roleAssignmentScheduleName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleAssignmentSchedule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleAssignmentSchedules", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleAssignmentScheduleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleAssignmentScheduleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/roleAssignments.ts b/sdk/authorization/arm-authorization/src/operations/roleAssignments.ts index f6d695fcba05..b0979867be3f 100644 --- a/sdk/authorization/arm-authorization/src/operations/roleAssignments.ts +++ b/sdk/authorization/arm-authorization/src/operations/roleAssignments.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 @@ -27,63 +26,43 @@ export class RoleAssignments { } /** - * Gets role assignments for a resource. - * @param resourceGroupName The name of the resource group. - * @param resourceProviderNamespace The namespace of the resource provider. - * @param parentResourcePath The parent resource identity. - * @param resourceType The resource type of the resource. - * @param resourceName The name of the resource to get role assignments for. + * List all role assignments that apply to a subscription. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: Models.RoleAssignmentsListForResourceOptionalParams): Promise; + listForSubscription(options?: Models.RoleAssignmentsListForSubscriptionOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group. - * @param resourceProviderNamespace The namespace of the resource provider. - * @param parentResourcePath The parent resource identity. - * @param resourceType The resource type of the resource. - * @param resourceName The name of the resource to get role assignments for. * @param callback The callback */ - listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void; + listForSubscription(callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. - * @param resourceProviderNamespace The namespace of the resource provider. - * @param parentResourcePath The parent resource identity. - * @param resourceType The resource type of the resource. - * @param resourceName The name of the resource to get role assignments for. * @param options The optional parameters * @param callback The callback */ - listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options: Models.RoleAssignmentsListForResourceOptionalParams, callback: msRest.ServiceCallback): void; - listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: Models.RoleAssignmentsListForResourceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listForSubscription(options: Models.RoleAssignmentsListForSubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listForSubscription(options?: Models.RoleAssignmentsListForSubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - resourceGroupName, - resourceProviderNamespace, - parentResourcePath, - resourceType, - resourceName, options }, - listForResourceOperationSpec, - callback) as Promise; + listForSubscriptionOperationSpec, + callback) as Promise; } /** - * Gets role assignments for a resource group. - * @param resourceGroupName The name of the resource group. + * List all role assignments that apply to a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listForResourceGroup(resourceGroupName: string, options?: Models.RoleAssignmentsListForResourceGroupOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ listForResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -99,71 +78,117 @@ export class RoleAssignments { } /** - * Deletes a role assignment. - * @param scope The scope of the role assignment to delete. - * @param roleAssignmentName The name of the role assignment to delete. + * List all role assignments that apply to a resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceProviderNamespace The namespace of the resource provider. + * @param resourceType The resource type name. For example the type name of a web app is 'sites' + * (from Microsoft.Web/sites). + * @param resourceName The resource name. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteMethod(scope: string, roleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + listForResource(resourceGroupName: string, resourceProviderNamespace: string, resourceType: string, resourceName: string, options?: Models.RoleAssignmentsListForResourceOptionalParams): Promise; /** - * @param scope The scope of the role assignment to delete. - * @param roleAssignmentName The name of the role assignment to delete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceProviderNamespace The namespace of the resource provider. + * @param resourceType The resource type name. For example the type name of a web app is 'sites' + * (from Microsoft.Web/sites). + * @param resourceName The resource name. * @param callback The callback */ - deleteMethod(scope: string, roleAssignmentName: string, callback: msRest.ServiceCallback): void; + listForResource(resourceGroupName: string, resourceProviderNamespace: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope of the role assignment to delete. - * @param roleAssignmentName The name of the role assignment to delete. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceProviderNamespace The namespace of the resource provider. + * @param resourceType The resource type name. For example the type name of a web app is 'sites' + * (from Microsoft.Web/sites). + * @param resourceName The resource name. * @param options The optional parameters * @param callback The callback */ - deleteMethod(scope: string, roleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(scope: string, roleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listForResource(resourceGroupName: string, resourceProviderNamespace: string, resourceType: string, resourceName: string, options: Models.RoleAssignmentsListForResourceOptionalParams, callback: msRest.ServiceCallback): void; + listForResource(resourceGroupName: string, resourceProviderNamespace: string, resourceType: string, resourceName: string, options?: Models.RoleAssignmentsListForResourceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceProviderNamespace, + resourceType, + resourceName, + options + }, + listForResourceOperationSpec, + callback) as Promise; + } + + /** + * Get a role assignment by scope and name. + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param roleAssignmentName The name of the role assignment. It can be any valid GUID. + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, roleAssignmentName: string, options?: Models.RoleAssignmentsGetOptionalParams): Promise; + /** + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param roleAssignmentName The name of the role assignment. It can be any valid GUID. + * @param callback The callback + */ + get(scope: string, roleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param roleAssignmentName The name of the role assignment. It can be any valid GUID. + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, roleAssignmentName: string, options: Models.RoleAssignmentsGetOptionalParams, callback: msRest.ServiceCallback): void; + get(scope: string, roleAssignmentName: string, options?: Models.RoleAssignmentsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { scope, roleAssignmentName, options }, - deleteMethodOperationSpec, - callback) as Promise; + getOperationSpec, + callback) as Promise; } /** - * Creates a role assignment. - * @param scope The scope of the role assignment to create. The scope can be any REST resource - * instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, - * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, - * and - * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' - * for a resource. - * @param roleAssignmentName The name of the role assignment to create. It can be any valid GUID. + * Create or update a role assignment by scope and name. + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param roleAssignmentName The name of the role assignment. It can be any valid GUID. * @param parameters Parameters for the role assignment. * @param [options] The optional parameters * @returns Promise */ create(scope: string, roleAssignmentName: string, parameters: Models.RoleAssignmentCreateParameters, options?: msRest.RequestOptionsBase): Promise; /** - * @param scope The scope of the role assignment to create. The scope can be any REST resource - * instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, - * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, - * and - * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' - * for a resource. - * @param roleAssignmentName The name of the role assignment to create. It can be any valid GUID. + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param roleAssignmentName The name of the role assignment. It can be any valid GUID. * @param parameters Parameters for the role assignment. * @param callback The callback */ create(scope: string, roleAssignmentName: string, parameters: Models.RoleAssignmentCreateParameters, callback: msRest.ServiceCallback): void; /** - * @param scope The scope of the role assignment to create. The scope can be any REST resource - * instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, - * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, - * and - * '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' - * for a resource. - * @param roleAssignmentName The name of the role assignment to create. It can be any valid GUID. + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param roleAssignmentName The name of the role assignment. It can be any valid GUID. * @param parameters Parameters for the role assignment. * @param options The optional parameters * @param callback The callback @@ -182,119 +207,159 @@ export class RoleAssignments { } /** - * Get the specified role assignment. - * @param scope The scope of the role assignment. - * @param roleAssignmentName The name of the role assignment to get. + * Delete a role assignment by scope and name. + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param roleAssignmentName The name of the role assignment. It can be any valid GUID. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - get(scope: string, roleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + deleteMethod(scope: string, roleAssignmentName: string, options?: Models.RoleAssignmentsDeleteMethodOptionalParams): Promise; /** - * @param scope The scope of the role assignment. - * @param roleAssignmentName The name of the role assignment to get. + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param roleAssignmentName The name of the role assignment. It can be any valid GUID. * @param callback The callback */ - get(scope: string, roleAssignmentName: string, callback: msRest.ServiceCallback): void; + deleteMethod(scope: string, roleAssignmentName: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope of the role assignment. - * @param roleAssignmentName The name of the role assignment to get. + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param roleAssignmentName The name of the role assignment. It can be any valid GUID. * @param options The optional parameters * @param callback The callback */ - get(scope: string, roleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(scope: string, roleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(scope: string, roleAssignmentName: string, options: Models.RoleAssignmentsDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; + deleteMethod(scope: string, roleAssignmentName: string, options?: Models.RoleAssignmentsDeleteMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { scope, roleAssignmentName, options }, - getOperationSpec, - callback) as Promise; + deleteMethodOperationSpec, + callback) as Promise; } /** - * Deletes a role assignment. - * @param roleId The ID of the role assignment to delete. + * Validate a role assignment create or update operation by scope and name. + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param roleAssignmentName The name of the role assignment. It can be any valid GUID. + * @param parameters Parameters for the role assignment. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteById(roleId: string, options?: msRest.RequestOptionsBase): Promise; + validate(scope: string, roleAssignmentName: string, parameters: Models.RoleAssignmentCreateParameters, options?: msRest.RequestOptionsBase): Promise; /** - * @param roleId The ID of the role assignment to delete. + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param roleAssignmentName The name of the role assignment. It can be any valid GUID. + * @param parameters Parameters for the role assignment. * @param callback The callback */ - deleteById(roleId: string, callback: msRest.ServiceCallback): void; + validate(scope: string, roleAssignmentName: string, parameters: Models.RoleAssignmentCreateParameters, callback: msRest.ServiceCallback): void; /** - * @param roleId The ID of the role assignment to delete. + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' + * @param roleAssignmentName The name of the role assignment. It can be any valid GUID. + * @param parameters Parameters for the role assignment. * @param options The optional parameters * @param callback The callback */ - deleteById(roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteById(roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + validate(scope: string, roleAssignmentName: string, parameters: Models.RoleAssignmentCreateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + validate(scope: string, roleAssignmentName: string, parameters: Models.RoleAssignmentCreateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - roleId, + scope, + roleAssignmentName, + parameters, options }, - deleteByIdOperationSpec, - callback) as Promise; + validateOperationSpec, + callback) as Promise; } /** - * Creates a role assignment by ID. - * @param roleId The ID of the role assignment to create. - * @param parameters Parameters for the role assignment. + * List all role assignments that apply to a scope. + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createById(roleId: string, parameters: Models.RoleAssignmentCreateParameters, options?: msRest.RequestOptionsBase): Promise; + listForScope(scope: string, options?: Models.RoleAssignmentsListForScopeOptionalParams): Promise; /** - * @param roleId The ID of the role assignment to create. - * @param parameters Parameters for the role assignment. + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' * @param callback The callback */ - createById(roleId: string, parameters: Models.RoleAssignmentCreateParameters, callback: msRest.ServiceCallback): void; + listForScope(scope: string, callback: msRest.ServiceCallback): void; /** - * @param roleId The ID of the role assignment to create. - * @param parameters Parameters for the role assignment. + * @param scope The scope of the operation or resource. Valid scopes are: subscription (format: + * '/subscriptions/{subscriptionId}'), resource group (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' * @param options The optional parameters * @param callback The callback */ - createById(roleId: string, parameters: Models.RoleAssignmentCreateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createById(roleId: string, parameters: Models.RoleAssignmentCreateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listForScope(scope: string, options: Models.RoleAssignmentsListForScopeOptionalParams, callback: msRest.ServiceCallback): void; + listForScope(scope: string, options?: Models.RoleAssignmentsListForScopeOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - roleId, - parameters, + scope, options }, - createByIdOperationSpec, - callback) as Promise; + listForScopeOperationSpec, + callback) as Promise; } /** - * Gets a role assignment by ID. - * @param roleId The ID of the role assignment to get. + * Get a role assignment by ID. + * @param roleAssignmentId The fully qualified ID of the role assignment including scope, resource + * name, and resource type. Format: + * /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: + * /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ * @param [options] The optional parameters * @returns Promise */ - getById(roleId: string, options?: msRest.RequestOptionsBase): Promise; + getById(roleAssignmentId: string, options?: Models.RoleAssignmentsGetByIdOptionalParams): Promise; /** - * @param roleId The ID of the role assignment to get. + * @param roleAssignmentId The fully qualified ID of the role assignment including scope, resource + * name, and resource type. Format: + * /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: + * /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ * @param callback The callback */ - getById(roleId: string, callback: msRest.ServiceCallback): void; + getById(roleAssignmentId: string, callback: msRest.ServiceCallback): void; /** - * @param roleId The ID of the role assignment to get. + * @param roleAssignmentId The fully qualified ID of the role assignment including scope, resource + * name, and resource type. Format: + * /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: + * /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ * @param options The optional parameters * @param callback The callback */ - getById(roleId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getById(roleId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getById(roleAssignmentId: string, options: Models.RoleAssignmentsGetByIdOptionalParams, callback: msRest.ServiceCallback): void; + getById(roleAssignmentId: string, options?: Models.RoleAssignmentsGetByIdOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - roleId, + roleAssignmentId, options }, getByIdOperationSpec, @@ -302,92 +367,159 @@ export class RoleAssignments { } /** - * Gets all role assignments for the subscription. + * Create or update a role assignment by ID. + * @param roleAssignmentId The fully qualified ID of the role assignment including scope, resource + * name, and resource type. Format: + * /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: + * /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ + * @param parameters Parameters for the role assignment. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(options?: Models.RoleAssignmentsListOptionalParams): Promise; + createById(roleAssignmentId: string, parameters: Models.RoleAssignmentCreateParameters, options?: msRest.RequestOptionsBase): Promise; /** + * @param roleAssignmentId The fully qualified ID of the role assignment including scope, resource + * name, and resource type. Format: + * /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: + * /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ + * @param parameters Parameters for the role assignment. * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + createById(roleAssignmentId: string, parameters: Models.RoleAssignmentCreateParameters, callback: msRest.ServiceCallback): void; /** + * @param roleAssignmentId The fully qualified ID of the role assignment including scope, resource + * name, and resource type. Format: + * /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: + * /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ + * @param parameters Parameters for the role assignment. * @param options The optional parameters * @param callback The callback */ - list(options: Models.RoleAssignmentsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.RoleAssignmentsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createById(roleAssignmentId: string, parameters: Models.RoleAssignmentCreateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createById(roleAssignmentId: string, parameters: Models.RoleAssignmentCreateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + roleAssignmentId, + parameters, options }, - listOperationSpec, - callback) as Promise; + createByIdOperationSpec, + callback) as Promise; } /** - * Gets role assignments for a scope. - * @param scope The scope of the role assignments. + * Delete a role assignment by ID. + * @param roleAssignmentId The fully qualified ID of the role assignment including scope, resource + * name, and resource type. Format: + * /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: + * /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listForScope(scope: string, options?: Models.RoleAssignmentsListForScopeOptionalParams): Promise; + deleteById(roleAssignmentId: string, options?: Models.RoleAssignmentsDeleteByIdOptionalParams): Promise; /** - * @param scope The scope of the role assignments. + * @param roleAssignmentId The fully qualified ID of the role assignment including scope, resource + * name, and resource type. Format: + * /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: + * /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ * @param callback The callback */ - listForScope(scope: string, callback: msRest.ServiceCallback): void; + deleteById(roleAssignmentId: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope of the role assignments. + * @param roleAssignmentId The fully qualified ID of the role assignment including scope, resource + * name, and resource type. Format: + * /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: + * /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ * @param options The optional parameters * @param callback The callback */ - listForScope(scope: string, options: Models.RoleAssignmentsListForScopeOptionalParams, callback: msRest.ServiceCallback): void; - listForScope(scope: string, options?: Models.RoleAssignmentsListForScopeOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteById(roleAssignmentId: string, options: Models.RoleAssignmentsDeleteByIdOptionalParams, callback: msRest.ServiceCallback): void; + deleteById(roleAssignmentId: string, options?: Models.RoleAssignmentsDeleteByIdOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - scope, + roleAssignmentId, options }, - listForScopeOperationSpec, - callback) as Promise; + deleteByIdOperationSpec, + callback) as Promise; } /** - * Gets role assignments for a resource. + * Validate a role assignment create or update operation by ID. + * @param roleAssignmentId The fully qualified ID of the role assignment including scope, resource + * name, and resource type. Format: + * /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: + * /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ + * @param parameters Parameters for the role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + validateById(roleAssignmentId: string, parameters: Models.RoleAssignmentCreateParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param roleAssignmentId The fully qualified ID of the role assignment including scope, resource + * name, and resource type. Format: + * /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: + * /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ + * @param parameters Parameters for the role assignment. + * @param callback The callback + */ + validateById(roleAssignmentId: string, parameters: Models.RoleAssignmentCreateParameters, callback: msRest.ServiceCallback): void; + /** + * @param roleAssignmentId The fully qualified ID of the role assignment including scope, resource + * name, and resource type. Format: + * /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: + * /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ + * @param parameters Parameters for the role assignment. + * @param options The optional parameters + * @param callback The callback + */ + validateById(roleAssignmentId: string, parameters: Models.RoleAssignmentCreateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + validateById(roleAssignmentId: string, parameters: Models.RoleAssignmentCreateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + roleAssignmentId, + parameters, + options + }, + validateByIdOperationSpec, + callback) as Promise; + } + + /** + * List all role 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 + * @returns Promise */ - listForResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listForSubscriptionNext(nextPageLink: string, options?: Models.RoleAssignmentsListForSubscriptionNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listForResourceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listForSubscriptionNext(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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listForSubscriptionNext(nextPageLink: string, options: Models.RoleAssignmentsListForSubscriptionNextOptionalParams, callback: msRest.ServiceCallback): void; + listForSubscriptionNext(nextPageLink: string, options?: Models.RoleAssignmentsListForSubscriptionNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listForResourceNextOperationSpec, - callback) as Promise; + listForSubscriptionNextOperationSpec, + callback) as Promise; } /** - * Gets role assignments for a resource group. + * List all role 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.RoleAssignmentsListForResourceGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -398,8 +530,8 @@ export class RoleAssignments { * @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.RoleAssignmentsListForResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listForResourceGroupNext(nextPageLink: string, options?: Models.RoleAssignmentsListForResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -410,40 +542,40 @@ export class RoleAssignments { } /** - * Gets all role assignments for the subscription. + * List all role assignments that apply to a resource. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listForResourceNext(nextPageLink: string, options?: Models.RoleAssignmentsListForResourceNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listForResourceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listForResourceNext(nextPageLink: string, options: Models.RoleAssignmentsListForResourceNextOptionalParams, callback: msRest.ServiceCallback): void; + listForResourceNext(nextPageLink: string, options?: Models.RoleAssignmentsListForResourceNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listNextOperationSpec, - callback) as Promise; + listForResourceNextOperationSpec, + callback) as Promise; } /** - * Gets role assignments for a scope. + * List all role assignments that apply to a scope. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listForScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listForScopeNext(nextPageLink: string, options?: Models.RoleAssignmentsListForScopeNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -454,8 +586,8 @@ export class RoleAssignments { * @param options The optional parameters * @param callback The callback */ - listForScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listForScopeNext(nextPageLink: string, options: Models.RoleAssignmentsListForScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listForScopeNext(nextPageLink: string, options?: Models.RoleAssignmentsListForScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -468,20 +600,16 @@ export class RoleAssignments { // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listForResourceOperationSpec: msRest.OperationSpec = { +const listForSubscriptionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/roleAssignments", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleAssignments", urlParameters: [ - Parameters.resourceGroupName, - Parameters.resourceProviderNamespace, - Parameters.parentResourcePath, - Parameters.resourceType, - Parameters.resourceName, Parameters.subscriptionId ], queryParameters: [ - Parameters.filter, - Parameters.apiVersion3 + Parameters.apiVersion3, + Parameters.filter1, + Parameters.tenantId ], headerParameters: [ Parameters.acceptLanguage @@ -491,7 +619,7 @@ const listForResourceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RoleAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -501,12 +629,42 @@ const listForResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/roleAssignments", urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.filter1, + Parameters.tenantId + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listForResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/roleAssignments", + urlParameters: [ + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.subscriptionId + Parameters.resourceProviderNamespace, + Parameters.resourceType, + Parameters.resourceName1 ], queryParameters: [ - Parameters.filter, - Parameters.apiVersion3 + Parameters.apiVersion3, + Parameters.filter1, + Parameters.tenantId ], headerParameters: [ Parameters.acceptLanguage @@ -516,21 +674,22 @@ const listForResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RoleAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", path: "{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}", urlParameters: [ Parameters.scope, Parameters.roleAssignmentName ], queryParameters: [ - Parameters.apiVersion3 + Parameters.apiVersion3, + Parameters.tenantId ], headerParameters: [ Parameters.acceptLanguage @@ -540,7 +699,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RoleAssignment }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -567,25 +726,29 @@ const createOperationSpec: msRest.OperationSpec = { } }, responses: { + 200: { + bodyMapper: Mappers.RoleAssignment + }, 201: { bodyMapper: Mappers.RoleAssignment }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", path: "{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}", urlParameters: [ Parameters.scope, Parameters.roleAssignmentName ], queryParameters: [ - Parameters.apiVersion3 + Parameters.apiVersion3, + Parameters.tenantId ], headerParameters: [ Parameters.acceptLanguage @@ -594,18 +757,20 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.RoleAssignment }, + 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const deleteByIdOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "{roleId}", +const validateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}/validate", urlParameters: [ - Parameters.roleId + Parameters.scope, + Parameters.roleAssignmentName ], queryParameters: [ Parameters.apiVersion3 @@ -613,52 +778,78 @@ const deleteByIdOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.RoleAssignmentCreateParameters, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.RoleAssignment + bodyMapper: Mappers.ValidationResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const createByIdOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "{roleId}", +const listForScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleAssignments", urlParameters: [ - Parameters.roleId + Parameters.scope ], queryParameters: [ - Parameters.apiVersion3 + Parameters.filter1, + Parameters.apiVersion3, + Parameters.tenantId ], headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RoleAssignmentCreateParameters, - required: true + responses: { + 200: { + bodyMapper: Mappers.RoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse } }, + serializer +}; + +const getByIdOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{roleAssignmentId}", + urlParameters: [ + Parameters.roleAssignmentId + ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.tenantId + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { - 201: { + 200: { bodyMapper: Mappers.RoleAssignment }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const getByIdOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{roleId}", +const createByIdOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "{roleAssignmentId}", urlParameters: [ - Parameters.roleId + Parameters.roleAssignmentId ], queryParameters: [ Parameters.apiVersion3 @@ -666,72 +857,94 @@ const getByIdOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.RoleAssignmentCreateParameters, + required: true + } + }, responses: { 200: { bodyMapper: Mappers.RoleAssignment }, + 201: { + bodyMapper: Mappers.RoleAssignment + }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleAssignments", +const deleteByIdOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "{roleAssignmentId}", urlParameters: [ - Parameters.subscriptionId + Parameters.roleAssignmentId ], queryParameters: [ - Parameters.filter, - Parameters.apiVersion3 + Parameters.apiVersion3, + Parameters.tenantId ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.RoleAssignmentListResult + bodyMapper: Mappers.RoleAssignment }, + 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const listForScopeOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{scope}/providers/Microsoft.Authorization/roleAssignments", +const validateByIdOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "{roleAssignmentId}/validate", urlParameters: [ - Parameters.scope + Parameters.roleAssignmentId ], queryParameters: [ - Parameters.filter, Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.RoleAssignmentCreateParameters, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.RoleAssignmentListResult + bodyMapper: Mappers.ValidationResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const listForResourceNextOperationSpec: msRest.OperationSpec = { +const listForSubscriptionNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.filter1, + Parameters.tenantId + ], headerParameters: [ Parameters.acceptLanguage ], @@ -740,7 +953,7 @@ const listForResourceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RoleAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -753,6 +966,11 @@ const listForResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.filter1, + Parameters.tenantId + ], headerParameters: [ Parameters.acceptLanguage ], @@ -761,19 +979,24 @@ const listForResourceGroupNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RoleAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const listForResourceNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion3, + Parameters.filter1, + Parameters.tenantId + ], headerParameters: [ Parameters.acceptLanguage ], @@ -782,7 +1005,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RoleAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -795,6 +1018,11 @@ const listForScopeNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter1, + Parameters.apiVersion3, + Parameters.tenantId + ], headerParameters: [ Parameters.acceptLanguage ], @@ -803,7 +1031,7 @@ const listForScopeNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RoleAssignmentListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/authorization/arm-authorization/src/operations/roleDefinitions.ts b/sdk/authorization/arm-authorization/src/operations/roleDefinitions.ts index de7a923fffb2..0004db492d11 100644 --- a/sdk/authorization/arm-authorization/src/operations/roleDefinitions.ts +++ b/sdk/authorization/arm-authorization/src/operations/roleDefinitions.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 @@ -200,7 +199,7 @@ export class RoleDefinitions { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.RoleDefinitionsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -211,8 +210,8 @@ export class RoleDefinitions { * @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.RoleDefinitionsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.RoleDefinitionsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -242,8 +241,9 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.RoleDefinition }, + 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -267,7 +267,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RoleDefinition }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -298,7 +298,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RoleDefinition }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -311,7 +311,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.scope ], queryParameters: [ - Parameters.filter, + Parameters.filter0, Parameters.apiVersion2 ], headerParameters: [ @@ -322,7 +322,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RoleDefinitionListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -345,7 +345,7 @@ const getByIdOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RoleDefinition }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -358,6 +358,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion2 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -366,7 +370,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RoleDefinitionListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/authorization/arm-authorization/src/operations/roleEligibilityScheduleInstances.ts b/sdk/authorization/arm-authorization/src/operations/roleEligibilityScheduleInstances.ts new file mode 100644 index 000000000000..8a4b2f44c25c --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/roleEligibilityScheduleInstances.ts @@ -0,0 +1,193 @@ +/* + * 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/roleEligibilityScheduleInstancesMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a RoleEligibilityScheduleInstances. */ +export class RoleEligibilityScheduleInstances { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a RoleEligibilityScheduleInstances. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Gets role eligibility schedule instances of a role eligibility schedule. + * @param scope The scope of the role eligibility schedule. + * @param [options] The optional parameters + * @returns Promise + */ + listForScope(scope: string, options?: Models.RoleEligibilityScheduleInstancesListForScopeOptionalParams): Promise; + /** + * @param scope The scope of the role eligibility schedule. + * @param callback The callback + */ + listForScope(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role eligibility schedule. + * @param options The optional parameters + * @param callback The callback + */ + listForScope(scope: string, options: Models.RoleEligibilityScheduleInstancesListForScopeOptionalParams, callback: msRest.ServiceCallback): void; + listForScope(scope: string, options?: Models.RoleEligibilityScheduleInstancesListForScopeOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listForScopeOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified role eligibility schedule instance. + * @param scope The scope of the role eligibility schedules. + * @param roleEligibilityScheduleInstanceName The name (hash of schedule name + time) of the role + * eligibility schedule to get. + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, roleEligibilityScheduleInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role eligibility schedules. + * @param roleEligibilityScheduleInstanceName The name (hash of schedule name + time) of the role + * eligibility schedule to get. + * @param callback The callback + */ + get(scope: string, roleEligibilityScheduleInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role eligibility schedules. + * @param roleEligibilityScheduleInstanceName The name (hash of schedule name + time) of the role + * eligibility schedule to get. + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, roleEligibilityScheduleInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, roleEligibilityScheduleInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleEligibilityScheduleInstanceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets role eligibility schedule instances of a role eligibility schedule. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listForScopeNext(nextPageLink: string, options?: Models.RoleEligibilityScheduleInstancesListForScopeNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listForScopeNext(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 + */ + listForScopeNext(nextPageLink: string, options: Models.RoleEligibilityScheduleInstancesListForScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listForScopeNext(nextPageLink: string, options?: Models.RoleEligibilityScheduleInstancesListForScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listForScopeNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listForScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleInstances", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleEligibilityScheduleInstanceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleInstances/{roleEligibilityScheduleInstanceName}", + urlParameters: [ + Parameters.scope, + Parameters.roleEligibilityScheduleInstanceName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleEligibilityScheduleInstance + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleEligibilityScheduleInstanceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/roleEligibilityScheduleRequests.ts b/sdk/authorization/arm-authorization/src/operations/roleEligibilityScheduleRequests.ts new file mode 100644 index 000000000000..0a8eba69623f --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/roleEligibilityScheduleRequests.ts @@ -0,0 +1,335 @@ +/* + * 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/roleEligibilityScheduleRequestsMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a RoleEligibilityScheduleRequests. */ +export class RoleEligibilityScheduleRequests { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a RoleEligibilityScheduleRequests. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Creates a role eligibility schedule request. + * @param scope The scope of the role eligibility schedule request to create. The scope can be any + * REST resource instance. For example, use + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/' for a subscription, + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' + * for a resource group, and + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' + * for a resource. + * @param roleEligibilityScheduleRequestName The name of the role eligibility to create. It can be + * any valid GUID. + * @param parameters Parameters for the role eligibility schedule request. + * @param [options] The optional parameters + * @returns Promise + */ + create(scope: string, roleEligibilityScheduleRequestName: string, parameters: Models.RoleEligibilityScheduleRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role eligibility schedule request to create. The scope can be any + * REST resource instance. For example, use + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/' for a subscription, + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' + * for a resource group, and + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' + * for a resource. + * @param roleEligibilityScheduleRequestName The name of the role eligibility to create. It can be + * any valid GUID. + * @param parameters Parameters for the role eligibility schedule request. + * @param callback The callback + */ + create(scope: string, roleEligibilityScheduleRequestName: string, parameters: Models.RoleEligibilityScheduleRequest, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role eligibility schedule request to create. The scope can be any + * REST resource instance. For example, use + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/' for a subscription, + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' + * for a resource group, and + * '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' + * for a resource. + * @param roleEligibilityScheduleRequestName The name of the role eligibility to create. It can be + * any valid GUID. + * @param parameters Parameters for the role eligibility schedule request. + * @param options The optional parameters + * @param callback The callback + */ + create(scope: string, roleEligibilityScheduleRequestName: string, parameters: Models.RoleEligibilityScheduleRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(scope: string, roleEligibilityScheduleRequestName: string, parameters: Models.RoleEligibilityScheduleRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleEligibilityScheduleRequestName, + parameters, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Get the specified role eligibility schedule request. + * @param scope The scope of the role eligibility schedule request. + * @param roleEligibilityScheduleRequestName The name (guid) of the role eligibility schedule + * request to get. + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, roleEligibilityScheduleRequestName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role eligibility schedule request. + * @param roleEligibilityScheduleRequestName The name (guid) of the role eligibility schedule + * request to get. + * @param callback The callback + */ + get(scope: string, roleEligibilityScheduleRequestName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role eligibility schedule request. + * @param roleEligibilityScheduleRequestName The name (guid) of the role eligibility schedule + * request to get. + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, roleEligibilityScheduleRequestName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, roleEligibilityScheduleRequestName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleEligibilityScheduleRequestName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets role eligibility schedule requests for a scope. + * @param scope The scope of the role eligibility schedule requests. + * @param [options] The optional parameters + * @returns Promise + */ + listForScope(scope: string, options?: Models.RoleEligibilityScheduleRequestsListForScopeOptionalParams): Promise; + /** + * @param scope The scope of the role eligibility schedule requests. + * @param callback The callback + */ + listForScope(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role eligibility schedule requests. + * @param options The optional parameters + * @param callback The callback + */ + listForScope(scope: string, options: Models.RoleEligibilityScheduleRequestsListForScopeOptionalParams, callback: msRest.ServiceCallback): void; + listForScope(scope: string, options?: Models.RoleEligibilityScheduleRequestsListForScopeOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listForScopeOperationSpec, + callback) as Promise; + } + + /** + * Cancels a pending role eligibility schedule request. + * @param scope The scope of the role eligibility request to cancel. + * @param roleEligibilityScheduleRequestName The name of the role eligibility request to cancel. + * @param [options] The optional parameters + * @returns Promise + */ + cancel(scope: string, roleEligibilityScheduleRequestName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role eligibility request to cancel. + * @param roleEligibilityScheduleRequestName The name of the role eligibility request to cancel. + * @param callback The callback + */ + cancel(scope: string, roleEligibilityScheduleRequestName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role eligibility request to cancel. + * @param roleEligibilityScheduleRequestName The name of the role eligibility request to cancel. + * @param options The optional parameters + * @param callback The callback + */ + cancel(scope: string, roleEligibilityScheduleRequestName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + cancel(scope: string, roleEligibilityScheduleRequestName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleEligibilityScheduleRequestName, + options + }, + cancelOperationSpec, + callback); + } + + /** + * Gets role eligibility schedule requests for a scope. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listForScopeNext(nextPageLink: string, options?: Models.RoleEligibilityScheduleRequestsListForScopeNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listForScopeNext(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 + */ + listForScopeNext(nextPageLink: string, options: Models.RoleEligibilityScheduleRequestsListForScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listForScopeNext(nextPageLink: string, options?: Models.RoleEligibilityScheduleRequestsListForScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listForScopeNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}", + urlParameters: [ + Parameters.scope, + Parameters.roleEligibilityScheduleRequestName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.RoleEligibilityScheduleRequest, + required: true + } + }, + responses: { + 201: { + bodyMapper: Mappers.RoleEligibilityScheduleRequest + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}", + urlParameters: [ + Parameters.scope, + Parameters.roleEligibilityScheduleRequestName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleEligibilityScheduleRequest + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleEligibilityScheduleRequestListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const cancelOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}/cancel", + urlParameters: [ + Parameters.scope, + Parameters.roleEligibilityScheduleRequestName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleEligibilityScheduleRequestListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/roleEligibilitySchedules.ts b/sdk/authorization/arm-authorization/src/operations/roleEligibilitySchedules.ts new file mode 100644 index 000000000000..7017aa048152 --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/roleEligibilitySchedules.ts @@ -0,0 +1,190 @@ +/* + * 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/roleEligibilitySchedulesMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a RoleEligibilitySchedules. */ +export class RoleEligibilitySchedules { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a RoleEligibilitySchedules. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Get the specified role eligibility schedule for a resource scope + * @param scope The scope of the role eligibility schedule. + * @param roleEligibilityScheduleName The name (guid) of the role eligibility schedule to get. + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, roleEligibilityScheduleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role eligibility schedule. + * @param roleEligibilityScheduleName The name (guid) of the role eligibility schedule to get. + * @param callback The callback + */ + get(scope: string, roleEligibilityScheduleName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role eligibility schedule. + * @param roleEligibilityScheduleName The name (guid) of the role eligibility schedule to get. + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, roleEligibilityScheduleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, roleEligibilityScheduleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleEligibilityScheduleName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets role eligibility schedules for a resource scope. + * @param scope The scope of the role eligibility schedules. + * @param [options] The optional parameters + * @returns Promise + */ + listForScope(scope: string, options?: Models.RoleEligibilitySchedulesListForScopeOptionalParams): Promise; + /** + * @param scope The scope of the role eligibility schedules. + * @param callback The callback + */ + listForScope(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role eligibility schedules. + * @param options The optional parameters + * @param callback The callback + */ + listForScope(scope: string, options: Models.RoleEligibilitySchedulesListForScopeOptionalParams, callback: msRest.ServiceCallback): void; + listForScope(scope: string, options?: Models.RoleEligibilitySchedulesListForScopeOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listForScopeOperationSpec, + callback) as Promise; + } + + /** + * Gets role eligibility schedules for a resource scope. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listForScopeNext(nextPageLink: string, options?: Models.RoleEligibilitySchedulesListForScopeNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listForScopeNext(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 + */ + listForScopeNext(nextPageLink: string, options: Models.RoleEligibilitySchedulesListForScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listForScopeNext(nextPageLink: string, options?: Models.RoleEligibilitySchedulesListForScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listForScopeNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleEligibilitySchedules/{roleEligibilityScheduleName}", + urlParameters: [ + Parameters.scope, + Parameters.roleEligibilityScheduleName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleEligibilitySchedule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleEligibilitySchedules", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleEligibilityScheduleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleEligibilityScheduleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/roleManagementPolicies.ts b/sdk/authorization/arm-authorization/src/operations/roleManagementPolicies.ts new file mode 100644 index 000000000000..44e4975f8dab --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/roleManagementPolicies.ts @@ -0,0 +1,310 @@ +/* + * 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/roleManagementPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a RoleManagementPolicies. */ +export class RoleManagementPolicies { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a RoleManagementPolicies. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Get the specified role management policy for a resource scope + * @param scope The scope of the role management policy. + * @param roleManagementPolicyName The name (guid) of the role management policy to get. + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, roleManagementPolicyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role management policy. + * @param roleManagementPolicyName The name (guid) of the role management policy to get. + * @param callback The callback + */ + get(scope: string, roleManagementPolicyName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role management policy. + * @param roleManagementPolicyName The name (guid) of the role management policy to get. + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, roleManagementPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, roleManagementPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleManagementPolicyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update a role management policy + * @param scope The scope of the role management policy to upsert. + * @param roleManagementPolicyName The name (guid) of the role management policy to upsert. + * @param parameters Parameters for the role management policy. + * @param [options] The optional parameters + * @returns Promise + */ + update(scope: string, roleManagementPolicyName: string, parameters: Models.RoleManagementPolicy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role management policy to upsert. + * @param roleManagementPolicyName The name (guid) of the role management policy to upsert. + * @param parameters Parameters for the role management policy. + * @param callback The callback + */ + update(scope: string, roleManagementPolicyName: string, parameters: Models.RoleManagementPolicy, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role management policy to upsert. + * @param roleManagementPolicyName The name (guid) of the role management policy to upsert. + * @param parameters Parameters for the role management policy. + * @param options The optional parameters + * @param callback The callback + */ + update(scope: string, roleManagementPolicyName: string, parameters: Models.RoleManagementPolicy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(scope: string, roleManagementPolicyName: string, parameters: Models.RoleManagementPolicy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleManagementPolicyName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Delete a role management policy + * @param scope The scope of the role management policy to upsert. + * @param roleManagementPolicyName The name (guid) of the role management policy to upsert. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(scope: string, roleManagementPolicyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role management policy to upsert. + * @param roleManagementPolicyName The name (guid) of the role management policy to upsert. + * @param callback The callback + */ + deleteMethod(scope: string, roleManagementPolicyName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role management policy to upsert. + * @param roleManagementPolicyName The name (guid) of the role management policy to upsert. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(scope: string, roleManagementPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(scope: string, roleManagementPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleManagementPolicyName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets role management policies for a resource scope. + * @param scope The scope of the role management policy. + * @param [options] The optional parameters + * @returns Promise + */ + listForScope(scope: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role management policy. + * @param callback The callback + */ + listForScope(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role management policy. + * @param options The optional parameters + * @param callback The callback + */ + listForScope(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listForScope(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listForScopeOperationSpec, + callback) as Promise; + } + + /** + * Gets role management policies for a resource scope. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listForScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listForScopeNext(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 + */ + listForScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listForScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listForScopeNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName}", + urlParameters: [ + Parameters.scope, + Parameters.roleManagementPolicyName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleManagementPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName}", + urlParameters: [ + Parameters.scope, + Parameters.roleManagementPolicyName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.RoleManagementPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.RoleManagementPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName}", + urlParameters: [ + Parameters.scope, + Parameters.roleManagementPolicyName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleManagementPolicies", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleManagementPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleManagementPolicyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/src/operations/roleManagementPolicyAssignments.ts b/sdk/authorization/arm-authorization/src/operations/roleManagementPolicyAssignments.ts new file mode 100644 index 000000000000..2df4b460de8a --- /dev/null +++ b/sdk/authorization/arm-authorization/src/operations/roleManagementPolicyAssignments.ts @@ -0,0 +1,319 @@ +/* + * 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/roleManagementPolicyAssignmentsMappers"; +import * as Parameters from "../models/parameters"; +import { AuthorizationManagementClientContext } from "../authorizationManagementClientContext"; + +/** Class representing a RoleManagementPolicyAssignments. */ +export class RoleManagementPolicyAssignments { + private readonly client: AuthorizationManagementClientContext; + + /** + * Create a RoleManagementPolicyAssignments. + * @param {AuthorizationManagementClientContext} client Reference to the service client. + */ + constructor(client: AuthorizationManagementClientContext) { + this.client = client; + } + + /** + * Get the specified role management policy assignment for a resource scope + * @param scope The scope of the role management policy. + * @param roleManagementPolicyAssignmentName The name of format {guid_guid} the role management + * policy assignment to get. + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, roleManagementPolicyAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role management policy. + * @param roleManagementPolicyAssignmentName The name of format {guid_guid} the role management + * policy assignment to get. + * @param callback The callback + */ + get(scope: string, roleManagementPolicyAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role management policy. + * @param roleManagementPolicyAssignmentName The name of format {guid_guid} the role management + * policy assignment to get. + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, roleManagementPolicyAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, roleManagementPolicyAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleManagementPolicyAssignmentName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create a role management policy assignment + * @param scope The scope of the role management policy assignment to upsert. + * @param roleManagementPolicyAssignmentName The name of format {guid_guid} the role management + * policy assignment to upsert. + * @param parameters Parameters for the role management policy assignment. + * @param [options] The optional parameters + * @returns Promise + */ + create(scope: string, roleManagementPolicyAssignmentName: string, parameters: Models.RoleManagementPolicyAssignment, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role management policy assignment to upsert. + * @param roleManagementPolicyAssignmentName The name of format {guid_guid} the role management + * policy assignment to upsert. + * @param parameters Parameters for the role management policy assignment. + * @param callback The callback + */ + create(scope: string, roleManagementPolicyAssignmentName: string, parameters: Models.RoleManagementPolicyAssignment, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role management policy assignment to upsert. + * @param roleManagementPolicyAssignmentName The name of format {guid_guid} the role management + * policy assignment to upsert. + * @param parameters Parameters for the role management policy assignment. + * @param options The optional parameters + * @param callback The callback + */ + create(scope: string, roleManagementPolicyAssignmentName: string, parameters: Models.RoleManagementPolicyAssignment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(scope: string, roleManagementPolicyAssignmentName: string, parameters: Models.RoleManagementPolicyAssignment, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleManagementPolicyAssignmentName, + parameters, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Delete a role management policy assignment + * @param scope The scope of the role management policy assignment to delete. + * @param roleManagementPolicyAssignmentName The name of format {guid_guid} the role management + * policy assignment to delete. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(scope: string, roleManagementPolicyAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role management policy assignment to delete. + * @param roleManagementPolicyAssignmentName The name of format {guid_guid} the role management + * policy assignment to delete. + * @param callback The callback + */ + deleteMethod(scope: string, roleManagementPolicyAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role management policy assignment to delete. + * @param roleManagementPolicyAssignmentName The name of format {guid_guid} the role management + * policy assignment to delete. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(scope: string, roleManagementPolicyAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(scope: string, roleManagementPolicyAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + roleManagementPolicyAssignmentName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets role management assignment policies for a resource scope. + * @param scope The scope of the role management policy. + * @param [options] The optional parameters + * @returns Promise + */ + listForScope(scope: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope of the role management policy. + * @param callback The callback + */ + listForScope(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope of the role management policy. + * @param options The optional parameters + * @param callback The callback + */ + listForScope(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listForScope(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listForScopeOperationSpec, + callback) as Promise; + } + + /** + * Gets role management assignment policies for a resource scope. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listForScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listForScopeNext(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 + */ + listForScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listForScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listForScopeNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}", + urlParameters: [ + Parameters.scope, + Parameters.roleManagementPolicyAssignmentName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleManagementPolicyAssignment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}", + urlParameters: [ + Parameters.scope, + Parameters.roleManagementPolicyAssignmentName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.RoleManagementPolicyAssignment, + required: true + } + }, + responses: { + 201: { + bodyMapper: Mappers.RoleManagementPolicyAssignment + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}", + urlParameters: [ + Parameters.scope, + Parameters.roleManagementPolicyAssignmentName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleManagementPolicyAssignmentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listForScopeNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleManagementPolicyAssignmentListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/authorization/arm-authorization/tsconfig.json b/sdk/authorization/arm-authorization/tsconfig.json index 58429b90531b..422b584abd5e 100644 --- a/sdk/authorization/arm-authorization/tsconfig.json +++ b/sdk/authorization/arm-authorization/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6","dom"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true