From 2dbcdaa09a6596141cdf5996ee514895fc54f039 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 7 Sep 2023 16:20:51 +0000 Subject: [PATCH] CodeGen from PR 25467 in Azure/azure-rest-api-specs Merge 7964daf337071cd0c16fbeb26b97096c630c1420 into c1d7ef4e6ff16ff97f24b1497c82de0b665310c5 --- ...zure.ResourceManager.Sql.netstandard2.0.cs | 48 +++- .../src/Generated/ArmSqlModelFactory.cs | 253 +++++++++--------- .../src/Generated/Extensions/SqlExtensions.cs | 76 +++--- .../src/Generated/FailoverGroupData.cs | 14 +- .../FailoverGroupPatch.Serialization.cs | 15 ++ .../Generated/Models/FailoverGroupPatch.cs | 21 +- ...overGroupReadOnlyEndpoint.Serialization.cs | 19 +- .../Models/FailoverGroupReadOnlyEndpoint.cs | 10 +- .../Models/FreeLimitExhaustionBehavior.cs | 57 ++++ .../Models/SqlAlwaysEncryptedEnclaveType.cs | 2 +- .../Models/SqlAvailabilityZoneType.cs | 2 +- .../Models/SqlDatabaseData.Serialization.cs | 47 +++- .../Models/SqlDatabasePatch.Serialization.cs | 15 ++ .../src/Generated/Models/SqlDatabasePatch.cs | 12 + ...ateEndpointConnectionData.Serialization.cs | 18 +- .../Models/SqlServerData.Serialization.cs | 17 +- .../Models/SqlServerPatch.Serialization.cs | 5 + .../src/Generated/Models/SqlServerPatch.cs | 2 + .../RestOperations/DatabasesRestOperations.cs | 2 +- .../FailoverGroupsRestOperations.cs | 2 +- ...rivateEndpointConnectionsRestOperations.cs | 160 +++++------ .../RestOperations/ServersRestOperations.cs | 2 +- .../src/Generated/SqlDatabaseData.cs | 26 +- .../SqlPrivateEndpointConnectionData.cs | 8 +- .../src/Generated/SqlServerData.cs | 6 +- .../src/Generated/SqlServerResource.cs | 106 ++++---- .../Azure.ResourceManager.Sql/src/autorest.md | 2 +- 27 files changed, 605 insertions(+), 342 deletions(-) create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FreeLimitExhaustionBehavior.cs diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs index a1e1fa3cc57d..da290021173d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs @@ -473,7 +473,7 @@ public FailoverGroupData() { } public System.Collections.Generic.IList FailoverDatabases { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } public System.Collections.Generic.IList PartnerServers { get { throw null; } } - public Azure.ResourceManager.Sql.Models.ReadOnlyEndpointFailoverPolicy? ReadOnlyEndpointFailoverPolicy { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.FailoverGroupReadOnlyEndpoint ReadOnlyEndpoint { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.FailoverGroupReadWriteEndpoint ReadWriteEndpoint { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.FailoverGroupReplicationRole? ReplicationRole { get { throw null; } } public string ReplicationState { get { throw null; } } @@ -2715,8 +2715,10 @@ public SqlDatabaseData(Azure.Core.AzureLocation location) : base (default(Azure. public System.DateTimeOffset? EarliestRestoreOn { get { throw null; } } public Azure.Core.ResourceIdentifier ElasticPoolId { get { throw null; } set { } } public string EncryptionProtector { get { throw null; } set { } } + public bool? EncryptionProtectorAutoRotation { get { throw null; } set { } } public Azure.Core.ResourceIdentifier FailoverGroupId { get { throw null; } } public System.Guid? FederatedClientId { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior? FreeLimitExhaustionBehavior { get { throw null; } set { } } public int? HighAvailabilityReplicaCount { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.DatabaseIdentity Identity { get { throw null; } set { } } public bool? IsInfraEncryptionEnabled { get { throw null; } } @@ -2750,6 +2752,7 @@ public SqlDatabaseData(Azure.Core.AzureLocation location) : base (default(Azure. public Azure.Core.ResourceIdentifier SourceDatabaseId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlDatabaseStatus? Status { get { throw null; } } + public bool? UseFreeLimit { get { throw null; } set { } } } public partial class SqlDatabaseResource : Azure.ResourceManager.ArmResource { @@ -3505,6 +3508,7 @@ public partial class SqlPrivateEndpointConnectionData : Azure.ResourceManager.Mo { public SqlPrivateEndpointConnectionData() { } public Azure.ResourceManager.Sql.Models.SqlPrivateLinkServiceConnectionStateProperty ConnectionState { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList GroupIds { get { throw null; } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlPrivateEndpointProvisioningState? ProvisioningState { get { throw null; } } } @@ -3804,6 +3808,7 @@ public SqlServerData(Azure.Core.AzureLocation location) : base (default(Azure.Co public System.Guid? FederatedClientId { get { throw null; } set { } } public string FullyQualifiedDomainName { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? IsIPv6Enabled { get { throw null; } set { } } public System.Uri KeyId { get { throw null; } set { } } public string Kind { get { throw null; } } public string MinimalTlsVersion { get { throw null; } set { } } @@ -5346,7 +5351,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.EndpointCertificateData EndpointCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string publicBlob = null) { throw null; } public static Azure.ResourceManager.Sql.ExtendedDatabaseBlobAuditingPolicyData ExtendedDatabaseBlobAuditingPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string predicateExpression = null, int? retentionDays = default(int?), System.Collections.Generic.IEnumerable auditActionsAndGroups = null, bool? isStorageSecondaryKeyInUse = default(bool?), bool? isAzureMonitorTargetEnabled = default(bool?), int? queueDelayMs = default(int?), bool? isManagedIdentityInUse = default(bool?), Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState? state = default(Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState?), string storageEndpoint = null, string storageAccountAccessKey = null, System.Guid? storageAccountSubscriptionId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.Sql.ExtendedServerBlobAuditingPolicyData ExtendedServerBlobAuditingPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isDevopsAuditEnabled = default(bool?), string predicateExpression = null, int? retentionDays = default(int?), System.Collections.Generic.IEnumerable auditActionsAndGroups = null, bool? isStorageSecondaryKeyInUse = default(bool?), bool? isAzureMonitorTargetEnabled = default(bool?), int? queueDelayMs = default(int?), bool? isManagedIdentityInUse = default(bool?), Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState? state = default(Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState?), string storageEndpoint = null, string storageAccountAccessKey = null, System.Guid? storageAccountSubscriptionId = default(System.Guid?)) { throw null; } - public static Azure.ResourceManager.Sql.FailoverGroupData FailoverGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Sql.Models.FailoverGroupReadWriteEndpoint readWriteEndpoint = null, Azure.ResourceManager.Sql.Models.ReadOnlyEndpointFailoverPolicy? readOnlyEndpointFailoverPolicy = default(Azure.ResourceManager.Sql.Models.ReadOnlyEndpointFailoverPolicy?), Azure.ResourceManager.Sql.Models.FailoverGroupReplicationRole? replicationRole = default(Azure.ResourceManager.Sql.Models.FailoverGroupReplicationRole?), string replicationState = null, System.Collections.Generic.IEnumerable partnerServers = null, System.Collections.Generic.IEnumerable failoverDatabases = null) { throw null; } + public static Azure.ResourceManager.Sql.FailoverGroupData FailoverGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Sql.Models.FailoverGroupReadWriteEndpoint readWriteEndpoint = null, Azure.ResourceManager.Sql.Models.FailoverGroupReadOnlyEndpoint readOnlyEndpoint = null, Azure.ResourceManager.Sql.Models.FailoverGroupReplicationRole? replicationRole = default(Azure.ResourceManager.Sql.Models.FailoverGroupReplicationRole?), string replicationState = null, System.Collections.Generic.IEnumerable partnerServers = null, System.Collections.Generic.IEnumerable failoverDatabases = null) { throw null; } public static Azure.ResourceManager.Sql.GeoBackupPolicyData GeoBackupPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Sql.Models.GeoBackupPolicyState state = Azure.ResourceManager.Sql.Models.GeoBackupPolicyState.Disabled, string storageType = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ImportExportExtensionsOperationResult ImportExportExtensionsOperationResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? requestId = default(System.Guid?), string requestType = null, string lastModifiedTime = null, string serverName = null, string databaseName = null, string status = null, string errorMessage = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ImportExportOperationResult ImportExportOperationResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? requestId = default(System.Guid?), string requestType = null, string queuedTime = null, string lastModifiedTime = null, System.Uri blobUri = null, string serverName = null, string databaseName = null, string status = null, string errorMessage = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } @@ -5451,7 +5456,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.SqlAgentConfigurationData SqlAgentConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.SqlAgentConfigurationPropertiesState? state = default(Azure.ResourceManager.Sql.Models.SqlAgentConfigurationPropertiesState?)) { throw null; } public static Azure.ResourceManager.Sql.SqlDatabaseAutomaticTuningData SqlDatabaseAutomaticTuningData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.AutomaticTuningMode? desiredState = default(Azure.ResourceManager.Sql.Models.AutomaticTuningMode?), Azure.ResourceManager.Sql.Models.AutomaticTuningMode? actualState = default(Azure.ResourceManager.Sql.Models.AutomaticTuningMode?), System.Collections.Generic.IDictionary options = null) { throw null; } public static Azure.ResourceManager.Sql.SqlDatabaseBlobAuditingPolicyData SqlDatabaseBlobAuditingPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, int? retentionDays = default(int?), System.Collections.Generic.IEnumerable auditActionsAndGroups = null, bool? isStorageSecondaryKeyInUse = default(bool?), bool? isAzureMonitorTargetEnabled = default(bool?), int? queueDelayMs = default(int?), bool? isManagedIdentityInUse = default(bool?), Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState? state = default(Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState?), string storageEndpoint = null, string storageAccountAccessKey = null, System.Guid? storageAccountSubscriptionId = default(System.Guid?)) { throw null; } - public static Azure.ResourceManager.Sql.SqlDatabaseData SqlDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Sql.Models.SqlSku sku = null, string kind = null, string managedBy = null, Azure.ResourceManager.Sql.Models.DatabaseIdentity identity = null, Azure.ResourceManager.Sql.Models.SqlDatabaseCreateMode? createMode = default(Azure.ResourceManager.Sql.Models.SqlDatabaseCreateMode?), string collation = null, long? maxSizeBytes = default(long?), Azure.ResourceManager.Sql.Models.SampleSchemaName? sampleName = default(Azure.ResourceManager.Sql.Models.SampleSchemaName?), Azure.Core.ResourceIdentifier elasticPoolId = null, Azure.Core.ResourceIdentifier sourceDatabaseId = null, Azure.ResourceManager.Sql.Models.SqlDatabaseStatus? status = default(Azure.ResourceManager.Sql.Models.SqlDatabaseStatus?), System.Guid? databaseId = default(System.Guid?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string currentServiceObjectiveName = null, string requestedServiceObjectiveName = null, Azure.Core.AzureLocation? defaultSecondaryLocation = default(Azure.Core.AzureLocation?), Azure.Core.ResourceIdentifier failoverGroupId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), System.DateTimeOffset? sourceDatabaseDeletedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier recoveryServicesRecoveryPointId = null, Azure.Core.ResourceIdentifier longTermRetentionBackupResourceId = null, Azure.Core.ResourceIdentifier recoverableDatabaseId = null, Azure.Core.ResourceIdentifier restorableDroppedDatabaseId = null, Azure.ResourceManager.Sql.Models.CatalogCollationType? catalogCollation = default(Azure.ResourceManager.Sql.Models.CatalogCollationType?), bool? isZoneRedundant = default(bool?), Azure.ResourceManager.Sql.Models.DatabaseLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.DatabaseLicenseType?), long? maxLogSizeBytes = default(long?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.DatabaseReadScale? readScale = default(Azure.ResourceManager.Sql.Models.DatabaseReadScale?), int? highAvailabilityReplicaCount = default(int?), Azure.ResourceManager.Sql.Models.SecondaryType? secondaryType = default(Azure.ResourceManager.Sql.Models.SecondaryType?), Azure.ResourceManager.Sql.Models.SqlSku currentSku = null, int? autoPauseDelay = default(int?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), double? minCapacity = default(double?), System.DateTimeOffset? pausedOn = default(System.DateTimeOffset?), System.DateTimeOffset? resumedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, bool? isLedgerOn = default(bool?), bool? isInfraEncryptionEnabled = default(bool?), System.Guid? federatedClientId = default(System.Guid?), System.Collections.Generic.IDictionary keys = null, string encryptionProtector = null, Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType? preferredEnclaveType = default(Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType?), Azure.Core.ResourceIdentifier sourceResourceId = null, bool? manualCutover = default(bool?), bool? performCutover = default(bool?), Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType? availabilityZone = default(Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType?)) { throw null; } + public static Azure.ResourceManager.Sql.SqlDatabaseData SqlDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Sql.Models.SqlSku sku = null, string kind = null, string managedBy = null, Azure.ResourceManager.Sql.Models.DatabaseIdentity identity = null, Azure.ResourceManager.Sql.Models.SqlDatabaseCreateMode? createMode = default(Azure.ResourceManager.Sql.Models.SqlDatabaseCreateMode?), string collation = null, long? maxSizeBytes = default(long?), Azure.ResourceManager.Sql.Models.SampleSchemaName? sampleName = default(Azure.ResourceManager.Sql.Models.SampleSchemaName?), Azure.Core.ResourceIdentifier elasticPoolId = null, Azure.Core.ResourceIdentifier sourceDatabaseId = null, Azure.ResourceManager.Sql.Models.SqlDatabaseStatus? status = default(Azure.ResourceManager.Sql.Models.SqlDatabaseStatus?), System.Guid? databaseId = default(System.Guid?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string currentServiceObjectiveName = null, string requestedServiceObjectiveName = null, Azure.Core.AzureLocation? defaultSecondaryLocation = default(Azure.Core.AzureLocation?), Azure.Core.ResourceIdentifier failoverGroupId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), System.DateTimeOffset? sourceDatabaseDeletedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier recoveryServicesRecoveryPointId = null, Azure.Core.ResourceIdentifier longTermRetentionBackupResourceId = null, Azure.Core.ResourceIdentifier recoverableDatabaseId = null, Azure.Core.ResourceIdentifier restorableDroppedDatabaseId = null, Azure.ResourceManager.Sql.Models.CatalogCollationType? catalogCollation = default(Azure.ResourceManager.Sql.Models.CatalogCollationType?), bool? isZoneRedundant = default(bool?), Azure.ResourceManager.Sql.Models.DatabaseLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.DatabaseLicenseType?), long? maxLogSizeBytes = default(long?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.DatabaseReadScale? readScale = default(Azure.ResourceManager.Sql.Models.DatabaseReadScale?), int? highAvailabilityReplicaCount = default(int?), Azure.ResourceManager.Sql.Models.SecondaryType? secondaryType = default(Azure.ResourceManager.Sql.Models.SecondaryType?), Azure.ResourceManager.Sql.Models.SqlSku currentSku = null, int? autoPauseDelay = default(int?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), double? minCapacity = default(double?), System.DateTimeOffset? pausedOn = default(System.DateTimeOffset?), System.DateTimeOffset? resumedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, bool? isLedgerOn = default(bool?), bool? isInfraEncryptionEnabled = default(bool?), System.Guid? federatedClientId = default(System.Guid?), System.Collections.Generic.IDictionary keys = null, string encryptionProtector = null, Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType? preferredEnclaveType = default(Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType?), bool? useFreeLimit = default(bool?), Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior? freeLimitExhaustionBehavior = default(Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior?), Azure.Core.ResourceIdentifier sourceResourceId = null, bool? manualCutover = default(bool?), bool? performCutover = default(bool?), Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType? availabilityZone = default(Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType?), bool? encryptionProtectorAutoRotation = default(bool?)) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlDatabaseExtension SqlDatabaseExtension(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.DatabaseExtensionOperationMode? operationMode = default(Azure.ResourceManager.Sql.Models.DatabaseExtensionOperationMode?), Azure.ResourceManager.Sql.Models.StorageKeyType? storageKeyType = default(Azure.ResourceManager.Sql.Models.StorageKeyType?), string storageKey = null, System.Uri storageUri = null) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlDatabaseKey SqlDatabaseKey(Azure.ResourceManager.Sql.Models.SqlDatabaseKeyType? keyType = default(Azure.ResourceManager.Sql.Models.SqlDatabaseKeyType?), string thumbprint = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string subregion = null) { throw null; } public static Azure.ResourceManager.Sql.SqlDatabaseSecurityAlertPolicyData SqlDatabaseSecurityAlertPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.SecurityAlertsPolicyState? state = default(Azure.ResourceManager.Sql.Models.SecurityAlertsPolicyState?), System.Collections.Generic.IEnumerable disabledAlerts = null, System.Collections.Generic.IEnumerable emailAddresses = null, bool? sendToEmailAccountAdmins = default(bool?), string storageEndpoint = null, string storageAccountAccessKey = null, int? retentionDays = default(int?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } @@ -5464,7 +5469,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.Models.SqlMetricValue SqlMetricValue(int? count = default(int?), double? average = default(double?), double? maximum = default(double?), double? minimum = default(double?), System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), double? total = default(double?)) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlNameAvailabilityResponse SqlNameAvailabilityResponse(string name = null, bool? isAvailable = default(bool?), Azure.ResourceManager.Sql.Models.SqlNameUnavailableReason? reason = default(Azure.ResourceManager.Sql.Models.SqlNameUnavailableReason?), string message = null) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlOutboundEnvironmentEndpoint SqlOutboundEnvironmentEndpoint(string category = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } - public static Azure.ResourceManager.Sql.SqlPrivateEndpointConnectionData SqlPrivateEndpointConnectionData(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 privateEndpointId = null, Azure.ResourceManager.Sql.Models.SqlPrivateLinkServiceConnectionStateProperty connectionState = null, Azure.ResourceManager.Sql.Models.SqlPrivateEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.SqlPrivateEndpointProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Sql.SqlPrivateEndpointConnectionData SqlPrivateEndpointConnectionData(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 privateEndpointId = null, System.Collections.Generic.IEnumerable groupIds = null, Azure.ResourceManager.Sql.Models.SqlPrivateLinkServiceConnectionStateProperty connectionState = null, Azure.ResourceManager.Sql.Models.SqlPrivateEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.SqlPrivateEndpointProvisioningState?)) { throw null; } public static Azure.ResourceManager.Sql.SqlPrivateLinkResourceData SqlPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.SqlPrivateLinkResourceProperties properties = null) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlPrivateLinkResourceProperties SqlPrivateLinkResourceProperties(string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlPrivateLinkServiceConnectionStateProperty SqlPrivateLinkServiceConnectionStateProperty(Azure.ResourceManager.Sql.Models.SqlPrivateLinkServiceConnectionStatus status = default(Azure.ResourceManager.Sql.Models.SqlPrivateLinkServiceConnectionStatus), string description = null, Azure.ResourceManager.Sql.Models.SqlPrivateLinkServiceConnectionActionsRequired? actionsRequired = default(Azure.ResourceManager.Sql.Models.SqlPrivateLinkServiceConnectionActionsRequired?)) { throw null; } @@ -5474,7 +5479,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.SqlServerBlobAuditingPolicyData SqlServerBlobAuditingPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isDevopsAuditEnabled = default(bool?), int? retentionDays = default(int?), System.Collections.Generic.IEnumerable auditActionsAndGroups = null, bool? isStorageSecondaryKeyInUse = default(bool?), bool? isAzureMonitorTargetEnabled = default(bool?), int? queueDelayMs = default(int?), bool? isManagedIdentityInUse = default(bool?), Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState? state = default(Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState?), string storageEndpoint = null, string storageAccountAccessKey = null, System.Guid? storageAccountSubscriptionId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.Sql.SqlServerCommunicationLinkData SqlServerCommunicationLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string kind = null, string state = null, string partnerServer = null) { throw null; } public static Azure.ResourceManager.Sql.SqlServerConnectionPolicyData SqlServerConnectionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string kind = null, Azure.ResourceManager.Sql.Models.ServerConnectionType? connectionType = default(Azure.ResourceManager.Sql.Models.ServerConnectionType?)) { throw null; } - public static Azure.ResourceManager.Sql.SqlServerData SqlServerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string kind = null, string administratorLogin = null, string administratorLoginPassword = null, string version = null, string state = null, string fullyQualifiedDomainName = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? publicNetworkAccess = default(Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag?), Azure.ResourceManager.Sql.Models.ServerWorkspaceFeature? workspaceFeature = default(Azure.ResourceManager.Sql.Models.ServerWorkspaceFeature?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Guid? federatedClientId = default(System.Guid?), System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ServerExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? restrictOutboundNetworkAccess = default(Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag?), Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?)) { throw null; } + public static Azure.ResourceManager.Sql.SqlServerData SqlServerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string kind = null, string administratorLogin = null, string administratorLoginPassword = null, string version = null, string state = null, string fullyQualifiedDomainName = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? publicNetworkAccess = default(Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag?), Azure.ResourceManager.Sql.Models.ServerWorkspaceFeature? workspaceFeature = default(Azure.ResourceManager.Sql.Models.ServerWorkspaceFeature?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Guid? federatedClientId = default(System.Guid?), System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ServerExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? restrictOutboundNetworkAccess = default(Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag?), Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? isIPv6Enabled = default(Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag?), Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?)) { throw null; } public static Azure.ResourceManager.Sql.SqlServerDatabaseReplicationLinkData SqlServerDatabaseReplicationLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string partnerServer = null, string partnerDatabase = null, Azure.Core.AzureLocation? partnerLocation = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole? role = default(Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole?), Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole? partnerRole = default(Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole?), string replicationMode = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), int? percentComplete = default(int?), Azure.ResourceManager.Sql.Models.ReplicationLinkState? replicationState = default(Azure.ResourceManager.Sql.Models.ReplicationLinkState?), bool? isTerminationAllowed = default(bool?), Azure.ResourceManager.Sql.Models.ReplicationLinkType? linkType = default(Azure.ResourceManager.Sql.Models.ReplicationLinkType?)) { throw null; } public static Azure.ResourceManager.Sql.SqlServerDatabaseRestorePointData SqlServerDatabaseRestorePointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Sql.Models.RestorePointType? restorePointType = default(Azure.ResourceManager.Sql.Models.RestorePointType?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?), System.DateTimeOffset? restorePointCreatedOn = default(System.DateTimeOffset?), string restorePointLabel = null) { throw null; } public static Azure.ResourceManager.Sql.SqlServerDevOpsAuditingSettingData SqlServerDevOpsAuditingSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isAzureMonitorTargetEnabled = default(bool?), bool? isManagedIdentityInUse = default(bool?), Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState? state = default(Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState?), string storageEndpoint = null, string storageAccountAccessKey = null, System.Guid? storageAccountSubscriptionId = default(System.Guid?)) { throw null; } @@ -6182,11 +6187,18 @@ internal ElasticPoolPerformanceLevelCapability() { } public partial class FailoverGroupPatch { public FailoverGroupPatch() { } - public System.Collections.Generic.IList Databases { get { throw null; } } - public Azure.ResourceManager.Sql.Models.ReadOnlyEndpointFailoverPolicy? ReadOnlyEndpointFailoverPolicy { get { throw null; } set { } } + public System.Collections.Generic.IList Databases { get { throw null; } } + public System.Collections.Generic.IList PartnerServers { get { throw null; } } + public Azure.ResourceManager.Sql.Models.FailoverGroupReadOnlyEndpoint ReadOnlyEndpoint { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.FailoverGroupReadWriteEndpoint ReadWriteEndpoint { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } } + public partial class FailoverGroupReadOnlyEndpoint + { + public FailoverGroupReadOnlyEndpoint() { } + public Azure.ResourceManager.Sql.Models.ReadOnlyEndpointFailoverPolicy? FailoverPolicy { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetServer { get { throw null; } set { } } + } public partial class FailoverGroupReadWriteEndpoint { public FailoverGroupReadWriteEndpoint(Azure.ResourceManager.Sql.Models.ReadWriteEndpointFailoverPolicy failoverPolicy) { } @@ -6212,6 +6224,24 @@ public FailoverGroupReadWriteEndpoint(Azure.ResourceManager.Sql.Models.ReadWrite public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FreeLimitExhaustionBehavior : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FreeLimitExhaustionBehavior(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior AutoPause { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior BillOverUsage { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior left, Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior left, Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct GeoBackupPolicyName : System.IEquatable { private readonly object _dummy; @@ -8177,8 +8207,10 @@ public SqlDatabasePatch() { } public System.DateTimeOffset? EarliestRestoreOn { get { throw null; } } public Azure.Core.ResourceIdentifier ElasticPoolId { get { throw null; } set { } } public string EncryptionProtector { get { throw null; } set { } } + public bool? EncryptionProtectorAutoRotation { get { throw null; } set { } } public Azure.Core.ResourceIdentifier FailoverGroupId { get { throw null; } } public System.Guid? FederatedClientId { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior? FreeLimitExhaustionBehavior { get { throw null; } set { } } public int? HighAvailabilityReplicaCount { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.DatabaseIdentity Identity { get { throw null; } set { } } public bool? IsInfraEncryptionEnabled { get { throw null; } } @@ -8210,6 +8242,7 @@ public SqlDatabasePatch() { } public Azure.Core.ResourceIdentifier SourceDatabaseId { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlDatabaseStatus? Status { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public bool? UseFreeLimit { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SqlDatabaseState : System.IEquatable @@ -8688,6 +8721,7 @@ public SqlServerPatch() { } public System.Guid? FederatedClientId { get { throw null; } set { } } public string FullyQualifiedDomainName { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? IsIPv6Enabled { get { throw null; } set { } } public System.Uri KeyId { get { throw null; } set { } } public string MinimalTlsVersion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrimaryUserAssignedIdentityId { get { throw null; } set { } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs index 7c8b0cdacab6..db2c5a2b1bf2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs @@ -1571,12 +1571,28 @@ public static ManagedServerSecurityAlertPolicyData ManagedServerSecurityAlertPol /// The resourceType. /// The systemData. /// Private endpoint which the connection belongs to. + /// Group IDs. /// Connection state of the private endpoint connection. /// State of the private endpoint connection. /// A new instance for mocking. - public static SqlPrivateEndpointConnectionData SqlPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier privateEndpointId = null, SqlPrivateLinkServiceConnectionStateProperty connectionState = null, SqlPrivateEndpointProvisioningState? provisioningState = null) + public static SqlPrivateEndpointConnectionData SqlPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier privateEndpointId = null, IEnumerable groupIds = null, SqlPrivateLinkServiceConnectionStateProperty connectionState = null, SqlPrivateEndpointProvisioningState? provisioningState = null) { - return new SqlPrivateEndpointConnectionData(id, name, resourceType, systemData, privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null, connectionState, provisioningState); + groupIds ??= new List(); + + return new SqlPrivateEndpointConnectionData(id, name, resourceType, systemData, privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null, groupIds?.ToList(), connectionState, provisioningState); + } + + /// Initializes a new instance of ServerPrivateEndpointConnectionProperties. + /// Private endpoint which the connection belongs to. + /// Group IDs. + /// Connection state of the private endpoint connection. + /// State of the private endpoint connection. + /// A new instance for mocking. + public static ServerPrivateEndpointConnectionProperties ServerPrivateEndpointConnectionProperties(ResourceIdentifier privateEndpointId = null, IEnumerable groupIds = null, SqlPrivateLinkServiceConnectionStateProperty connectionState = null, SqlPrivateEndpointProvisioningState? provisioningState = null) + { + groupIds ??= new List(); + + return new ServerPrivateEndpointConnectionProperties(privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null, groupIds?.ToList(), connectionState, provisioningState); } /// Initializes a new instance of SqlPrivateLinkServiceConnectionStateProperty. @@ -3174,6 +3190,14 @@ public static ManagedDatabaseRestoreDetailUnrestorableFileProperties ManagedData /// The resource ids of the user assigned identities to use. /// The azure key vault URI of the database if it's configured with per Database Customer Managed Keys. /// Type of enclave requested on the database i.e. Default or VBS enclaves. + /// Whether or not the database uses free monthly limits. Allowed on one database in a subscription. + /// + /// Specifies the behavior when monthly free limits are exhausted for the free database. + /// + /// AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. + /// + /// BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed. + /// /// /// The resource identifier of the source associated with the create operation of this database. /// @@ -3208,13 +3232,14 @@ public static ManagedDatabaseRestoreDetailUnrestorableFileProperties ManagedData /// When performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database. /// /// Specifies the availability zone the database is pinned to. + /// The flag to enable or disable auto rotation of database encryption protector AKV key. /// A new instance for mocking. - public static SqlDatabaseData SqlDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SqlSku sku = null, string kind = null, string managedBy = null, DatabaseIdentity identity = null, SqlDatabaseCreateMode? createMode = null, string collation = null, long? maxSizeBytes = null, SampleSchemaName? sampleName = null, ResourceIdentifier elasticPoolId = null, ResourceIdentifier sourceDatabaseId = null, SqlDatabaseStatus? status = null, Guid? databaseId = null, DateTimeOffset? createdOn = null, string currentServiceObjectiveName = null, string requestedServiceObjectiveName = null, AzureLocation? defaultSecondaryLocation = null, ResourceIdentifier failoverGroupId = null, DateTimeOffset? restorePointInTime = null, DateTimeOffset? sourceDatabaseDeletedOn = null, ResourceIdentifier recoveryServicesRecoveryPointId = null, ResourceIdentifier longTermRetentionBackupResourceId = null, ResourceIdentifier recoverableDatabaseId = null, ResourceIdentifier restorableDroppedDatabaseId = null, CatalogCollationType? catalogCollation = null, bool? isZoneRedundant = null, DatabaseLicenseType? licenseType = null, long? maxLogSizeBytes = null, DateTimeOffset? earliestRestoreOn = null, DatabaseReadScale? readScale = null, int? highAvailabilityReplicaCount = null, SecondaryType? secondaryType = null, SqlSku currentSku = null, int? autoPauseDelay = null, SqlBackupStorageRedundancy? currentBackupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, double? minCapacity = null, DateTimeOffset? pausedOn = null, DateTimeOffset? resumedOn = null, ResourceIdentifier maintenanceConfigurationId = null, bool? isLedgerOn = null, bool? isInfraEncryptionEnabled = null, Guid? federatedClientId = null, IDictionary keys = null, string encryptionProtector = null, SqlAlwaysEncryptedEnclaveType? preferredEnclaveType = null, ResourceIdentifier sourceResourceId = null, bool? manualCutover = null, bool? performCutover = null, SqlAvailabilityZoneType? availabilityZone = null) + public static SqlDatabaseData SqlDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SqlSku sku = null, string kind = null, string managedBy = null, DatabaseIdentity identity = null, SqlDatabaseCreateMode? createMode = null, string collation = null, long? maxSizeBytes = null, SampleSchemaName? sampleName = null, ResourceIdentifier elasticPoolId = null, ResourceIdentifier sourceDatabaseId = null, SqlDatabaseStatus? status = null, Guid? databaseId = null, DateTimeOffset? createdOn = null, string currentServiceObjectiveName = null, string requestedServiceObjectiveName = null, AzureLocation? defaultSecondaryLocation = null, ResourceIdentifier failoverGroupId = null, DateTimeOffset? restorePointInTime = null, DateTimeOffset? sourceDatabaseDeletedOn = null, ResourceIdentifier recoveryServicesRecoveryPointId = null, ResourceIdentifier longTermRetentionBackupResourceId = null, ResourceIdentifier recoverableDatabaseId = null, ResourceIdentifier restorableDroppedDatabaseId = null, CatalogCollationType? catalogCollation = null, bool? isZoneRedundant = null, DatabaseLicenseType? licenseType = null, long? maxLogSizeBytes = null, DateTimeOffset? earliestRestoreOn = null, DatabaseReadScale? readScale = null, int? highAvailabilityReplicaCount = null, SecondaryType? secondaryType = null, SqlSku currentSku = null, int? autoPauseDelay = null, SqlBackupStorageRedundancy? currentBackupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, double? minCapacity = null, DateTimeOffset? pausedOn = null, DateTimeOffset? resumedOn = null, ResourceIdentifier maintenanceConfigurationId = null, bool? isLedgerOn = null, bool? isInfraEncryptionEnabled = null, Guid? federatedClientId = null, IDictionary keys = null, string encryptionProtector = null, SqlAlwaysEncryptedEnclaveType? preferredEnclaveType = null, bool? useFreeLimit = null, FreeLimitExhaustionBehavior? freeLimitExhaustionBehavior = null, ResourceIdentifier sourceResourceId = null, bool? manualCutover = null, bool? performCutover = null, SqlAvailabilityZoneType? availabilityZone = null, bool? encryptionProtectorAutoRotation = null) { tags ??= new Dictionary(); keys ??= new Dictionary(); - return new SqlDatabaseData(id, name, resourceType, systemData, tags, location, sku, kind, managedBy, identity, createMode, collation, maxSizeBytes, sampleName, elasticPoolId, sourceDatabaseId, status, databaseId, createdOn, currentServiceObjectiveName, requestedServiceObjectiveName, defaultSecondaryLocation, failoverGroupId, restorePointInTime, sourceDatabaseDeletedOn, recoveryServicesRecoveryPointId, longTermRetentionBackupResourceId, recoverableDatabaseId, restorableDroppedDatabaseId, catalogCollation, isZoneRedundant, licenseType, maxLogSizeBytes, earliestRestoreOn, readScale, highAvailabilityReplicaCount, secondaryType, currentSku, autoPauseDelay, currentBackupStorageRedundancy, requestedBackupStorageRedundancy, minCapacity, pausedOn, resumedOn, maintenanceConfigurationId, isLedgerOn, isInfraEncryptionEnabled, federatedClientId, keys, encryptionProtector, preferredEnclaveType, sourceResourceId, manualCutover, performCutover, availabilityZone); + return new SqlDatabaseData(id, name, resourceType, systemData, tags, location, sku, kind, managedBy, identity, createMode, collation, maxSizeBytes, sampleName, elasticPoolId, sourceDatabaseId, status, databaseId, createdOn, currentServiceObjectiveName, requestedServiceObjectiveName, defaultSecondaryLocation, failoverGroupId, restorePointInTime, sourceDatabaseDeletedOn, recoveryServicesRecoveryPointId, longTermRetentionBackupResourceId, recoverableDatabaseId, restorableDroppedDatabaseId, catalogCollation, isZoneRedundant, licenseType, maxLogSizeBytes, earliestRestoreOn, readScale, highAvailabilityReplicaCount, secondaryType, currentSku, autoPauseDelay, currentBackupStorageRedundancy, requestedBackupStorageRedundancy, minCapacity, pausedOn, resumedOn, maintenanceConfigurationId, isLedgerOn, isInfraEncryptionEnabled, federatedClientId, keys, encryptionProtector, preferredEnclaveType, useFreeLimit, freeLimitExhaustionBehavior, sourceResourceId, manualCutover, performCutover, availabilityZone, encryptionProtectorAutoRotation); } /// Initializes a new instance of DatabaseIdentity. @@ -3541,89 +3566,6 @@ public static ManagedInstanceServerConfigurationOptionData ManagedInstanceServer return new ManagedInstanceServerConfigurationOptionData(id, name, resourceType, systemData, serverConfigurationOptionValue, provisioningState); } - /// Initializes a new instance of SqlNameAvailabilityResponse. - /// The name whose availability was checked. - /// True if the name is available, otherwise false. - /// The reason code explaining why the name is unavailable. Will be undefined if the name is available. - /// A message explaining why the name is unavailable. Will be undefined if the name is available. - /// A new instance for mocking. - public static SqlNameAvailabilityResponse SqlNameAvailabilityResponse(string name = null, bool? isAvailable = null, SqlNameUnavailableReason? reason = null, string message = null) - { - return new SqlNameAvailabilityResponse(name, isAvailable, reason, message); - } - - /// Initializes a new instance of SqlServerData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The Azure Active Directory identity of the server. - /// Kind of sql server. This is metadata used for the Azure portal experience. - /// Administrator username for the server. Once created it cannot be changed. - /// The administrator login password (required for server creation). - /// The version of the server. - /// The state of the server. - /// The fully qualified domain name of the server. - /// List of private endpoint connections on a server. - /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. - /// Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. - /// Whether or not existing server has a workspace created and if it allows connection from workspace. - /// The resource id of a user assigned identity to be used by default. - /// The Client id used for cross tenant CMK scenario. - /// A CMK URI of the key to use for encryption. - /// The Azure Active Directory administrator of the server. This can only be used at server create time. If used for server update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. - /// Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - /// Status of external governance. - /// A new instance for mocking. - public static SqlServerData SqlServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, string administratorLogin = null, string administratorLoginPassword = null, string version = null, string state = null, string fullyQualifiedDomainName = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, ServerNetworkAccessFlag? publicNetworkAccess = null, ServerWorkspaceFeature? workspaceFeature = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Guid? federatedClientId = null, Uri keyId = null, ServerExternalAdministrator administrators = null, ServerNetworkAccessFlag? restrictOutboundNetworkAccess = null, ExternalGovernanceStatus? externalGovernanceStatus = null) - { - tags ??= new Dictionary(); - privateEndpointConnections ??= new List(); - - return new SqlServerData(id, name, resourceType, systemData, tags, location, identity, kind, administratorLogin, administratorLoginPassword, version, state, fullyQualifiedDomainName, privateEndpointConnections?.ToList(), minimalTlsVersion, publicNetworkAccess, workspaceFeature, primaryUserAssignedIdentityId, federatedClientId, keyId, administrators, restrictOutboundNetworkAccess, externalGovernanceStatus); - } - - /// Initializes a new instance of SqlServerPrivateEndpointConnection. - /// Resource ID. - /// Private endpoint connection properties. - /// A new instance for mocking. - public static SqlServerPrivateEndpointConnection SqlServerPrivateEndpointConnection(ResourceIdentifier id = null, ServerPrivateEndpointConnectionProperties properties = null) - { - return new SqlServerPrivateEndpointConnection(id, properties); - } - - /// Initializes a new instance of ServerPrivateEndpointConnectionProperties. - /// Private endpoint which the connection belongs to. - /// Group IDs. - /// Connection state of the private endpoint connection. - /// State of the private endpoint connection. - /// A new instance for mocking. - public static ServerPrivateEndpointConnectionProperties ServerPrivateEndpointConnectionProperties(ResourceIdentifier privateEndpointId = null, IEnumerable groupIds = null, SqlPrivateLinkServiceConnectionStateProperty connectionState = null, SqlPrivateEndpointProvisioningState? provisioningState = null) - { - groupIds ??= new List(); - - return new ServerPrivateEndpointConnectionProperties(privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null, groupIds?.ToList(), connectionState, provisioningState); - } - - /// Initializes a new instance of RefreshExternalGovernanceStatusOperationResult. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Request Id. - /// Request type. - /// Queued time. - /// Server name. - /// Operation status. - /// Error message. - /// A new instance for mocking. - public static RefreshExternalGovernanceStatusOperationResult RefreshExternalGovernanceStatusOperationResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? requestId = null, string requestType = null, string queuedTime = null, string serverName = null, string status = null, string errorMessage = null) - { - return new RefreshExternalGovernanceStatusOperationResult(id, name, resourceType, systemData, requestId, requestType, queuedTime, serverName, status, errorMessage); - } - /// Initializes a new instance of ManagedInstanceStartStopScheduleData. /// The id. /// The name. @@ -3654,39 +3596,6 @@ public static LogicalDatabaseTransparentDataEncryptionData LogicalDatabaseTransp return new LogicalDatabaseTransparentDataEncryptionData(id, name, resourceType, systemData, state); } - /// Initializes a new instance of FailoverGroupData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Resource location. - /// Resource tags. - /// Read-write endpoint of the failover group instance. - /// Read-only endpoint of the failover group instance. - /// Local replication role of the failover group instance. - /// Replication state of the failover group instance. - /// List of partner server information for the failover group. - /// List of databases in the failover group. - /// A new instance for mocking. - public static FailoverGroupData FailoverGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, IDictionary tags = null, FailoverGroupReadWriteEndpoint readWriteEndpoint = null, ReadOnlyEndpointFailoverPolicy? readOnlyEndpointFailoverPolicy = null, FailoverGroupReplicationRole? replicationRole = null, string replicationState = null, IEnumerable partnerServers = null, IEnumerable failoverDatabases = null) - { - tags ??= new Dictionary(); - partnerServers ??= new List(); - failoverDatabases ??= new List(); - - return new FailoverGroupData(id, name, resourceType, systemData, location, tags, readWriteEndpoint, readOnlyEndpointFailoverPolicy != null ? new FailoverGroupReadOnlyEndpoint(readOnlyEndpointFailoverPolicy) : null, replicationRole, replicationState, partnerServers?.ToList(), failoverDatabases?.ToList()); - } - - /// Initializes a new instance of PartnerServerInfo. - /// Resource identifier of the partner server. - /// Geo location of the partner server. - /// Replication role of the partner server. - /// A new instance for mocking. - public static PartnerServerInfo PartnerServerInfo(ResourceIdentifier id = null, AzureLocation? location = null, FailoverGroupReplicationRole? replicationRole = null) - { - return new PartnerServerInfo(id, location, replicationRole); - } - /// Initializes a new instance of IPv6FirewallRuleData. /// Resource ID. /// Resource name. @@ -3906,5 +3815,109 @@ public static SqlVulnerabilityAssessmentData SqlVulnerabilityAssessmentData(Reso { return new SqlVulnerabilityAssessmentData(id, name, resourceType, systemData, state); } + + /// Initializes a new instance of SqlNameAvailabilityResponse. + /// The name whose availability was checked. + /// True if the name is available, otherwise false. + /// The reason code explaining why the name is unavailable. Will be undefined if the name is available. + /// A message explaining why the name is unavailable. Will be undefined if the name is available. + /// A new instance for mocking. + public static SqlNameAvailabilityResponse SqlNameAvailabilityResponse(string name = null, bool? isAvailable = null, SqlNameUnavailableReason? reason = null, string message = null) + { + return new SqlNameAvailabilityResponse(name, isAvailable, reason, message); + } + + /// Initializes a new instance of SqlServerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The Azure Active Directory identity of the server. + /// Kind of sql server. This is metadata used for the Azure portal experience. + /// Administrator username for the server. Once created it cannot be changed. + /// The administrator login password (required for server creation). + /// The version of the server. + /// The state of the server. + /// The fully qualified domain name of the server. + /// List of private endpoint connections on a server. + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. + /// Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. + /// Whether or not existing server has a workspace created and if it allows connection from workspace. + /// The resource id of a user assigned identity to be used by default. + /// The Client id used for cross tenant CMK scenario. + /// A CMK URI of the key to use for encryption. + /// The Azure Active Directory administrator of the server. This can only be used at server create time. If used for server update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. + /// Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Status of external governance. + /// A new instance for mocking. + public static SqlServerData SqlServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, string administratorLogin = null, string administratorLoginPassword = null, string version = null, string state = null, string fullyQualifiedDomainName = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, ServerNetworkAccessFlag? publicNetworkAccess = null, ServerWorkspaceFeature? workspaceFeature = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Guid? federatedClientId = null, Uri keyId = null, ServerExternalAdministrator administrators = null, ServerNetworkAccessFlag? restrictOutboundNetworkAccess = null, ServerNetworkAccessFlag? isIPv6Enabled = null, ExternalGovernanceStatus? externalGovernanceStatus = null) + { + tags ??= new Dictionary(); + privateEndpointConnections ??= new List(); + + return new SqlServerData(id, name, resourceType, systemData, tags, location, identity, kind, administratorLogin, administratorLoginPassword, version, state, fullyQualifiedDomainName, privateEndpointConnections?.ToList(), minimalTlsVersion, publicNetworkAccess, workspaceFeature, primaryUserAssignedIdentityId, federatedClientId, keyId, administrators, restrictOutboundNetworkAccess, isIPv6Enabled, externalGovernanceStatus); + } + + /// Initializes a new instance of SqlServerPrivateEndpointConnection. + /// Resource ID. + /// Private endpoint connection properties. + /// A new instance for mocking. + public static SqlServerPrivateEndpointConnection SqlServerPrivateEndpointConnection(ResourceIdentifier id = null, ServerPrivateEndpointConnectionProperties properties = null) + { + return new SqlServerPrivateEndpointConnection(id, properties); + } + + /// Initializes a new instance of RefreshExternalGovernanceStatusOperationResult. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Request Id. + /// Request type. + /// Queued time. + /// Server name. + /// Operation status. + /// Error message. + /// A new instance for mocking. + public static RefreshExternalGovernanceStatusOperationResult RefreshExternalGovernanceStatusOperationResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? requestId = null, string requestType = null, string queuedTime = null, string serverName = null, string status = null, string errorMessage = null) + { + return new RefreshExternalGovernanceStatusOperationResult(id, name, resourceType, systemData, requestId, requestType, queuedTime, serverName, status, errorMessage); + } + + /// Initializes a new instance of FailoverGroupData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resource location. + /// Resource tags. + /// Read-write endpoint of the failover group instance. + /// Read-only endpoint of the failover group instance. + /// Local replication role of the failover group instance. + /// Replication state of the failover group instance. + /// List of partner server information for the failover group. + /// List of databases in the failover group. + /// A new instance for mocking. + public static FailoverGroupData FailoverGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, IDictionary tags = null, FailoverGroupReadWriteEndpoint readWriteEndpoint = null, FailoverGroupReadOnlyEndpoint readOnlyEndpoint = null, FailoverGroupReplicationRole? replicationRole = null, string replicationState = null, IEnumerable partnerServers = null, IEnumerable failoverDatabases = null) + { + tags ??= new Dictionary(); + partnerServers ??= new List(); + failoverDatabases ??= new List(); + + return new FailoverGroupData(id, name, resourceType, systemData, location, tags, readWriteEndpoint, readOnlyEndpoint, replicationRole, replicationState, partnerServers?.ToList(), failoverDatabases?.ToList()); + } + + /// Initializes a new instance of PartnerServerInfo. + /// Resource identifier of the partner server. + /// Geo location of the partner server. + /// Replication role of the partner server. + /// A new instance for mocking. + public static PartnerServerInfo PartnerServerInfo(ResourceIdentifier id = null, AzureLocation? location = null, FailoverGroupReplicationRole? replicationRole = null) + { + return new PartnerServerInfo(id, location, replicationRole); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs index e1c84fcbeac1..fd3093d6ab12 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs @@ -2160,25 +2160,6 @@ public static ManagedInstanceServerConfigurationOptionResource GetManagedInstanc } #endregion - #region SqlServerResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static SqlServerResource GetSqlServerResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - SqlServerResource.ValidateResourceId(id); - return new SqlServerResource(client, id); - } - ); - } - #endregion - #region ManagedInstanceStartStopScheduleResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -2217,25 +2198,6 @@ public static LogicalDatabaseTransparentDataEncryptionResource GetLogicalDatabas } #endregion - #region FailoverGroupResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static FailoverGroupResource GetFailoverGroupResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - FailoverGroupResource.ValidateResourceId(id); - return new FailoverGroupResource(client, id); - } - ); - } - #endregion - #region IPv6FirewallRuleResource /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. @@ -2445,6 +2407,44 @@ public static SqlDatabaseSqlVulnerabilityAssessmentResource GetSqlDatabaseSqlVul } #endregion + #region SqlServerResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static SqlServerResource GetSqlServerResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + SqlServerResource.ValidateResourceId(id); + return new SqlServerResource(client, id); + } + ); + } + #endregion + + #region FailoverGroupResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static FailoverGroupResource GetFailoverGroupResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + FailoverGroupResource.ValidateResourceId(id); + return new FailoverGroupResource(client, id); + } + ); + } + #endregion + /// Gets a collection of InstancePoolResources in the ResourceGroupResource. /// The instance the method will execute against. /// An object representing collection of InstancePoolResources and their operations over a InstancePoolResource. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs index 82094f558655..efa2b655dbe3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs @@ -58,19 +58,7 @@ internal FailoverGroupData(ResourceIdentifier id, string name, ResourceType reso /// Read-write endpoint of the failover group instance. public FailoverGroupReadWriteEndpoint ReadWriteEndpoint { get; set; } /// Read-only endpoint of the failover group instance. - internal FailoverGroupReadOnlyEndpoint ReadOnlyEndpoint { get; set; } - /// Failover policy of the read-only endpoint for the failover group. - public ReadOnlyEndpointFailoverPolicy? ReadOnlyEndpointFailoverPolicy - { - get => ReadOnlyEndpoint is null ? default : ReadOnlyEndpoint.FailoverPolicy; - set - { - if (ReadOnlyEndpoint is null) - ReadOnlyEndpoint = new FailoverGroupReadOnlyEndpoint(); - ReadOnlyEndpoint.FailoverPolicy = value; - } - } - + public FailoverGroupReadOnlyEndpoint ReadOnlyEndpoint { get; set; } /// Local replication role of the failover group instance. public FailoverGroupReplicationRole? ReplicationRole { get; } /// Replication state of the failover group instance. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.Serialization.cs index c9d5b7eae525..872748cae205 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.Serialization.cs @@ -44,10 +44,25 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartArray(); foreach (var item in Databases) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } + if (Optional.IsCollectionDefined(PartnerServers)) + { + writer.WritePropertyName("partnerServers"u8); + writer.WriteStartArray(); + foreach (var item in PartnerServers) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.cs index b9eb38271662..6d521c9be7c9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.cs @@ -17,7 +17,8 @@ public partial class FailoverGroupPatch public FailoverGroupPatch() { Tags = new ChangeTrackingDictionary(); - Databases = new ChangeTrackingList(); + Databases = new ChangeTrackingList(); + PartnerServers = new ChangeTrackingList(); } /// Resource tags. @@ -25,20 +26,10 @@ public FailoverGroupPatch() /// Read-write endpoint of the failover group instance. public FailoverGroupReadWriteEndpoint ReadWriteEndpoint { get; set; } /// Read-only endpoint of the failover group instance. - internal FailoverGroupReadOnlyEndpoint ReadOnlyEndpoint { get; set; } - /// Failover policy of the read-only endpoint for the failover group. - public ReadOnlyEndpointFailoverPolicy? ReadOnlyEndpointFailoverPolicy - { - get => ReadOnlyEndpoint is null ? default : ReadOnlyEndpoint.FailoverPolicy; - set - { - if (ReadOnlyEndpoint is null) - ReadOnlyEndpoint = new FailoverGroupReadOnlyEndpoint(); - ReadOnlyEndpoint.FailoverPolicy = value; - } - } - + public FailoverGroupReadOnlyEndpoint ReadOnlyEndpoint { get; set; } /// List of databases in the failover group. - public IList Databases { get; } + public IList Databases { get; } + /// List of partner server information for the failover group. + public IList PartnerServers { get; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.Serialization.cs index d1d7d7899a3c..ce08b61e692c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Sql.Models { - internal partial class FailoverGroupReadOnlyEndpoint : IUtf8JsonSerializable + public partial class FailoverGroupReadOnlyEndpoint : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -20,6 +20,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("failoverPolicy"u8); writer.WriteStringValue(FailoverPolicy.Value.ToString()); } + if (Optional.IsDefined(TargetServer)) + { + writer.WritePropertyName("targetServer"u8); + writer.WriteStringValue(TargetServer); + } writer.WriteEndObject(); } @@ -30,6 +35,7 @@ internal static FailoverGroupReadOnlyEndpoint DeserializeFailoverGroupReadOnlyEn return null; } Optional failoverPolicy = default; + Optional targetServer = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("failoverPolicy"u8)) @@ -41,8 +47,17 @@ internal static FailoverGroupReadOnlyEndpoint DeserializeFailoverGroupReadOnlyEn failoverPolicy = new ReadOnlyEndpointFailoverPolicy(property.Value.GetString()); continue; } + if (property.NameEquals("targetServer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetServer = new ResourceIdentifier(property.Value.GetString()); + continue; + } } - return new FailoverGroupReadOnlyEndpoint(Optional.ToNullable(failoverPolicy)); + return new FailoverGroupReadOnlyEndpoint(Optional.ToNullable(failoverPolicy), targetServer.Value); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.cs index 71f21a76ef3b..dda31caa2580 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.cs @@ -5,10 +5,12 @@ #nullable disable +using Azure.Core; + namespace Azure.ResourceManager.Sql.Models { /// Read-only endpoint of the failover group instance. - internal partial class FailoverGroupReadOnlyEndpoint + public partial class FailoverGroupReadOnlyEndpoint { /// Initializes a new instance of FailoverGroupReadOnlyEndpoint. public FailoverGroupReadOnlyEndpoint() @@ -17,12 +19,16 @@ public FailoverGroupReadOnlyEndpoint() /// Initializes a new instance of FailoverGroupReadOnlyEndpoint. /// Failover policy of the read-only endpoint for the failover group. - internal FailoverGroupReadOnlyEndpoint(ReadOnlyEndpointFailoverPolicy? failoverPolicy) + /// The target partner server where the read-only endpoint points to. + internal FailoverGroupReadOnlyEndpoint(ReadOnlyEndpointFailoverPolicy? failoverPolicy, ResourceIdentifier targetServer) { FailoverPolicy = failoverPolicy; + TargetServer = targetServer; } /// Failover policy of the read-only endpoint for the failover group. public ReadOnlyEndpointFailoverPolicy? FailoverPolicy { get; set; } + /// The target partner server where the read-only endpoint points to. + public ResourceIdentifier TargetServer { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FreeLimitExhaustionBehavior.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FreeLimitExhaustionBehavior.cs new file mode 100644 index 000000000000..41155b8ca9ed --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FreeLimitExhaustionBehavior.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// + /// Specifies the behavior when monthly free limits are exhausted for the free database. + /// + /// AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. + /// + /// BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed. + /// + public readonly partial struct FreeLimitExhaustionBehavior : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FreeLimitExhaustionBehavior(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutoPauseValue = "AutoPause"; + private const string BillOverUsageValue = "BillOverUsage"; + + /// AutoPause. + public static FreeLimitExhaustionBehavior AutoPause { get; } = new FreeLimitExhaustionBehavior(AutoPauseValue); + /// BillOverUsage. + public static FreeLimitExhaustionBehavior BillOverUsage { get; } = new FreeLimitExhaustionBehavior(BillOverUsageValue); + /// Determines if two values are the same. + public static bool operator ==(FreeLimitExhaustionBehavior left, FreeLimitExhaustionBehavior right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FreeLimitExhaustionBehavior left, FreeLimitExhaustionBehavior right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FreeLimitExhaustionBehavior(string value) => new FreeLimitExhaustionBehavior(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FreeLimitExhaustionBehavior other && Equals(other); + /// + public bool Equals(FreeLimitExhaustionBehavior other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlAlwaysEncryptedEnclaveType.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlAlwaysEncryptedEnclaveType.cs index 193b04668b42..2ae6a1f97a04 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlAlwaysEncryptedEnclaveType.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlAlwaysEncryptedEnclaveType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Sql.Models { - /// Type of enclave requested on the database i.e. Default or VBS enclaves. + /// Type of enclave requested on the elastic pool. public readonly partial struct SqlAlwaysEncryptedEnclaveType : IEquatable { private readonly string _value; diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlAvailabilityZoneType.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlAvailabilityZoneType.cs index d8adc3380487..75dfe8a34909 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlAvailabilityZoneType.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlAvailabilityZoneType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Sql.Models { - /// Specifies the availability zone the database is pinned to. + /// Specifies the availability zone the pool's primary replica is pinned to. public readonly partial struct SqlAvailabilityZoneType : IEquatable { private readonly string _value; diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseData.Serialization.cs index b6481b91f422..2a2e94c92f62 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseData.Serialization.cs @@ -185,6 +185,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("preferredEnclaveType"u8); writer.WriteStringValue(PreferredEnclaveType.Value.ToString()); } + if (Optional.IsDefined(UseFreeLimit)) + { + writer.WritePropertyName("useFreeLimit"u8); + writer.WriteBooleanValue(UseFreeLimit.Value); + } + if (Optional.IsDefined(FreeLimitExhaustionBehavior)) + { + writer.WritePropertyName("freeLimitExhaustionBehavior"u8); + writer.WriteStringValue(FreeLimitExhaustionBehavior.Value.ToString()); + } if (Optional.IsDefined(SourceResourceId)) { writer.WritePropertyName("sourceResourceId"u8); @@ -205,6 +215,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("availabilityZone"u8); writer.WriteStringValue(AvailabilityZone.Value.ToString()); } + if (Optional.IsDefined(EncryptionProtectorAutoRotation)) + { + writer.WritePropertyName("encryptionProtectorAutoRotation"u8); + writer.WriteBooleanValue(EncryptionProtectorAutoRotation.Value); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -266,10 +281,13 @@ internal static SqlDatabaseData DeserializeSqlDatabaseData(JsonElement element) Optional> keys = default; Optional encryptionProtector = default; Optional preferredEnclaveType = default; + Optional useFreeLimit = default; + Optional freeLimitExhaustionBehavior = default; Optional sourceResourceId = default; Optional manualCutover = default; Optional performCutover = default; Optional availabilityZone = default; + Optional encryptionProtectorAutoRotation = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sku"u8)) @@ -710,6 +728,24 @@ internal static SqlDatabaseData DeserializeSqlDatabaseData(JsonElement element) preferredEnclaveType = new SqlAlwaysEncryptedEnclaveType(property0.Value.GetString()); continue; } + if (property0.NameEquals("useFreeLimit"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useFreeLimit = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("freeLimitExhaustionBehavior"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + freeLimitExhaustionBehavior = new FreeLimitExhaustionBehavior(property0.Value.GetString()); + continue; + } if (property0.NameEquals("sourceResourceId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -746,11 +782,20 @@ internal static SqlDatabaseData DeserializeSqlDatabaseData(JsonElement element) availabilityZone = new SqlAvailabilityZoneType(property0.Value.GetString()); continue; } + if (property0.NameEquals("encryptionProtectorAutoRotation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryptionProtectorAutoRotation = property0.Value.GetBoolean(); + continue; + } } continue; } } - return new SqlDatabaseData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, kind.Value, managedBy.Value, identity.Value, Optional.ToNullable(createMode), collation.Value, Optional.ToNullable(maxSizeBytes), Optional.ToNullable(sampleName), elasticPoolId.Value, sourceDatabaseId.Value, Optional.ToNullable(status), Optional.ToNullable(databaseId), Optional.ToNullable(creationDate), currentServiceObjectiveName.Value, requestedServiceObjectiveName.Value, Optional.ToNullable(defaultSecondaryLocation), failoverGroupId.Value, Optional.ToNullable(restorePointInTime), Optional.ToNullable(sourceDatabaseDeletionDate), recoveryServicesRecoveryPointId.Value, longTermRetentionBackupResourceId.Value, recoverableDatabaseId.Value, restorableDroppedDatabaseId.Value, Optional.ToNullable(catalogCollation), Optional.ToNullable(zoneRedundant), Optional.ToNullable(licenseType), Optional.ToNullable(maxLogSizeBytes), Optional.ToNullable(earliestRestoreDate), Optional.ToNullable(readScale), Optional.ToNullable(highAvailabilityReplicaCount), Optional.ToNullable(secondaryType), currentSku.Value, Optional.ToNullable(autoPauseDelay), Optional.ToNullable(currentBackupStorageRedundancy), Optional.ToNullable(requestedBackupStorageRedundancy), Optional.ToNullable(minCapacity), Optional.ToNullable(pausedDate), Optional.ToNullable(resumedDate), maintenanceConfigurationId.Value, Optional.ToNullable(isLedgerOn), Optional.ToNullable(isInfraEncryptionEnabled), Optional.ToNullable(federatedClientId), Optional.ToDictionary(keys), encryptionProtector.Value, Optional.ToNullable(preferredEnclaveType), sourceResourceId.Value, Optional.ToNullable(manualCutover), Optional.ToNullable(performCutover), Optional.ToNullable(availabilityZone)); + return new SqlDatabaseData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, kind.Value, managedBy.Value, identity.Value, Optional.ToNullable(createMode), collation.Value, Optional.ToNullable(maxSizeBytes), Optional.ToNullable(sampleName), elasticPoolId.Value, sourceDatabaseId.Value, Optional.ToNullable(status), Optional.ToNullable(databaseId), Optional.ToNullable(creationDate), currentServiceObjectiveName.Value, requestedServiceObjectiveName.Value, Optional.ToNullable(defaultSecondaryLocation), failoverGroupId.Value, Optional.ToNullable(restorePointInTime), Optional.ToNullable(sourceDatabaseDeletionDate), recoveryServicesRecoveryPointId.Value, longTermRetentionBackupResourceId.Value, recoverableDatabaseId.Value, restorableDroppedDatabaseId.Value, Optional.ToNullable(catalogCollation), Optional.ToNullable(zoneRedundant), Optional.ToNullable(licenseType), Optional.ToNullable(maxLogSizeBytes), Optional.ToNullable(earliestRestoreDate), Optional.ToNullable(readScale), Optional.ToNullable(highAvailabilityReplicaCount), Optional.ToNullable(secondaryType), currentSku.Value, Optional.ToNullable(autoPauseDelay), Optional.ToNullable(currentBackupStorageRedundancy), Optional.ToNullable(requestedBackupStorageRedundancy), Optional.ToNullable(minCapacity), Optional.ToNullable(pausedDate), Optional.ToNullable(resumedDate), maintenanceConfigurationId.Value, Optional.ToNullable(isLedgerOn), Optional.ToNullable(isInfraEncryptionEnabled), Optional.ToNullable(federatedClientId), Optional.ToDictionary(keys), encryptionProtector.Value, Optional.ToNullable(preferredEnclaveType), Optional.ToNullable(useFreeLimit), Optional.ToNullable(freeLimitExhaustionBehavior), sourceResourceId.Value, Optional.ToNullable(manualCutover), Optional.ToNullable(performCutover), Optional.ToNullable(availabilityZone), Optional.ToNullable(encryptionProtectorAutoRotation)); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabasePatch.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabasePatch.Serialization.cs index a5d8a9026672..36c78c5197d7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabasePatch.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabasePatch.Serialization.cs @@ -179,6 +179,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("preferredEnclaveType"u8); writer.WriteStringValue(PreferredEnclaveType.Value.ToString()); } + if (Optional.IsDefined(UseFreeLimit)) + { + writer.WritePropertyName("useFreeLimit"u8); + writer.WriteBooleanValue(UseFreeLimit.Value); + } + if (Optional.IsDefined(FreeLimitExhaustionBehavior)) + { + writer.WritePropertyName("freeLimitExhaustionBehavior"u8); + writer.WriteStringValue(FreeLimitExhaustionBehavior.Value.ToString()); + } if (Optional.IsDefined(ManualCutover)) { writer.WritePropertyName("manualCutover"u8); @@ -189,6 +199,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("performCutover"u8); writer.WriteBooleanValue(PerformCutover.Value); } + if (Optional.IsDefined(EncryptionProtectorAutoRotation)) + { + writer.WritePropertyName("encryptionProtectorAutoRotation"u8); + writer.WriteBooleanValue(EncryptionProtectorAutoRotation.Value); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabasePatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabasePatch.cs index 68e06ebd598a..3398f7b4f216 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabasePatch.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabasePatch.cs @@ -127,6 +127,16 @@ public SqlDatabasePatch() public string EncryptionProtector { get; set; } /// Type of enclave requested on the database i.e. Default or VBS enclaves. public SqlAlwaysEncryptedEnclaveType? PreferredEnclaveType { get; set; } + /// Whether or not the database uses free monthly limits. Allowed on one database in a subscription. + public bool? UseFreeLimit { get; set; } + /// + /// Specifies the behavior when monthly free limits are exhausted for the free database. + /// + /// AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. + /// + /// BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed. + /// + public FreeLimitExhaustionBehavior? FreeLimitExhaustionBehavior { get; set; } /// /// Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier. /// @@ -147,5 +157,7 @@ public SqlDatabasePatch() /// When performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database. /// public bool? PerformCutover { get; set; } + /// The flag to enable or disable auto rotation of database encryption protector AKV key. + public bool? EncryptionProtectorAutoRotation { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlPrivateEndpointConnectionData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlPrivateEndpointConnectionData.Serialization.cs index 5973b318f778..23fe07b7a57b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlPrivateEndpointConnectionData.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -45,6 +46,7 @@ internal static SqlPrivateEndpointConnectionData DeserializeSqlPrivateEndpointCo ResourceType type = default; Optional systemData = default; Optional privateEndpoint = default; + Optional> groupIds = default; Optional privateLinkServiceConnectionState = default; Optional provisioningState = default; foreach (var property in element.EnumerateObject()) @@ -91,6 +93,20 @@ internal static SqlPrivateEndpointConnectionData DeserializeSqlPrivateEndpointCo privateEndpoint = JsonSerializer.Deserialize(property0.Value.GetRawText()); continue; } + if (property0.NameEquals("groupIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + groupIds = array; + continue; + } if (property0.NameEquals("privateLinkServiceConnectionState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -113,7 +129,7 @@ internal static SqlPrivateEndpointConnectionData DeserializeSqlPrivateEndpointCo continue; } } - return new SqlPrivateEndpointConnectionData(id, name, type, systemData.Value, privateEndpoint, privateLinkServiceConnectionState.Value, Optional.ToNullable(provisioningState)); + return new SqlPrivateEndpointConnectionData(id, name, type, systemData.Value, privateEndpoint, Optional.ToList(groupIds), privateLinkServiceConnectionState.Value, Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs index 61b95ef6e807..80d2e29559d7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs @@ -90,6 +90,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("restrictOutboundNetworkAccess"u8); writer.WriteStringValue(RestrictOutboundNetworkAccess.Value.ToString()); } + if (Optional.IsDefined(IsIPv6Enabled)) + { + writer.WritePropertyName("isIPv6Enabled"u8); + writer.WriteStringValue(IsIPv6Enabled.Value.ToString()); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -122,6 +127,7 @@ internal static SqlServerData DeserializeSqlServerData(JsonElement element) Optional keyId = default; Optional administrators = default; Optional restrictOutboundNetworkAccess = default; + Optional isIPv6Enabled = default; Optional externalGovernanceStatus = default; foreach (var property in element.EnumerateObject()) { @@ -299,6 +305,15 @@ internal static SqlServerData DeserializeSqlServerData(JsonElement element) restrictOutboundNetworkAccess = new ServerNetworkAccessFlag(property0.Value.GetString()); continue; } + if (property0.NameEquals("isIPv6Enabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isIPv6Enabled = new ServerNetworkAccessFlag(property0.Value.GetString()); + continue; + } if (property0.NameEquals("externalGovernanceStatus"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -312,7 +327,7 @@ internal static SqlServerData DeserializeSqlServerData(JsonElement element) continue; } } - return new SqlServerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, administratorLogin.Value, administratorLoginPassword.Value, version.Value, state.Value, fullyQualifiedDomainName.Value, Optional.ToList(privateEndpointConnections), minimalTlsVersion.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(workspaceFeature), primaryUserAssignedIdentityId.Value, Optional.ToNullable(federatedClientId), keyId.Value, administrators.Value, Optional.ToNullable(restrictOutboundNetworkAccess), Optional.ToNullable(externalGovernanceStatus)); + return new SqlServerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, administratorLogin.Value, administratorLoginPassword.Value, version.Value, state.Value, fullyQualifiedDomainName.Value, Optional.ToList(privateEndpointConnections), minimalTlsVersion.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(workspaceFeature), primaryUserAssignedIdentityId.Value, Optional.ToNullable(federatedClientId), keyId.Value, administrators.Value, Optional.ToNullable(restrictOutboundNetworkAccess), Optional.ToNullable(isIPv6Enabled), Optional.ToNullable(externalGovernanceStatus)); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.Serialization.cs index c4278f9e2b15..f7a54ec519da 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.Serialization.cs @@ -85,6 +85,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("restrictOutboundNetworkAccess"u8); writer.WriteStringValue(RestrictOutboundNetworkAccess.Value.ToString()); } + if (Optional.IsDefined(IsIPv6Enabled)) + { + writer.WritePropertyName("isIPv6Enabled"u8); + writer.WriteStringValue(IsIPv6Enabled.Value.ToString()); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs index 85a305f3bda2..faac4313df16 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs @@ -54,6 +54,8 @@ public SqlServerPatch() public ServerExternalAdministrator Administrators { get; set; } /// Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. public ServerNetworkAccessFlag? RestrictOutboundNetworkAccess { get; set; } + /// Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + public ServerNetworkAccessFlag? IsIPv6Enabled { get; set; } /// Status of external governance. public ExternalGovernanceStatus? ExternalGovernanceStatus { get; } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabasesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabasesRestOperations.cs index ca8b64b1d746..4c606afcd7b8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabasesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabasesRestOperations.cs @@ -33,7 +33,7 @@ public DatabasesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01-preview"; + _apiVersion = apiVersion ?? "2023-02-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs index db2d5891dffa..316fa12bf8bf 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs @@ -33,7 +33,7 @@ public FailoverGroupsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01-preview"; + _apiVersion = apiVersion ?? "2023-02-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 0dee943bf222..121083df1685 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -33,10 +33,89 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-11-01-preview"; + _apiVersion = apiVersion ?? "2022-08-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Sql/servers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/privateEndpointConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all private endpoint connections on a server. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the server. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SqlPrivateEndpointConnectionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SqlPrivateEndpointConnectionListResult.DeserializeSqlPrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all private endpoint connections on a server. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the server. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SqlPrivateEndpointConnectionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SqlPrivateEndpointConnectionListResult.DeserializeSqlPrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) { var message = _pipeline.CreateMessage(); @@ -286,85 +365,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Sql/servers/", false); - uri.AppendPath(serverName, true); - uri.AppendPath("/privateEndpointConnections", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets all private endpoint connections on a server. - /// The subscription ID that identifies an Azure subscription. - /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the server. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SqlPrivateEndpointConnectionListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SqlPrivateEndpointConnectionListResult.DeserializeSqlPrivateEndpointConnectionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets all private endpoint connections on a server. - /// The subscription ID that identifies an Azure subscription. - /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the server. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SqlPrivateEndpointConnectionListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SqlPrivateEndpointConnectionListResult.DeserializeSqlPrivateEndpointConnectionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateListByServerNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs index b9c2f078a170..d57541dfcf16 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs @@ -33,7 +33,7 @@ public ServersRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01-preview"; + _apiVersion = apiVersion ?? "2023-02-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseData.cs index 8084dbdf7f87..f55a8a185f26 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseData.cs @@ -109,6 +109,14 @@ public SqlDatabaseData(AzureLocation location) : base(location) /// The resource ids of the user assigned identities to use. /// The azure key vault URI of the database if it's configured with per Database Customer Managed Keys. /// Type of enclave requested on the database i.e. Default or VBS enclaves. + /// Whether or not the database uses free monthly limits. Allowed on one database in a subscription. + /// + /// Specifies the behavior when monthly free limits are exhausted for the free database. + /// + /// AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. + /// + /// BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed. + /// /// /// The resource identifier of the source associated with the create operation of this database. /// @@ -143,7 +151,8 @@ public SqlDatabaseData(AzureLocation location) : base(location) /// When performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database. /// /// Specifies the availability zone the database is pinned to. - internal SqlDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SqlSku sku, string kind, string managedBy, DatabaseIdentity identity, SqlDatabaseCreateMode? createMode, string collation, long? maxSizeBytes, SampleSchemaName? sampleName, ResourceIdentifier elasticPoolId, ResourceIdentifier sourceDatabaseId, SqlDatabaseStatus? status, Guid? databaseId, DateTimeOffset? createdOn, string currentServiceObjectiveName, string requestedServiceObjectiveName, AzureLocation? defaultSecondaryLocation, ResourceIdentifier failoverGroupId, DateTimeOffset? restorePointInTime, DateTimeOffset? sourceDatabaseDeletedOn, ResourceIdentifier recoveryServicesRecoveryPointId, ResourceIdentifier longTermRetentionBackupResourceId, ResourceIdentifier recoverableDatabaseId, ResourceIdentifier restorableDroppedDatabaseId, CatalogCollationType? catalogCollation, bool? isZoneRedundant, DatabaseLicenseType? licenseType, long? maxLogSizeBytes, DateTimeOffset? earliestRestoreOn, DatabaseReadScale? readScale, int? highAvailabilityReplicaCount, SecondaryType? secondaryType, SqlSku currentSku, int? autoPauseDelay, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, double? minCapacity, DateTimeOffset? pausedOn, DateTimeOffset? resumedOn, ResourceIdentifier maintenanceConfigurationId, bool? isLedgerOn, bool? isInfraEncryptionEnabled, Guid? federatedClientId, IDictionary keys, string encryptionProtector, SqlAlwaysEncryptedEnclaveType? preferredEnclaveType, ResourceIdentifier sourceResourceId, bool? manualCutover, bool? performCutover, SqlAvailabilityZoneType? availabilityZone) : base(id, name, resourceType, systemData, tags, location) + /// The flag to enable or disable auto rotation of database encryption protector AKV key. + internal SqlDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SqlSku sku, string kind, string managedBy, DatabaseIdentity identity, SqlDatabaseCreateMode? createMode, string collation, long? maxSizeBytes, SampleSchemaName? sampleName, ResourceIdentifier elasticPoolId, ResourceIdentifier sourceDatabaseId, SqlDatabaseStatus? status, Guid? databaseId, DateTimeOffset? createdOn, string currentServiceObjectiveName, string requestedServiceObjectiveName, AzureLocation? defaultSecondaryLocation, ResourceIdentifier failoverGroupId, DateTimeOffset? restorePointInTime, DateTimeOffset? sourceDatabaseDeletedOn, ResourceIdentifier recoveryServicesRecoveryPointId, ResourceIdentifier longTermRetentionBackupResourceId, ResourceIdentifier recoverableDatabaseId, ResourceIdentifier restorableDroppedDatabaseId, CatalogCollationType? catalogCollation, bool? isZoneRedundant, DatabaseLicenseType? licenseType, long? maxLogSizeBytes, DateTimeOffset? earliestRestoreOn, DatabaseReadScale? readScale, int? highAvailabilityReplicaCount, SecondaryType? secondaryType, SqlSku currentSku, int? autoPauseDelay, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, double? minCapacity, DateTimeOffset? pausedOn, DateTimeOffset? resumedOn, ResourceIdentifier maintenanceConfigurationId, bool? isLedgerOn, bool? isInfraEncryptionEnabled, Guid? federatedClientId, IDictionary keys, string encryptionProtector, SqlAlwaysEncryptedEnclaveType? preferredEnclaveType, bool? useFreeLimit, FreeLimitExhaustionBehavior? freeLimitExhaustionBehavior, ResourceIdentifier sourceResourceId, bool? manualCutover, bool? performCutover, SqlAvailabilityZoneType? availabilityZone, bool? encryptionProtectorAutoRotation) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Kind = kind; @@ -190,10 +199,13 @@ internal SqlDatabaseData(ResourceIdentifier id, string name, ResourceType resour Keys = keys; EncryptionProtector = encryptionProtector; PreferredEnclaveType = preferredEnclaveType; + UseFreeLimit = useFreeLimit; + FreeLimitExhaustionBehavior = freeLimitExhaustionBehavior; SourceResourceId = sourceResourceId; ManualCutover = manualCutover; PerformCutover = performCutover; AvailabilityZone = availabilityZone; + EncryptionProtectorAutoRotation = encryptionProtectorAutoRotation; } /// @@ -317,6 +329,16 @@ internal SqlDatabaseData(ResourceIdentifier id, string name, ResourceType resour public string EncryptionProtector { get; set; } /// Type of enclave requested on the database i.e. Default or VBS enclaves. public SqlAlwaysEncryptedEnclaveType? PreferredEnclaveType { get; set; } + /// Whether or not the database uses free monthly limits. Allowed on one database in a subscription. + public bool? UseFreeLimit { get; set; } + /// + /// Specifies the behavior when monthly free limits are exhausted for the free database. + /// + /// AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. + /// + /// BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed. + /// + public FreeLimitExhaustionBehavior? FreeLimitExhaustionBehavior { get; set; } /// /// The resource identifier of the source associated with the create operation of this database. /// @@ -355,5 +377,7 @@ internal SqlDatabaseData(ResourceIdentifier id, string name, ResourceType resour public bool? PerformCutover { get; set; } /// Specifies the availability zone the database is pinned to. public SqlAvailabilityZoneType? AvailabilityZone { get; set; } + /// The flag to enable or disable auto rotation of database encryption protector AKV key. + public bool? EncryptionProtectorAutoRotation { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionData.cs index 47a03e2b1269..fe6320781413 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionData.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources.Models; @@ -21,6 +22,7 @@ public partial class SqlPrivateEndpointConnectionData : ResourceData /// Initializes a new instance of SqlPrivateEndpointConnectionData. public SqlPrivateEndpointConnectionData() { + GroupIds = new ChangeTrackingList(); } /// Initializes a new instance of SqlPrivateEndpointConnectionData. @@ -29,11 +31,13 @@ public SqlPrivateEndpointConnectionData() /// The resourceType. /// The systemData. /// Private endpoint which the connection belongs to. + /// Group IDs. /// Connection state of the private endpoint connection. /// State of the private endpoint connection. - internal SqlPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WritableSubResource privateEndpoint, SqlPrivateLinkServiceConnectionStateProperty connectionState, SqlPrivateEndpointProvisioningState? provisioningState) : base(id, name, resourceType, systemData) + internal SqlPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WritableSubResource privateEndpoint, IReadOnlyList groupIds, SqlPrivateLinkServiceConnectionStateProperty connectionState, SqlPrivateEndpointProvisioningState? provisioningState) : base(id, name, resourceType, systemData) { PrivateEndpoint = privateEndpoint; + GroupIds = groupIds; ConnectionState = connectionState; ProvisioningState = provisioningState; } @@ -52,6 +56,8 @@ public ResourceIdentifier PrivateEndpointId } } + /// Group IDs. + public IReadOnlyList GroupIds { get; } /// Connection state of the private endpoint connection. public SqlPrivateLinkServiceConnectionStateProperty ConnectionState { get; set; } /// State of the private endpoint connection. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs index 3ba0dde5c8b4..febef08699f9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs @@ -49,8 +49,9 @@ public SqlServerData(AzureLocation location) : base(location) /// A CMK URI of the key to use for encryption. /// The Azure Active Directory administrator of the server. This can only be used at server create time. If used for server update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. /// Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. /// Status of external governance. - internal SqlServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, string administratorLogin, string administratorLoginPassword, string version, string state, string fullyQualifiedDomainName, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, ServerNetworkAccessFlag? publicNetworkAccess, ServerWorkspaceFeature? workspaceFeature, ResourceIdentifier primaryUserAssignedIdentityId, Guid? federatedClientId, Uri keyId, ServerExternalAdministrator administrators, ServerNetworkAccessFlag? restrictOutboundNetworkAccess, ExternalGovernanceStatus? externalGovernanceStatus) : base(id, name, resourceType, systemData, tags, location) + internal SqlServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, string administratorLogin, string administratorLoginPassword, string version, string state, string fullyQualifiedDomainName, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, ServerNetworkAccessFlag? publicNetworkAccess, ServerWorkspaceFeature? workspaceFeature, ResourceIdentifier primaryUserAssignedIdentityId, Guid? federatedClientId, Uri keyId, ServerExternalAdministrator administrators, ServerNetworkAccessFlag? restrictOutboundNetworkAccess, ServerNetworkAccessFlag? isIPv6Enabled, ExternalGovernanceStatus? externalGovernanceStatus) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Kind = kind; @@ -68,6 +69,7 @@ internal SqlServerData(ResourceIdentifier id, string name, ResourceType resource KeyId = keyId; Administrators = administrators; RestrictOutboundNetworkAccess = restrictOutboundNetworkAccess; + IsIPv6Enabled = isIPv6Enabled; ExternalGovernanceStatus = externalGovernanceStatus; } @@ -103,6 +105,8 @@ internal SqlServerData(ResourceIdentifier id, string name, ResourceType resource public ServerExternalAdministrator Administrators { get; set; } /// Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. public ServerNetworkAccessFlag? RestrictOutboundNetworkAccess { get; set; } + /// Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + public ServerNetworkAccessFlag? IsIPv6Enabled { get; set; } /// Status of external governance. public ExternalGovernanceStatus? ExternalGovernanceStatus { get; } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs index 32be4fa6306d..6cc822786c4a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs @@ -1473,59 +1473,6 @@ public virtual Response GetRestorableDroppedD return GetRestorableDroppedDatabases().Get(restorableDroppedDatabaseId, expand, filter, cancellationToken); } - /// Gets a collection of FailoverGroupResources in the SqlServer. - /// An object representing collection of FailoverGroupResources and their operations over a FailoverGroupResource. - public virtual FailoverGroupCollection GetFailoverGroups() - { - return GetCachedClient(Client => new FailoverGroupCollection(Client, Id)); - } - - /// - /// Gets a failover group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName} - /// - /// - /// Operation Id - /// FailoverGroups_Get - /// - /// - /// - /// The name of the failover group. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetFailoverGroupAsync(string failoverGroupName, CancellationToken cancellationToken = default) - { - return await GetFailoverGroups().GetAsync(failoverGroupName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a failover group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName} - /// - /// - /// Operation Id - /// FailoverGroups_Get - /// - /// - /// - /// The name of the failover group. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetFailoverGroup(string failoverGroupName, CancellationToken cancellationToken = default) - { - return GetFailoverGroups().Get(failoverGroupName, cancellationToken); - } - /// Gets a collection of IPv6FirewallRuleResources in the SqlServer. /// An object representing collection of IPv6FirewallRuleResources and their operations over a IPv6FirewallRuleResource. public virtual IPv6FirewallRuleCollection GetIPv6FirewallRules() @@ -1628,6 +1575,59 @@ public virtual Response GetSqlServe return GetSqlServerSqlVulnerabilityAssessments().Get(vulnerabilityAssessmentName, cancellationToken); } + /// Gets a collection of FailoverGroupResources in the SqlServer. + /// An object representing collection of FailoverGroupResources and their operations over a FailoverGroupResource. + public virtual FailoverGroupCollection GetFailoverGroups() + { + return GetCachedClient(Client => new FailoverGroupCollection(Client, Id)); + } + + /// + /// Gets a failover group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName} + /// + /// + /// Operation Id + /// FailoverGroups_Get + /// + /// + /// + /// The name of the failover group. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetFailoverGroupAsync(string failoverGroupName, CancellationToken cancellationToken = default) + { + return await GetFailoverGroups().GetAsync(failoverGroupName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a failover group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName} + /// + /// + /// Operation Id + /// FailoverGroups_Get + /// + /// + /// + /// The name of the failover group. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetFailoverGroup(string failoverGroupName, CancellationToken cancellationToken = default) + { + return GetFailoverGroups().Get(failoverGroupName, cancellationToken); + } + /// /// Gets a server. /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md index d2614619d89b..aa37bac84730 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md @@ -5,7 +5,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true tag: package-composite-v5 -require: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/sql/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/sql/resource-manager/readme.md namespace: Azure.ResourceManager.Sql output-folder: $(this-folder)/Generated clear-output-folder: true