diff --git a/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/IRoleAssignmentsOperations.cs b/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/IRoleAssignmentsOperations.cs
index 7d71e8e960dd..426ff5b3cbc5 100644
--- a/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/IRoleAssignmentsOperations.cs
+++ b/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/IRoleAssignmentsOperations.cs
@@ -85,7 +85,7 @@ public partial interface IRoleAssignmentsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListForResourceGroupWithHttpMessagesAsync(string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> ListForResourceGroupWithHttpMessagesAsync(string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Deletes a role assignment.
///
@@ -145,7 +145,7 @@ public partial interface IRoleAssignmentsOperations
///
/// Thrown when a required parameter is null
///
- Task> CreateWithHttpMessagesAsync(string scope, string roleAssignmentName, RoleAssignmentCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> CreateWithHttpMessagesAsync(string scope, string roleAssignmentName, RoleAssignmentCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Get the specified role assignment.
///
@@ -170,7 +170,7 @@ public partial interface IRoleAssignmentsOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string scope, string roleAssignmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string scope, string roleAssignmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Deletes a role assignment.
///
@@ -261,7 +261,7 @@ public partial interface IRoleAssignmentsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets role assignments for a scope.
///
@@ -286,7 +286,7 @@ public partial interface IRoleAssignmentsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListForScopeWithHttpMessagesAsync(string scope, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> ListForScopeWithHttpMessagesAsync(string scope, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets role assignments for a resource.
///
@@ -330,7 +330,7 @@ public partial interface IRoleAssignmentsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListForResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> ListForResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets all role assignments for the subscription.
///
@@ -352,7 +352,7 @@ public partial interface IRoleAssignmentsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets role assignments for a scope.
///
@@ -374,6 +374,6 @@ public partial interface IRoleAssignmentsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListForScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> ListForScopeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/Error.cs b/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/Error.cs
new file mode 100644
index 000000000000..0f7521369f32
--- /dev/null
+++ b/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/Error.cs
@@ -0,0 +1,53 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.Authorization.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Object to be thrown in case of an unsuccessful response
+ ///
+ public partial class Error
+ {
+ ///
+ /// Initializes a new instance of the Error class.
+ ///
+ public Error()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Error class.
+ ///
+ /// Object to be thrown in case of an
+ /// unsuccessful response
+ public Error(ErrorError errorProperty = default(ErrorError))
+ {
+ ErrorProperty = errorProperty;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets object to be thrown in case of an unsuccessful
+ /// response
+ ///
+ [JsonProperty(PropertyName = "error")]
+ public ErrorError ErrorProperty { get; set; }
+
+ }
+}
diff --git a/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/ErrorError.cs b/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/ErrorError.cs
new file mode 100644
index 000000000000..e99c9ed9e049
--- /dev/null
+++ b/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/ErrorError.cs
@@ -0,0 +1,60 @@
+//
+// 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.
+//
+
+namespace Microsoft.Azure.Management.Authorization.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Object to be thrown in case of an unsuccessful response
+ ///
+ public partial class ErrorError
+ {
+ ///
+ /// Initializes a new instance of the ErrorError class.
+ ///
+ public ErrorError()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorError class.
+ ///
+ /// Brief error code
+ /// Longer message explaining the details of the
+ /// error
+ public ErrorError(string code = default(string), string message = default(string))
+ {
+ Code = code;
+ Message = message;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets brief error code
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; set; }
+
+ ///
+ /// Gets or sets longer message explaining the details of the error
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ }
+}
diff --git a/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/RoleAssignment.cs b/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/RoleAssignment.cs
index 7825ab6a6b49..e069fb7f7eda 100644
--- a/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/RoleAssignment.cs
+++ b/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/RoleAssignment.cs
@@ -46,10 +46,21 @@ public RoleAssignment()
/// The Delegation flag for the role
/// assignment
/// Description of role assignment
- /// The conditions on the role
+ /// 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'
+ /// Version of the condition. Currently
+ /// accepted value is '2.0'
+ /// Time it was created
+ /// Time it was updated
+ /// Id of the user who created the
/// assignment
- /// Version of the condition
- public RoleAssignment(string id = default(string), string name = default(string), string type = default(string), string scope = default(string), string roleDefinitionId = default(string), string principalId = default(string), string principalType = default(string), bool? canDelegate = default(bool?), string description = default(string), string condition = default(string), string conditionVersion = default(string))
+ /// Id of the user who updated the
+ /// assignment
+ /// Id of the
+ /// delegated managed identity resource
+ public RoleAssignment(string id = default(string), string name = default(string), string type = default(string), string scope = default(string), string roleDefinitionId = default(string), string principalId = default(string), string principalType = default(string), bool? canDelegate = default(bool?), string description = default(string), string condition = default(string), string conditionVersion = default(string), System.DateTime? createdOn = default(System.DateTime?), System.DateTime? updatedOn = default(System.DateTime?), string createdBy = default(string), string updatedBy = default(string), string delegatedManagedIdentityResourceId = default(string))
{
Id = id;
Name = name;
@@ -62,6 +73,11 @@ public RoleAssignment()
Description = description;
Condition = condition;
ConditionVersion = conditionVersion;
+ CreatedOn = createdOn;
+ UpdatedOn = updatedOn;
+ CreatedBy = createdBy;
+ UpdatedBy = updatedBy;
+ DelegatedManagedIdentityResourceId = delegatedManagedIdentityResourceId;
CustomInit();
}
@@ -128,16 +144,50 @@ public RoleAssignment()
public string Description { get; set; }
///
- /// Gets or sets the conditions on the role assignment
+ /// Gets or sets 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'
///
[JsonProperty(PropertyName = "properties.condition")]
public string Condition { get; set; }
///
- /// Gets or sets version of the condition
+ /// Gets or sets version of the condition. Currently accepted value is
+ /// '2.0'
///
[JsonProperty(PropertyName = "properties.conditionVersion")]
public string ConditionVersion { get; set; }
+ ///
+ /// Gets or sets time it was created
+ ///
+ [JsonProperty(PropertyName = "properties.createdOn")]
+ public System.DateTime? CreatedOn { get; set; }
+
+ ///
+ /// Gets or sets time it was updated
+ ///
+ [JsonProperty(PropertyName = "properties.updatedOn")]
+ public System.DateTime? UpdatedOn { get; set; }
+
+ ///
+ /// Gets or sets id of the user who created the assignment
+ ///
+ [JsonProperty(PropertyName = "properties.createdBy")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// Gets or sets id of the user who updated the assignment
+ ///
+ [JsonProperty(PropertyName = "properties.updatedBy")]
+ public string UpdatedBy { get; set; }
+
+ ///
+ /// Gets or sets id of the delegated managed identity resource
+ ///
+ [JsonProperty(PropertyName = "properties.delegatedManagedIdentityResourceId")]
+ public string DelegatedManagedIdentityResourceId { get; set; }
+
}
}
diff --git a/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/RoleAssignmentCreateParameters.cs b/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/RoleAssignmentCreateParameters.cs
index 7c7d5192b95f..c447f74288ca 100644
--- a/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/RoleAssignmentCreateParameters.cs
+++ b/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/Models/RoleAssignmentCreateParameters.cs
@@ -47,9 +47,12 @@ public RoleAssignmentCreateParameters()
/// The delegation flag used for creating a
/// role assignment
/// Description of role assignment
- /// The conditions on the role
- /// assignment
- /// Version of the condition
+ /// 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'
+ /// Version of the condition. Currently
+ /// accepted value is '2.0'
public RoleAssignmentCreateParameters(string roleDefinitionId, string principalId, string principalType = default(string), bool? canDelegate = default(bool?), string description = default(string), string condition = default(string), string conditionVersion = default(string))
{
RoleDefinitionId = roleDefinitionId;
@@ -104,13 +107,17 @@ public RoleAssignmentCreateParameters()
public string Description { get; set; }
///
- /// Gets or sets the conditions on the role assignment
+ /// Gets or sets 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'
///
[JsonProperty(PropertyName = "properties.condition")]
public string Condition { get; set; }
///
- /// Gets or sets version of the condition
+ /// Gets or sets version of the condition. Currently accepted value is
+ /// '2.0'
///
[JsonProperty(PropertyName = "properties.conditionVersion")]
public string ConditionVersion { get; set; }
diff --git a/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/RoleAssignmentsOperations.cs b/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/RoleAssignmentsOperations.cs
index a2400ef800cf..3c6b2f94a848 100644
--- a/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/RoleAssignmentsOperations.cs
+++ b/sdk/authorization/Microsoft.Azure.Management.Authorization/src/Generated/RoleAssignmentsOperations.cs
@@ -314,7 +314,7 @@ internal RoleAssignmentsOperations(AuthorizationManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListForResourceGroupWithHttpMessagesAsync(string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ListForResourceGroupWithHttpMessagesAsync(string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -414,7 +414,7 @@ internal RoleAssignmentsOperations(AuthorizationManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 400)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -449,7 +449,7 @@ internal RoleAssignmentsOperations(AuthorizationManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse