diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/api/Azure.ResourceManager.Authorization.netstandard2.0.cs b/sdk/authorization/Azure.ResourceManager.Authorization/api/Azure.ResourceManager.Authorization.netstandard2.0.cs index c215d3d6e2ae..8d659190c16f 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/api/Azure.ResourceManager.Authorization.netstandard2.0.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/api/Azure.ResourceManager.Authorization.netstandard2.0.cs @@ -143,10 +143,14 @@ public partial class AuthorizationRoleDefinitionData : Azure.ResourceManager.Mod { public AuthorizationRoleDefinitionData() { } public System.Collections.Generic.IList AssignableScopes { get { throw null; } } + public string CreatedBy { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } public string Description { get { throw null; } set { } } public System.Collections.Generic.IList Permissions { get { throw null; } } public string RoleName { get { throw null; } set { } } public Azure.ResourceManager.Authorization.Models.AuthorizationRoleType? RoleType { get { throw null; } set { } } + public string UpdatedBy { get { throw null; } } + public System.DateTimeOffset? UpdatedOn { get { throw null; } } } public partial class AuthorizationRoleDefinitionResource : Azure.ResourceManager.ArmResource { @@ -178,6 +182,10 @@ protected DenyAssignmentCollection() { } public partial class DenyAssignmentData : Azure.ResourceManager.Models.ResourceData { internal DenyAssignmentData() { } + public string Condition { get { throw null; } } + public string ConditionVersion { get { throw null; } } + public string CreatedBy { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } public string DenyAssignmentName { get { throw null; } } public string Description { get { throw null; } } public System.Collections.Generic.IReadOnlyList ExcludePrincipals { get { throw null; } } @@ -186,6 +194,8 @@ internal DenyAssignmentData() { } public System.Collections.Generic.IReadOnlyList Permissions { get { throw null; } } public System.Collections.Generic.IReadOnlyList Principals { get { throw null; } } public string Scope { get { throw null; } } + public string UpdatedBy { get { throw null; } } + public System.DateTimeOffset? UpdatedOn { get { throw null; } } } public partial class DenyAssignmentResource : Azure.ResourceManager.ArmResource { @@ -604,8 +614,8 @@ public static partial class ArmAuthorizationModelFactory public static Azure.ResourceManager.Authorization.Models.AuthorizationProviderOperationInfo AuthorizationProviderOperationInfo(string name = null, string displayName = null, string description = null, string origin = null, System.BinaryData properties = null, bool? isDataAction = default(bool?)) { throw null; } public static Azure.ResourceManager.Authorization.AuthorizationProviderOperationsMetadataData AuthorizationProviderOperationsMetadataData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null, System.Collections.Generic.IEnumerable operations = null) { throw null; } public static Azure.ResourceManager.Authorization.Models.AuthorizationProviderResourceType AuthorizationProviderResourceType(string name = null, string displayName = null, System.Collections.Generic.IEnumerable operations = null) { throw null; } - public static Azure.ResourceManager.Authorization.AuthorizationRoleDefinitionData AuthorizationRoleDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string roleName = null, string description = null, Azure.ResourceManager.Authorization.Models.AuthorizationRoleType? roleType = default(Azure.ResourceManager.Authorization.Models.AuthorizationRoleType?), System.Collections.Generic.IEnumerable permissions = null, System.Collections.Generic.IEnumerable assignableScopes = null) { throw null; } - public static Azure.ResourceManager.Authorization.DenyAssignmentData DenyAssignmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string denyAssignmentName = null, string description = null, System.Collections.Generic.IEnumerable permissions = null, string scope = null, bool? isAppliedToChildScopes = default(bool?), System.Collections.Generic.IEnumerable principals = null, System.Collections.Generic.IEnumerable excludePrincipals = null, bool? isSystemProtected = default(bool?)) { throw null; } + public static Azure.ResourceManager.Authorization.AuthorizationRoleDefinitionData AuthorizationRoleDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string roleName = null, string description = null, Azure.ResourceManager.Authorization.Models.AuthorizationRoleType? roleType = default(Azure.ResourceManager.Authorization.Models.AuthorizationRoleType?), System.Collections.Generic.IEnumerable permissions = null, System.Collections.Generic.IEnumerable assignableScopes = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), string createdBy = null, string updatedBy = null) { throw null; } + public static Azure.ResourceManager.Authorization.DenyAssignmentData DenyAssignmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string denyAssignmentName = null, string description = null, System.Collections.Generic.IEnumerable permissions = null, string scope = null, bool? isAppliedToChildScopes = default(bool?), System.Collections.Generic.IEnumerable principals = null, System.Collections.Generic.IEnumerable excludePrincipals = null, bool? isSystemProtected = default(bool?), string condition = null, string conditionVersion = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), string createdBy = null, string updatedBy = null) { throw null; } public static Azure.ResourceManager.Authorization.Models.DenyAssignmentPermission DenyAssignmentPermission(System.Collections.Generic.IEnumerable actions = null, System.Collections.Generic.IEnumerable notActions = null, System.Collections.Generic.IEnumerable dataActions = null, System.Collections.Generic.IEnumerable notDataActions = null, string condition = null, string conditionVersion = null) { throw null; } public static Azure.ResourceManager.Authorization.Models.EligibleChildResource EligibleChildResource(string id = null, string name = null, string resourceType = null) { throw null; } public static Azure.ResourceManager.Authorization.Models.PolicyAssignmentProperties PolicyAssignmentProperties(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier policyId = null, Azure.ResourceManager.Authorization.Models.RoleManagementPrincipal lastModifiedBy = null, System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier roleDefinitionId = null, string roleDefinitionDisplayName = null, Azure.ResourceManager.Authorization.Models.AuthorizationRoleType? roleType = default(Azure.ResourceManager.Authorization.Models.AuthorizationRoleType?), Azure.Core.ResourceIdentifier scopeId = null, string scopeDisplayName = null, Azure.ResourceManager.Authorization.Models.RoleManagementScopeType? scopeType = default(Azure.ResourceManager.Authorization.Models.RoleManagementScopeType?)) { throw null; } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/ArmAuthorizationModelFactory.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/ArmAuthorizationModelFactory.cs index 296e8ba06c10..ed40f1fac9cd 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/ArmAuthorizationModelFactory.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/ArmAuthorizationModelFactory.cs @@ -43,14 +43,20 @@ public static AuthorizationClassicAdministrator AuthorizationClassicAdministrato /// Array of principals to which the deny assignment applies. /// Array of principals to which the deny assignment does not apply. /// Specifies whether this deny assignment was created by Azure and cannot be edited or deleted. + /// The conditions on the deny 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. + /// Time it was created. + /// Time it was updated. + /// Id of the user who created the assignment. + /// Id of the user who updated the assignment. /// A new instance for mocking. - public static DenyAssignmentData DenyAssignmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string denyAssignmentName = null, string description = null, IEnumerable permissions = null, string scope = null, bool? isAppliedToChildScopes = null, IEnumerable principals = null, IEnumerable excludePrincipals = null, bool? isSystemProtected = null) + public static DenyAssignmentData DenyAssignmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string denyAssignmentName = null, string description = null, IEnumerable permissions = null, string scope = null, bool? isAppliedToChildScopes = null, IEnumerable principals = null, IEnumerable excludePrincipals = null, bool? isSystemProtected = null, string condition = null, string conditionVersion = null, DateTimeOffset? createdOn = null, DateTimeOffset? updatedOn = null, string createdBy = null, string updatedBy = null) { permissions ??= new List(); principals ??= new List(); excludePrincipals ??= new List(); - return new DenyAssignmentData(id, name, resourceType, systemData, denyAssignmentName, description, permissions?.ToList(), scope, isAppliedToChildScopes, principals?.ToList(), excludePrincipals?.ToList(), isSystemProtected); + return new DenyAssignmentData(id, name, resourceType, systemData, denyAssignmentName, description, permissions?.ToList(), scope, isAppliedToChildScopes, principals?.ToList(), excludePrincipals?.ToList(), isSystemProtected, condition, conditionVersion, createdOn, updatedOn, createdBy, updatedBy); } /// Initializes a new instance of DenyAssignmentPermission. @@ -157,13 +163,17 @@ public static RoleAssignmentData RoleAssignmentData(ResourceIdentifier id = null /// The role type. /// Role definition permissions. /// Role definition assignable scopes. + /// Time it was created. + /// Time it was updated. + /// Id of the user who created the assignment. + /// Id of the user who updated the assignment. /// A new instance for mocking. - public static AuthorizationRoleDefinitionData AuthorizationRoleDefinitionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string roleName = null, string description = null, AuthorizationRoleType? roleType = null, IEnumerable permissions = null, IEnumerable assignableScopes = null) + public static AuthorizationRoleDefinitionData AuthorizationRoleDefinitionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string roleName = null, string description = null, AuthorizationRoleType? roleType = null, IEnumerable permissions = null, IEnumerable assignableScopes = null, DateTimeOffset? createdOn = null, DateTimeOffset? updatedOn = null, string createdBy = null, string updatedBy = null) { permissions ??= new List(); assignableScopes ??= new List(); - return new AuthorizationRoleDefinitionData(id, name, resourceType, systemData, roleName, description, roleType, permissions?.ToList(), assignableScopes?.ToList()); + return new AuthorizationRoleDefinitionData(id, name, resourceType, systemData, roleName, description, roleType, permissions?.ToList(), assignableScopes?.ToList(), createdOn, updatedOn, createdBy, updatedBy); } /// Initializes a new instance of EligibleChildResource. diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationRoleDefinitionData.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationRoleDefinitionData.cs index f11183c5d5f1..65be750a80c2 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationRoleDefinitionData.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationRoleDefinitionData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Authorization.Models; @@ -35,13 +36,21 @@ public AuthorizationRoleDefinitionData() /// The role type. /// Role definition permissions. /// Role definition assignable scopes. - internal AuthorizationRoleDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string roleName, string description, AuthorizationRoleType? roleType, IList permissions, IList assignableScopes) : base(id, name, resourceType, systemData) + /// Time it was created. + /// Time it was updated. + /// Id of the user who created the assignment. + /// Id of the user who updated the assignment. + internal AuthorizationRoleDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string roleName, string description, AuthorizationRoleType? roleType, IList permissions, IList assignableScopes, DateTimeOffset? createdOn, DateTimeOffset? updatedOn, string createdBy, string updatedBy) : base(id, name, resourceType, systemData) { RoleName = roleName; Description = description; RoleType = roleType; Permissions = permissions; AssignableScopes = assignableScopes; + CreatedOn = createdOn; + UpdatedOn = updatedOn; + CreatedBy = createdBy; + UpdatedBy = updatedBy; } /// The role name. @@ -54,5 +63,13 @@ internal AuthorizationRoleDefinitionData(ResourceIdentifier id, string name, Res public IList Permissions { get; } /// Role definition assignable scopes. public IList AssignableScopes { get; } + /// Time it was created. + public DateTimeOffset? CreatedOn { get; } + /// Time it was updated. + public DateTimeOffset? UpdatedOn { get; } + /// Id of the user who created the assignment. + public string CreatedBy { get; } + /// Id of the user who updated the assignment. + public string UpdatedBy { get; } } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/DenyAssignmentData.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/DenyAssignmentData.cs index cc3c67fc0fd3..9432b7cdf8b6 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/DenyAssignmentData.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/DenyAssignmentData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Authorization.Models; @@ -39,7 +40,13 @@ internal DenyAssignmentData() /// Array of principals to which the deny assignment applies. /// Array of principals to which the deny assignment does not apply. /// Specifies whether this deny assignment was created by Azure and cannot be edited or deleted. - internal DenyAssignmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string denyAssignmentName, string description, IReadOnlyList permissions, string scope, bool? isAppliedToChildScopes, IReadOnlyList principals, IReadOnlyList excludePrincipals, bool? isSystemProtected) : base(id, name, resourceType, systemData) + /// The conditions on the deny 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. + /// Time it was created. + /// Time it was updated. + /// Id of the user who created the assignment. + /// Id of the user who updated the assignment. + internal DenyAssignmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string denyAssignmentName, string description, IReadOnlyList permissions, string scope, bool? isAppliedToChildScopes, IReadOnlyList principals, IReadOnlyList excludePrincipals, bool? isSystemProtected, string condition, string conditionVersion, DateTimeOffset? createdOn, DateTimeOffset? updatedOn, string createdBy, string updatedBy) : base(id, name, resourceType, systemData) { DenyAssignmentName = denyAssignmentName; Description = description; @@ -49,6 +56,12 @@ internal DenyAssignmentData(ResourceIdentifier id, string name, ResourceType res Principals = principals; ExcludePrincipals = excludePrincipals; IsSystemProtected = isSystemProtected; + Condition = condition; + ConditionVersion = conditionVersion; + CreatedOn = createdOn; + UpdatedOn = updatedOn; + CreatedBy = createdBy; + UpdatedBy = updatedBy; } /// The display name of the deny assignment. @@ -67,5 +80,17 @@ internal DenyAssignmentData(ResourceIdentifier id, string name, ResourceType res public IReadOnlyList ExcludePrincipals { get; } /// Specifies whether this deny assignment was created by Azure and cannot be edited or deleted. public bool? IsSystemProtected { get; } + /// The conditions on the deny assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'. + public string Condition { get; } + /// Version of the condition. + public string ConditionVersion { get; } + /// Time it was created. + public DateTimeOffset? CreatedOn { get; } + /// Time it was updated. + public DateTimeOffset? UpdatedOn { get; } + /// Id of the user who created the assignment. + public string CreatedBy { get; } + /// Id of the user who updated the assignment. + public string UpdatedBy { get; } } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/AuthorizationRoleDefinitionData.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/AuthorizationRoleDefinitionData.Serialization.cs index ec2a0c4b0e60..4af71456eaad 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/AuthorizationRoleDefinitionData.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/AuthorizationRoleDefinitionData.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -74,6 +75,10 @@ internal static AuthorizationRoleDefinitionData DeserializeAuthorizationRoleDefi Optional type0 = default; Optional> permissions = default; Optional> assignableScopes = default; + Optional createdOn = default; + Optional updatedOn = default; + Optional createdBy = default; + Optional updatedBy = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -156,11 +161,39 @@ internal static AuthorizationRoleDefinitionData DeserializeAuthorizationRoleDefi assignableScopes = array; continue; } + if (property0.NameEquals("createdOn"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdOn = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("updatedOn"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updatedOn = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("createdBy"u8)) + { + createdBy = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("updatedBy"u8)) + { + updatedBy = property0.Value.GetString(); + continue; + } } continue; } } - return new AuthorizationRoleDefinitionData(id, name, type, systemData.Value, roleName.Value, description.Value, Optional.ToNullable(type0), Optional.ToList(permissions), Optional.ToList(assignableScopes)); + return new AuthorizationRoleDefinitionData(id, name, type, systemData.Value, roleName.Value, description.Value, Optional.ToNullable(type0), Optional.ToList(permissions), Optional.ToList(assignableScopes), Optional.ToNullable(createdOn), Optional.ToNullable(updatedOn), createdBy.Value, updatedBy.Value); } } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/DenyAssignmentData.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/DenyAssignmentData.Serialization.cs index ac3f587b7008..2a43cc353958 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/DenyAssignmentData.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/DenyAssignmentData.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -33,6 +34,12 @@ internal static DenyAssignmentData DeserializeDenyAssignmentData(JsonElement ele Optional> principals = default; Optional> excludePrincipals = default; Optional isSystemProtected = default; + Optional condition = default; + Optional conditionVersion = default; + Optional createdOn = default; + Optional updatedOn = default; + Optional createdBy = default; + Optional updatedBy = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -143,11 +150,49 @@ internal static DenyAssignmentData DeserializeDenyAssignmentData(JsonElement ele isSystemProtected = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("condition"u8)) + { + condition = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("conditionVersion"u8)) + { + conditionVersion = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("createdOn"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdOn = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("updatedOn"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updatedOn = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("createdBy"u8)) + { + createdBy = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("updatedBy"u8)) + { + updatedBy = property0.Value.GetString(); + continue; + } } continue; } } - return new DenyAssignmentData(id, name, type, systemData.Value, denyAssignmentName.Value, description.Value, Optional.ToList(permissions), scope.Value, Optional.ToNullable(doNotApplyToChildScopes), Optional.ToList(principals), Optional.ToList(excludePrincipals), Optional.ToNullable(isSystemProtected)); + return new DenyAssignmentData(id, name, type, systemData.Value, denyAssignmentName.Value, description.Value, Optional.ToList(permissions), scope.Value, Optional.ToNullable(doNotApplyToChildScopes), Optional.ToList(principals), Optional.ToList(excludePrincipals), Optional.ToNullable(isSystemProtected), condition.Value, conditionVersion.Value, Optional.ToNullable(createdOn), Optional.ToNullable(updatedOn), createdBy.Value, updatedBy.Value); } } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/autorest.md b/sdk/authorization/Azure.ResourceManager.Authorization/src/autorest.md index 236e9d020c30..e919ff46329e 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/autorest.md +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: Authorization namespace: Azure.ResourceManager.Authorization -require: https://github.com/Azure/azure-rest-api-specs/blob/a436672b07fb1fe276c203b086b3f0e0d0c4aa24/specification/authorization/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/authorization/resource-manager/readme.md tag: package-2022-04-01 output-folder: Generated/ clear-output-folder: true