Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR] authorization/resource-manager #3486

Merged
5 commits merged into from
Sep 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/services/authorizationManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -56,6 +60,13 @@ class RoleAssignmentCreateParameters {
name: 'String'
}
},
principalType: {
required: false,
serializedName: 'properties.principalType',
type: {
name: 'String'
}
},
canDelegate: {
required: false,
serializedName: 'properties.canDelegate',
Expand Down
20 changes: 20 additions & 0 deletions lib/services/authorizationManagement/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down
2 changes: 1 addition & 1 deletion lib/services/authorizationManagement/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/services/authorizationManagement/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "6.0.0",
"dependencies": {
"ms-rest": "^2.3.3",
"ms-rest-azure": "^2.5.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down