From a31a6fcad4e36f064cb06999f8c6ab265983e322 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 4 Sep 2018 08:42:04 -0700 Subject: [PATCH 1/4] [AutoPR authorization/resource-manager] Grlin/Adding Principal Type to RA (#3437) * Generated from c1bd4a0fe7a9875860bee68573376dd262355075 adding principal type + updating version number * Generated from 84db701a586ef87002724760147236ef3730335c adding principalType known values * Generated from 84db701a586ef87002724760147236ef3730335c adding principalType known values --- .../lib/models/index.d.ts | 5 ++ .../lib/models/providerOperationsMetadata.js | 2 + .../lib/models/resourceType.js | 2 + .../models/roleAssignmentCreateParameters.js | 11 ++++ .../lib/models/roleDefinition.js | 2 + .../lib/operations/index.d.ts | 20 ++++++++ .../lib/operations/permissions.js | 4 +- .../providerOperationsMetadataOperations.js | 4 +- .../lib/operations/roleAssignments.js | 50 +++++++++++++++---- .../lib/operations/roleDefinitions.js | 10 ++-- .../authorizationManagement/package.json | 4 +- 11 files changed, 93 insertions(+), 21 deletions(-) diff --git a/lib/services/authorizationManagement/lib/models/index.d.ts b/lib/services/authorizationManagement/lib/models/index.d.ts index 054ebbae5c..f53d6c665b 100644 --- a/lib/services/authorizationManagement/lib/models/index.d.ts +++ b/lib/services/authorizationManagement/lib/models/index.d.ts @@ -205,12 +205,17 @@ export interface RoleAssignment { * @member {string} [principalId] 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. + * @member {string} [principalType] The principal type of the assigned + * principal ID. Possible values include: 'User', 'Group', 'ServicePrincipal', + * 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', 'Application', 'MSI', + * 'DirectoryObjectOrGroup', 'Everyone' * @member {boolean} [canDelegate] The delgation flag used for creating a role * assignment */ export interface RoleAssignmentCreateParameters { roleDefinitionId?: string; principalId?: string; + principalType?: string; canDelegate?: boolean; } diff --git a/lib/services/authorizationManagement/lib/models/providerOperationsMetadata.js b/lib/services/authorizationManagement/lib/models/providerOperationsMetadata.js index 5c455692ca..93e590f6cb 100644 --- a/lib/services/authorizationManagement/lib/models/providerOperationsMetadata.js +++ b/lib/services/authorizationManagement/lib/models/providerOperationsMetadata.js @@ -10,6 +10,8 @@ 'use strict'; +const models = require('./index'); + /** * Provider Operations metadata * diff --git a/lib/services/authorizationManagement/lib/models/resourceType.js b/lib/services/authorizationManagement/lib/models/resourceType.js index 10ebee67b5..49599002c0 100644 --- a/lib/services/authorizationManagement/lib/models/resourceType.js +++ b/lib/services/authorizationManagement/lib/models/resourceType.js @@ -10,6 +10,8 @@ 'use strict'; +const models = require('./index'); + /** * Resource Type * diff --git a/lib/services/authorizationManagement/lib/models/roleAssignmentCreateParameters.js b/lib/services/authorizationManagement/lib/models/roleAssignmentCreateParameters.js index 1d631e6965..0c83bc89d9 100644 --- a/lib/services/authorizationManagement/lib/models/roleAssignmentCreateParameters.js +++ b/lib/services/authorizationManagement/lib/models/roleAssignmentCreateParameters.js @@ -22,6 +22,10 @@ class RoleAssignmentCreateParameters { * @member {string} [principalId] 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. + * @member {string} [principalType] The principal type of the assigned + * principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', + * 'Application', 'MSI', 'DirectoryObjectOrGroup', 'Everyone' * @member {boolean} [canDelegate] The delgation flag used for creating a * role assignment */ @@ -56,6 +60,13 @@ class RoleAssignmentCreateParameters { name: 'String' } }, + principalType: { + required: false, + serializedName: 'properties.principalType', + type: { + name: 'String' + } + }, canDelegate: { required: false, serializedName: 'properties.canDelegate', diff --git a/lib/services/authorizationManagement/lib/models/roleDefinition.js b/lib/services/authorizationManagement/lib/models/roleDefinition.js index 76ab1c56ff..89e214622b 100644 --- a/lib/services/authorizationManagement/lib/models/roleDefinition.js +++ b/lib/services/authorizationManagement/lib/models/roleDefinition.js @@ -10,6 +10,8 @@ 'use strict'; +const models = require('./index'); + /** * Role definition. * diff --git a/lib/services/authorizationManagement/lib/operations/index.d.ts b/lib/services/authorizationManagement/lib/operations/index.d.ts index 1451a13434..4572e94368 100644 --- a/lib/services/authorizationManagement/lib/operations/index.d.ts +++ b/lib/services/authorizationManagement/lib/operations/index.d.ts @@ -818,6 +818,11 @@ export interface RoleAssignments { * role. This maps to the ID inside the Active Directory. It can point to a * user, service principal, or security group. * + * @param {string} [parameters.principalType] The principal type of the + * assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', + * 'Application', 'MSI', 'DirectoryObjectOrGroup', 'Everyone' + * * @param {boolean} [parameters.canDelegate] The delgation flag used for * creating a role assignment * @@ -857,6 +862,11 @@ export interface RoleAssignments { * role. This maps to the ID inside the Active Directory. It can point to a * user, service principal, or security group. * + * @param {string} [parameters.principalType] The principal type of the + * assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', + * 'Application', 'MSI', 'DirectoryObjectOrGroup', 'Everyone' + * * @param {boolean} [parameters.canDelegate] The delgation flag used for * creating a role assignment * @@ -1020,6 +1030,11 @@ export interface RoleAssignments { * role. This maps to the ID inside the Active Directory. It can point to a * user, service principal, or security group. * + * @param {string} [parameters.principalType] The principal type of the + * assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', + * 'Application', 'MSI', 'DirectoryObjectOrGroup', 'Everyone' + * * @param {boolean} [parameters.canDelegate] The delgation flag used for * creating a role assignment * @@ -1050,6 +1065,11 @@ export interface RoleAssignments { * role. This maps to the ID inside the Active Directory. It can point to a * user, service principal, or security group. * + * @param {string} [parameters.principalType] The principal type of the + * assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', + * 'Application', 'MSI', 'DirectoryObjectOrGroup', 'Everyone' + * * @param {boolean} [parameters.canDelegate] The delgation flag used for * creating a role assignment * diff --git a/lib/services/authorizationManagement/lib/operations/permissions.js b/lib/services/authorizationManagement/lib/operations/permissions.js index 96ac5a3e74..76c2f9684a 100644 --- a/lib/services/authorizationManagement/lib/operations/permissions.js +++ b/lib/services/authorizationManagement/lib/operations/permissions.js @@ -47,7 +47,7 @@ function _listForResourceGroup(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -194,7 +194,7 @@ function _listForResource(resourceGroupName, resourceProviderNamespace, parentRe if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/authorizationManagement/lib/operations/providerOperationsMetadataOperations.js b/lib/services/authorizationManagement/lib/operations/providerOperationsMetadataOperations.js index 2d3a0eb0c0..b6246668ba 100644 --- a/lib/services/authorizationManagement/lib/operations/providerOperationsMetadataOperations.js +++ b/lib/services/authorizationManagement/lib/operations/providerOperationsMetadataOperations.js @@ -52,7 +52,7 @@ function _get(resourceProviderNamespace, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : 'resourceTypes'; - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (resourceProviderNamespace === null || resourceProviderNamespace === undefined || typeof resourceProviderNamespace.valueOf() !== 'string') { @@ -193,7 +193,7 @@ function _list(options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : 'resourceTypes'; - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (expand !== null && expand !== undefined && typeof expand.valueOf() !== 'string') { diff --git a/lib/services/authorizationManagement/lib/operations/roleAssignments.js b/lib/services/authorizationManagement/lib/operations/roleAssignments.js index bebfb2af76..4c4031ad9d 100644 --- a/lib/services/authorizationManagement/lib/operations/roleAssignments.js +++ b/lib/services/authorizationManagement/lib/operations/roleAssignments.js @@ -64,7 +64,7 @@ function _listForResource(resourceGroupName, resourceProviderNamespace, parentRe throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -230,7 +230,7 @@ function _listForResourceGroup(resourceGroupName, options, callback) { throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -376,7 +376,7 @@ function _deleteMethod(scope, roleAssignmentName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (scope === null || scope === undefined || typeof scope.valueOf() !== 'string') { @@ -503,6 +503,11 @@ function _deleteMethod(scope, roleAssignmentName, options, callback) { * role. This maps to the ID inside the Active Directory. It can point to a * user, service principal, or security group. * + * @param {string} [parameters.principalType] The principal type of the + * assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', + * 'Application', 'MSI', 'DirectoryObjectOrGroup', 'Everyone' + * * @param {boolean} [parameters.canDelegate] The delgation flag used for * creating a role assignment * @@ -534,7 +539,7 @@ function _create(scope, roleAssignmentName, parameters, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (scope === null || scope === undefined || typeof scope.valueOf() !== 'string') { @@ -690,7 +695,7 @@ function _get(scope, roleAssignmentName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (scope === null || scope === undefined || typeof scope.valueOf() !== 'string') { @@ -827,7 +832,7 @@ function _deleteById(roleId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (roleId === null || roleId === undefined || typeof roleId.valueOf() !== 'string') { @@ -941,6 +946,11 @@ function _deleteById(roleId, options, callback) { * role. This maps to the ID inside the Active Directory. It can point to a * user, service principal, or security group. * + * @param {string} [parameters.principalType] The principal type of the + * assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', + * 'Application', 'MSI', 'DirectoryObjectOrGroup', 'Everyone' + * * @param {boolean} [parameters.canDelegate] The delgation flag used for * creating a role assignment * @@ -972,7 +982,7 @@ function _createById(roleId, parameters, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (roleId === null || roleId === undefined || typeof roleId.valueOf() !== 'string') { @@ -1122,7 +1132,7 @@ function _getById(roleId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (roleId === null || roleId === undefined || typeof roleId.valueOf() !== 'string') { @@ -1260,7 +1270,7 @@ function _list(options, callback) { throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { @@ -1406,7 +1416,7 @@ function _listForScope(scope, options, callback) { throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (scope === null || scope === undefined || typeof scope.valueOf() !== 'string') { @@ -2365,6 +2375,11 @@ class RoleAssignments { * role. This maps to the ID inside the Active Directory. It can point to a * user, service principal, or security group. * + * @param {string} [parameters.principalType] The principal type of the + * assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', + * 'Application', 'MSI', 'DirectoryObjectOrGroup', 'Everyone' + * * @param {boolean} [parameters.canDelegate] The delgation flag used for * creating a role assignment * @@ -2416,6 +2431,11 @@ class RoleAssignments { * role. This maps to the ID inside the Active Directory. It can point to a * user, service principal, or security group. * + * @param {string} [parameters.principalType] The principal type of the + * assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', + * 'Application', 'MSI', 'DirectoryObjectOrGroup', 'Everyone' + * * @param {boolean} [parameters.canDelegate] The delgation flag used for * creating a role assignment * @@ -2648,6 +2668,11 @@ class RoleAssignments { * role. This maps to the ID inside the Active Directory. It can point to a * user, service principal, or security group. * + * @param {string} [parameters.principalType] The principal type of the + * assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', + * 'Application', 'MSI', 'DirectoryObjectOrGroup', 'Everyone' + * * @param {boolean} [parameters.canDelegate] The delgation flag used for * creating a role assignment * @@ -2690,6 +2715,11 @@ class RoleAssignments { * role. This maps to the ID inside the Active Directory. It can point to a * user, service principal, or security group. * + * @param {string} [parameters.principalType] The principal type of the + * assigned principal ID. Possible values include: 'User', 'Group', + * 'ServicePrincipal', 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', + * 'Application', 'MSI', 'DirectoryObjectOrGroup', 'Everyone' + * * @param {boolean} [parameters.canDelegate] The delgation flag used for * creating a role assignment * diff --git a/lib/services/authorizationManagement/lib/operations/roleDefinitions.js b/lib/services/authorizationManagement/lib/operations/roleDefinitions.js index 48fbc51257..07175afefc 100644 --- a/lib/services/authorizationManagement/lib/operations/roleDefinitions.js +++ b/lib/services/authorizationManagement/lib/operations/roleDefinitions.js @@ -49,7 +49,7 @@ function _deleteMethod(scope, roleDefinitionId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (scope === null || scope === undefined || typeof scope.valueOf() !== 'string') { @@ -188,7 +188,7 @@ function _get(scope, roleDefinitionId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (scope === null || scope === undefined || typeof scope.valueOf() !== 'string') { @@ -341,7 +341,7 @@ function _createOrUpdate(scope, roleDefinitionId, roleDefinition, options, callb if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (scope === null || scope === undefined || typeof scope.valueOf() !== 'string') { @@ -500,7 +500,7 @@ function _list(scope, options, callback) { throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (scope === null || scope === undefined || typeof scope.valueOf() !== 'string') { @@ -644,7 +644,7 @@ function _getById(roleId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-01-01-preview'; + let apiVersion = '2018-09-01-preview'; // Validate try { if (roleId === null || roleId === undefined || typeof roleId.valueOf() !== 'string') { diff --git a/lib/services/authorizationManagement/package.json b/lib/services/authorizationManagement/package.json index 90e6504feb..eb54773981 100644 --- a/lib/services/authorizationManagement/package.json +++ b/lib/services/authorizationManagement/package.json @@ -2,7 +2,7 @@ "name": "azure-arm-authorization", "author": "Microsoft Corporation", "description": "AuthorizationManagementClient Library with typescript type definitions for node", - "version": "5.0.1", + "version": "", "dependencies": { "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/authorizationManagementClient.js", "types": "./lib/authorizationManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/authorizationManagement", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" From c9ddf4a54fc7c77cf67591d600f63fd2339d8ba8 Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Tue, 4 Sep 2018 09:06:14 -0700 Subject: [PATCH 2/4] Regenerate azure-arm-authorization, update version to 6.0.0 --- .../lib/models/providerOperationsMetadata.js | 2 -- .../authorizationManagement/lib/models/resourceType.js | 2 -- .../authorizationManagement/lib/models/roleDefinition.js | 2 -- lib/services/authorizationManagement/package-lock.json | 2 +- lib/services/authorizationManagement/package.json | 4 ++-- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/services/authorizationManagement/lib/models/providerOperationsMetadata.js b/lib/services/authorizationManagement/lib/models/providerOperationsMetadata.js index 93e590f6cb..5c455692ca 100644 --- a/lib/services/authorizationManagement/lib/models/providerOperationsMetadata.js +++ b/lib/services/authorizationManagement/lib/models/providerOperationsMetadata.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Provider Operations metadata * diff --git a/lib/services/authorizationManagement/lib/models/resourceType.js b/lib/services/authorizationManagement/lib/models/resourceType.js index 49599002c0..10ebee67b5 100644 --- a/lib/services/authorizationManagement/lib/models/resourceType.js +++ b/lib/services/authorizationManagement/lib/models/resourceType.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Resource Type * diff --git a/lib/services/authorizationManagement/lib/models/roleDefinition.js b/lib/services/authorizationManagement/lib/models/roleDefinition.js index 89e214622b..76ab1c56ff 100644 --- a/lib/services/authorizationManagement/lib/models/roleDefinition.js +++ b/lib/services/authorizationManagement/lib/models/roleDefinition.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Role definition. * diff --git a/lib/services/authorizationManagement/package-lock.json b/lib/services/authorizationManagement/package-lock.json index f886bd24ca..82902b09f8 100644 --- a/lib/services/authorizationManagement/package-lock.json +++ b/lib/services/authorizationManagement/package-lock.json @@ -1,6 +1,6 @@ { "name": "azure-arm-authorization", - "version": "5.0.1", + "version": "6.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/lib/services/authorizationManagement/package.json b/lib/services/authorizationManagement/package.json index eb54773981..791730b83e 100644 --- a/lib/services/authorizationManagement/package.json +++ b/lib/services/authorizationManagement/package.json @@ -2,7 +2,7 @@ "name": "azure-arm-authorization", "author": "Microsoft Corporation", "description": "AuthorizationManagementClient Library with typescript type definitions for node", - "version": "", + "version": "6.0.0", "dependencies": { "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/authorizationManagementClient.js", "types": "./lib/authorizationManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/authorizationManagement", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" From b2919012161270022e46ad78d33fb334bca41856 Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Tue, 4 Sep 2018 09:20:36 -0700 Subject: [PATCH 3/4] Fix test --- ...ign_Key_Vault_the_operator_role_on_a_storage_account.nock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/recordings/keyvaultstorage-tests/Key_Vault_Storage_should_successfully_assign_Key_Vault_the_operator_role_on_a_storage_account.nock.js b/test/recordings/keyvaultstorage-tests/Key_Vault_Storage_should_successfully_assign_Key_Vault_the_operator_role_on_a_storage_account.nock.js index 466fcfdde1..2b61ecdc96 100644 --- a/test/recordings/keyvaultstorage-tests/Key_Vault_Storage_should_successfully_assign_Key_Vault_the_operator_role_on_a_storage_account.nock.js +++ b/test/recordings/keyvaultstorage-tests/Key_Vault_Storage_should_successfully_assign_Key_Vault_the_operator_role_on_a_storage_account.nock.js @@ -113,7 +113,7 @@ nock('https://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('///providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Storage%20Account%20Key%20Operator%20Service%20Role%27&api-version=2018-01-01-preview') + .get('///providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Storage%20Account%20Key%20Operator%20Service%20Role%27&api-version=2018-09-01-preview') .reply(200, "{\"value\":[{\"properties\":{\"roleName\":\"Storage Account Key Operator Service Role\",\"type\":\"BuiltInRole\",\"description\":\"Storage Account Key Operators are allowed to list and regenerate keys on Storage Accounts\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"Microsoft.Storage/storageAccounts/listkeys/action\",\"Microsoft.Storage/storageAccounts/regeneratekey/action\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2017-04-13T18:26:11.5770570Z\",\"updatedOn\":\"2017-04-13T20:57:14.5990198Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/providers/Microsoft.Authorization/roleDefinitions/81a9662b-bebf-436f-a333-f67b29880f12\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"81a9662b-bebf-436f-a333-f67b29880f12\"}]}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '737', From 6a5ea912c67beaa2f101c471b7b2292cf9050ffd Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Tue, 4 Sep 2018 09:42:05 -0700 Subject: [PATCH 4/4] Fix another test --- ...ign_Key_Vault_the_operator_role_on_a_storage_account.nock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/recordings/keyvaultstorage-tests/Key_Vault_Storage_should_successfully_assign_Key_Vault_the_operator_role_on_a_storage_account.nock.js b/test/recordings/keyvaultstorage-tests/Key_Vault_Storage_should_successfully_assign_Key_Vault_the_operator_role_on_a_storage_account.nock.js index 2b61ecdc96..064ba1cd97 100644 --- a/test/recordings/keyvaultstorage-tests/Key_Vault_Storage_should_successfully_assign_Key_Vault_the_operator_role_on_a_storage_account.nock.js +++ b/test/recordings/keyvaultstorage-tests/Key_Vault_Storage_should_successfully_assign_Key_Vault_the_operator_role_on_a_storage_account.nock.js @@ -136,7 +136,7 @@ function (nock) { var result = nock('https://management.azure.com:443') .filteringRequestBody(function (path) { return '*';}) -.put('//subscriptions/6d8e19c2-3a60-481f-8ebb-118dc3007c5d/resourceGroups/nodeTestGroup8988/providers/Microsoft.Storage/storageAccounts/testakvsa725/providers/Microsoft.Authorization/roleAssignments/afb48884-7051-4b73-b83f-afcca5decd79?api-version=2018-01-01-preview', '*') +.put('//subscriptions/6d8e19c2-3a60-481f-8ebb-118dc3007c5d/resourceGroups/nodeTestGroup8988/providers/Microsoft.Storage/storageAccounts/testakvsa725/providers/Microsoft.Authorization/roleAssignments/afb48884-7051-4b73-b83f-afcca5decd79?api-version=2018-09-01-preview', '*') .reply(201, "{\"properties\":{\"roleDefinitionId\":\"/subscriptions/6d8e19c2-3a60-481f-8ebb-118dc3007c5d/providers/Microsoft.Authorization/roleDefinitions/81a9662b-bebf-436f-a333-f67b29880f12\",\"principalId\":\"93c27d83-f79b-4cb2-8dd4-4aa716542e74\",\"principalType\":\"ServicePrincipal\",\"scope\":\"/subscriptions/6d8e19c2-3a60-481f-8ebb-118dc3007c5d/resourceGroups/nodeTestGroup8988/providers/Microsoft.Storage/storageAccounts/testakvsa725\",\"createdOn\":\"2018-06-27T23:53:49.6661846Z\",\"updatedOn\":\"2018-06-27T23:53:49.6661846Z\",\"createdBy\":null,\"updatedBy\":\"7541419d-883d-452f-a823-56aa8bf0749f\"},\"id\":\"/subscriptions/6d8e19c2-3a60-481f-8ebb-118dc3007c5d/resourceGroups/nodeTestGroup8988/providers/Microsoft.Storage/storageAccounts/testakvsa725/providers/Microsoft.Authorization/roleAssignments/afb48884-7051-4b73-b83f-afcca5decd79\",\"type\":\"Microsoft.Authorization/roleAssignments\",\"name\":\"afb48884-7051-4b73-b83f-afcca5decd79\"}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '901',