diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md b/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md index e6321f3e7357..f2292df907df 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.3.0-beta.2 (Unreleased) +## 1.3.0-beta.2 (2023-07-31) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Supported Sql Elastic Pool creation and update with `PreferredEnclaveType`. ## 1.3.0-beta.1 (2023-05-31) 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 289c9ac3937a..a1e1fa3cc57d 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 @@ -245,6 +245,7 @@ protected ElasticPoolCollection() { } public partial class ElasticPoolData : Azure.ResourceManager.Models.TrackedResourceData { public ElasticPoolData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType? AvailabilityZone { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public int? HighAvailabilityReplicaCount { get { throw null; } set { } } public bool? IsZoneRedundant { get { throw null; } set { } } @@ -252,7 +253,9 @@ public ElasticPoolData(Azure.Core.AzureLocation location) : base (default(Azure. public Azure.ResourceManager.Sql.Models.ElasticPoolLicenseType? LicenseType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier MaintenanceConfigurationId { get { throw null; } set { } } public long? MaxSizeBytes { get { throw null; } set { } } + public double? MinCapacity { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ElasticPoolPerDatabaseSettings PerDatabaseSettings { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType? PreferredEnclaveType { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlSku Sku { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ElasticPoolState? State { get { throw null; } } } @@ -464,7 +467,10 @@ protected FailoverGroupCollection() { } public partial class FailoverGroupData : Azure.ResourceManager.Models.ResourceData { public FailoverGroupData() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] public System.Collections.Generic.IList Databases { get { throw null; } } + 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 { } } @@ -494,6 +500,8 @@ protected FailoverGroupResource() { } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation TryPlannedBeforeForcedFailover(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TryPlannedBeforeForcedFailoverAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.FailoverGroupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.FailoverGroupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -928,12 +936,13 @@ public ManagedDatabaseData(Azure.Core.AzureLocation location) : base (default(Az public string Collation { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public Azure.ResourceManager.Sql.Models.ManagedDatabaseCreateMode? CreateMode { get { throw null; } set { } } - public string CrossSubscriptionRestorableDroppedDatabaseId { get { throw null; } set { } } - public string CrossSubscriptionSourceDatabaseId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier CrossSubscriptionRestorableDroppedDatabaseId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier CrossSubscriptionSourceDatabaseId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier CrossSubscriptionTargetManagedInstanceId { get { throw null; } set { } } public Azure.Core.AzureLocation? DefaultSecondaryLocation { get { throw null; } } public System.DateTimeOffset? EarliestRestorePoint { get { throw null; } } public Azure.Core.ResourceIdentifier FailoverGroupId { get { throw null; } } + public bool? IsLedgerOn { get { throw null; } set { } } public string LastBackupName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier LongTermRetentionBackupResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier RecoverableDatabaseId { get { throw null; } set { } } @@ -1398,6 +1407,8 @@ public ManagedInstanceData(Azure.Core.AzureLocation location) : base (default(Az public string Collation { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? CurrentBackupStorageRedundancy { get { throw null; } } public string DnsZone { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] public string DnsZonePartner { get { throw null; } set { } } public string FullyQualifiedDomainName { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } @@ -1407,6 +1418,7 @@ public ManagedInstanceData(Azure.Core.AzureLocation location) : base (default(Az public System.Uri KeyId { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? LicenseType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier MaintenanceConfigurationId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ManagedDnsZonePartner { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? ManagedInstanceCreateMode { get { throw null; } set { } } public string MinimalTlsVersion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrimaryUserAssignedIdentityId { get { throw null; } set { } } @@ -2189,12 +2201,20 @@ protected RecommendedActionResource() { } public partial class RecoverableDatabaseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected RecoverableDatabaseCollection() { } - public virtual Azure.Response Exists(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string databaseName, string expand = null, string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response Exists(string databaseName, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string databaseName, string expand = null, string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> ExistsAsync(string databaseName, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.Response Get(string databaseName, string expand = null, string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response Get(string databaseName, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string databaseName, string expand = null, string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> GetAsync(string databaseName, System.Threading.CancellationToken cancellationToken) { throw null; } System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } @@ -2204,6 +2224,7 @@ public partial class RecoverableDatabaseData : Azure.ResourceManager.Models.Reso public RecoverableDatabaseData() { } public string Edition { get { throw null; } } public string ElasticPoolName { get { throw null; } } + public System.Collections.Generic.IDictionary Keys { get { throw null; } } public System.DateTimeOffset? LastAvailableBackupOn { get { throw null; } } public string ServiceLevelObjective { get { throw null; } } } @@ -2214,8 +2235,12 @@ protected RecoverableDatabaseResource() { } public virtual Azure.ResourceManager.Sql.RecoverableDatabaseData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serverName, string databaseName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string expand = null, string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string expand = null, string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken) { throw null; } } public partial class RecoverableManagedDatabaseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -4388,8 +4413,12 @@ protected SqlServerResource() { } public virtual Azure.Response GetOutboundFirewallRule(string outboundRuleFqdn, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetOutboundFirewallRuleAsync(string outboundRuleFqdn, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Sql.OutboundFirewallRuleCollection GetOutboundFirewallRules() { throw null; } - public virtual Azure.Response GetRecoverableDatabase(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetRecoverableDatabaseAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetRecoverableDatabase(string databaseName, string expand = null, string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Response GetRecoverableDatabase(string databaseName, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> GetRecoverableDatabaseAsync(string databaseName, string expand = null, string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> GetRecoverableDatabaseAsync(string databaseName, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual Azure.ResourceManager.Sql.RecoverableDatabaseCollection GetRecoverableDatabases() { throw null; } public virtual Azure.Pageable GetReplicationLinks(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetReplicationLinksAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4827,6 +4856,7 @@ public SqlVulnerabilityAssessmentScanData() { } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public int? HighSeverityFailedRulesCount { get { throw null; } } public bool? IsBaselineApplied { get { throw null; } } + public System.DateTimeOffset? LastScanOn { get { throw null; } } public int? LowSeverityFailedRulesCount { get { throw null; } } public int? MediumSeverityFailedRulesCount { get { throw null; } } public string ScanId { get { throw null; } } @@ -5305,7 +5335,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.DistributedAvailabilityGroupData DistributedAvailabilityGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string targetDatabase = null, string sourceEndpoint = null, string primaryAvailabilityGroupName = null, string secondaryAvailabilityGroupName = null, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode? replicationMode = default(Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode?), System.Guid? distributedAvailabilityGroupId = default(System.Guid?), System.Guid? sourceReplicaId = default(System.Guid?), System.Guid? targetReplicaId = default(System.Guid?), string linkState = null, string lastHardenedLsn = null) { throw null; } public static Azure.ResourceManager.Sql.Models.EditionCapability EditionCapability(string name = null, System.Collections.Generic.IEnumerable supportedServiceLevelObjectives = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.Sql.Models.ReadScaleCapability readScale = null, System.Collections.Generic.IEnumerable supportedStorageCapabilities = null, Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ElasticPoolActivity ElasticPoolActivity(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.DateTimeOffset? endOn = default(System.DateTimeOffset?), int? errorCode = default(int?), string errorMessage = null, int? errorSeverity = default(int?), string operation = null, System.Guid? operationId = default(System.Guid?), int? percentComplete = default(int?), int? requestedDatabaseDtuMax = default(int?), int? requestedDatabaseDtuMin = default(int?), int? requestedDtu = default(int?), string requestedElasticPoolName = null, long? requestedStorageLimitInGB = default(long?), string elasticPoolName = null, string serverName = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), string state = null, int? requestedStorageLimitInMB = default(int?), int? requestedDatabaseDtuGuarantee = default(int?), int? requestedDatabaseDtuCap = default(int?), int? requestedDtuGuarantee = default(int?)) { throw null; } - public static Azure.ResourceManager.Sql.ElasticPoolData ElasticPoolData(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, Azure.ResourceManager.Sql.Models.ElasticPoolState? state = default(Azure.ResourceManager.Sql.Models.ElasticPoolState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), long? maxSizeBytes = default(long?), Azure.ResourceManager.Sql.Models.ElasticPoolPerDatabaseSettings perDatabaseSettings = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.Sql.Models.ElasticPoolLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ElasticPoolLicenseType?), Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, int? highAvailabilityReplicaCount = default(int?)) { throw null; } + public static Azure.ResourceManager.Sql.ElasticPoolData ElasticPoolData(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, Azure.ResourceManager.Sql.Models.ElasticPoolState? state = default(Azure.ResourceManager.Sql.Models.ElasticPoolState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), long? maxSizeBytes = default(long?), double? minCapacity = default(double?), Azure.ResourceManager.Sql.Models.ElasticPoolPerDatabaseSettings perDatabaseSettings = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.Sql.Models.ElasticPoolLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ElasticPoolLicenseType?), Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, int? highAvailabilityReplicaCount = default(int?), Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType? preferredEnclaveType = default(Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType?), Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType? availabilityZone = default(Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType?)) { throw null; } public static Azure.ResourceManager.Sql.Models.ElasticPoolDatabaseActivity ElasticPoolDatabaseActivity(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 databaseName = null, System.DateTimeOffset? endOn = default(System.DateTimeOffset?), int? errorCode = default(int?), string errorMessage = null, int? errorSeverity = default(int?), string operation = null, System.Guid? operationId = default(System.Guid?), int? percentComplete = default(int?), string requestedElasticPoolName = null, string currentElasticPoolName = null, string currentServiceObjective = null, string requestedServiceObjective = null, string serverName = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), string state = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ElasticPoolEditionCapability ElasticPoolEditionCapability(string name = null, System.Collections.Generic.IEnumerable supportedElasticPoolPerformanceLevels = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ElasticPoolOperationData ElasticPoolOperationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string elasticPoolName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = default(int?), string serverName = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), string state = null, int? errorCode = default(int?), string errorDescription = null, int? errorSeverity = default(int?), bool? isUserError = default(bool?), System.DateTimeOffset? estimatedCompleteOn = default(System.DateTimeOffset?), string description = null, bool? isCancellable = default(bool?)) { throw null; } @@ -5316,7 +5346,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 databases = 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.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.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; } @@ -5341,7 +5371,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.MaintenanceWindowsData MaintenanceWindowsData(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.IEnumerable timeRanges = null) { throw null; } public static Azure.ResourceManager.Sql.ManagedBackupShortTermRetentionPolicyData ManagedBackupShortTermRetentionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? retentionDays = default(int?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedDatabaseAdvancedThreatProtectionData ManagedDatabaseAdvancedThreatProtectionData(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.AdvancedThreatProtectionState? state = default(Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.Sql.ManagedDatabaseData ManagedDatabaseData(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), string collation = null, Azure.ResourceManager.Sql.Models.ManagedDatabaseStatus? status = default(Azure.ResourceManager.Sql.Models.ManagedDatabaseStatus?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? earliestRestorePoint = default(System.DateTimeOffset?), System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.Core.AzureLocation? defaultSecondaryLocation = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Sql.Models.CatalogCollationType? catalogCollation = default(Azure.ResourceManager.Sql.Models.CatalogCollationType?), Azure.ResourceManager.Sql.Models.ManagedDatabaseCreateMode? createMode = default(Azure.ResourceManager.Sql.Models.ManagedDatabaseCreateMode?), System.Uri storageContainerUri = null, Azure.Core.ResourceIdentifier sourceDatabaseId = null, string crossSubscriptionSourceDatabaseId = null, Azure.Core.ResourceIdentifier restorableDroppedDatabaseId = null, string crossSubscriptionRestorableDroppedDatabaseId = null, string storageContainerIdentity = null, string storageContainerSasToken = null, Azure.Core.ResourceIdentifier failoverGroupId = null, Azure.Core.ResourceIdentifier recoverableDatabaseId = null, Azure.Core.ResourceIdentifier longTermRetentionBackupResourceId = null, bool? allowAutoCompleteRestore = default(bool?), string lastBackupName = null, Azure.Core.ResourceIdentifier crossSubscriptionTargetManagedInstanceId = null) { throw null; } + public static Azure.ResourceManager.Sql.ManagedDatabaseData ManagedDatabaseData(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), string collation = null, Azure.ResourceManager.Sql.Models.ManagedDatabaseStatus? status = default(Azure.ResourceManager.Sql.Models.ManagedDatabaseStatus?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? earliestRestorePoint = default(System.DateTimeOffset?), System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.Core.AzureLocation? defaultSecondaryLocation = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Sql.Models.CatalogCollationType? catalogCollation = default(Azure.ResourceManager.Sql.Models.CatalogCollationType?), Azure.ResourceManager.Sql.Models.ManagedDatabaseCreateMode? createMode = default(Azure.ResourceManager.Sql.Models.ManagedDatabaseCreateMode?), System.Uri storageContainerUri = null, Azure.Core.ResourceIdentifier sourceDatabaseId = null, Azure.Core.ResourceIdentifier crossSubscriptionSourceDatabaseId = null, Azure.Core.ResourceIdentifier restorableDroppedDatabaseId = null, Azure.Core.ResourceIdentifier crossSubscriptionRestorableDroppedDatabaseId = null, string storageContainerIdentity = null, string storageContainerSasToken = null, Azure.Core.ResourceIdentifier failoverGroupId = null, Azure.Core.ResourceIdentifier recoverableDatabaseId = null, Azure.Core.ResourceIdentifier longTermRetentionBackupResourceId = null, bool? allowAutoCompleteRestore = default(bool?), string lastBackupName = null, Azure.Core.ResourceIdentifier crossSubscriptionTargetManagedInstanceId = null, bool? isLedgerOn = default(bool?)) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedDatabaseRestoreDetailBackupSetProperties ManagedDatabaseRestoreDetailBackupSetProperties(string status = null, string firstStripeName = null, int? numberOfStripes = default(int?), int? backupSizeInMB = default(int?), System.DateTimeOffset? restoreStartedOn = default(System.DateTimeOffset?), System.DateTimeOffset? restoreFinishedOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedDatabaseRestoreDetailData ManagedDatabaseRestoreDetailData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string restoreType = null, string status = null, string blockReason = null, string lastUploadedFileName = null, System.DateTimeOffset? lastUploadedFileOn = default(System.DateTimeOffset?), string lastRestoredFileName = null, System.DateTimeOffset? lastRestoredFileOn = default(System.DateTimeOffset?), int? completedPercent = default(int?), int? currentRestoredSizeInMB = default(int?), int? currentRestorePlanSizeInMB = default(int?), string currentBackupType = null, string currentRestoringFileName = null, int? numberOfFilesFound = default(int?), int? numberOfFilesQueued = default(int?), int? numberOfFilesSkipped = default(int?), int? numberOfFilesRestoring = default(int?), int? numberOfFilesRestored = default(int?), int? numberOfFilesUnrestorable = default(int?), System.Collections.Generic.IEnumerable fullBackupSets = null, System.Collections.Generic.IEnumerable diffBackupSets = null, System.Collections.Generic.IEnumerable logBackupSets = null, System.Collections.Generic.IEnumerable unrestorableFileList = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedDatabaseRestoreDetailUnrestorableFileProperties ManagedDatabaseRestoreDetailUnrestorableFileProperties(string name = null) { throw null; } @@ -5349,7 +5379,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.ManagedInstanceAdministratorData ManagedInstanceAdministratorData(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.ManagedInstanceAdministratorType? administratorType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceAdministratorType?), string login = null, System.Guid? sid = default(System.Guid?), System.Guid? tenantId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceAdvancedThreatProtectionData ManagedInstanceAdvancedThreatProtectionData(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.AdvancedThreatProtectionState? state = default(Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceAzureADOnlyAuthenticationData ManagedInstanceAzureADOnlyAuthenticationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isAzureADOnlyAuthenticationEnabled = default(bool?)) { throw null; } - public static Azure.ResourceManager.Sql.ManagedInstanceData ManagedInstanceData(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, Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), int? vCores = default(int?), int? storageSizeInGB = default(int?), string collation = null, string dnsZone = null, string dnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null) { throw null; } + public static Azure.ResourceManager.Sql.ManagedInstanceData ManagedInstanceData(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, Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), int? vCores = default(int?), int? storageSizeInGB = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceDtcData ManagedInstanceDtcData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? dtcEnabled = default(bool?), Azure.ResourceManager.Sql.Models.ManagedInstanceDtcSecuritySettings securitySettings = null, System.Collections.Generic.IEnumerable externalDnsSuffixSearchList = null, string dtcHostNameDnsSuffix = null, Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState?)) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstanceEditionCapability ManagedInstanceEditionCapability(string name = null, System.Collections.Generic.IEnumerable supportedFamilies = null, System.Collections.Generic.IEnumerable supportedStorageCapabilities = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceEncryptionProtectorData ManagedInstanceEncryptionProtectorData(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, string serverKeyName = null, Azure.ResourceManager.Sql.Models.SqlServerKeyType? serverKeyType = default(Azure.ResourceManager.Sql.Models.SqlServerKeyType?), System.Uri uri = null, string thumbprint = null, bool? isAutoRotationEnabled = default(bool?)) { throw null; } @@ -5401,7 +5431,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.Models.RecommendedActionMetricInfo RecommendedActionMetricInfo(string metricName = null, string unit = null, string timeGrain = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), double? value = default(double?)) { throw null; } public static Azure.ResourceManager.Sql.Models.RecommendedActionStateInfo RecommendedActionStateInfo(Azure.ResourceManager.Sql.Models.RecommendedActionCurrentState currentValue = default(Azure.ResourceManager.Sql.Models.RecommendedActionCurrentState), Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy? actionInitiatedBy = default(Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy?), System.DateTimeOffset? lastModified = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.Models.RecommendedSensitivityLabelUpdate RecommendedSensitivityLabelUpdate(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.RecommendedSensitivityLabelUpdateKind? op = default(Azure.ResourceManager.Sql.Models.RecommendedSensitivityLabelUpdateKind?), string schema = null, string table = null, string column = null) { throw null; } - public static Azure.ResourceManager.Sql.RecoverableDatabaseData RecoverableDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string edition = null, string serviceLevelObjective = null, string elasticPoolName = null, System.DateTimeOffset? lastAvailableBackupOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.Sql.RecoverableDatabaseData RecoverableDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string edition = null, string serviceLevelObjective = null, string elasticPoolName = null, System.DateTimeOffset? lastAvailableBackupOn = default(System.DateTimeOffset?), System.Collections.Generic.IDictionary keys = null) { throw null; } public static Azure.ResourceManager.Sql.RecoverableManagedDatabaseData RecoverableManagedDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string lastAvailableBackupDate = null) { throw null; } public static Azure.ResourceManager.Sql.Models.RefreshExternalGovernanceStatusOperationResult RefreshExternalGovernanceStatusOperationResult(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 serverName = null, string status = null, string errorMessage = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ResourceWithWritableName ResourceWithWritableName(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?)) { throw null; } @@ -5478,7 +5508,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentQueryCheck SqlVulnerabilityAssessmentQueryCheck(string query = null, System.Collections.Generic.IEnumerable> expectedResult = null, System.Collections.Generic.IEnumerable columnNames = null) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentRemediation SqlVulnerabilityAssessmentRemediation(string description = null, System.Collections.Generic.IEnumerable scripts = null, bool? isAutomated = default(bool?), string portalLink = null) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentRuleMetadata SqlVulnerabilityAssessmentRuleMetadata(string ruleId = null, Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentRuleSeverity? severity = default(Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentRuleSeverity?), string category = null, Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentRuleType? ruleType = default(Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentRuleType?), string title = null, string description = null, string rationale = null, Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentQueryCheck queryCheck = null, System.Collections.Generic.IEnumerable benchmarkReferences = null) { throw null; } - public static Azure.ResourceManager.Sql.SqlVulnerabilityAssessmentScanData SqlVulnerabilityAssessmentScanData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string scanId = null, Azure.ResourceManager.Sql.Models.VulnerabilityAssessmentScanTriggerType? triggerType = default(Azure.ResourceManager.Sql.Models.VulnerabilityAssessmentScanTriggerType?), Azure.ResourceManager.Sql.Models.VulnerabilityAssessmentScanState? state = default(Azure.ResourceManager.Sql.Models.VulnerabilityAssessmentScanState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, string server = null, string database = null, string sqlVersion = null, int? highSeverityFailedRulesCount = default(int?), int? mediumSeverityFailedRulesCount = default(int?), int? lowSeverityFailedRulesCount = default(int?), int? totalPassedRulesCount = default(int?), int? totalFailedRulesCount = default(int?), int? totalRulesCount = default(int?), bool? isBaselineApplied = default(bool?)) { throw null; } + public static Azure.ResourceManager.Sql.SqlVulnerabilityAssessmentScanData SqlVulnerabilityAssessmentScanData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string scanId = null, Azure.ResourceManager.Sql.Models.VulnerabilityAssessmentScanTriggerType? triggerType = default(Azure.ResourceManager.Sql.Models.VulnerabilityAssessmentScanTriggerType?), Azure.ResourceManager.Sql.Models.VulnerabilityAssessmentScanState? state = default(Azure.ResourceManager.Sql.Models.VulnerabilityAssessmentScanState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, string server = null, string database = null, string sqlVersion = null, int? highSeverityFailedRulesCount = default(int?), int? mediumSeverityFailedRulesCount = default(int?), int? lowSeverityFailedRulesCount = default(int?), int? totalPassedRulesCount = default(int?), int? totalFailedRulesCount = default(int?), int? totalRulesCount = default(int?), bool? isBaselineApplied = default(bool?), System.DateTimeOffset? lastScanOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentScanError SqlVulnerabilityAssessmentScanError(string code = null, string message = null) { throw null; } public static Azure.ResourceManager.Sql.SqlVulnerabilityAssessmentScanResultData SqlVulnerabilityAssessmentScanResultData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string ruleId = null, Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentRuleStatus? status = default(Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentRuleStatus?), string errorMessage = null, bool? isTrimmed = default(bool?), System.Collections.Generic.IEnumerable> queryResults = null, Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentRemediation remediation = null, Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentBaselineAdjustedResult baselineAdjustedResult = null, Azure.ResourceManager.Sql.Models.SqlVulnerabilityAssessmentRuleMetadata ruleMetadata = null) { throw null; } public static Azure.ResourceManager.Sql.Models.StorageCapability StorageCapability(Azure.ResourceManager.Sql.Models.StorageCapabilityStorageAccountType? storageAccountType = default(Azure.ResourceManager.Sql.Models.StorageCapabilityStorageAccountType?), Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } @@ -6044,12 +6074,15 @@ public ElasticPoolOperationData() { } public partial class ElasticPoolPatch { public ElasticPoolPatch() { } + public Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType? AvailabilityZone { get { throw null; } set { } } public int? HighAvailabilityReplicaCount { get { throw null; } set { } } public bool? IsZoneRedundant { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ElasticPoolLicenseType? LicenseType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier MaintenanceConfigurationId { get { throw null; } set { } } public long? MaxSizeBytes { get { throw null; } set { } } + public double? MinCapacity { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ElasticPoolPerDatabaseSettings PerDatabaseSettings { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType? PreferredEnclaveType { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlSku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } } @@ -6691,12 +6724,13 @@ public ManagedDatabasePatch() { } public string Collation { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public Azure.ResourceManager.Sql.Models.ManagedDatabaseCreateMode? CreateMode { get { throw null; } set { } } - public string CrossSubscriptionRestorableDroppedDatabaseId { get { throw null; } set { } } - public string CrossSubscriptionSourceDatabaseId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier CrossSubscriptionRestorableDroppedDatabaseId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier CrossSubscriptionSourceDatabaseId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier CrossSubscriptionTargetManagedInstanceId { get { throw null; } set { } } public Azure.Core.AzureLocation? DefaultSecondaryLocation { get { throw null; } } public System.DateTimeOffset? EarliestRestorePoint { get { throw null; } } public Azure.Core.ResourceIdentifier FailoverGroupId { get { throw null; } } + public bool? IsLedgerOn { get { throw null; } set { } } public string LastBackupName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier LongTermRetentionBackupResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier RecoverableDatabaseId { get { throw null; } set { } } @@ -6914,6 +6948,7 @@ public ManagedInstancePatch() { } public System.Uri KeyId { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? LicenseType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier MaintenanceConfigurationId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ManagedDnsZonePartner { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? ManagedInstanceCreateMode { 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/assets.json b/sdk/sqlmanagement/Azure.ResourceManager.Sql/assets.json index d5cbdabd337e..8071e469533b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/assets.json +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/sqlmanagement/Azure.ResourceManager.Sql", - "Tag": "net/sqlmanagement/Azure.ResourceManager.Sql_2430b66b98" + "Tag": "net/sqlmanagement/Azure.ResourceManager.Sql_6c92b7d572" } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolCollection.cs index d52546a86af6..6e7898df7ea3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ElasticPoolCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAllElasticPoolsInAServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolListByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolListByServer.json // this example is just showing the usage of "ElasticPools_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_GetAllElasticPoolsInAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAHyperscaleElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/HyperscaleElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/HyperscaleElasticPoolGet.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetAHyperscaleElasticPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAHyperscaleElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/HyperscaleElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/HyperscaleElasticPoolGet.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetAHyperscaleElasticPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolGet.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Get_GetAnElasticPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolGet.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,12 +187,191 @@ public async Task Exists_GetAnElasticPool() Console.WriteLine($"Succeeded: {result}"); } + // Get an elastic pool with Availability Zone + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAnElasticPoolWithAvailabilityZone() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/GetElasticPoolWithAvailabilityZone.json + // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerResource created on azure + // for more information of creating SqlServerResource, please refer to the document of SqlServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "sqlcrudtest-2369"; + string serverName = "sqlcrudtest-8069"; + ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); + + // get the collection of this ElasticPoolResource + ElasticPoolCollection collection = sqlServer.GetElasticPools(); + + // invoke the operation + string elasticPoolName = "sqlcrudtest-8102"; + ElasticPoolResource result = await collection.GetAsync(elasticPoolName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get an elastic pool with Availability Zone + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAnElasticPoolWithAvailabilityZone() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/GetElasticPoolWithAvailabilityZone.json + // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerResource created on azure + // for more information of creating SqlServerResource, please refer to the document of SqlServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "sqlcrudtest-2369"; + string serverName = "sqlcrudtest-8069"; + ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); + + // get the collection of this ElasticPoolResource + ElasticPoolCollection collection = sqlServer.GetElasticPools(); + + // invoke the operation + string elasticPoolName = "sqlcrudtest-8102"; + bool result = await collection.ExistsAsync(elasticPoolName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get an elastic pool with preferred enclave type parameter + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAnElasticPoolWithPreferredEnclaveTypeParameter() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolGetWithPreferredEnclaveType.json + // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerResource created on azure + // for more information of creating SqlServerResource, please refer to the document of SqlServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "sqlcrudtest-2369"; + string serverName = "sqlcrudtest-8069"; + ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); + + // get the collection of this ElasticPoolResource + ElasticPoolCollection collection = sqlServer.GetElasticPools(); + + // invoke the operation + string elasticPoolName = "sqlcrudtest-8102"; + ElasticPoolResource result = await collection.GetAsync(elasticPoolName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get an elastic pool with preferred enclave type parameter + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAnElasticPoolWithPreferredEnclaveTypeParameter() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolGetWithPreferredEnclaveType.json + // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerResource created on azure + // for more information of creating SqlServerResource, please refer to the document of SqlServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "sqlcrudtest-2369"; + string serverName = "sqlcrudtest-8069"; + ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); + + // get the collection of this ElasticPoolResource + ElasticPoolCollection collection = sqlServer.GetElasticPools(); + + // invoke the operation + string elasticPoolName = "sqlcrudtest-8102"; + bool result = await collection.ExistsAsync(elasticPoolName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Create or Update an elastic pool with Availability Zone + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateAnElasticPoolWithAvailabilityZone() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/CreateElasticPoolWithAvailabilityZone.json + // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerResource created on azure + // for more information of creating SqlServerResource, please refer to the document of SqlServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "sqlcrudtest-2369"; + string serverName = "sqlcrudtest-8069"; + ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); + + // get the collection of this ElasticPoolResource + ElasticPoolCollection collection = sqlServer.GetElasticPools(); + + // invoke the operation + string elasticPoolName = "sqlcrudtest-8102"; + ElasticPoolData data = new ElasticPoolData(new AzureLocation("Japan East")) + { + Sku = new SqlSku("HS_Gen5_4"), + PerDatabaseSettings = new ElasticPoolPerDatabaseSettings() + { + MinCapacity = 0.25, + MaxCapacity = 2, + }, + IsZoneRedundant = true, + AvailabilityZone = SqlAvailabilityZoneType.One, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticPoolName, data); + ElasticPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Create or update Hyperscale elastic pool with high availability replica count parameter [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateHyperscaleElasticPoolWithHighAvailabilityReplicaCountParameter() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +412,7 @@ public async Task CreateOrUpdate_CreateOrUpdateHyperscaleElasticPoolWithHighAvai [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithAllParameter() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolCreateOrUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolCreateOrUpdateMax.json // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -282,7 +461,7 @@ public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithAllParameter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithMaintenanceConfigurationParameter() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -322,7 +501,7 @@ public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithMaintenanceConfigu [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithMinimumParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolCreateOrUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolCreateOrUpdateMin.json // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -353,5 +532,87 @@ public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithMinimumParameters( // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + // Create or update elastic pool with preferred enclave type parameter as Default + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsDefault() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolCreateWithDefaultPreferredEnclaveType.json + // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerResource created on azure + // for more information of creating SqlServerResource, please refer to the document of SqlServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "sqlcrudtest-2369"; + string serverName = "sqlcrudtest-8069"; + ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); + + // get the collection of this ElasticPoolResource + ElasticPoolCollection collection = sqlServer.GetElasticPools(); + + // invoke the operation + string elasticPoolName = "sqlcrudtest-8102"; + ElasticPoolData data = new ElasticPoolData(new AzureLocation("Japan East")) + { + Sku = new SqlSku("GP_Gen5_4"), + PreferredEnclaveType = SqlAlwaysEncryptedEnclaveType.Default, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticPoolName, data); + ElasticPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or update elastic pool with preferred enclave type parameter as VBS + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsVBS() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolCreateWithVBSPreferredEnclaveType.json + // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerResource created on azure + // for more information of creating SqlServerResource, please refer to the document of SqlServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "sqlcrudtest-2369"; + string serverName = "sqlcrudtest-8069"; + ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); + + // get the collection of this ElasticPoolResource + ElasticPoolCollection collection = sqlServer.GetElasticPools(); + + // invoke the operation + string elasticPoolName = "sqlcrudtest-8102"; + ElasticPoolData data = new ElasticPoolData(new AzureLocation("Japan East")) + { + Sku = new SqlSku("GP_Gen5_4"), + PreferredEnclaveType = SqlAlwaysEncryptedEnclaveType.Vbs, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticPoolName, data); + ElasticPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolResource.cs index 77ecb7ea76a3..7ca2bf1dc6f2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolResource.cs @@ -203,12 +203,47 @@ public async Task GetElasticPoolOperations_ListTheElasticPoolManagementOperation Console.WriteLine($"Succeeded"); } + // Gets a list of databases in an elastic pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDatabases_GetsAListOfDatabasesInAnElasticPool() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ListDatabasesByElasticPool.json + // this example is just showing the usage of "Databases_ListByElasticPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticPoolResource created on azure + // for more information of creating ElasticPoolResource, please refer to the document of ElasticPoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default-SQL-SouthEastAsia"; + string serverName = "testsvr"; + string elasticPoolName = "pool1"; + ResourceIdentifier elasticPoolResourceId = ElasticPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, elasticPoolName); + ElasticPoolResource elasticPool = client.GetElasticPoolResource(elasticPoolResourceId); + + // invoke the operation and iterate over the result + await foreach (SqlDatabaseResource item in elasticPool.GetDatabasesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlDatabaseData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + // Get a Hyperscale elastic pool [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAHyperscaleElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/HyperscaleElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/HyperscaleElasticPoolGet.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -240,7 +275,71 @@ public async Task Get_GetAHyperscaleElasticPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolGet.json + // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticPoolResource created on azure + // for more information of creating ElasticPoolResource, please refer to the document of ElasticPoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "sqlcrudtest-2369"; + string serverName = "sqlcrudtest-8069"; + string elasticPoolName = "sqlcrudtest-8102"; + ResourceIdentifier elasticPoolResourceId = ElasticPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, elasticPoolName); + ElasticPoolResource elasticPool = client.GetElasticPoolResource(elasticPoolResourceId); + + // invoke the operation + ElasticPoolResource result = await elasticPool.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get an elastic pool with Availability Zone + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAnElasticPoolWithAvailabilityZone() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/GetElasticPoolWithAvailabilityZone.json + // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticPoolResource created on azure + // for more information of creating ElasticPoolResource, please refer to the document of ElasticPoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "sqlcrudtest-2369"; + string serverName = "sqlcrudtest-8069"; + string elasticPoolName = "sqlcrudtest-8102"; + ResourceIdentifier elasticPoolResourceId = ElasticPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, elasticPoolName); + ElasticPoolResource elasticPool = client.GetElasticPoolResource(elasticPoolResourceId); + + // invoke the operation + ElasticPoolResource result = await elasticPool.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get an elastic pool with preferred enclave type parameter + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAnElasticPoolWithPreferredEnclaveTypeParameter() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolGetWithPreferredEnclaveType.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -272,7 +371,7 @@ public async Task Get_GetAnElasticPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolDelete.json // this example is just showing the usage of "ElasticPools_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -300,7 +399,7 @@ public async Task Delete_DeleteAnElasticPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_AssignsMaintenanceConfigurationToAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json // this example is just showing the usage of "ElasticPools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -332,12 +431,88 @@ public async Task Update_AssignsMaintenanceConfigurationToAnElasticPool() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // Create or update elastic pool with preferred enclave type parameter as Default + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsDefault() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolUpdateWithDefaultPreferredEnclaveType.json + // this example is just showing the usage of "ElasticPools_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticPoolResource created on azure + // for more information of creating ElasticPoolResource, please refer to the document of ElasticPoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "sqlcrudtest-2369"; + string serverName = "sqlcrudtest-8069"; + string elasticPoolName = "sqlcrudtest-8102"; + ResourceIdentifier elasticPoolResourceId = ElasticPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, elasticPoolName); + ElasticPoolResource elasticPool = client.GetElasticPoolResource(elasticPoolResourceId); + + // invoke the operation + ElasticPoolPatch patch = new ElasticPoolPatch() + { + Sku = new SqlSku("GP_Gen5_4"), + PreferredEnclaveType = SqlAlwaysEncryptedEnclaveType.Default, + }; + ArmOperation lro = await elasticPool.UpdateAsync(WaitUntil.Completed, patch); + ElasticPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or update elastic pool with preferred enclave type parameter as VBS + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsVBS() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolUpdateWithVBSPreferredEnclaveType.json + // this example is just showing the usage of "ElasticPools_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticPoolResource created on azure + // for more information of creating ElasticPoolResource, please refer to the document of ElasticPoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "sqlcrudtest-2369"; + string serverName = "sqlcrudtest-8069"; + string elasticPoolName = "sqlcrudtest-8102"; + ResourceIdentifier elasticPoolResourceId = ElasticPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, elasticPoolName); + ElasticPoolResource elasticPool = client.GetElasticPoolResource(elasticPoolResourceId); + + // invoke the operation + ElasticPoolPatch patch = new ElasticPoolPatch() + { + Sku = new SqlSku("GP_Gen5_4"), + PreferredEnclaveType = SqlAlwaysEncryptedEnclaveType.Vbs, + }; + ArmOperation lro = await elasticPool.UpdateAsync(WaitUntil.Completed, patch); + ElasticPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Resets maintenance configuration of an elastic pool to default. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ResetsMaintenanceConfigurationOfAnElasticPoolToDefault() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json // this example is just showing the usage of "ElasticPools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -374,7 +549,7 @@ public async Task Update_ResetsMaintenanceConfigurationOfAnElasticPoolToDefault( [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAnElasticPoolWithAllParameter() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolUpdateMax.json // this example is just showing the usage of "ElasticPools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -422,7 +597,7 @@ public async Task Update_UpdateAnElasticPoolWithAllParameter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAnElasticPoolWithMinimumParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolUpdateMin.json // this example is just showing the usage of "ElasticPools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -456,7 +631,7 @@ public async Task Update_UpdateAnElasticPoolWithMinimumParameters() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateHighAvailabilityReplicaCountOfAHyperscaleElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/HyperscaleElasticPoolUpdateSetHighAvailabilityReplicaCount.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/HyperscaleElasticPoolUpdateSetHighAvailabilityReplicaCount.json // this example is just showing the usage of "ElasticPools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -493,7 +668,7 @@ public async Task Update_UpdateHighAvailabilityReplicaCountOfAHyperscaleElasticP [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Failover_FailoverAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/FailoverElasticPool.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/FailoverElasticPool.json // this example is just showing the usage of "ElasticPools_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -515,40 +690,5 @@ public async Task Failover_FailoverAnElasticPool() Console.WriteLine($"Succeeded"); } - - // Gets a list of databases in an elastic pool. - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetDatabases_GetsAListOfDatabasesInAnElasticPool() - { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ListDatabasesByElasticPool.json - // this example is just showing the usage of "Databases_ListByElasticPool" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ElasticPoolResource created on azure - // for more information of creating ElasticPoolResource, please refer to the document of ElasticPoolResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "Default-SQL-SouthEastAsia"; - string serverName = "testsvr"; - string elasticPoolName = "pool1"; - ResourceIdentifier elasticPoolResourceId = ElasticPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, elasticPoolName); - ElasticPoolResource elasticPool = client.GetElasticPoolResource(elasticPoolResourceId); - - // invoke the operation and iterate over the result - await foreach (SqlDatabaseResource item in elasticPool.GetDatabasesAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - SqlDatabaseData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs index bbd2c49622cf..a8ef293c6ffd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs @@ -18,12 +18,49 @@ namespace Azure.ResourceManager.Sql.Samples { public partial class Sample_FailoverGroupCollection { + // List failover group + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListFailoverGroup() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/FailoverGroupList.json + // this example is just showing the usage of "FailoverGroups_ListByServer" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerResource created on azure + // for more information of creating SqlServerResource, please refer to the document of SqlServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "failover-group-primary-server"; + ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); + + // get the collection of this FailoverGroupResource + FailoverGroupCollection collection = sqlServer.GetFailoverGroups(); + + // invoke the operation and iterate over the result + await foreach (FailoverGroupResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FailoverGroupData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + // Get failover group [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/FailoverGroupGet.json // this example is just showing the usage of "FailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +95,7 @@ public async Task Get_GetFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/FailoverGroupGet.json // this example is just showing the usage of "FailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +126,7 @@ public async Task Exists_GetFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/FailoverGroupCreateOrUpdate.json // this example is just showing the usage of "FailoverGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,9 +158,9 @@ public async Task CreateOrUpdate_CreateFailoverGroup() { new PartnerServerInfo(new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server")) }, - Databases = + FailoverDatabases = { -"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1","/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2" +new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1"),new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2") }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, failoverGroupName, data); @@ -135,42 +172,5 @@ public async Task CreateOrUpdate_CreateFailoverGroup() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - - // List failover group - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListFailoverGroup() - { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupList.json - // this example is just showing the usage of "FailoverGroups_ListByServer" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SqlServerResource created on azure - // for more information of creating SqlServerResource, please refer to the document of SqlServerResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "Default"; - string serverName = "failover-group-primary-server"; - ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); - SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); - - // get the collection of this FailoverGroupResource - FailoverGroupCollection collection = sqlServer.GetFailoverGroups(); - - // invoke the operation and iterate over the result - await foreach (FailoverGroupResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - FailoverGroupData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupResource.cs index dd0aa5cf27d6..a810a311d335 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupResource.cs @@ -23,7 +23,7 @@ public partial class Sample_FailoverGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/FailoverGroupGet.json // this example is just showing the usage of "FailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/FailoverGroupDelete.json // this example is just showing the usage of "FailoverGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Delete_DeleteFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/FailoverGroupUpdate.json // this example is just showing the usage of "FailoverGroups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task Update_UpdateFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Failover_PlannedFailoverOfAFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupFailover.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/FailoverGroupFailover.json // this example is just showing the usage of "FailoverGroups_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,7 +160,7 @@ public async Task Failover_PlannedFailoverOfAFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ForceFailoverAllowDataLoss_ForcedFailoverOfAFailoverGroupAllowingDataLoss() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json // this example is just showing the usage of "FailoverGroups_ForceFailoverAllowDataLoss" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,5 +187,38 @@ public async Task ForceFailoverAllowDataLoss_ForcedFailoverOfAFailoverGroupAllow // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + // Try planned before forced failover of a failover group + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task TryPlannedBeforeForcedFailover_TryPlannedBeforeForcedFailoverOfAFailoverGroup() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/FailoverGroupTryPlannedBeforeForcedFailover.json + // this example is just showing the usage of "FailoverGroups_TryPlannedBeforeForcedFailover" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FailoverGroupResource created on azure + // for more information of creating FailoverGroupResource, please refer to the document of FailoverGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "failovergroupsecondaryserver"; + string failoverGroupName = "failovergrouptest3"; + ResourceIdentifier failoverGroupResourceId = FailoverGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, failoverGroupName); + FailoverGroupResource failoverGroup = client.GetFailoverGroupResource(failoverGroupResourceId); + + // invoke the operation + ArmOperation lro = await failoverGroup.TryPlannedBeforeForcedFailoverAsync(WaitUntil.Completed); + FailoverGroupResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FailoverGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleCollection.cs index a0e59e37e3f9..584aea8889c5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_IPv6FirewallRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListIPv6FirewallRules() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleList.json // this example is just showing the usage of "IPv6FirewallRules_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task GetAll_ListIPv6FirewallRules() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetIPv6FirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleGet.json // this example is just showing the usage of "IPv6FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_GetIPv6FirewallRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetIPv6FirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleGet.json // this example is just showing the usage of "IPv6FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_GetIPv6FirewallRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAnIPv6FirewallRuleMaxMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleCreate.json // this example is just showing the usage of "IPv6FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task CreateOrUpdate_CreateAnIPv6FirewallRuleMaxMin() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateAnIPv6FirewallRuleMaxMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleUpdate.json // this example is just showing the usage of "IPv6FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleResource.cs index 0e203732493c..ee33fe05e4c9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleResource.cs @@ -22,7 +22,7 @@ public partial class Sample_IPv6FirewallRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetIPv6FirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleGet.json // this example is just showing the usage of "IPv6FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetIPv6FirewallRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateAnIPv6FirewallRuleMaxMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleCreate.json // this example is just showing the usage of "IPv6FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Update_CreateAnIPv6FirewallRuleMaxMin() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAnIPv6FirewallRuleMaxMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleUpdate.json // this example is just showing the usage of "IPv6FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task Update_UpdateAnIPv6FirewallRuleMaxMin() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAnIPv6FirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleDelete.json // this example is just showing the usage of "IPv6FirewallRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseCollection.cs index 4071800055ae..ecb55bf23dec 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ManagedDatabaseCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDatabasesByManagedInstances() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseListByManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseListByManagedInstance.json // this example is just showing the usage of "ManagedDatabases_ListByInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ListDatabasesByManagedInstances() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseGet.json // this example is just showing the usage of "ManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetsAManagedDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseGet.json // this example is just showing the usage of "ManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetsAManagedDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseByRestoringFromAnExternalBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task CreateOrUpdate_CreatesANewManagedDatabaseByRestoringFromAnExte [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseByRestoringFromAnExternalBackupUsingManagedIdentity() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackupManagedIdentity.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackupManagedIdentity.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -216,7 +216,7 @@ public async Task CreateOrUpdate_CreatesANewManagedDatabaseByRestoringFromAnExte [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseFromRestoringAGeoReplicatedBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseCreateRecovery.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateRecovery.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -257,7 +257,7 @@ public async Task CreateOrUpdate_CreatesANewManagedDatabaseFromRestoringAGeoRepl [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseFromRestoringALongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseCreateRestoreLtrBackup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateRestoreLtrBackup.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -300,7 +300,7 @@ public async Task CreateOrUpdate_CreatesANewManagedDatabaseFromRestoringALongTer [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseUsingCrossSubscriptionPointInTimeRestore() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseCreateCrossSubscriptionPointInTimeRestore.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateCrossSubscriptionPointInTimeRestore.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -325,7 +325,7 @@ public async Task CreateOrUpdate_CreatesANewManagedDatabaseUsingCrossSubscriptio { RestorePointInTime = DateTimeOffset.Parse("2017-07-14T05:35:31.503Z"), CreateMode = ManagedDatabaseCreateMode.PointInTimeRestore, - CrossSubscriptionSourceDatabaseId = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr2/databases/testdb", + CrossSubscriptionSourceDatabaseId = new ResourceIdentifier("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr2/databases/testdb"), CrossSubscriptionTargetManagedInstanceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr"), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, data); @@ -343,7 +343,7 @@ public async Task CreateOrUpdate_CreatesANewManagedDatabaseUsingCrossSubscriptio [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseUsingPointInTimeRestore() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -380,12 +380,52 @@ public async Task CreateOrUpdate_CreatesANewManagedDatabaseUsingPointInTimeResto Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // Creates a new managed database with ledger on. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreatesANewManagedDatabaseWithLedgerOn() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/CreateManagedDatabaseLedger.json + // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ManagedInstanceResource created on azure + // for more information of creating ManagedInstanceResource, please refer to the document of ManagedInstanceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default-SQL-SouthEastAsia"; + string managedInstanceName = "managedInstance"; + ResourceIdentifier managedInstanceResourceId = ManagedInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName); + ManagedInstanceResource managedInstance = client.GetManagedInstanceResource(managedInstanceResourceId); + + // get the collection of this ManagedDatabaseResource + ManagedDatabaseCollection collection = managedInstance.GetManagedDatabases(); + + // invoke the operation + string databaseName = "managedDatabase"; + ManagedDatabaseData data = new ManagedDatabaseData(new AzureLocation("southeastasia")) + { + IsLedgerOn = true, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, data); + ManagedDatabaseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ManagedDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Creates a new managed database with maximal properties [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseWithMaximalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateMax.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -428,7 +468,7 @@ public async Task CreateOrUpdate_CreatesANewManagedDatabaseWithMaximalProperties [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseWithMinimalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateMin.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseResource.cs index 3d03d4dc90eb..7a01b974d03f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseResource.cs @@ -495,7 +495,7 @@ public async Task UpdateRecommendedManagedDatabaseSensitivityLabel_UpdateRecomme [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseGet.json // this example is just showing the usage of "ManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -527,7 +527,7 @@ public async Task Get_GetsAManagedDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseDelete.json // this example is just showing the usage of "ManagedDatabases_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -555,7 +555,7 @@ public async Task Delete_DeleteManagedDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdatesAManagedDatabaseWithMaximalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseUpdateMax.json // this example is just showing the usage of "ManagedDatabases_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -595,7 +595,7 @@ public async Task Update_UpdatesAManagedDatabaseWithMaximalProperties() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdatesAManagedDatabaseWithMinimalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseUpdateMin.json // this example is just showing the usage of "ManagedDatabases_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -635,7 +635,7 @@ public async Task Update_UpdatesAManagedDatabaseWithMinimalProperties() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CancelMove_CancelsAManagedDatabaseMove() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseCancelMove.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCancelMove.json // this example is just showing the usage of "ManagedDatabases_CancelMove" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -653,7 +653,7 @@ public async Task CancelMove_CancelsAManagedDatabaseMove() ManagedDatabaseResource managedDatabase = client.GetManagedDatabaseResource(managedDatabaseResourceId); // invoke the operation - ManagedDatabaseMoveDefinition managedDatabaseMoveDefinition = new ManagedDatabaseMoveDefinition(new ResourceIdentifier("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase")); + ManagedDatabaseMoveDefinition managedDatabaseMoveDefinition = new ManagedDatabaseMoveDefinition(new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase")); await managedDatabase.CancelMoveAsync(WaitUntil.Completed, managedDatabaseMoveDefinition); Console.WriteLine($"Succeeded"); @@ -664,7 +664,7 @@ public async Task CancelMove_CancelsAManagedDatabaseMove() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CompleteMove_CompletesAManagedDatabaseMove() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseCompleteMove.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCompleteMove.json // this example is just showing the usage of "ManagedDatabases_CompleteMove" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -682,7 +682,7 @@ public async Task CompleteMove_CompletesAManagedDatabaseMove() ManagedDatabaseResource managedDatabase = client.GetManagedDatabaseResource(managedDatabaseResourceId); // invoke the operation - ManagedDatabaseMoveDefinition managedDatabaseMoveDefinition = new ManagedDatabaseMoveDefinition(new ResourceIdentifier("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase")); + ManagedDatabaseMoveDefinition managedDatabaseMoveDefinition = new ManagedDatabaseMoveDefinition(new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase")); await managedDatabase.CompleteMoveAsync(WaitUntil.Completed, managedDatabaseMoveDefinition); Console.WriteLine($"Succeeded"); @@ -693,7 +693,7 @@ public async Task CompleteMove_CompletesAManagedDatabaseMove() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CompleteRestore_CompletesAManagedDatabaseExternalBackupRestore() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json // this example is just showing the usage of "ManagedDatabases_CompleteRestore" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -722,7 +722,7 @@ public async Task CompleteRestore_CompletesAManagedDatabaseExternalBackupRestore [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartMove_StartsAManagedDatabaseMoveWithAllOptionalParametersSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseStartMoveMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseStartMoveMax.json // this example is just showing the usage of "ManagedDatabases_StartMove" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -740,7 +740,7 @@ public async Task StartMove_StartsAManagedDatabaseMoveWithAllOptionalParametersS ManagedDatabaseResource managedDatabase = client.GetManagedDatabaseResource(managedDatabaseResourceId); // invoke the operation - ManagedDatabaseStartMoveDefinition managedDatabaseStartMoveDefinition = new ManagedDatabaseStartMoveDefinition(new ResourceIdentifier("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase")) + ManagedDatabaseStartMoveDefinition managedDatabaseStartMoveDefinition = new ManagedDatabaseStartMoveDefinition(new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase")) { OperationMode = ManagedDatabaseMoveOperationMode.Copy, }; @@ -754,7 +754,7 @@ public async Task StartMove_StartsAManagedDatabaseMoveWithAllOptionalParametersS [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartMove_StartsAManagedDatabaseMoveWithNoOptionalParametersSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseStartMoveMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseStartMoveMin.json // this example is just showing the usage of "ManagedDatabases_StartMove" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -772,7 +772,7 @@ public async Task StartMove_StartsAManagedDatabaseMoveWithNoOptionalParametersSp ManagedDatabaseResource managedDatabase = client.GetManagedDatabaseResource(managedDatabaseResourceId); // invoke the operation - ManagedDatabaseStartMoveDefinition managedDatabaseStartMoveDefinition = new ManagedDatabaseStartMoveDefinition(new ResourceIdentifier("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase")); + ManagedDatabaseStartMoveDefinition managedDatabaseStartMoveDefinition = new ManagedDatabaseStartMoveDefinition(new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase")); await managedDatabase.StartMoveAsync(WaitUntil.Completed, managedDatabaseStartMoveDefinition); Console.WriteLine($"Succeeded"); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceCollection.cs index 7f56a611caa3..f755d2ec5b0b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceCollection.cs @@ -257,7 +257,7 @@ public async Task CreateOrUpdate_CreateManagedInstanceWithAllProperties() VCores = 8, StorageSizeInGB = 1024, Collation = "SQL_Latin1_General_CP1_CI_AS", - DnsZonePartner = "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + ManagedDnsZonePartner = new ResourceIdentifier("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance"), IsPublicDataEndpointEnabled = false, ProxyOverride = ManagedInstanceProxyOverride.Redirect, TimezoneId = "UTC", diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceResource.cs index 92471cbd281c..3a609b812177 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceResource.cs @@ -89,7 +89,7 @@ public async Task GetSqlServerTrustGroups_ListServerTrustGroupsByManagedInstance [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetInaccessibleManagedDatabases_ListInaccessibleManagedDatabasesByManagedInstances() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json // this example is just showing the usage of "ManagedDatabases_ListInaccessibleByInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseCollection.cs index c202872ccdfc..cc94d2422ab3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseCollection.cs @@ -16,12 +16,49 @@ namespace Azure.ResourceManager.Sql.Samples { public partial class Sample_RecoverableDatabaseCollection { - // Get a recoverable database + // Get list of recoverable databases. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetListOfRecoverableDatabases() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/RecoverableDatabaseList.json + // this example is just showing the usage of "RecoverableDatabases_ListByServer" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerResource created on azure + // for more information of creating SqlServerResource, please refer to the document of SqlServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "recoverabledatabasetest-1234"; + string serverName = "recoverabledatabasetest-7177"; + ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); + + // get the collection of this RecoverableDatabaseResource + RecoverableDatabaseCollection collection = sqlServer.GetRecoverableDatabases(); + + // invoke the operation and iterate over the result + await foreach (RecoverableDatabaseResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RecoverableDatabaseData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a recoverable database. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetARecoverableDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/RecoverableDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/RecoverableDatabaseGet.json // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,12 +88,12 @@ public async Task Get_GetARecoverableDatabase() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get a recoverable database + // Get a recoverable database. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetARecoverableDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/RecoverableDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/RecoverableDatabaseGet.json // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,13 +119,13 @@ public async Task Exists_GetARecoverableDatabase() Console.WriteLine($"Succeeded: {result}"); } - // Get list of restorable dropped databases + // Gets a recoverable database with expand equals keys. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_GetListOfRestorableDroppedDatabases() + public async Task Get_GetsARecoverableDatabaseWithExpandEqualsKeys() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/RecoverableDatabaseList.json - // this example is just showing the usage of "RecoverableDatabases_ListByServer" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json + // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -98,25 +135,56 @@ public async Task GetAll_GetListOfRestorableDroppedDatabases() // this example assumes you already have this SqlServerResource created on azure // for more information of creating SqlServerResource, please refer to the document of SqlServerResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "recoverabledatabasetest-1234"; - string serverName = "recoverabledatabasetest-7177"; + string resourceGroupName = "recoverabledatabasetest-6852"; + string serverName = "recoverabledatabasetest-2080"; ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); // get the collection of this RecoverableDatabaseResource RecoverableDatabaseCollection collection = sqlServer.GetRecoverableDatabases(); - // invoke the operation and iterate over the result - await foreach (RecoverableDatabaseResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - RecoverableDatabaseData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } + // invoke the operation + string databaseName = "recoverabledatabasetest-9187"; + string expand = "keys"; + RecoverableDatabaseResource result = await collection.GetAsync(databaseName, expand: expand); - Console.WriteLine($"Succeeded"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RecoverableDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Gets a recoverable database with expand equals keys. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetsARecoverableDatabaseWithExpandEqualsKeys() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json + // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerResource created on azure + // for more information of creating SqlServerResource, please refer to the document of SqlServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "recoverabledatabasetest-6852"; + string serverName = "recoverabledatabasetest-2080"; + ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); + + // get the collection of this RecoverableDatabaseResource + RecoverableDatabaseCollection collection = sqlServer.GetRecoverableDatabases(); + + // invoke the operation + string databaseName = "recoverabledatabasetest-9187"; + string expand = "keys"; + bool result = await collection.ExistsAsync(databaseName, expand: expand); + + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseResource.cs index 3c7eff069793..f6d46d7060c5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseResource.cs @@ -16,12 +16,12 @@ namespace Azure.ResourceManager.Sql.Samples { public partial class Sample_RecoverableDatabaseResource { - // Get a recoverable database + // Get a recoverable database. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetARecoverableDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/RecoverableDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/RecoverableDatabaseGet.json // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,5 +47,38 @@ public async Task Get_GetARecoverableDatabase() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + // Gets a recoverable database with expand equals keys. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsARecoverableDatabaseWithExpandEqualsKeys() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json + // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RecoverableDatabaseResource created on azure + // for more information of creating RecoverableDatabaseResource, please refer to the document of RecoverableDatabaseResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "recoverabledatabasetest-6852"; + string serverName = "recoverabledatabasetest-2080"; + string databaseName = "recoverabledatabasetest-9187"; + ResourceIdentifier recoverableDatabaseResourceId = RecoverableDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName); + RecoverableDatabaseResource recoverableDatabase = client.GetRecoverableDatabaseResource(recoverableDatabaseResourceId); + + // invoke the operation + string expand = "keys"; + RecoverableDatabaseResource result = await recoverableDatabase.GetAsync(expand: expand); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RecoverableDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineCollection.cs index 8bd9d11eca63..91091d85391f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineCollect [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_ListBySqlVulnerabilityAssessment" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task GetAll_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBasel [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task Get_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaseline [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task Exists_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBasel [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AddADatabaseSVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task CreateOrUpdate_AddADatabaseSVulnerabilityAssessmentRuleBaselin [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AddADatabaseSVulnerabilityAssessmentRuleBaselineList() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.cs index 1b1653e092a4..0952a3202d0e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.cs @@ -24,7 +24,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineResourc [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaseline [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_AddADatabaseSVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task Update_AddADatabaseSVulnerabilityAssessmentRuleBaselineFromThe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_AddADatabaseSVulnerabilityAssessmentRuleBaselineList() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCollection.cs index 01aefb9809b9..66c3a10598ba 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCol [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_ListByBaseline" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task GetAll_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBasel [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsADatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Get_GetsADatabaseSSqlVulnerabilityAssessmentRuleBaseline() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsADatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task Exists_GetsADatabaseSSqlVulnerabilityAssessmentRuleBaseline() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.cs index bb16dc5e9b7d..1cfbec8c0c1e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.cs @@ -23,7 +23,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleRes [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsADatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetsADatabaseSSqlVulnerabilityAssessmentRuleBaseline() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Update_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBa [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RemovesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentCollection.cs index 3071b4464496..5457c4f4e952 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetSQLVulnerabilityAssessmentPoliciesOnAGivenDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentsSettings_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_GetSQLVulnerabilityAssessmentPoliciesOnAGivenDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSQLVulnerabilityAssessmentPolicyForDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_GetSQLVulnerabilityAssessmentPolicyForDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSQLVulnerabilityAssessmentPolicyForDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentResource.cs index 3e3af598d00a..52fe216a4660 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentResource.cs @@ -23,7 +23,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ExecuteScan_ExecutesADatabaseSVulnerabilityAssessmentScan() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentExecuteScan_Execute" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task ExecuteScan_ExecutesADatabaseSVulnerabilityAssessmentScan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSQLVulnerabilityAssessmentPolicyForDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanCollection.cs index 50ba3fb252e5..aa7f23d949e7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentScanCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsTheListOfADatabaseVulnerabilityAssessmentScanRecords() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScans_ListBySqlVulnerabilityAssessments" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task GetAll_GetsTheListOfADatabaseVulnerabilityAssessmentScanRecord [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADatabaseSVulnerabilityAssessmentScan() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Get_GetADatabaseSVulnerabilityAssessmentScan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetADatabaseSVulnerabilityAssessmentScan() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResource.cs index 2af4f3be2225..d1a36a1ac23d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResource.cs @@ -22,7 +22,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADatabaseSVulnerabilityAssessmentScan() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultCollection.cs index 59393a092321..158fb693ef8f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultColle [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDatabaseSQLVulnerabilityAssessmentScanResultsForScanId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScanResult_ListByScan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task GetAll_ListDatabaseSQLVulnerabilityAssessmentScanResultsForSca [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task Get_GetADatabaseSQLVulnerabilityAssessmentScanResultForScanIdA [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetADatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.cs index f5b159bb9b43..390f0aec3734 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.cs @@ -22,7 +22,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultResou [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineCollection.cs index fcadb100389f..26b89929ccd3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentBaselineCollectio [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaseline_ListBySqlVulnerabilityAssessment" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task GetAll_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBasel [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Get_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaseline [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task Exists_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBasel [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AddADatabaseSVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task CreateOrUpdate_AddADatabaseSVulnerabilityAssessmentRuleBaselin [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AddADatabaseSVulnerabilityAssessmentRuleBaselineList() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineResource.cs index c83b02234bd9..55fba464e094 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineResource.cs @@ -24,7 +24,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentBaselineResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task Get_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaseline [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_AddADatabaseSVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Update_AddADatabaseSVulnerabilityAssessmentRuleBaselineFromThe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_AddADatabaseSVulnerabilityAssessmentRuleBaselineList() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleCollection.cs index 423555496115..2b96b8f6d7c4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleColle [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaseline_ListByBaseline" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task GetAll_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBasel [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Get_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task Exists_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBasel [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaseline_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.cs index e0c7b46095c6..5447dbe0def3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.cs @@ -23,7 +23,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleResou [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task Get_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaseline_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task Update_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBa [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RemovesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaselines_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentCollection.cs index 716bc2cc2584..b44511a292a5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetSQLVulnerabilityAssessmentPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentListByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentListByServer.json // this example is just showing the usage of "SqlVulnerabilityAssessmentsSettings_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_GetSQLVulnerabilityAssessmentPolicies() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSQLVulnerabilityAssessmentPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetSQLVulnerabilityAssessmentPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSQLVulnerabilityAssessmentPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetSQLVulnerabilityAssessmentPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateASQLVulnerabilityAssessmentPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentCreate.json // this example is just showing the usage of "SqlVulnerabilityAssessmentsSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentResource.cs index 1a46c1d15dfe..55f388b60d1c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentResource.cs @@ -23,7 +23,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ExecuteScan_ExecutesADatabaseSVulnerabilityAssessmentScan() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScansExecute.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentScansExecute.json // this example is just showing the usage of "SqlVulnerabilityAssessmentExecuteScan_Execute" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task ExecuteScan_ExecutesADatabaseSVulnerabilityAssessmentScan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSQLVulnerabilityAssessmentPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_GetSQLVulnerabilityAssessmentPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateASQLVulnerabilityAssessmentPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentCreate.json // this example is just showing the usage of "SqlVulnerabilityAssessmentsSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Update_CreateASQLVulnerabilityAssessmentPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RemoveSQLVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentDelete.json // this example is just showing the usage of "SqlVulnerabilityAssessments_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanCollection.cs index 043bc895dd1b..1a4e0abc5bda 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentScanCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsTheListOfADatabaseVulnerabilityAssessmentScanRecords() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScans_ListBySqlVulnerabilityAssessments" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_GetsTheListOfADatabaseVulnerabilityAssessmentScanRecord [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsTheADatabaseVulnerabilityAssessmentScanRecords() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_GetsTheADatabaseVulnerabilityAssessmentScanRecords() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsTheADatabaseVulnerabilityAssessmentScanRecords() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResource.cs index 4eab61317ecd..4df31702eadf 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResource.cs @@ -22,7 +22,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentScanResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsTheADatabaseVulnerabilityAssessmentScanRecords() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultCollection.cs index 68f6385e7696..cd6ba6e19368 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentScanResultCollect [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSystemDatabaseSQLVulnerabilityAssessmentScanResultsForScanId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentListScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentListScansResults.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScanResult_ListByScan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task GetAll_ListSystemDatabaseSQLVulnerabilityAssessmentScanResults [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASystemDatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Get_GetASystemDatabaseSQLVulnerabilityAssessmentScanResultForS [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetASystemDatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultResource.cs index 510efdc5f903..dff2a6b00989 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultResource.cs @@ -22,7 +22,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentScanResultResourc [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASystemDatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/FailoverGroupData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/FailoverGroupData.cs new file mode 100644 index 000000000000..c8c3c114338e --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/FailoverGroupData.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql +{ + public partial class FailoverGroupData + { + /// List of databases in the failover group. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete and will be removed in a future release", false)] + public IList Databases { get; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/ManagedInstanceData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/ManagedInstanceData.cs new file mode 100644 index 000000000000..6e3414beb119 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/ManagedInstanceData.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql +{ + public partial class ManagedInstanceData + { + /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete and will be removed in a future release", false)] + public string DnsZonePartner { get; set; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/ManagedInstancePatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/ManagedInstancePatch.cs new file mode 100644 index 000000000000..5601d5eb30e6 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/ManagedInstancePatch.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.ResourceManager.Sql.Models +{ + public partial class ManagedInstancePatch + { + /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. + public string DnsZonePartner { get; set; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Customized/Models/SqlMetricDefinition.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/SqlMetricDefinition.cs similarity index 100% rename from sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Customized/Models/SqlMetricDefinition.cs rename to sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/SqlMetricDefinition.cs diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/RecoverableDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/RecoverableDatabaseCollection.cs new file mode 100644 index 000000000000..4768de2b9d63 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/RecoverableDatabaseCollection.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using System.Threading; +using System.Threading.Tasks; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql +{ + public partial class RecoverableDatabaseCollection + { + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName} + /// + /// + /// Operation Id + /// RecoverableDatabases_Get + /// + /// + /// + /// The name of the database. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response Exists(string databaseName, CancellationToken cancellationToken) + => Exists(databaseName, null, null, cancellationToken); + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName} + /// + /// + /// Operation Id + /// RecoverableDatabases_Get + /// + /// + /// + /// The name of the database. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> ExistsAsync(string databaseName, CancellationToken cancellationToken) + => await ExistsAsync(databaseName, null, null, cancellationToken).ConfigureAwait(false); + + /// + /// Gets a recoverable database, which is a resource representing a database's geo backup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName} + /// + /// + /// Operation Id + /// RecoverableDatabases_Get + /// + /// + /// + /// The name of the database. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response Get(string databaseName, CancellationToken cancellationToken) + => Get(databaseName, null, null, cancellationToken); + + /// + /// Gets a recoverable database, which is a resource representing a database's geo backup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName} + /// + /// + /// Operation Id + /// RecoverableDatabases_Get + /// + /// + /// + /// The name of the database. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetAsync(string databaseName, CancellationToken cancellationToken) + => await GetAsync(databaseName, null, null, cancellationToken).ConfigureAwait(false); + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/RecoverableDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/RecoverableDatabaseResource.cs new file mode 100644 index 000000000000..0e6719b50b7b --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/RecoverableDatabaseResource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.Sql +{ + public partial class RecoverableDatabaseResource + { + /// + /// Gets a recoverable database, which is a resource representing a database's geo backup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName} + /// + /// + /// Operation Id + /// RecoverableDatabases_Get + /// + /// + /// + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response Get(CancellationToken cancellationToken) + => Get(null, null, cancellationToken); + + /// + /// Gets a recoverable database, which is a resource representing a database's geo backup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName} + /// + /// + /// Operation Id + /// RecoverableDatabases_Get + /// + /// + /// + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetAsync(CancellationToken cancellationToken) + => await GetAsync(null, null, cancellationToken).ConfigureAwait(false); + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/SqlServerResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/SqlServerResource.cs index 756bb5c08a53..f74c1b497007 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/SqlServerResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/SqlServerResource.cs @@ -20,6 +20,50 @@ namespace Azure.ResourceManager.Sql /// public partial class SqlServerResource : ArmResource { + /// + /// Gets a recoverable database, which is a resource representing a database's geo backup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName} + /// + /// + /// Operation Id + /// RecoverableDatabases_Get + /// + /// + /// + /// The name of the database. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> GetRecoverableDatabaseAsync(string databaseName, CancellationToken cancellationToken) + => await GetRecoverableDatabaseAsync(databaseName, null, null, cancellationToken).ConfigureAwait(false); + + /// + /// Gets a recoverable database, which is a resource representing a database's geo backup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName} + /// + /// + /// Operation Id + /// RecoverableDatabases_Get + /// + /// + /// + /// The name of the database. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response GetRecoverableDatabase(string databaseName, CancellationToken cancellationToken) + => GetRecoverableDatabase(databaseName, null, null, cancellationToken); + /// /// Gets a restorable dropped database. /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs index fd73686f1200..7c8b0cdacab6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs @@ -18,21 +18,6 @@ namespace Azure.ResourceManager.Sql.Models /// Model factory for models. public static partial class ArmSqlModelFactory { - /// Initializes a new instance of RecoverableDatabaseData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The edition of the database. - /// The service level objective name of the database. - /// The elastic pool name of the database. - /// The last available backup date of the database (ISO8601 format). - /// A new instance for mocking. - public static RecoverableDatabaseData RecoverableDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string edition = null, string serviceLevelObjective = null, string elasticPoolName = null, DateTimeOffset? lastAvailableBackupOn = null) - { - return new RecoverableDatabaseData(id, name, resourceType, systemData, edition, serviceLevelObjective, elasticPoolName, lastAvailableBackupOn); - } - /// Initializes a new instance of DataMaskingPolicyData. /// The id. /// The name. @@ -598,39 +583,6 @@ public static EncryptionProtectorData EncryptionProtectorData(ResourceIdentifier return new EncryptionProtectorData(id, name, resourceType, systemData, kind, location, subregion, serverKeyName, serverKeyType, uri, thumbprint, isAutoRotationEnabled); } - /// 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 databases = null) - { - tags ??= new Dictionary(); - partnerServers ??= new List(); - databases ??= new List(); - - return new FailoverGroupData(id, name, resourceType, systemData, location, tags, readWriteEndpoint, readOnlyEndpointFailoverPolicy != null ? new FailoverGroupReadOnlyEndpoint(readOnlyEndpointFailoverPolicy) : null, replicationRole, replicationState, partnerServers?.ToList(), databases?.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 SqlFirewallRuleData. /// Resource ID. /// Resource name. @@ -2118,18 +2070,6 @@ public static WorkloadGroupData WorkloadGroupData(ResourceIdentifier id = null, return new WorkloadGroupData(id, name, resourceType, systemData, minResourcePercent, maxResourcePercent, minResourcePercentPerRequest, maxResourcePercentPerRequest, importance, queryExecutionTimeout); } - /// Initializes a new instance of LogicalDatabaseTransparentDataEncryptionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Specifies the state of the transparent data encryption. - /// A new instance for mocking. - public static LogicalDatabaseTransparentDataEncryptionData LogicalDatabaseTransparentDataEncryptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TransparentDataEncryptionState? state = null) - { - return new LogicalDatabaseTransparentDataEncryptionData(id, name, resourceType, systemData, state); - } - /// Initializes a new instance of BackupShortTermRetentionPolicyData. /// The id. /// The name. @@ -2319,41 +2259,6 @@ public static ManagedInstanceLongTermRetentionBackupData ManagedInstanceLongTerm return new ManagedInstanceLongTermRetentionBackupData(id, name, resourceType, systemData, managedInstanceName, managedInstanceCreateOn, databaseName, databaseDeletedOn, backupOn, backupExpireOn, backupStorageRedundancy); } - /// Initializes a new instance of RestorableDroppedDatabaseData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The name and tier of the SKU. - /// The name of the database. - /// The max size of the database expressed in bytes. - /// The creation date of the database (ISO8601 format). - /// The deletion date of the database (ISO8601 format). - /// The earliest restore date of the database (ISO8601 format). - /// The storage account type used to store backups for this database. - /// The resource ids of the user assigned identities to use. - /// A new instance for mocking. - public static RestorableDroppedDatabaseData RestorableDroppedDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SqlSku sku = null, string databaseName = null, long? maxSizeBytes = null, DateTimeOffset? createdOn = null, DateTimeOffset? deletedOn = null, DateTimeOffset? earliestRestoreOn = null, SqlBackupStorageRedundancy? backupStorageRedundancy = null, IDictionary keys = null) - { - tags ??= new Dictionary(); - keys ??= new Dictionary(); - - return new RestorableDroppedDatabaseData(id, name, resourceType, systemData, tags, location, sku, databaseName, maxSizeBytes, createdOn, deletedOn, earliestRestoreOn, backupStorageRedundancy, keys); - } - - /// Initializes a new instance of SqlDatabaseKey. - /// The database key type. Only supported value is 'AzureKeyVault'. - /// Thumbprint of the database key. - /// The database key creation date. - /// Subregion of the server key. - /// A new instance for mocking. - public static SqlDatabaseKey SqlDatabaseKey(SqlDatabaseKeyType? keyType = null, string thumbprint = null, DateTimeOffset? createdOn = null, string subregion = null) - { - return new SqlDatabaseKey(keyType, thumbprint, createdOn, subregion); - } - /// Initializes a new instance of RestorableDroppedManagedDatabaseData. /// The id. /// The name. @@ -2422,52 +2327,6 @@ public static ServerTrustCertificateData ServerTrustCertificateData(ResourceIden return new ServerTrustCertificateData(id, name, resourceType, systemData, publicBlob, thumbprint, certificateName); } - /// Initializes a new instance of ElasticPoolData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// - /// The elastic pool SKU. - /// - /// The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command: - /// - /// ```azurecli - /// az sql elastic-pool list-editions -l <location> -o table - /// ```` - /// - /// - /// Kind of elastic pool. This is metadata used for the Azure portal experience. - /// The state of the elastic pool. - /// The creation date of the elastic pool (ISO8601 format). - /// The storage limit for the database elastic pool in bytes. - /// The per database settings for the elastic pool. - /// Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. - /// The license type to apply for this elastic pool. - /// Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. - /// The number of secondary replicas associated with the elastic pool that are used to provide high availability. - /// A new instance for mocking. - public static ElasticPoolData ElasticPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SqlSku sku = null, string kind = null, ElasticPoolState? state = null, DateTimeOffset? createdOn = null, long? maxSizeBytes = null, ElasticPoolPerDatabaseSettings perDatabaseSettings = null, bool? isZoneRedundant = null, ElasticPoolLicenseType? licenseType = null, ResourceIdentifier maintenanceConfigurationId = null, int? highAvailabilityReplicaCount = null) - { - tags ??= new Dictionary(); - - return new ElasticPoolData(id, name, resourceType, systemData, tags, location, sku, kind, state, createdOn, maxSizeBytes, perDatabaseSettings, isZoneRedundant, licenseType, maintenanceConfigurationId, highAvailabilityReplicaCount); - } - - /// Initializes a new instance of IPv6FirewallRuleData. - /// Resource ID. - /// Resource name. - /// Resource type. - /// The start IP address of the firewall rule. Must be IPv6 format. - /// The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpAddress. - /// A new instance for mocking. - public static IPv6FirewallRuleData IPv6FirewallRuleData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, string startIPv6Address = null, string endIPv6Address = null) - { - return new IPv6FirewallRuleData(id, name, resourceType, startIPv6Address, endIPv6Address); - } - /// Initializes a new instance of EndpointCertificateData. /// The id. /// The name. @@ -3032,320 +2891,113 @@ public static ManagedServerDnsAliasData ManagedServerDnsAliasData(ResourceIdenti return new ManagedServerDnsAliasData(id, name, resourceType, systemData, azureDnsRecord, publicAzureDnsRecord); } - /// Initializes a new instance of SqlVulnerabilityAssessmentBaselineData. + /// Initializes a new instance of ManagedDatabaseAdvancedThreatProtectionData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The baseline set result. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentBaselineData SqlVulnerabilityAssessmentBaselineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary>> results = null) + /// Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. + /// Specifies the UTC creation time of the policy. + /// A new instance for mocking. + public static ManagedDatabaseAdvancedThreatProtectionData ManagedDatabaseAdvancedThreatProtectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AdvancedThreatProtectionState? state = null, DateTimeOffset? createdOn = null) { - results ??= new Dictionary>>(); - - return new SqlVulnerabilityAssessmentBaselineData(id, name, resourceType, systemData, results); + return new ManagedDatabaseAdvancedThreatProtectionData(id, name, resourceType, systemData, state, createdOn); } - /// Initializes a new instance of SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent. + /// Initializes a new instance of ManagedInstanceAdvancedThreatProtectionData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The latest scan flag. - /// The rule baseline result list. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isLatestScan = null, IDictionary>> results = null) + /// Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. + /// Specifies the UTC creation time of the policy. + /// A new instance for mocking. + public static ManagedInstanceAdvancedThreatProtectionData ManagedInstanceAdvancedThreatProtectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AdvancedThreatProtectionState? state = null, DateTimeOffset? createdOn = null) { - results ??= new Dictionary>>(); - - return new SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent(id, name, resourceType, systemData, isLatestScan, results); + return new ManagedInstanceAdvancedThreatProtectionData(id, name, resourceType, systemData, state, createdOn); } - /// Initializes a new instance of SqlVulnerabilityAssessmentBaselineRuleData. + /// Initializes a new instance of SqlServerDatabaseReplicationLinkData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The rule baseline result. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentBaselineRuleData SqlVulnerabilityAssessmentBaselineRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable> results = null) + /// Resource partner server. + /// Resource partner database. + /// Resource partner location. + /// Local replication role. + /// Partner replication role. + /// Replication mode. + /// Time at which the link was created. + /// Seeding completion percentage for the link. + /// Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). + /// Whether the user is currently allowed to terminate the link. + /// Link type (GEO, NAMED, STANDBY). + /// A new instance for mocking. + public static SqlServerDatabaseReplicationLinkData SqlServerDatabaseReplicationLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string partnerServer = null, string partnerDatabase = null, AzureLocation? partnerLocation = null, SqlServerDatabaseReplicationRole? role = null, SqlServerDatabaseReplicationRole? partnerRole = null, string replicationMode = null, DateTimeOffset? startOn = null, int? percentComplete = null, ReplicationLinkState? replicationState = null, bool? isTerminationAllowed = null, ReplicationLinkType? linkType = null) { - results ??= new List>(); - - return new SqlVulnerabilityAssessmentBaselineRuleData(id, name, resourceType, systemData, results?.ToList()); + return new SqlServerDatabaseReplicationLinkData(id, name, resourceType, systemData, partnerServer, partnerDatabase, partnerLocation, role, partnerRole, replicationMode, startOn, percentComplete, replicationState, isTerminationAllowed, linkType); } - /// Initializes a new instance of SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent. + /// Initializes a new instance of ManagedInstanceDtcData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The latest scan flag. - /// The rule baseline result. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isLatestScan = null, IEnumerable> results = null) + /// Active status of managed instance DTC. + /// Security settings of managed instance DTC. + /// External dns suffix search list of managed instance DTC. + /// Host name dns suffix of managed instance DTC. + /// Provisioning state of managed instance DTC. + /// A new instance for mocking. + public static ManagedInstanceDtcData ManagedInstanceDtcData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? dtcEnabled = null, ManagedInstanceDtcSecuritySettings securitySettings = null, IEnumerable externalDnsSuffixSearchList = null, string dtcHostNameDnsSuffix = null, JobExecutionProvisioningState? provisioningState = null) { - results ??= new List>(); + externalDnsSuffixSearchList ??= new List(); - return new SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent(id, name, resourceType, systemData, isLatestScan, results?.ToList()); + return new ManagedInstanceDtcData(id, name, resourceType, systemData, dtcEnabled, securitySettings, externalDnsSuffixSearchList?.ToList(), dtcHostNameDnsSuffix, provisioningState); } - /// Initializes a new instance of SqlVulnerabilityAssessmentScanResultData. + /// Initializes a new instance of SqlSynapseLinkWorkspace. /// The id. /// The name. /// The resourceType. /// The systemData. - /// SQL Vulnerability Assessment rule Id. - /// SQL Vulnerability Assessment rule result status. - /// SQL Vulnerability Assessment error message. - /// SQL Vulnerability Assessment is the query results trimmed. - /// SQL Vulnerability Assessment query results that was run. - /// SQL Vulnerability Assessment the remediation details. - /// SQL Vulnerability Assessment rule result adjusted with baseline. - /// SQL Vulnerability Assessment rule metadata. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentScanResultData SqlVulnerabilityAssessmentScanResultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string ruleId = null, SqlVulnerabilityAssessmentRuleStatus? status = null, string errorMessage = null, bool? isTrimmed = null, IEnumerable> queryResults = null, SqlVulnerabilityAssessmentRemediation remediation = null, SqlVulnerabilityAssessmentBaselineAdjustedResult baselineAdjustedResult = null, SqlVulnerabilityAssessmentRuleMetadata ruleMetadata = null) + /// List of all synapselink workspaces. + /// A new instance for mocking. + public static SqlSynapseLinkWorkspace SqlSynapseLinkWorkspace(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable workspaces = null) { - queryResults ??= new List>(); + workspaces ??= new List(); - return new SqlVulnerabilityAssessmentScanResultData(id, name, resourceType, systemData, ruleId, status, errorMessage, isTrimmed, queryResults?.ToList(), remediation, baselineAdjustedResult, ruleMetadata); + return new SqlSynapseLinkWorkspace(id, name, resourceType, systemData, workspaces?.ToList()); } - /// Initializes a new instance of SqlVulnerabilityAssessmentRemediation. - /// SQL Vulnerability Assessment remediation description. - /// SQL Vulnerability Assessment remediation script. - /// SQL Vulnerability Assessment is remediation automated. - /// SQL Vulnerability Assessment optional link to remediate in Azure Portal. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentRemediation SqlVulnerabilityAssessmentRemediation(string description = null, IEnumerable scripts = null, bool? isAutomated = null, string portalLink = null) + /// Initializes a new instance of VirtualClusterData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Subnet resource ID for the virtual cluster. + /// Virtual cluster version. + /// List of resources in this virtual cluster. + /// A new instance for mocking. + public static VirtualClusterData VirtualClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier subnetId = null, string version = null, IEnumerable childResources = null) { - scripts ??= new List(); + tags ??= new Dictionary(); + childResources ??= new List(); - return new SqlVulnerabilityAssessmentRemediation(description, scripts?.ToList(), isAutomated, portalLink); + return new VirtualClusterData(id, name, resourceType, systemData, tags, location, subnetId, version, childResources?.ToList()); } - /// Initializes a new instance of SqlVulnerabilityAssessmentBaselineAdjustedResult. - /// SQL Vulnerability Assessment baseline details. - /// SQL Vulnerability Assessment baseline status. - /// SQL Vulnerability Assessment results that are not in baseline. - /// SQL Vulnerability Assessment results that are in baseline. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentBaselineAdjustedResult SqlVulnerabilityAssessmentBaselineAdjustedResult(SqlVulnerabilityAssessmentBaselineDetails baseline = null, SqlVulnerabilityAssessmentRuleStatus? status = null, IEnumerable> resultsNotInBaseline = null, IEnumerable> resultsOnlyInBaseline = null) - { - resultsNotInBaseline ??= new List>(); - resultsOnlyInBaseline ??= new List>(); - - return new SqlVulnerabilityAssessmentBaselineAdjustedResult(baseline, status, resultsNotInBaseline?.ToList(), resultsOnlyInBaseline?.ToList()); - } - - /// Initializes a new instance of SqlVulnerabilityAssessmentBaselineDetails. - /// SQL Vulnerability Assessment baseline expected results. - /// SQL Vulnerability Assessment baseline update time (UTC). - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentBaselineDetails SqlVulnerabilityAssessmentBaselineDetails(IEnumerable> expectedResults = null, DateTimeOffset? updatedOn = null) - { - expectedResults ??= new List>(); - - return new SqlVulnerabilityAssessmentBaselineDetails(expectedResults?.ToList(), updatedOn); - } - - /// Initializes a new instance of SqlVulnerabilityAssessmentRuleMetadata. - /// SQL Vulnerability Assessment rule Id. - /// SQL Vulnerability Assessment rule severity. - /// SQL Vulnerability Assessment rule category. - /// SQL Vulnerability Assessment rule type. - /// SQL Vulnerability Assessment rule title. - /// SQL Vulnerability Assessment rule description. - /// SQL Vulnerability Assessment rule rationale. - /// SQL Vulnerability Assessment rule query details. - /// SQL Vulnerability Assessment benchmark references. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentRuleMetadata SqlVulnerabilityAssessmentRuleMetadata(string ruleId = null, SqlVulnerabilityAssessmentRuleSeverity? severity = null, string category = null, SqlVulnerabilityAssessmentRuleType? ruleType = null, string title = null, string description = null, string rationale = null, SqlVulnerabilityAssessmentQueryCheck queryCheck = null, IEnumerable benchmarkReferences = null) - { - benchmarkReferences ??= new List(); - - return new SqlVulnerabilityAssessmentRuleMetadata(ruleId, severity, category, ruleType, title, description, rationale, queryCheck, benchmarkReferences?.ToList()); - } - - /// Initializes a new instance of SqlVulnerabilityAssessmentQueryCheck. - /// SQL Vulnerability Assessment rule query. - /// SQL Vulnerability Assessment query expected result. - /// SQL Vulnerability Assessment column names of query expected result. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentQueryCheck SqlVulnerabilityAssessmentQueryCheck(string query = null, IEnumerable> expectedResult = null, IEnumerable columnNames = null) - { - expectedResult ??= new List>(); - columnNames ??= new List(); - - return new SqlVulnerabilityAssessmentQueryCheck(query, expectedResult?.ToList(), columnNames?.ToList()); - } - - /// Initializes a new instance of SqlVulnerabilityAssessmentBenchmarkReference. - /// SQL Vulnerability Assessment benchmark name. - /// SQL Vulnerability Assessment benchmark reference. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentBenchmarkReference SqlVulnerabilityAssessmentBenchmarkReference(string benchmark = null, string reference = null) - { - return new SqlVulnerabilityAssessmentBenchmarkReference(benchmark, reference); - } - - /// Initializes a new instance of SqlVulnerabilityAssessmentScanData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The scan ID. - /// The scan trigger type. - /// The scan status. - /// The scan start time (UTC). - /// The scan end time (UTC). - /// The scan errors. - /// The server name. - /// The database name. - /// The SQL version. - /// The number of failed rules with high severity. - /// The number of failed rules with medium severity. - /// The number of failed rules with low severity. - /// The number of total passed rules. - /// The number of total failed rules. - /// The number of total rules assessed. - /// Baseline created for this database, and has one or more rules. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentScanData SqlVulnerabilityAssessmentScanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string scanId = null, VulnerabilityAssessmentScanTriggerType? triggerType = null, VulnerabilityAssessmentScanState? state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable errors = null, string server = null, string database = null, string sqlVersion = null, int? highSeverityFailedRulesCount = null, int? mediumSeverityFailedRulesCount = null, int? lowSeverityFailedRulesCount = null, int? totalPassedRulesCount = null, int? totalFailedRulesCount = null, int? totalRulesCount = null, bool? isBaselineApplied = null) - { - errors ??= new List(); - - return new SqlVulnerabilityAssessmentScanData(id, name, resourceType, systemData, scanId, triggerType, state, startOn, endOn, errors?.ToList(), server, database, sqlVersion, highSeverityFailedRulesCount, mediumSeverityFailedRulesCount, lowSeverityFailedRulesCount, totalPassedRulesCount, totalFailedRulesCount, totalRulesCount, isBaselineApplied); - } - - /// Initializes a new instance of SqlVulnerabilityAssessmentScanError. - /// The error code. - /// The error message. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentScanError SqlVulnerabilityAssessmentScanError(string code = null, string message = null) - { - return new SqlVulnerabilityAssessmentScanError(code, message); - } - - /// Initializes a new instance of SqlVulnerabilityAssessmentData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentData SqlVulnerabilityAssessmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SqlVulnerabilityAssessmentState? state = null) - { - return new SqlVulnerabilityAssessmentData(id, name, resourceType, systemData, state); - } - - /// Initializes a new instance of ManagedDatabaseAdvancedThreatProtectionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. - /// Specifies the UTC creation time of the policy. - /// A new instance for mocking. - public static ManagedDatabaseAdvancedThreatProtectionData ManagedDatabaseAdvancedThreatProtectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AdvancedThreatProtectionState? state = null, DateTimeOffset? createdOn = null) - { - return new ManagedDatabaseAdvancedThreatProtectionData(id, name, resourceType, systemData, state, createdOn); - } - - /// Initializes a new instance of ManagedInstanceAdvancedThreatProtectionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. - /// Specifies the UTC creation time of the policy. - /// A new instance for mocking. - public static ManagedInstanceAdvancedThreatProtectionData ManagedInstanceAdvancedThreatProtectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AdvancedThreatProtectionState? state = null, DateTimeOffset? createdOn = null) - { - return new ManagedInstanceAdvancedThreatProtectionData(id, name, resourceType, systemData, state, createdOn); - } - - /// Initializes a new instance of SqlServerDatabaseReplicationLinkData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Resource partner server. - /// Resource partner database. - /// Resource partner location. - /// Local replication role. - /// Partner replication role. - /// Replication mode. - /// Time at which the link was created. - /// Seeding completion percentage for the link. - /// Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). - /// Whether the user is currently allowed to terminate the link. - /// Link type (GEO, NAMED, STANDBY). - /// A new instance for mocking. - public static SqlServerDatabaseReplicationLinkData SqlServerDatabaseReplicationLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string partnerServer = null, string partnerDatabase = null, AzureLocation? partnerLocation = null, SqlServerDatabaseReplicationRole? role = null, SqlServerDatabaseReplicationRole? partnerRole = null, string replicationMode = null, DateTimeOffset? startOn = null, int? percentComplete = null, ReplicationLinkState? replicationState = null, bool? isTerminationAllowed = null, ReplicationLinkType? linkType = null) - { - return new SqlServerDatabaseReplicationLinkData(id, name, resourceType, systemData, partnerServer, partnerDatabase, partnerLocation, role, partnerRole, replicationMode, startOn, percentComplete, replicationState, isTerminationAllowed, linkType); - } - - /// Initializes a new instance of ManagedInstanceDtcData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Active status of managed instance DTC. - /// Security settings of managed instance DTC. - /// External dns suffix search list of managed instance DTC. - /// Host name dns suffix of managed instance DTC. - /// Provisioning state of managed instance DTC. - /// A new instance for mocking. - public static ManagedInstanceDtcData ManagedInstanceDtcData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? dtcEnabled = null, ManagedInstanceDtcSecuritySettings securitySettings = null, IEnumerable externalDnsSuffixSearchList = null, string dtcHostNameDnsSuffix = null, JobExecutionProvisioningState? provisioningState = null) - { - externalDnsSuffixSearchList ??= new List(); - - return new ManagedInstanceDtcData(id, name, resourceType, systemData, dtcEnabled, securitySettings, externalDnsSuffixSearchList?.ToList(), dtcHostNameDnsSuffix, provisioningState); - } - - /// Initializes a new instance of SqlSynapseLinkWorkspace. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// List of all synapselink workspaces. - /// A new instance for mocking. - public static SqlSynapseLinkWorkspace SqlSynapseLinkWorkspace(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable workspaces = null) - { - workspaces ??= new List(); - - return new SqlSynapseLinkWorkspace(id, name, resourceType, systemData, workspaces?.ToList()); - } - - /// Initializes a new instance of VirtualClusterData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Subnet resource ID for the virtual cluster. - /// Virtual cluster version. - /// List of resources in this virtual cluster. - /// A new instance for mocking. - public static VirtualClusterData VirtualClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier subnetId = null, string version = null, IEnumerable childResources = null) - { - tags ??= new Dictionary(); - childResources ??= new List(); - - return new VirtualClusterData(id, name, resourceType, systemData, tags, location, subnetId, version, childResources?.ToList()); - } - - /// Initializes a new instance of ManagedInstanceUpdateDnsServersOperationData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The status of the DNS refresh operation. - /// A new instance for mocking. - public static ManagedInstanceUpdateDnsServersOperationData ManagedInstanceUpdateDnsServersOperationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DnsRefreshConfigurationPropertiesStatus? status = null) + /// Initializes a new instance of ManagedInstanceUpdateDnsServersOperationData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The status of the DNS refresh operation. + /// A new instance for mocking. + public static ManagedInstanceUpdateDnsServersOperationData ManagedInstanceUpdateDnsServersOperationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DnsRefreshConfigurationPropertiesStatus? status = null) { return new ManagedInstanceUpdateDnsServersOperationData(id, name, resourceType, systemData, status); } @@ -3439,192 +3091,17 @@ public static ManagedDatabaseRestoreDetailUnrestorableFileProperties ManagedData return new ManagedDatabaseRestoreDetailUnrestorableFileProperties(name); } - /// Initializes a new instance of ManagedDatabaseData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Collation of the managed database. - /// Status of the database. - /// Creation date of the database. - /// Earliest restore point in time for point in time restore. - /// Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. - /// Geo paired region. - /// Collation of the metadata catalog. - /// Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required). - /// Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored. - /// The resource identifier of the source database associated with create operation of this database. - /// The resource identifier of the cross-subscription source database associated with create operation of this database. - /// The restorable dropped database resource id to restore when creating this database. - /// The restorable cross-subscription dropped database resource id to restore when creating this database. - /// Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed. - /// Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token. - /// Instance Failover Group resource identifier that this managed database belongs to. - /// The resource identifier of the recoverable database associated with create operation of this database. - /// The name of the Long Term Retention backup to be used for restore of this managed database. - /// Whether to auto complete restore of this managed database. - /// Last backup file name for restore of this managed database. - /// Target managed instance id used in cross-subscription restore. - /// A new instance for mocking. - public static ManagedDatabaseData ManagedDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string collation = null, ManagedDatabaseStatus? status = null, DateTimeOffset? createdOn = null, DateTimeOffset? earliestRestorePoint = null, DateTimeOffset? restorePointInTime = null, AzureLocation? defaultSecondaryLocation = null, CatalogCollationType? catalogCollation = null, ManagedDatabaseCreateMode? createMode = null, Uri storageContainerUri = null, ResourceIdentifier sourceDatabaseId = null, string crossSubscriptionSourceDatabaseId = null, ResourceIdentifier restorableDroppedDatabaseId = null, string crossSubscriptionRestorableDroppedDatabaseId = null, string storageContainerIdentity = null, string storageContainerSasToken = null, ResourceIdentifier failoverGroupId = null, ResourceIdentifier recoverableDatabaseId = null, ResourceIdentifier longTermRetentionBackupResourceId = null, bool? allowAutoCompleteRestore = null, string lastBackupName = null, ResourceIdentifier crossSubscriptionTargetManagedInstanceId = null) - { - tags ??= new Dictionary(); - - return new ManagedDatabaseData(id, name, resourceType, systemData, tags, location, collation, status, createdOn, earliestRestorePoint, restorePointInTime, defaultSecondaryLocation, catalogCollation, createMode, storageContainerUri, sourceDatabaseId, crossSubscriptionSourceDatabaseId, restorableDroppedDatabaseId, crossSubscriptionRestorableDroppedDatabaseId, storageContainerIdentity, storageContainerSasToken, failoverGroupId, recoverableDatabaseId, longTermRetentionBackupResourceId, allowAutoCompleteRestore, lastBackupName, crossSubscriptionTargetManagedInstanceId); - } - - /// Initializes a new instance of ManagedInstanceData. + /// Initializes a new instance of SqlDatabaseData. /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// The Azure Active Directory identity of the managed instance. - /// Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH. - /// - /// - /// Specifies the mode of database creation. + /// + /// The database SKU. /// - /// Default: Regular instance creation. - /// - /// Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. - /// - /// The fully qualified domain name of the managed instance. - /// Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). - /// The administrator login password (required for managed instance creation). - /// Subnet resource ID for the managed instance. - /// The state of the managed instance. - /// The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). - /// The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. - /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. - /// Collation of the managed instance. - /// The Dns Zone that the managed instance is in. - /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. - /// Whether or not the public data endpoint is enabled. - /// The resource identifier of the source managed instance associated with create operation of this instance. - /// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. - /// Connection type used for connecting to the instance. - /// - /// Id of the timezone. Allowed values are timezones supported by Windows. - /// Windows keeps details on supported timezones, including the id, in registry under - /// KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. - /// You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. - /// List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - /// An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". - /// - /// The Id of the instance pool this managed server belongs to. - /// Specifies maintenance configuration id to apply to this managed instance. - /// List of private endpoint connections on a managed instance. - /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. - /// The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). - /// The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). - /// Whether or not the multi-az is enabled. - /// The resource id of a user assigned identity to be used by default. - /// A CMK URI of the key to use for encryption. - /// The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. - /// The managed instance's service principal. - /// A new instance for mocking. - public static ManagedInstanceData ManagedInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, SqlSku sku = null, ManagedInstancePropertiesProvisioningState? provisioningState = null, ManagedServerCreateMode? managedInstanceCreateMode = null, string fullyQualifiedDomainName = null, string administratorLogin = null, string administratorLoginPassword = null, ResourceIdentifier subnetId = null, string state = null, ManagedInstanceLicenseType? licenseType = null, int? vCores = null, int? storageSizeInGB = null, string collation = null, string dnsZone = null, string dnsZonePartner = null, bool? isPublicDataEndpointEnabled = null, ResourceIdentifier sourceManagedInstanceId = null, DateTimeOffset? restorePointInTime = null, ManagedInstanceProxyOverride? proxyOverride = null, string timezoneId = null, ResourceIdentifier instancePoolId = null, ResourceIdentifier maintenanceConfigurationId = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, SqlBackupStorageRedundancy? currentBackupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isZoneRedundant = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Uri keyId = null, ManagedInstanceExternalAdministrator administrators = null, SqlServicePrincipal servicePrincipal = null) - { - tags ??= new Dictionary(); - privateEndpointConnections ??= new List(); - - return new ManagedInstanceData(id, name, resourceType, systemData, tags, location, identity, sku, provisioningState, managedInstanceCreateMode, fullyQualifiedDomainName, administratorLogin, administratorLoginPassword, subnetId, state, licenseType, vCores, storageSizeInGB, collation, dnsZone, dnsZonePartner, isPublicDataEndpointEnabled, sourceManagedInstanceId, restorePointInTime, proxyOverride, timezoneId, instancePoolId, maintenanceConfigurationId, privateEndpointConnections?.ToList(), minimalTlsVersion, currentBackupStorageRedundancy, requestedBackupStorageRedundancy, isZoneRedundant, primaryUserAssignedIdentityId, keyId, administrators, servicePrincipal); - } - - /// Initializes a new instance of ManagedInstancePecProperty. - /// Resource ID. - /// Private endpoint connection properties. - /// A new instance for mocking. - public static ManagedInstancePecProperty ManagedInstancePecProperty(ResourceIdentifier id = null, ManagedInstancePrivateEndpointConnectionProperties properties = null) - { - return new ManagedInstancePecProperty(id, properties); - } - - /// Initializes a new instance of SqlServicePrincipal. - /// The Azure Active Directory application object id. - /// The Azure Active Directory application client id. - /// The Azure Active Directory tenant id. - /// Service principal type. - /// A new instance for mocking. - public static SqlServicePrincipal SqlServicePrincipal(Guid? principalId = null, Guid? clientId = null, Guid? tenantId = null, SqlServicePrincipalType? principalType = null) - { - return new SqlServicePrincipal(principalId, clientId, tenantId, principalType); - } - - /// Initializes a new instance of SqlOutboundEnvironmentEndpoint. - /// The type of service accessed by the managed instance service, e.g., Azure Storage, Azure Active Directory, etc. - /// The endpoints that the managed instance service communicates with in order to function correctly. - /// A new instance for mocking. - public static SqlOutboundEnvironmentEndpoint SqlOutboundEnvironmentEndpoint(string category = null, IEnumerable endpoints = null) - { - endpoints ??= new List(); - - return new SqlOutboundEnvironmentEndpoint(category, endpoints?.ToList()); - } - - /// Initializes a new instance of ManagedInstanceEndpointDependency. - /// The domain name of the dependency. - /// The IP Addresses and Ports used when connecting to DomainName. - /// A new instance for mocking. - public static ManagedInstanceEndpointDependency ManagedInstanceEndpointDependency(string domainName = null, IEnumerable endpointDetails = null) - { - endpointDetails ??= new List(); - - return new ManagedInstanceEndpointDependency(domainName, endpointDetails?.ToList()); - } - - /// Initializes a new instance of ManagedInstanceEndpointDetail. - /// The port an endpoint is connected to. - /// A new instance for mocking. - public static ManagedInstanceEndpointDetail ManagedInstanceEndpointDetail(int? port = null) - { - return new ManagedInstanceEndpointDetail(port); - } - - /// Initializes a new instance of TopQueries. - /// Requested number of top queries. - /// Aggregation function used to calculate query metrics. - /// Metric used to rank queries. - /// Interval type (length). - /// The start time for the metric (ISO-8601 format). - /// The end time for the metric (ISO-8601 format). - /// List of top resource consuming queries with appropriate metric data. - /// A new instance for mocking. - public static TopQueries TopQueries(int? numberOfQueries = null, string aggregationFunction = null, string observationMetric = null, QueryTimeGrainType? intervalType = null, string startTime = null, string endTime = null, IEnumerable queries = null) - { - queries ??= new List(); - - return new TopQueries(numberOfQueries, aggregationFunction, observationMetric, intervalType, startTime, endTime, queries?.ToList()); - } - - /// Initializes a new instance of ManagedInstanceServerConfigurationOptionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Value of the server configuration option. - /// Provisioning state of server configuration option. - /// A new instance for mocking. - public static ManagedInstanceServerConfigurationOptionData ManagedInstanceServerConfigurationOptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? serverConfigurationOptionValue = null, JobExecutionProvisioningState? provisioningState = null) - { - return new ManagedInstanceServerConfigurationOptionData(id, name, resourceType, systemData, serverConfigurationOptionValue, provisioningState); - } - - /// Initializes a new instance of SqlDatabaseData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// - /// The database SKU. - /// - /// The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + /// The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: /// /// ```azurecli /// az sql db list-editions -l <location> -o table @@ -3752,6 +3229,17 @@ public static DatabaseIdentity DatabaseIdentity(DatabaseIdentityType? identityTy return new DatabaseIdentity(identityType, tenantId, userAssignedIdentities); } + /// Initializes a new instance of SqlDatabaseKey. + /// The database key type. Only supported value is 'AzureKeyVault'. + /// Thumbprint of the database key. + /// The database key creation date. + /// Subregion of the server key. + /// A new instance for mocking. + public static SqlDatabaseKey SqlDatabaseKey(SqlDatabaseKeyType? keyType = null, string thumbprint = null, DateTimeOffset? createdOn = null, string subregion = null) + { + return new SqlDatabaseKey(keyType, thumbprint, createdOn, subregion); + } + /// Initializes a new instance of ImportExportOperationResult. /// The id. /// The name. @@ -3785,118 +3273,638 @@ public static PrivateEndpointConnectionRequestStatus PrivateEndpointConnectionRe return new PrivateEndpointConnectionRequestStatus(privateLinkServiceId, privateEndpointConnectionName, status); } - /// Initializes a new instance of ManagedLedgerDigestUploadData. + /// Initializes a new instance of ElasticPoolData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger. - /// Specifies the state of ledger digest upload. - /// A new instance for mocking. - public static ManagedLedgerDigestUploadData ManagedLedgerDigestUploadData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string digestStorageEndpoint = null, ManagedLedgerDigestUploadsState? state = null) + /// The tags. + /// The location. + /// + /// The elastic pool SKU. + /// + /// The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command: + /// + /// ```azurecli + /// az sql elastic-pool list-editions -l <location> -o table + /// ```` + /// + /// + /// Kind of elastic pool. This is metadata used for the Azure portal experience. + /// The state of the elastic pool. + /// The creation date of the elastic pool (ISO8601 format). + /// The storage limit for the database elastic pool in bytes. + /// Minimal capacity that serverless pool will not shrink below, if not paused. + /// The per database settings for the elastic pool. + /// Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. + /// The license type to apply for this elastic pool. + /// Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. + /// The number of secondary replicas associated with the elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools. + /// Type of enclave requested on the elastic pool. + /// Specifies the availability zone the pool's primary replica is pinned to. + /// A new instance for mocking. + public static ElasticPoolData ElasticPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SqlSku sku = null, string kind = null, ElasticPoolState? state = null, DateTimeOffset? createdOn = null, long? maxSizeBytes = null, double? minCapacity = null, ElasticPoolPerDatabaseSettings perDatabaseSettings = null, bool? isZoneRedundant = null, ElasticPoolLicenseType? licenseType = null, ResourceIdentifier maintenanceConfigurationId = null, int? highAvailabilityReplicaCount = null, SqlAlwaysEncryptedEnclaveType? preferredEnclaveType = null, SqlAvailabilityZoneType? availabilityZone = null) { - return new ManagedLedgerDigestUploadData(id, name, resourceType, systemData, digestStorageEndpoint, state); - } + tags ??= new Dictionary(); - /// 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); + return new ElasticPoolData(id, name, resourceType, systemData, tags, location, sku, kind, state, createdOn, maxSizeBytes, minCapacity, perDatabaseSettings, isZoneRedundant, licenseType, maintenanceConfigurationId, highAvailabilityReplicaCount, preferredEnclaveType, availabilityZone); } - /// Initializes a new instance of SqlServerData. + /// Initializes a new instance of ManagedDatabaseData. /// 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: '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) + /// Collation of the managed database. + /// Status of the database. + /// Creation date of the database. + /// Earliest restore point in time for point in time restore. + /// Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. + /// Geo paired region. + /// Collation of the metadata catalog. + /// Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required). + /// Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored. + /// The resource identifier of the source database associated with create operation of this database. + /// The resource identifier of the cross-subscription source database associated with create operation of this database. + /// The restorable dropped database resource id to restore when creating this database. + /// The restorable cross-subscription dropped database resource id to restore when creating this database. + /// Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed. + /// Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token. + /// Instance Failover Group resource identifier that this managed database belongs to. + /// The resource identifier of the recoverable database associated with create operation of this database. + /// The name of the Long Term Retention backup to be used for restore of this managed database. + /// Whether to auto complete restore of this managed database. + /// Last backup file name for restore of this managed database. + /// Target managed instance id used in cross-subscription restore. + /// Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. + /// A new instance for mocking. + public static ManagedDatabaseData ManagedDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string collation = null, ManagedDatabaseStatus? status = null, DateTimeOffset? createdOn = null, DateTimeOffset? earliestRestorePoint = null, DateTimeOffset? restorePointInTime = null, AzureLocation? defaultSecondaryLocation = null, CatalogCollationType? catalogCollation = null, ManagedDatabaseCreateMode? createMode = null, Uri storageContainerUri = null, ResourceIdentifier sourceDatabaseId = null, ResourceIdentifier crossSubscriptionSourceDatabaseId = null, ResourceIdentifier restorableDroppedDatabaseId = null, ResourceIdentifier crossSubscriptionRestorableDroppedDatabaseId = null, string storageContainerIdentity = null, string storageContainerSasToken = null, ResourceIdentifier failoverGroupId = null, ResourceIdentifier recoverableDatabaseId = null, ResourceIdentifier longTermRetentionBackupResourceId = null, bool? allowAutoCompleteRestore = null, string lastBackupName = null, ResourceIdentifier crossSubscriptionTargetManagedInstanceId = null, bool? isLedgerOn = 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); + return new ManagedDatabaseData(id, name, resourceType, systemData, tags, location, collation, status, createdOn, earliestRestorePoint, restorePointInTime, defaultSecondaryLocation, catalogCollation, createMode, storageContainerUri, sourceDatabaseId, crossSubscriptionSourceDatabaseId, restorableDroppedDatabaseId, crossSubscriptionRestorableDroppedDatabaseId, storageContainerIdentity, storageContainerSasToken, failoverGroupId, recoverableDatabaseId, longTermRetentionBackupResourceId, allowAutoCompleteRestore, lastBackupName, crossSubscriptionTargetManagedInstanceId, isLedgerOn); } - /// Initializes a new instance of RefreshExternalGovernanceStatusOperationResult. + /// Initializes a new instance of ManagedInstanceData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// Request Id. - /// Request type. - /// Queued time. - /// Server name. + /// The tags. + /// The location. + /// The Azure Active Directory identity of the managed instance. + /// Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH. + /// + /// + /// Specifies the mode of database creation. + /// + /// Default: Regular instance creation. + /// + /// Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. + /// + /// The fully qualified domain name of the managed instance. + /// Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). + /// The administrator login password (required for managed instance creation). + /// Subnet resource ID for the managed instance. + /// The state of the managed instance. + /// The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + /// The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. + /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. + /// Collation of the managed instance. + /// The Dns Zone that the managed instance is in. + /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. + /// Whether or not the public data endpoint is enabled. + /// The resource identifier of the source managed instance associated with create operation of this instance. + /// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. + /// Connection type used for connecting to the instance. + /// + /// Id of the timezone. Allowed values are timezones supported by Windows. + /// Windows keeps details on supported timezones, including the id, in registry under + /// KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + /// You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. + /// List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + /// An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". + /// + /// The Id of the instance pool this managed server belongs to. + /// Specifies maintenance configuration id to apply to this managed instance. + /// List of private endpoint connections on a managed instance. + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. + /// The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). + /// The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). + /// Whether or not the multi-az is enabled. + /// The resource id of a user assigned identity to be used by default. + /// A CMK URI of the key to use for encryption. + /// The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. + /// The managed instance's service principal. + /// A new instance for mocking. + public static ManagedInstanceData ManagedInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, SqlSku sku = null, ManagedInstancePropertiesProvisioningState? provisioningState = null, ManagedServerCreateMode? managedInstanceCreateMode = null, string fullyQualifiedDomainName = null, string administratorLogin = null, string administratorLoginPassword = null, ResourceIdentifier subnetId = null, string state = null, ManagedInstanceLicenseType? licenseType = null, int? vCores = null, int? storageSizeInGB = null, string collation = null, string dnsZone = null, ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = null, ResourceIdentifier sourceManagedInstanceId = null, DateTimeOffset? restorePointInTime = null, ManagedInstanceProxyOverride? proxyOverride = null, string timezoneId = null, ResourceIdentifier instancePoolId = null, ResourceIdentifier maintenanceConfigurationId = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, SqlBackupStorageRedundancy? currentBackupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isZoneRedundant = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Uri keyId = null, ManagedInstanceExternalAdministrator administrators = null, SqlServicePrincipal servicePrincipal = null) + { + tags ??= new Dictionary(); + privateEndpointConnections ??= new List(); + + return new ManagedInstanceData(id, name, resourceType, systemData, tags, location, identity, sku, provisioningState, managedInstanceCreateMode, fullyQualifiedDomainName, administratorLogin, administratorLoginPassword, subnetId, state, licenseType, vCores, storageSizeInGB, collation, dnsZone, managedDnsZonePartner, isPublicDataEndpointEnabled, sourceManagedInstanceId, restorePointInTime, proxyOverride, timezoneId, instancePoolId, maintenanceConfigurationId, privateEndpointConnections?.ToList(), minimalTlsVersion, currentBackupStorageRedundancy, requestedBackupStorageRedundancy, isZoneRedundant, primaryUserAssignedIdentityId, keyId, administrators, servicePrincipal); + } + + /// Initializes a new instance of ManagedInstancePecProperty. + /// Resource ID. + /// Private endpoint connection properties. + /// A new instance for mocking. + public static ManagedInstancePecProperty ManagedInstancePecProperty(ResourceIdentifier id = null, ManagedInstancePrivateEndpointConnectionProperties properties = null) + { + return new ManagedInstancePecProperty(id, properties); + } + + /// Initializes a new instance of SqlServicePrincipal. + /// The Azure Active Directory application object id. + /// The Azure Active Directory application client id. + /// The Azure Active Directory tenant id. + /// Service principal type. + /// A new instance for mocking. + public static SqlServicePrincipal SqlServicePrincipal(Guid? principalId = null, Guid? clientId = null, Guid? tenantId = null, SqlServicePrincipalType? principalType = null) + { + return new SqlServicePrincipal(principalId, clientId, tenantId, principalType); + } + + /// Initializes a new instance of SqlOutboundEnvironmentEndpoint. + /// The type of service accessed by the managed instance service, e.g., Azure Storage, Azure Active Directory, etc. + /// The endpoints that the managed instance service communicates with in order to function correctly. + /// A new instance for mocking. + public static SqlOutboundEnvironmentEndpoint SqlOutboundEnvironmentEndpoint(string category = null, IEnumerable endpoints = null) + { + endpoints ??= new List(); + + return new SqlOutboundEnvironmentEndpoint(category, endpoints?.ToList()); + } + + /// Initializes a new instance of ManagedInstanceEndpointDependency. + /// The domain name of the dependency. + /// The IP Addresses and Ports used when connecting to DomainName. + /// A new instance for mocking. + public static ManagedInstanceEndpointDependency ManagedInstanceEndpointDependency(string domainName = null, IEnumerable endpointDetails = null) + { + endpointDetails ??= new List(); + + return new ManagedInstanceEndpointDependency(domainName, endpointDetails?.ToList()); + } + + /// Initializes a new instance of ManagedInstanceEndpointDetail. + /// The port an endpoint is connected to. + /// A new instance for mocking. + public static ManagedInstanceEndpointDetail ManagedInstanceEndpointDetail(int? port = null) + { + return new ManagedInstanceEndpointDetail(port); + } + + /// Initializes a new instance of TopQueries. + /// Requested number of top queries. + /// Aggregation function used to calculate query metrics. + /// Metric used to rank queries. + /// Interval type (length). + /// The start time for the metric (ISO-8601 format). + /// The end time for the metric (ISO-8601 format). + /// List of top resource consuming queries with appropriate metric data. + /// A new instance for mocking. + public static TopQueries TopQueries(int? numberOfQueries = null, string aggregationFunction = null, string observationMetric = null, QueryTimeGrainType? intervalType = null, string startTime = null, string endTime = null, IEnumerable queries = null) + { + queries ??= new List(); + + return new TopQueries(numberOfQueries, aggregationFunction, observationMetric, intervalType, startTime, endTime, queries?.ToList()); + } + + /// Initializes a new instance of ManagedLedgerDigestUploadData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger. + /// Specifies the state of ledger digest upload. + /// A new instance for mocking. + public static ManagedLedgerDigestUploadData ManagedLedgerDigestUploadData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string digestStorageEndpoint = null, ManagedLedgerDigestUploadsState? state = null) + { + return new ManagedLedgerDigestUploadData(id, name, resourceType, systemData, digestStorageEndpoint, state); + } + + /// Initializes a new instance of RecoverableDatabaseData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The edition of the database. + /// The service level objective name of the database. + /// The elastic pool name of the database. + /// The last available backup date. + /// The resource ids of the user assigned identities to use. + /// A new instance for mocking. + public static RecoverableDatabaseData RecoverableDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string edition = null, string serviceLevelObjective = null, string elasticPoolName = null, DateTimeOffset? lastAvailableBackupOn = null, IDictionary keys = null) + { + keys ??= new Dictionary(); + + return new RecoverableDatabaseData(id, name, resourceType, systemData, edition, serviceLevelObjective, elasticPoolName, lastAvailableBackupOn, keys); + } + + /// Initializes a new instance of RestorableDroppedDatabaseData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The name and tier of the SKU. + /// The name of the database. + /// The max size of the database expressed in bytes. + /// The creation date of the database (ISO8601 format). + /// The deletion date of the database (ISO8601 format). + /// The earliest restore date of the database (ISO8601 format). + /// The storage account type used to store backups for this database. + /// The resource ids of the user assigned identities to use. + /// A new instance for mocking. + public static RestorableDroppedDatabaseData RestorableDroppedDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SqlSku sku = null, string databaseName = null, long? maxSizeBytes = null, DateTimeOffset? createdOn = null, DateTimeOffset? deletedOn = null, DateTimeOffset? earliestRestoreOn = null, SqlBackupStorageRedundancy? backupStorageRedundancy = null, IDictionary keys = null) + { + tags ??= new Dictionary(); + keys ??= new Dictionary(); + + return new RestorableDroppedDatabaseData(id, name, resourceType, systemData, tags, location, sku, databaseName, maxSizeBytes, createdOn, deletedOn, earliestRestoreOn, backupStorageRedundancy, keys); + } + + /// Initializes a new instance of ManagedInstanceServerConfigurationOptionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Value of the server configuration option. + /// Provisioning state of server configuration option. + /// A new instance for mocking. + public static ManagedInstanceServerConfigurationOptionData ManagedInstanceServerConfigurationOptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? serverConfigurationOptionValue = null, JobExecutionProvisioningState? provisioningState = null) + { + 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); + return new RefreshExternalGovernanceStatusOperationResult(id, name, resourceType, systemData, requestId, requestType, queuedTime, serverName, status, errorMessage); + } + + /// Initializes a new instance of ManagedInstanceStartStopScheduleData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The description of the schedule. + /// The time zone of the schedule. + /// Schedule list. + /// Next action to be executed (Start or Stop). + /// Timestamp when the next action will be executed in the corresponding schedule time zone. + /// A new instance for mocking. + public static ManagedInstanceStartStopScheduleData ManagedInstanceStartStopScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string timeZoneId = null, IEnumerable scheduleList = null, string nextRunAction = null, string nextExecutionTime = null) + { + scheduleList ??= new List(); + + return new ManagedInstanceStartStopScheduleData(id, name, resourceType, systemData, description, timeZoneId, scheduleList?.ToList(), nextRunAction, nextExecutionTime); + } + + /// Initializes a new instance of LogicalDatabaseTransparentDataEncryptionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Specifies the state of the transparent data encryption. + /// A new instance for mocking. + public static LogicalDatabaseTransparentDataEncryptionData LogicalDatabaseTransparentDataEncryptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TransparentDataEncryptionState? state = null) + { + return new LogicalDatabaseTransparentDataEncryptionData(id, name, resourceType, systemData, state); } - /// Initializes a new instance of ManagedInstanceStartStopScheduleData. + /// Initializes a new instance of FailoverGroupData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The description of the schedule. - /// The time zone of the schedule. - /// Schedule list. - /// Next action to be executed (Start or Stop). - /// Timestamp when the next action will be executed in the corresponding schedule time zone. - /// A new instance for mocking. - public static ManagedInstanceStartStopScheduleData ManagedInstanceStartStopScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string timeZoneId = null, IEnumerable scheduleList = null, string nextRunAction = null, string nextExecutionTime = null) + /// 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) { - scheduleList ??= new List(); + tags ??= new Dictionary(); + partnerServers ??= new List(); + failoverDatabases ??= new List(); - return new ManagedInstanceStartStopScheduleData(id, name, resourceType, systemData, description, timeZoneId, scheduleList?.ToList(), nextRunAction, nextExecutionTime); + 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. + /// Resource type. + /// The start IP address of the firewall rule. Must be IPv6 format. + /// The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpv6Address. + /// A new instance for mocking. + public static IPv6FirewallRuleData IPv6FirewallRuleData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, string startIPv6Address = null, string endIPv6Address = null) + { + return new IPv6FirewallRuleData(id, name, resourceType, startIPv6Address, endIPv6Address); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentBaselineData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The baseline set result. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentBaselineData SqlVulnerabilityAssessmentBaselineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary>> results = null) + { + results ??= new Dictionary>>(); + + return new SqlVulnerabilityAssessmentBaselineData(id, name, resourceType, systemData, results); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The latest scan flag. + /// The rule baseline result list. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isLatestScan = null, IDictionary>> results = null) + { + results ??= new Dictionary>>(); + + return new SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent(id, name, resourceType, systemData, isLatestScan, results); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentBaselineRuleData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The rule baseline result. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentBaselineRuleData SqlVulnerabilityAssessmentBaselineRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable> results = null) + { + results ??= new List>(); + + return new SqlVulnerabilityAssessmentBaselineRuleData(id, name, resourceType, systemData, results?.ToList()); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The latest scan flag. + /// The rule baseline result. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isLatestScan = null, IEnumerable> results = null) + { + results ??= new List>(); + + return new SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent(id, name, resourceType, systemData, isLatestScan, results?.ToList()); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentScanResultData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// SQL Vulnerability Assessment rule Id. + /// SQL Vulnerability Assessment rule result status. + /// SQL Vulnerability Assessment error message. + /// SQL Vulnerability Assessment is the query results trimmed. + /// SQL Vulnerability Assessment query results that was run. + /// SQL Vulnerability Assessment the remediation details. + /// SQL Vulnerability Assessment rule result adjusted with baseline. + /// SQL Vulnerability Assessment rule metadata. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentScanResultData SqlVulnerabilityAssessmentScanResultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string ruleId = null, SqlVulnerabilityAssessmentRuleStatus? status = null, string errorMessage = null, bool? isTrimmed = null, IEnumerable> queryResults = null, SqlVulnerabilityAssessmentRemediation remediation = null, SqlVulnerabilityAssessmentBaselineAdjustedResult baselineAdjustedResult = null, SqlVulnerabilityAssessmentRuleMetadata ruleMetadata = null) + { + queryResults ??= new List>(); + + return new SqlVulnerabilityAssessmentScanResultData(id, name, resourceType, systemData, ruleId, status, errorMessage, isTrimmed, queryResults?.ToList(), remediation, baselineAdjustedResult, ruleMetadata); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentRemediation. + /// SQL Vulnerability Assessment remediation description. + /// SQL Vulnerability Assessment remediation script. + /// SQL Vulnerability Assessment is remediation automated. + /// SQL Vulnerability Assessment optional link to remediate in Azure Portal. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentRemediation SqlVulnerabilityAssessmentRemediation(string description = null, IEnumerable scripts = null, bool? isAutomated = null, string portalLink = null) + { + scripts ??= new List(); + + return new SqlVulnerabilityAssessmentRemediation(description, scripts?.ToList(), isAutomated, portalLink); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentBaselineAdjustedResult. + /// SQL Vulnerability Assessment baseline details. + /// SQL Vulnerability Assessment baseline status. + /// SQL Vulnerability Assessment results that are not in baseline. + /// SQL Vulnerability Assessment results that are in baseline. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentBaselineAdjustedResult SqlVulnerabilityAssessmentBaselineAdjustedResult(SqlVulnerabilityAssessmentBaselineDetails baseline = null, SqlVulnerabilityAssessmentRuleStatus? status = null, IEnumerable> resultsNotInBaseline = null, IEnumerable> resultsOnlyInBaseline = null) + { + resultsNotInBaseline ??= new List>(); + resultsOnlyInBaseline ??= new List>(); + + return new SqlVulnerabilityAssessmentBaselineAdjustedResult(baseline, status, resultsNotInBaseline?.ToList(), resultsOnlyInBaseline?.ToList()); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentBaselineDetails. + /// SQL Vulnerability Assessment baseline expected results. + /// SQL Vulnerability Assessment baseline update time (UTC). + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentBaselineDetails SqlVulnerabilityAssessmentBaselineDetails(IEnumerable> expectedResults = null, DateTimeOffset? updatedOn = null) + { + expectedResults ??= new List>(); + + return new SqlVulnerabilityAssessmentBaselineDetails(expectedResults?.ToList(), updatedOn); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentRuleMetadata. + /// SQL Vulnerability Assessment rule Id. + /// SQL Vulnerability Assessment rule severity. + /// SQL Vulnerability Assessment rule category. + /// SQL Vulnerability Assessment rule type. + /// SQL Vulnerability Assessment rule title. + /// SQL Vulnerability Assessment rule description. + /// SQL Vulnerability Assessment rule rationale. + /// SQL Vulnerability Assessment rule query details. + /// SQL Vulnerability Assessment benchmark references. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentRuleMetadata SqlVulnerabilityAssessmentRuleMetadata(string ruleId = null, SqlVulnerabilityAssessmentRuleSeverity? severity = null, string category = null, SqlVulnerabilityAssessmentRuleType? ruleType = null, string title = null, string description = null, string rationale = null, SqlVulnerabilityAssessmentQueryCheck queryCheck = null, IEnumerable benchmarkReferences = null) + { + benchmarkReferences ??= new List(); + + return new SqlVulnerabilityAssessmentRuleMetadata(ruleId, severity, category, ruleType, title, description, rationale, queryCheck, benchmarkReferences?.ToList()); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentQueryCheck. + /// SQL Vulnerability Assessment rule query. + /// SQL Vulnerability Assessment query expected result. + /// SQL Vulnerability Assessment column names of query expected result. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentQueryCheck SqlVulnerabilityAssessmentQueryCheck(string query = null, IEnumerable> expectedResult = null, IEnumerable columnNames = null) + { + expectedResult ??= new List>(); + columnNames ??= new List(); + + return new SqlVulnerabilityAssessmentQueryCheck(query, expectedResult?.ToList(), columnNames?.ToList()); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentBenchmarkReference. + /// SQL Vulnerability Assessment benchmark name. + /// SQL Vulnerability Assessment benchmark reference. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentBenchmarkReference SqlVulnerabilityAssessmentBenchmarkReference(string benchmark = null, string reference = null) + { + return new SqlVulnerabilityAssessmentBenchmarkReference(benchmark, reference); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentScanData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The scan ID. + /// The scan trigger type. + /// The scan status. + /// The scan start time (UTC). + /// The scan end time (UTC). + /// The scan errors. + /// The server name. + /// The database name. + /// The SQL version. + /// The number of failed rules with high severity. + /// The number of failed rules with medium severity. + /// The number of failed rules with low severity. + /// The number of total passed rules. + /// The number of total failed rules. + /// The number of total rules assessed. + /// Baseline created for this database, and has one or more rules. + /// The last scan time. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentScanData SqlVulnerabilityAssessmentScanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string scanId = null, VulnerabilityAssessmentScanTriggerType? triggerType = null, VulnerabilityAssessmentScanState? state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable errors = null, string server = null, string database = null, string sqlVersion = null, int? highSeverityFailedRulesCount = null, int? mediumSeverityFailedRulesCount = null, int? lowSeverityFailedRulesCount = null, int? totalPassedRulesCount = null, int? totalFailedRulesCount = null, int? totalRulesCount = null, bool? isBaselineApplied = null, DateTimeOffset? lastScanOn = null) + { + errors ??= new List(); + + return new SqlVulnerabilityAssessmentScanData(id, name, resourceType, systemData, scanId, triggerType, state, startOn, endOn, errors?.ToList(), server, database, sqlVersion, highSeverityFailedRulesCount, mediumSeverityFailedRulesCount, lowSeverityFailedRulesCount, totalPassedRulesCount, totalFailedRulesCount, totalRulesCount, isBaselineApplied, lastScanOn); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentScanError. + /// The error code. + /// The error message. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentScanError SqlVulnerabilityAssessmentScanError(string code = null, string message = null) + { + return new SqlVulnerabilityAssessmentScanError(code, message); + } + + /// Initializes a new instance of SqlVulnerabilityAssessmentData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentData SqlVulnerabilityAssessmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SqlVulnerabilityAssessmentState? state = null) + { + return new SqlVulnerabilityAssessmentData(id, name, resourceType, systemData, state); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolCollection.cs index 0ffbf4505ff6..1753abab2d07 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolCollection.cs @@ -81,7 +81,7 @@ public virtual async Task> CreateOrUpdateAsync try { var response = await _elasticPoolRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, elasticPoolName, data, cancellationToken).ConfigureAwait(false); - var operation = new SqlArmOperation(new ElasticPoolOperationSource(Client), _elasticPoolClientDiagnostics, Pipeline, _elasticPoolRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, elasticPoolName, data).Request, response, OperationFinalStateVia.Location); + var operation = new SqlArmOperation(new ElasticPoolOperationSource(Client), _elasticPoolClientDiagnostics, Pipeline, _elasticPoolRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, elasticPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -122,7 +122,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn try { var response = _elasticPoolRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, elasticPoolName, data, cancellationToken); - var operation = new SqlArmOperation(new ElasticPoolOperationSource(Client), _elasticPoolClientDiagnostics, Pipeline, _elasticPoolRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, elasticPoolName, data).Request, response, OperationFinalStateVia.Location); + var operation = new SqlArmOperation(new ElasticPoolOperationSource(Client), _elasticPoolClientDiagnostics, Pipeline, _elasticPoolRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, elasticPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolData.cs index 3c3aecd562d5..90529d2362a9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolData.cs @@ -46,23 +46,29 @@ public ElasticPoolData(AzureLocation location) : base(location) /// The state of the elastic pool. /// The creation date of the elastic pool (ISO8601 format). /// The storage limit for the database elastic pool in bytes. + /// Minimal capacity that serverless pool will not shrink below, if not paused. /// The per database settings for the elastic pool. /// Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. /// The license type to apply for this elastic pool. /// Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. - /// The number of secondary replicas associated with the elastic pool that are used to provide high availability. - internal ElasticPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SqlSku sku, string kind, ElasticPoolState? state, DateTimeOffset? createdOn, long? maxSizeBytes, ElasticPoolPerDatabaseSettings perDatabaseSettings, bool? isZoneRedundant, ElasticPoolLicenseType? licenseType, ResourceIdentifier maintenanceConfigurationId, int? highAvailabilityReplicaCount) : base(id, name, resourceType, systemData, tags, location) + /// The number of secondary replicas associated with the elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools. + /// Type of enclave requested on the elastic pool. + /// Specifies the availability zone the pool's primary replica is pinned to. + internal ElasticPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SqlSku sku, string kind, ElasticPoolState? state, DateTimeOffset? createdOn, long? maxSizeBytes, double? minCapacity, ElasticPoolPerDatabaseSettings perDatabaseSettings, bool? isZoneRedundant, ElasticPoolLicenseType? licenseType, ResourceIdentifier maintenanceConfigurationId, int? highAvailabilityReplicaCount, SqlAlwaysEncryptedEnclaveType? preferredEnclaveType, SqlAvailabilityZoneType? availabilityZone) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Kind = kind; State = state; CreatedOn = createdOn; MaxSizeBytes = maxSizeBytes; + MinCapacity = minCapacity; PerDatabaseSettings = perDatabaseSettings; IsZoneRedundant = isZoneRedundant; LicenseType = licenseType; MaintenanceConfigurationId = maintenanceConfigurationId; HighAvailabilityReplicaCount = highAvailabilityReplicaCount; + PreferredEnclaveType = preferredEnclaveType; + AvailabilityZone = availabilityZone; } /// @@ -84,6 +90,8 @@ internal ElasticPoolData(ResourceIdentifier id, string name, ResourceType resour public DateTimeOffset? CreatedOn { get; } /// The storage limit for the database elastic pool in bytes. public long? MaxSizeBytes { get; set; } + /// Minimal capacity that serverless pool will not shrink below, if not paused. + public double? MinCapacity { get; set; } /// The per database settings for the elastic pool. public ElasticPoolPerDatabaseSettings PerDatabaseSettings { get; set; } /// Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. @@ -92,7 +100,11 @@ internal ElasticPoolData(ResourceIdentifier id, string name, ResourceType resour public ElasticPoolLicenseType? LicenseType { get; set; } /// Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. public ResourceIdentifier MaintenanceConfigurationId { get; set; } - /// The number of secondary replicas associated with the elastic pool that are used to provide high availability. + /// The number of secondary replicas associated with the elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools. public int? HighAvailabilityReplicaCount { get; set; } + /// Type of enclave requested on the elastic pool. + public SqlAlwaysEncryptedEnclaveType? PreferredEnclaveType { get; set; } + /// Specifies the availability zone the pool's primary replica is pinned to. + public SqlAvailabilityZoneType? AvailabilityZone { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolResource.cs index 76b4ae2658c6..944f65f0b5eb 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolResource.cs @@ -603,6 +603,50 @@ public virtual Pageable GetElasticPoolOperations(Cance return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, ElasticPoolOperationData.DeserializeElasticPoolOperationData, _elasticPoolOperationsClientDiagnostics, Pipeline, "ElasticPoolResource.GetElasticPoolOperations", "value", "nextLink", cancellationToken); } + /// + /// Gets a list of databases in an elastic pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases + /// + /// + /// Operation Id + /// Databases_ListByElasticPool + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDatabasesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlDatabaseDatabasesRestClient.CreateListByElasticPoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlDatabaseDatabasesRestClient.CreateListByElasticPoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlDatabaseResource(Client, SqlDatabaseData.DeserializeSqlDatabaseData(e)), _sqlDatabaseDatabasesClientDiagnostics, Pipeline, "ElasticPoolResource.GetDatabases", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of databases in an elastic pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases + /// + /// + /// Operation Id + /// Databases_ListByElasticPool + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDatabases(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlDatabaseDatabasesRestClient.CreateListByElasticPoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlDatabaseDatabasesRestClient.CreateListByElasticPoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlDatabaseResource(Client, SqlDatabaseData.DeserializeSqlDatabaseData(e)), _sqlDatabaseDatabasesClientDiagnostics, Pipeline, "ElasticPoolResource.GetDatabases", "value", "nextLink", cancellationToken); + } + /// /// Failovers an elastic pool. /// @@ -671,50 +715,6 @@ public virtual ArmOperation Failover(WaitUntil waitUntil, CancellationToken canc } } - /// - /// Gets a list of databases in an elastic pool. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases - /// - /// - /// Operation Id - /// Databases_ListByElasticPool - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDatabasesAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlDatabaseDatabasesRestClient.CreateListByElasticPoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlDatabaseDatabasesRestClient.CreateListByElasticPoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlDatabaseResource(Client, SqlDatabaseData.DeserializeSqlDatabaseData(e)), _sqlDatabaseDatabasesClientDiagnostics, Pipeline, "ElasticPoolResource.GetDatabases", "value", "nextLink", cancellationToken); - } - - /// - /// Gets a list of databases in an elastic pool. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases - /// - /// - /// Operation Id - /// Databases_ListByElasticPool - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDatabases(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlDatabaseDatabasesRestClient.CreateListByElasticPoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlDatabaseDatabasesRestClient.CreateListByElasticPoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlDatabaseResource(Client, SqlDatabaseData.DeserializeSqlDatabaseData(e)), _sqlDatabaseDatabasesClientDiagnostics, Pipeline, "ElasticPoolResource.GetDatabases", "value", "nextLink", cancellationToken); - } - /// /// Add a tag to the current resource. /// 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 ca5c2ad02039..e1c84fcbeac1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs @@ -51,25 +51,6 @@ private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtens return new SubscriptionResourceExtensionClient(client, scope); }); } - #region RecoverableDatabaseResource - /// - /// 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 RecoverableDatabaseResource GetRecoverableDatabaseResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - RecoverableDatabaseResource.ValidateResourceId(id); - return new RecoverableDatabaseResource(client, id); - } - ); - } - #endregion - #region DataMaskingPolicyResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -526,25 +507,6 @@ public static EncryptionProtectorResource GetEncryptionProtectorResource(this Ar } #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 SqlFirewallRuleResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -1514,25 +1476,6 @@ public static WorkloadGroupResource GetWorkloadGroupResource(this ArmClient clie } #endregion - #region LogicalDatabaseTransparentDataEncryptionResource - /// - /// 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 LogicalDatabaseTransparentDataEncryptionResource GetLogicalDatabaseTransparentDataEncryptionResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - LogicalDatabaseTransparentDataEncryptionResource.ValidateResourceId(id); - return new LogicalDatabaseTransparentDataEncryptionResource(client, id); - } - ); - } - #endregion - #region BackupShortTermRetentionPolicyResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -1666,25 +1609,6 @@ public static ResourceGroupLongTermRetentionManagedInstanceBackupResource GetRes } #endregion - #region RestorableDroppedDatabaseResource - /// - /// 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 RestorableDroppedDatabaseResource GetRestorableDroppedDatabaseResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - RestorableDroppedDatabaseResource.ValidateResourceId(id); - return new RestorableDroppedDatabaseResource(client, id); - } - ); - } - #endregion - #region RestorableDroppedManagedDatabaseResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -1761,44 +1685,6 @@ public static ManagedInstanceServerTrustCertificateResource GetManagedInstanceSe } #endregion - #region ElasticPoolResource - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static ElasticPoolResource GetElasticPoolResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - ElasticPoolResource.ValidateResourceId(id); - return new ElasticPoolResource(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. - /// You can use to create an from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static IPv6FirewallRuleResource GetIPv6FirewallRuleResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - IPv6FirewallRuleResource.ValidateResourceId(id); - return new IPv6FirewallRuleResource(client, id); - } - ); - } - #endregion - #region EndpointCertificateResource /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. @@ -1989,457 +1875,571 @@ public static ManagedServerDnsAliasResource GetManagedServerDnsAliasResource(thi } #endregion - #region SqlDatabaseSqlVulnerabilityAssessmentBaselineResource + #region ManagedDatabaseAdvancedThreatProtectionResource /// - /// 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. + /// 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 SqlDatabaseSqlVulnerabilityAssessmentBaselineResource GetSqlDatabaseSqlVulnerabilityAssessmentBaselineResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ManagedDatabaseAdvancedThreatProtectionResource GetManagedDatabaseAdvancedThreatProtectionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.ValidateResourceId(id); - return new SqlDatabaseSqlVulnerabilityAssessmentBaselineResource(client, id); + ManagedDatabaseAdvancedThreatProtectionResource.ValidateResourceId(id); + return new ManagedDatabaseAdvancedThreatProtectionResource(client, id); } ); } #endregion - #region SqlServerSqlVulnerabilityAssessmentBaselineResource + #region ManagedInstanceAdvancedThreatProtectionResource /// - /// 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. + /// 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 SqlServerSqlVulnerabilityAssessmentBaselineResource GetSqlServerSqlVulnerabilityAssessmentBaselineResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ManagedInstanceAdvancedThreatProtectionResource GetManagedInstanceAdvancedThreatProtectionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SqlServerSqlVulnerabilityAssessmentBaselineResource.ValidateResourceId(id); - return new SqlServerSqlVulnerabilityAssessmentBaselineResource(client, id); + ManagedInstanceAdvancedThreatProtectionResource.ValidateResourceId(id); + return new ManagedInstanceAdvancedThreatProtectionResource(client, id); } ); } #endregion - #region SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource + #region SqlServerDatabaseReplicationLinkResource /// - /// 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. + /// 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 SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource GetSqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static SqlServerDatabaseReplicationLinkResource GetSqlServerDatabaseReplicationLinkResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.ValidateResourceId(id); - return new SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource(client, id); + SqlServerDatabaseReplicationLinkResource.ValidateResourceId(id); + return new SqlServerDatabaseReplicationLinkResource(client, id); } ); } #endregion - #region SqlServerSqlVulnerabilityAssessmentBaselineRuleResource + #region ManagedInstanceDtcResource /// - /// 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. + /// 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 SqlServerSqlVulnerabilityAssessmentBaselineRuleResource GetSqlServerSqlVulnerabilityAssessmentBaselineRuleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ManagedInstanceDtcResource GetManagedInstanceDtcResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.ValidateResourceId(id); - return new SqlServerSqlVulnerabilityAssessmentBaselineRuleResource(client, id); + ManagedInstanceDtcResource.ValidateResourceId(id); + return new ManagedInstanceDtcResource(client, id); } ); } #endregion - #region SqlDatabaseSqlVulnerabilityAssessmentScanResultResource + #region VirtualClusterResource /// - /// 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. + /// 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 SqlDatabaseSqlVulnerabilityAssessmentScanResultResource GetSqlDatabaseSqlVulnerabilityAssessmentScanResultResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static VirtualClusterResource GetVirtualClusterResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.ValidateResourceId(id); - return new SqlDatabaseSqlVulnerabilityAssessmentScanResultResource(client, id); + VirtualClusterResource.ValidateResourceId(id); + return new VirtualClusterResource(client, id); } ); } #endregion - #region SqlServerSqlVulnerabilityAssessmentScanResultResource + #region InstanceFailoverGroupResource /// - /// 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. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static SqlServerSqlVulnerabilityAssessmentScanResultResource GetSqlServerSqlVulnerabilityAssessmentScanResultResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static InstanceFailoverGroupResource GetInstanceFailoverGroupResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SqlServerSqlVulnerabilityAssessmentScanResultResource.ValidateResourceId(id); - return new SqlServerSqlVulnerabilityAssessmentScanResultResource(client, id); + InstanceFailoverGroupResource.ValidateResourceId(id); + return new InstanceFailoverGroupResource(client, id); } ); } #endregion - #region SqlDatabaseSqlVulnerabilityAssessmentScanResource + #region ManagedDatabaseRestoreDetailResource /// - /// 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. + /// 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 SqlDatabaseSqlVulnerabilityAssessmentScanResource GetSqlDatabaseSqlVulnerabilityAssessmentScanResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ManagedDatabaseRestoreDetailResource GetManagedDatabaseRestoreDetailResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SqlDatabaseSqlVulnerabilityAssessmentScanResource.ValidateResourceId(id); - return new SqlDatabaseSqlVulnerabilityAssessmentScanResource(client, id); + ManagedDatabaseRestoreDetailResource.ValidateResourceId(id); + return new ManagedDatabaseRestoreDetailResource(client, id); } ); } #endregion - #region SqlServerSqlVulnerabilityAssessmentScanResource + #region SqlDatabaseResource /// - /// 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. + /// 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 SqlServerSqlVulnerabilityAssessmentScanResource GetSqlServerSqlVulnerabilityAssessmentScanResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static SqlDatabaseResource GetSqlDatabaseResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SqlServerSqlVulnerabilityAssessmentScanResource.ValidateResourceId(id); - return new SqlServerSqlVulnerabilityAssessmentScanResource(client, id); + SqlDatabaseResource.ValidateResourceId(id); + return new SqlDatabaseResource(client, id); } ); } #endregion - #region SqlDatabaseSqlVulnerabilityAssessmentResource + #region ElasticPoolResource /// - /// 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. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static SqlDatabaseSqlVulnerabilityAssessmentResource GetSqlDatabaseSqlVulnerabilityAssessmentResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ElasticPoolResource GetElasticPoolResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SqlDatabaseSqlVulnerabilityAssessmentResource.ValidateResourceId(id); - return new SqlDatabaseSqlVulnerabilityAssessmentResource(client, id); + ElasticPoolResource.ValidateResourceId(id); + return new ElasticPoolResource(client, id); } ); } #endregion - #region SqlServerSqlVulnerabilityAssessmentResource + #region ManagedDatabaseResource /// - /// 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. + /// 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 SqlServerSqlVulnerabilityAssessmentResource GetSqlServerSqlVulnerabilityAssessmentResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ManagedDatabaseResource GetManagedDatabaseResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SqlServerSqlVulnerabilityAssessmentResource.ValidateResourceId(id); - return new SqlServerSqlVulnerabilityAssessmentResource(client, id); + ManagedDatabaseResource.ValidateResourceId(id); + return new ManagedDatabaseResource(client, id); } ); } #endregion - #region ManagedDatabaseAdvancedThreatProtectionResource + #region ManagedInstanceResource /// - /// 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. + /// 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 ManagedDatabaseAdvancedThreatProtectionResource GetManagedDatabaseAdvancedThreatProtectionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ManagedInstanceResource GetManagedInstanceResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ManagedDatabaseAdvancedThreatProtectionResource.ValidateResourceId(id); - return new ManagedDatabaseAdvancedThreatProtectionResource(client, id); + ManagedInstanceResource.ValidateResourceId(id); + return new ManagedInstanceResource(client, id); } ); } #endregion - #region ManagedInstanceAdvancedThreatProtectionResource + #region ManagedLedgerDigestUploadResource /// - /// 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. + /// 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 ManagedInstanceAdvancedThreatProtectionResource GetManagedInstanceAdvancedThreatProtectionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ManagedLedgerDigestUploadResource GetManagedLedgerDigestUploadResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ManagedInstanceAdvancedThreatProtectionResource.ValidateResourceId(id); - return new ManagedInstanceAdvancedThreatProtectionResource(client, id); + ManagedLedgerDigestUploadResource.ValidateResourceId(id); + return new ManagedLedgerDigestUploadResource(client, id); } ); } #endregion - #region SqlServerDatabaseReplicationLinkResource + #region RecoverableDatabaseResource /// - /// 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. + /// 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 SqlServerDatabaseReplicationLinkResource GetSqlServerDatabaseReplicationLinkResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static RecoverableDatabaseResource GetRecoverableDatabaseResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SqlServerDatabaseReplicationLinkResource.ValidateResourceId(id); - return new SqlServerDatabaseReplicationLinkResource(client, id); + RecoverableDatabaseResource.ValidateResourceId(id); + return new RecoverableDatabaseResource(client, id); } ); } #endregion - #region ManagedInstanceDtcResource + #region RestorableDroppedDatabaseResource /// - /// 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. + /// 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 ManagedInstanceDtcResource GetManagedInstanceDtcResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static RestorableDroppedDatabaseResource GetRestorableDroppedDatabaseResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ManagedInstanceDtcResource.ValidateResourceId(id); - return new ManagedInstanceDtcResource(client, id); + RestorableDroppedDatabaseResource.ValidateResourceId(id); + return new RestorableDroppedDatabaseResource(client, id); } ); } #endregion - #region VirtualClusterResource + #region ManagedInstanceServerConfigurationOptionResource /// - /// 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. + /// 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 VirtualClusterResource GetVirtualClusterResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ManagedInstanceServerConfigurationOptionResource GetManagedInstanceServerConfigurationOptionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - VirtualClusterResource.ValidateResourceId(id); - return new VirtualClusterResource(client, id); + ManagedInstanceServerConfigurationOptionResource.ValidateResourceId(id); + return new ManagedInstanceServerConfigurationOptionResource(client, id); } ); } #endregion - #region InstanceFailoverGroupResource + #region SqlServerResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// 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 InstanceFailoverGroupResource GetInstanceFailoverGroupResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static SqlServerResource GetSqlServerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - InstanceFailoverGroupResource.ValidateResourceId(id); - return new InstanceFailoverGroupResource(client, id); + SqlServerResource.ValidateResourceId(id); + return new SqlServerResource(client, id); } ); } #endregion - #region ManagedDatabaseRestoreDetailResource + #region ManagedInstanceStartStopScheduleResource /// - /// 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. + /// 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 ManagedDatabaseRestoreDetailResource GetManagedDatabaseRestoreDetailResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ManagedInstanceStartStopScheduleResource GetManagedInstanceStartStopScheduleResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ManagedDatabaseRestoreDetailResource.ValidateResourceId(id); - return new ManagedDatabaseRestoreDetailResource(client, id); + ManagedInstanceStartStopScheduleResource.ValidateResourceId(id); + return new ManagedInstanceStartStopScheduleResource(client, id); } ); } #endregion - #region ManagedDatabaseResource + #region LogicalDatabaseTransparentDataEncryptionResource /// - /// 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. + /// 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 ManagedDatabaseResource GetManagedDatabaseResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static LogicalDatabaseTransparentDataEncryptionResource GetLogicalDatabaseTransparentDataEncryptionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ManagedDatabaseResource.ValidateResourceId(id); - return new ManagedDatabaseResource(client, id); + LogicalDatabaseTransparentDataEncryptionResource.ValidateResourceId(id); + return new LogicalDatabaseTransparentDataEncryptionResource(client, id); } ); } #endregion - #region ManagedInstanceResource + #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. + /// 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 ManagedInstanceResource GetManagedInstanceResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static FailoverGroupResource GetFailoverGroupResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ManagedInstanceResource.ValidateResourceId(id); - return new ManagedInstanceResource(client, id); + FailoverGroupResource.ValidateResourceId(id); + return new FailoverGroupResource(client, id); } ); } #endregion - #region ManagedInstanceServerConfigurationOptionResource + #region IPv6FirewallRuleResource /// - /// 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. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static ManagedInstanceServerConfigurationOptionResource GetManagedInstanceServerConfigurationOptionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static IPv6FirewallRuleResource GetIPv6FirewallRuleResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ManagedInstanceServerConfigurationOptionResource.ValidateResourceId(id); - return new ManagedInstanceServerConfigurationOptionResource(client, id); + IPv6FirewallRuleResource.ValidateResourceId(id); + return new IPv6FirewallRuleResource(client, id); } ); } #endregion - #region SqlDatabaseResource + #region SqlServerSqlVulnerabilityAssessmentBaselineResource /// - /// 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. + /// 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 SqlDatabaseResource GetSqlDatabaseResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static SqlServerSqlVulnerabilityAssessmentBaselineResource GetSqlServerSqlVulnerabilityAssessmentBaselineResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SqlDatabaseResource.ValidateResourceId(id); - return new SqlDatabaseResource(client, id); + SqlServerSqlVulnerabilityAssessmentBaselineResource.ValidateResourceId(id); + return new SqlServerSqlVulnerabilityAssessmentBaselineResource(client, id); } ); } #endregion - #region ManagedLedgerDigestUploadResource + #region SqlDatabaseSqlVulnerabilityAssessmentBaselineResource /// - /// 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. + /// 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 ManagedLedgerDigestUploadResource GetManagedLedgerDigestUploadResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static SqlDatabaseSqlVulnerabilityAssessmentBaselineResource GetSqlDatabaseSqlVulnerabilityAssessmentBaselineResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ManagedLedgerDigestUploadResource.ValidateResourceId(id); - return new ManagedLedgerDigestUploadResource(client, id); + SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.ValidateResourceId(id); + return new SqlDatabaseSqlVulnerabilityAssessmentBaselineResource(client, id); } ); } #endregion - #region SqlServerResource + #region SqlServerSqlVulnerabilityAssessmentBaselineRuleResource /// - /// 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. + /// 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) + /// Returns a object. + public static SqlServerSqlVulnerabilityAssessmentBaselineRuleResource GetSqlServerSqlVulnerabilityAssessmentBaselineRuleResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SqlServerResource.ValidateResourceId(id); - return new SqlServerResource(client, id); + SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.ValidateResourceId(id); + return new SqlServerSqlVulnerabilityAssessmentBaselineRuleResource(client, id); } ); } #endregion - #region ManagedInstanceStartStopScheduleResource + #region SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource /// - /// 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. + /// 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 ManagedInstanceStartStopScheduleResource GetManagedInstanceStartStopScheduleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource GetSqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ManagedInstanceStartStopScheduleResource.ValidateResourceId(id); - return new ManagedInstanceStartStopScheduleResource(client, id); + SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.ValidateResourceId(id); + return new SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource(client, id); + } + ); + } + #endregion + + #region SqlServerSqlVulnerabilityAssessmentScanResultResource + /// + /// 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 SqlServerSqlVulnerabilityAssessmentScanResultResource GetSqlServerSqlVulnerabilityAssessmentScanResultResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + SqlServerSqlVulnerabilityAssessmentScanResultResource.ValidateResourceId(id); + return new SqlServerSqlVulnerabilityAssessmentScanResultResource(client, id); + } + ); + } + #endregion + + #region SqlDatabaseSqlVulnerabilityAssessmentScanResultResource + /// + /// 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 SqlDatabaseSqlVulnerabilityAssessmentScanResultResource GetSqlDatabaseSqlVulnerabilityAssessmentScanResultResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.ValidateResourceId(id); + return new SqlDatabaseSqlVulnerabilityAssessmentScanResultResource(client, id); + } + ); + } + #endregion + + #region SqlServerSqlVulnerabilityAssessmentScanResource + /// + /// 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 SqlServerSqlVulnerabilityAssessmentScanResource GetSqlServerSqlVulnerabilityAssessmentScanResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + SqlServerSqlVulnerabilityAssessmentScanResource.ValidateResourceId(id); + return new SqlServerSqlVulnerabilityAssessmentScanResource(client, id); + } + ); + } + #endregion + + #region SqlDatabaseSqlVulnerabilityAssessmentScanResource + /// + /// 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 SqlDatabaseSqlVulnerabilityAssessmentScanResource GetSqlDatabaseSqlVulnerabilityAssessmentScanResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + SqlDatabaseSqlVulnerabilityAssessmentScanResource.ValidateResourceId(id); + return new SqlDatabaseSqlVulnerabilityAssessmentScanResource(client, id); + } + ); + } + #endregion + + #region SqlServerSqlVulnerabilityAssessmentResource + /// + /// 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 SqlServerSqlVulnerabilityAssessmentResource GetSqlServerSqlVulnerabilityAssessmentResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + SqlServerSqlVulnerabilityAssessmentResource.ValidateResourceId(id); + return new SqlServerSqlVulnerabilityAssessmentResource(client, id); + } + ); + } + #endregion + + #region SqlDatabaseSqlVulnerabilityAssessmentResource + /// + /// 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 SqlDatabaseSqlVulnerabilityAssessmentResource GetSqlDatabaseSqlVulnerabilityAssessmentResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + SqlDatabaseSqlVulnerabilityAssessmentResource.ValidateResourceId(id); + return new SqlDatabaseSqlVulnerabilityAssessmentResource(client, id); } ); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs index 0424d7043be3..82094f558655 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs @@ -23,7 +23,7 @@ public FailoverGroupData() { Tags = new ChangeTrackingDictionary(); PartnerServers = new ChangeTrackingList(); - Databases = new ChangeTrackingList(); + FailoverDatabases = new ChangeTrackingList(); } /// Initializes a new instance of FailoverGroupData. @@ -38,8 +38,8 @@ public FailoverGroupData() /// 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. - internal FailoverGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, IDictionary tags, FailoverGroupReadWriteEndpoint readWriteEndpoint, FailoverGroupReadOnlyEndpoint readOnlyEndpoint, FailoverGroupReplicationRole? replicationRole, string replicationState, IList partnerServers, IList databases) : base(id, name, resourceType, systemData) + /// List of databases in the failover group. + internal FailoverGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, IDictionary tags, FailoverGroupReadWriteEndpoint readWriteEndpoint, FailoverGroupReadOnlyEndpoint readOnlyEndpoint, FailoverGroupReplicationRole? replicationRole, string replicationState, IList partnerServers, IList failoverDatabases) : base(id, name, resourceType, systemData) { Location = location; Tags = tags; @@ -48,7 +48,7 @@ internal FailoverGroupData(ResourceIdentifier id, string name, ResourceType reso ReplicationRole = replicationRole; ReplicationState = replicationState; PartnerServers = partnerServers; - Databases = databases; + FailoverDatabases = failoverDatabases; } /// Resource location. @@ -78,6 +78,6 @@ public ReadOnlyEndpointFailoverPolicy? ReadOnlyEndpointFailoverPolicy /// List of partner server information for the failover group. public IList PartnerServers { get; } /// List of databases in the failover group. - public IList Databases { get; } + public IList FailoverDatabases { get; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.cs index 78082ce6705d..bd73b459ec10 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.cs @@ -432,6 +432,74 @@ public virtual ArmOperation ForceFailoverAllowDataLoss(Wa } } + /// + /// Fails over from the current primary server to this server. This operation tries planned before forced failover but might still result in data loss. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/tryPlannedBeforeForcedFailover + /// + /// + /// Operation Id + /// FailoverGroups_TryPlannedBeforeForcedFailover + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> TryPlannedBeforeForcedFailoverAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _failoverGroupClientDiagnostics.CreateScope("FailoverGroupResource.TryPlannedBeforeForcedFailover"); + scope.Start(); + try + { + var response = await _failoverGroupRestClient.TryPlannedBeforeForcedFailoverAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SqlArmOperation(new FailoverGroupOperationSource(Client), _failoverGroupClientDiagnostics, Pipeline, _failoverGroupRestClient.CreateTryPlannedBeforeForcedFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Fails over from the current primary server to this server. This operation tries planned before forced failover but might still result in data loss. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/tryPlannedBeforeForcedFailover + /// + /// + /// Operation Id + /// FailoverGroups_TryPlannedBeforeForcedFailover + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation TryPlannedBeforeForcedFailover(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _failoverGroupClientDiagnostics.CreateScope("FailoverGroupResource.TryPlannedBeforeForcedFailover"); + scope.Start(); + try + { + var response = _failoverGroupRestClient.TryPlannedBeforeForcedFailover(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new SqlArmOperation(new FailoverGroupOperationSource(Client), _failoverGroupClientDiagnostics, Pipeline, _failoverGroupRestClient.CreateTryPlannedBeforeForcedFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleData.cs index 2457a943ceae..13121345c409 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleData.cs @@ -26,7 +26,7 @@ public IPv6FirewallRuleData() /// Resource name. /// Resource type. /// The start IP address of the firewall rule. Must be IPv6 format. - /// The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpAddress. + /// The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpv6Address. internal IPv6FirewallRuleData(ResourceIdentifier id, string name, ResourceType? resourceType, string startIPv6Address, string endIPv6Address) : base(id, name, resourceType) { StartIPv6Address = startIPv6Address; @@ -35,7 +35,7 @@ internal IPv6FirewallRuleData(ResourceIdentifier id, string name, ResourceType? /// The start IP address of the firewall rule. Must be IPv6 format. public string StartIPv6Address { get; set; } - /// The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpAddress. + /// The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpv6Address. public string EndIPv6Address { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseData.cs index 8f5811dc6d95..2e384009ac86 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseData.cs @@ -53,7 +53,8 @@ public ManagedDatabaseData(AzureLocation location) : base(location) /// Whether to auto complete restore of this managed database. /// Last backup file name for restore of this managed database. /// Target managed instance id used in cross-subscription restore. - internal ManagedDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string collation, ManagedDatabaseStatus? status, DateTimeOffset? createdOn, DateTimeOffset? earliestRestorePoint, DateTimeOffset? restorePointInTime, AzureLocation? defaultSecondaryLocation, CatalogCollationType? catalogCollation, ManagedDatabaseCreateMode? createMode, Uri storageContainerUri, ResourceIdentifier sourceDatabaseId, string crossSubscriptionSourceDatabaseId, ResourceIdentifier restorableDroppedDatabaseId, string crossSubscriptionRestorableDroppedDatabaseId, string storageContainerIdentity, string storageContainerSasToken, ResourceIdentifier failoverGroupId, ResourceIdentifier recoverableDatabaseId, ResourceIdentifier longTermRetentionBackupResourceId, bool? allowAutoCompleteRestore, string lastBackupName, ResourceIdentifier crossSubscriptionTargetManagedInstanceId) : base(id, name, resourceType, systemData, tags, location) + /// Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. + internal ManagedDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string collation, ManagedDatabaseStatus? status, DateTimeOffset? createdOn, DateTimeOffset? earliestRestorePoint, DateTimeOffset? restorePointInTime, AzureLocation? defaultSecondaryLocation, CatalogCollationType? catalogCollation, ManagedDatabaseCreateMode? createMode, Uri storageContainerUri, ResourceIdentifier sourceDatabaseId, ResourceIdentifier crossSubscriptionSourceDatabaseId, ResourceIdentifier restorableDroppedDatabaseId, ResourceIdentifier crossSubscriptionRestorableDroppedDatabaseId, string storageContainerIdentity, string storageContainerSasToken, ResourceIdentifier failoverGroupId, ResourceIdentifier recoverableDatabaseId, ResourceIdentifier longTermRetentionBackupResourceId, bool? allowAutoCompleteRestore, string lastBackupName, ResourceIdentifier crossSubscriptionTargetManagedInstanceId, bool? isLedgerOn) : base(id, name, resourceType, systemData, tags, location) { Collation = collation; Status = status; @@ -76,6 +77,7 @@ internal ManagedDatabaseData(ResourceIdentifier id, string name, ResourceType re AllowAutoCompleteRestore = allowAutoCompleteRestore; LastBackupName = lastBackupName; CrossSubscriptionTargetManagedInstanceId = crossSubscriptionTargetManagedInstanceId; + IsLedgerOn = isLedgerOn; } /// Collation of the managed database. @@ -99,11 +101,11 @@ internal ManagedDatabaseData(ResourceIdentifier id, string name, ResourceType re /// The resource identifier of the source database associated with create operation of this database. public ResourceIdentifier SourceDatabaseId { get; set; } /// The resource identifier of the cross-subscription source database associated with create operation of this database. - public string CrossSubscriptionSourceDatabaseId { get; set; } + public ResourceIdentifier CrossSubscriptionSourceDatabaseId { get; set; } /// The restorable dropped database resource id to restore when creating this database. public ResourceIdentifier RestorableDroppedDatabaseId { get; set; } /// The restorable cross-subscription dropped database resource id to restore when creating this database. - public string CrossSubscriptionRestorableDroppedDatabaseId { get; set; } + public ResourceIdentifier CrossSubscriptionRestorableDroppedDatabaseId { get; set; } /// Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed. public string StorageContainerIdentity { get; set; } /// Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token. @@ -120,5 +122,7 @@ internal ManagedDatabaseData(ResourceIdentifier id, string name, ResourceType re public string LastBackupName { get; set; } /// Target managed instance id used in cross-subscription restore. public ResourceIdentifier CrossSubscriptionTargetManagedInstanceId { get; set; } + /// Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. + public bool? IsLedgerOn { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs index adc0e2552e70..27a62b8e51f8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs @@ -53,7 +53,7 @@ public ManagedInstanceData(AzureLocation location) : base(location) /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. /// Collation of the managed instance. /// The Dns Zone that the managed instance is in. - /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. + /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. /// Whether or not the public data endpoint is enabled. /// The resource identifier of the source managed instance associated with create operation of this instance. /// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. @@ -77,7 +77,7 @@ public ManagedInstanceData(AzureLocation location) : base(location) /// A CMK URI of the key to use for encryption. /// The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. /// The managed instance's service principal. - internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, SqlSku sku, ManagedInstancePropertiesProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, string administratorLogin, string administratorLoginPassword, ResourceIdentifier subnetId, string state, ManagedInstanceLicenseType? licenseType, int? vCores, int? storageSizeInGB, string collation, string dnsZone, string dnsZonePartner, bool? isPublicDataEndpointEnabled, ResourceIdentifier sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, ResourceIdentifier instancePoolId, ResourceIdentifier maintenanceConfigurationId, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, ResourceIdentifier primaryUserAssignedIdentityId, Uri keyId, ManagedInstanceExternalAdministrator administrators, SqlServicePrincipal servicePrincipal) : base(id, name, resourceType, systemData, tags, location) + internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, SqlSku sku, ManagedInstancePropertiesProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, string administratorLogin, string administratorLoginPassword, ResourceIdentifier subnetId, string state, ManagedInstanceLicenseType? licenseType, int? vCores, int? storageSizeInGB, string collation, string dnsZone, ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, ResourceIdentifier sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, ResourceIdentifier instancePoolId, ResourceIdentifier maintenanceConfigurationId, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, ResourceIdentifier primaryUserAssignedIdentityId, Uri keyId, ManagedInstanceExternalAdministrator administrators, SqlServicePrincipal servicePrincipal) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Sku = sku; @@ -93,7 +93,7 @@ internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType re StorageSizeInGB = storageSizeInGB; Collation = collation; DnsZone = dnsZone; - DnsZonePartner = dnsZonePartner; + ManagedDnsZonePartner = managedDnsZonePartner; IsPublicDataEndpointEnabled = isPublicDataEndpointEnabled; SourceManagedInstanceId = sourceManagedInstanceId; RestorePointInTime = restorePointInTime; @@ -147,7 +147,7 @@ internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType re /// The Dns Zone that the managed instance is in. public string DnsZone { get; } /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. - public string DnsZonePartner { get; set; } + public ResourceIdentifier ManagedDnsZonePartner { get; set; } /// Whether or not the public data endpoint is enabled. public bool? IsPublicDataEndpointEnabled { get; set; } /// The resource identifier of the source managed instance associated with create operation of this instance. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ElasticPoolData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ElasticPoolData.Serialization.cs index 902e5a1b6fe3..f27d59ad162b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ElasticPoolData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ElasticPoolData.Serialization.cs @@ -44,6 +44,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("maxSizeBytes"u8); writer.WriteNumberValue(MaxSizeBytes.Value); } + if (Optional.IsDefined(MinCapacity)) + { + writer.WritePropertyName("minCapacity"u8); + writer.WriteNumberValue(MinCapacity.Value); + } if (Optional.IsDefined(PerDatabaseSettings)) { writer.WritePropertyName("perDatabaseSettings"u8); @@ -69,6 +74,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("highAvailabilityReplicaCount"u8); writer.WriteNumberValue(HighAvailabilityReplicaCount.Value); } + if (Optional.IsDefined(PreferredEnclaveType)) + { + writer.WritePropertyName("preferredEnclaveType"u8); + writer.WriteStringValue(PreferredEnclaveType.Value.ToString()); + } + if (Optional.IsDefined(AvailabilityZone)) + { + writer.WritePropertyName("availabilityZone"u8); + writer.WriteStringValue(AvailabilityZone.Value.ToString()); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -90,11 +105,14 @@ internal static ElasticPoolData DeserializeElasticPoolData(JsonElement element) Optional state = default; Optional creationDate = default; Optional maxSizeBytes = default; + Optional minCapacity = default; Optional perDatabaseSettings = default; Optional zoneRedundant = default; Optional licenseType = default; Optional maintenanceConfigurationId = default; Optional highAvailabilityReplicaCount = default; + Optional preferredEnclaveType = default; + Optional availabilityZone = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sku"u8)) @@ -190,6 +208,15 @@ internal static ElasticPoolData DeserializeElasticPoolData(JsonElement element) maxSizeBytes = property0.Value.GetInt64(); continue; } + if (property0.NameEquals("minCapacity"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minCapacity = property0.Value.GetDouble(); + continue; + } if (property0.NameEquals("perDatabaseSettings"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -235,11 +262,29 @@ internal static ElasticPoolData DeserializeElasticPoolData(JsonElement element) highAvailabilityReplicaCount = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("preferredEnclaveType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + preferredEnclaveType = new SqlAlwaysEncryptedEnclaveType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("availabilityZone"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availabilityZone = new SqlAvailabilityZoneType(property0.Value.GetString()); + continue; + } } continue; } } - return new ElasticPoolData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, kind.Value, Optional.ToNullable(state), Optional.ToNullable(creationDate), Optional.ToNullable(maxSizeBytes), perDatabaseSettings.Value, Optional.ToNullable(zoneRedundant), Optional.ToNullable(licenseType), maintenanceConfigurationId.Value, Optional.ToNullable(highAvailabilityReplicaCount)); + return new ElasticPoolData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, kind.Value, Optional.ToNullable(state), Optional.ToNullable(creationDate), Optional.ToNullable(maxSizeBytes), Optional.ToNullable(minCapacity), perDatabaseSettings.Value, Optional.ToNullable(zoneRedundant), Optional.ToNullable(licenseType), maintenanceConfigurationId.Value, Optional.ToNullable(highAvailabilityReplicaCount), Optional.ToNullable(preferredEnclaveType), Optional.ToNullable(availabilityZone)); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ElasticPoolPatch.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ElasticPoolPatch.Serialization.cs index e9134f1c9645..6028e031ec7f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ElasticPoolPatch.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ElasticPoolPatch.Serialization.cs @@ -38,6 +38,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("maxSizeBytes"u8); writer.WriteNumberValue(MaxSizeBytes.Value); } + if (Optional.IsDefined(MinCapacity)) + { + writer.WritePropertyName("minCapacity"u8); + writer.WriteNumberValue(MinCapacity.Value); + } if (Optional.IsDefined(PerDatabaseSettings)) { writer.WritePropertyName("perDatabaseSettings"u8); @@ -63,6 +68,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("highAvailabilityReplicaCount"u8); writer.WriteNumberValue(HighAvailabilityReplicaCount.Value); } + if (Optional.IsDefined(PreferredEnclaveType)) + { + writer.WritePropertyName("preferredEnclaveType"u8); + writer.WriteStringValue(PreferredEnclaveType.Value.ToString()); + } + if (Optional.IsDefined(AvailabilityZone)) + { + writer.WritePropertyName("availabilityZone"u8); + writer.WriteStringValue(AvailabilityZone.Value.ToString()); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ElasticPoolPatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ElasticPoolPatch.cs index 524fbabd9bb0..c5280dcfee0a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ElasticPoolPatch.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ElasticPoolPatch.cs @@ -25,6 +25,8 @@ public ElasticPoolPatch() public IDictionary Tags { get; } /// The storage limit for the database elastic pool in bytes. public long? MaxSizeBytes { get; set; } + /// Minimal capacity that serverless pool will not shrink below, if not paused. + public double? MinCapacity { get; set; } /// The per database settings for the elastic pool. public ElasticPoolPerDatabaseSettings PerDatabaseSettings { get; set; } /// Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. @@ -35,5 +37,9 @@ public ElasticPoolPatch() public ResourceIdentifier MaintenanceConfigurationId { get; set; } /// The number of secondary replicas associated with the elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools. public int? HighAvailabilityReplicaCount { get; set; } + /// Type of enclave requested on the elastic pool. + public SqlAlwaysEncryptedEnclaveType? PreferredEnclaveType { get; set; } + /// Specifies the availability zone the pool's primary replica is pinned to. + public SqlAvailabilityZoneType? AvailabilityZone { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupData.Serialization.cs index 8218b1ff14bd..0d2704143c9a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupData.Serialization.cs @@ -51,12 +51,17 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Databases)) + if (Optional.IsCollectionDefined(FailoverDatabases)) { writer.WritePropertyName("databases"u8); writer.WriteStartArray(); - foreach (var item in Databases) + foreach (var item in FailoverDatabases) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); @@ -82,7 +87,7 @@ internal static FailoverGroupData DeserializeFailoverGroupData(JsonElement eleme Optional replicationRole = default; Optional replicationState = default; Optional> partnerServers = default; - Optional> databases = default; + Optional> databases = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("location"u8)) @@ -193,10 +198,17 @@ internal static FailoverGroupData DeserializeFailoverGroupData(JsonElement eleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } } databases = array; continue; diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedDatabaseData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedDatabaseData.Serialization.cs index 81b98b953fc9..f2ed21a9523b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedDatabaseData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedDatabaseData.Serialization.cs @@ -114,6 +114,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("crossSubscriptionTargetManagedInstanceId"u8); writer.WriteStringValue(CrossSubscriptionTargetManagedInstanceId); } + if (Optional.IsDefined(IsLedgerOn)) + { + writer.WritePropertyName("isLedgerOn"u8); + writer.WriteBooleanValue(IsLedgerOn.Value); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -140,9 +145,9 @@ internal static ManagedDatabaseData DeserializeManagedDatabaseData(JsonElement e Optional createMode = default; Optional storageContainerUri = default; Optional sourceDatabaseId = default; - Optional crossSubscriptionSourceDatabaseId = default; + Optional crossSubscriptionSourceDatabaseId = default; Optional restorableDroppedDatabaseId = default; - Optional crossSubscriptionRestorableDroppedDatabaseId = default; + Optional crossSubscriptionRestorableDroppedDatabaseId = default; Optional storageContainerIdentity = default; Optional storageContainerSasToken = default; Optional failoverGroupId = default; @@ -151,6 +156,7 @@ internal static ManagedDatabaseData DeserializeManagedDatabaseData(JsonElement e Optional autoCompleteRestore = default; Optional lastBackupName = default; Optional crossSubscriptionTargetManagedInstanceId = default; + Optional isLedgerOn = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -293,7 +299,11 @@ internal static ManagedDatabaseData DeserializeManagedDatabaseData(JsonElement e } if (property0.NameEquals("crossSubscriptionSourceDatabaseId"u8)) { - crossSubscriptionSourceDatabaseId = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + crossSubscriptionSourceDatabaseId = new ResourceIdentifier(property0.Value.GetString()); continue; } if (property0.NameEquals("restorableDroppedDatabaseId"u8)) @@ -307,7 +317,11 @@ internal static ManagedDatabaseData DeserializeManagedDatabaseData(JsonElement e } if (property0.NameEquals("crossSubscriptionRestorableDroppedDatabaseId"u8)) { - crossSubscriptionRestorableDroppedDatabaseId = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + crossSubscriptionRestorableDroppedDatabaseId = new ResourceIdentifier(property0.Value.GetString()); continue; } if (property0.NameEquals("storageContainerIdentity"u8)) @@ -370,11 +384,20 @@ internal static ManagedDatabaseData DeserializeManagedDatabaseData(JsonElement e crossSubscriptionTargetManagedInstanceId = new ResourceIdentifier(property0.Value.GetString()); continue; } + if (property0.NameEquals("isLedgerOn"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLedgerOn = property0.Value.GetBoolean(); + continue; + } } continue; } } - return new ManagedDatabaseData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, collation.Value, Optional.ToNullable(status), Optional.ToNullable(creationDate), Optional.ToNullable(earliestRestorePoint), Optional.ToNullable(restorePointInTime), Optional.ToNullable(defaultSecondaryLocation), Optional.ToNullable(catalogCollation), Optional.ToNullable(createMode), storageContainerUri.Value, sourceDatabaseId.Value, crossSubscriptionSourceDatabaseId.Value, restorableDroppedDatabaseId.Value, crossSubscriptionRestorableDroppedDatabaseId.Value, storageContainerIdentity.Value, storageContainerSasToken.Value, failoverGroupId.Value, recoverableDatabaseId.Value, longTermRetentionBackupResourceId.Value, Optional.ToNullable(autoCompleteRestore), lastBackupName.Value, crossSubscriptionTargetManagedInstanceId.Value); + return new ManagedDatabaseData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, collation.Value, Optional.ToNullable(status), Optional.ToNullable(creationDate), Optional.ToNullable(earliestRestorePoint), Optional.ToNullable(restorePointInTime), Optional.ToNullable(defaultSecondaryLocation), Optional.ToNullable(catalogCollation), Optional.ToNullable(createMode), storageContainerUri.Value, sourceDatabaseId.Value, crossSubscriptionSourceDatabaseId.Value, restorableDroppedDatabaseId.Value, crossSubscriptionRestorableDroppedDatabaseId.Value, storageContainerIdentity.Value, storageContainerSasToken.Value, failoverGroupId.Value, recoverableDatabaseId.Value, longTermRetentionBackupResourceId.Value, Optional.ToNullable(autoCompleteRestore), lastBackupName.Value, crossSubscriptionTargetManagedInstanceId.Value, Optional.ToNullable(isLedgerOn)); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedDatabasePatch.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedDatabasePatch.Serialization.cs index d374954f7729..487319dbe93e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedDatabasePatch.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedDatabasePatch.Serialization.cs @@ -108,6 +108,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("crossSubscriptionTargetManagedInstanceId"u8); writer.WriteStringValue(CrossSubscriptionTargetManagedInstanceId); } + if (Optional.IsDefined(IsLedgerOn)) + { + writer.WritePropertyName("isLedgerOn"u8); + writer.WriteBooleanValue(IsLedgerOn.Value); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedDatabasePatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedDatabasePatch.cs index 8c87223278a2..f5eedc78c595 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedDatabasePatch.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedDatabasePatch.cs @@ -43,11 +43,11 @@ public ManagedDatabasePatch() /// The resource identifier of the source database associated with create operation of this database. public ResourceIdentifier SourceDatabaseId { get; set; } /// The resource identifier of the cross-subscription source database associated with create operation of this database. - public string CrossSubscriptionSourceDatabaseId { get; set; } + public ResourceIdentifier CrossSubscriptionSourceDatabaseId { get; set; } /// The restorable dropped database resource id to restore when creating this database. public ResourceIdentifier RestorableDroppedDatabaseId { get; set; } /// The restorable cross-subscription dropped database resource id to restore when creating this database. - public string CrossSubscriptionRestorableDroppedDatabaseId { get; set; } + public ResourceIdentifier CrossSubscriptionRestorableDroppedDatabaseId { get; set; } /// Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed. public string StorageContainerIdentity { get; set; } /// Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token. @@ -64,5 +64,7 @@ public ManagedDatabasePatch() public string LastBackupName { get; set; } /// Target managed instance id used in cross-subscription restore. public ResourceIdentifier CrossSubscriptionTargetManagedInstanceId { get; set; } + /// Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. + public bool? IsLedgerOn { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceData.Serialization.cs index 9bc35699fdbd..8a4f14c80f27 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceData.Serialization.cs @@ -85,10 +85,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("collation"u8); writer.WriteStringValue(Collation); } - if (Optional.IsDefined(DnsZonePartner)) + if (Optional.IsDefined(ManagedDnsZonePartner)) { writer.WritePropertyName("dnsZonePartner"u8); - writer.WriteStringValue(DnsZonePartner); + writer.WriteStringValue(ManagedDnsZonePartner); } if (Optional.IsDefined(IsPublicDataEndpointEnabled)) { @@ -190,7 +190,7 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e Optional storageSizeInGB = default; Optional collation = default; Optional dnsZone = default; - Optional dnsZonePartner = default; + Optional dnsZonePartner = default; Optional publicDataEndpointEnabled = default; Optional sourceManagedInstanceId = default; Optional restorePointInTime = default; @@ -366,7 +366,11 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e } if (property0.NameEquals("dnsZonePartner"u8)) { - dnsZonePartner = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsZonePartner = new ResourceIdentifier(property0.Value.GetString()); continue; } if (property0.NameEquals("publicDataEndpointEnabled"u8)) diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.Serialization.cs index b388107e871b..0ff2a1968faa 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.Serialization.cs @@ -80,10 +80,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("collation"u8); writer.WriteStringValue(Collation); } - if (Optional.IsDefined(DnsZonePartner)) + if (Optional.IsDefined(ManagedDnsZonePartner)) { writer.WritePropertyName("dnsZonePartner"u8); - writer.WriteStringValue(DnsZonePartner); + writer.WriteStringValue(ManagedDnsZonePartner); } if (Optional.IsDefined(IsPublicDataEndpointEnabled)) { diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.cs index 3a1bd551c4e6..10c153714093 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.cs @@ -59,7 +59,7 @@ public ManagedInstancePatch() /// The Dns Zone that the managed instance is in. public string DnsZone { get; } /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. - public string DnsZonePartner { get; set; } + public ResourceIdentifier ManagedDnsZonePartner { get; set; } /// Whether or not the public data endpoint is enabled. public bool? IsPublicDataEndpointEnabled { get; set; } /// The resource identifier of the source managed instance associated with create operation of this instance. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RecoverableDatabaseData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RecoverableDatabaseData.Serialization.cs index 051ac8a02448..65fd9368b5fb 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RecoverableDatabaseData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RecoverableDatabaseData.Serialization.cs @@ -6,9 +6,11 @@ #nullable disable using System; +using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Sql.Models; namespace Azure.ResourceManager.Sql { @@ -19,6 +21,17 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Keys)) + { + writer.WritePropertyName("keys"u8); + writer.WriteStartObject(); + foreach (var item in Keys) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -37,6 +50,7 @@ internal static RecoverableDatabaseData DeserializeRecoverableDatabaseData(JsonE Optional serviceLevelObjective = default; Optional elasticPoolName = default; Optional lastAvailableBackupDate = default; + Optional> keys = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -96,11 +110,25 @@ internal static RecoverableDatabaseData DeserializeRecoverableDatabaseData(JsonE lastAvailableBackupDate = property0.Value.GetDateTimeOffset("O"); continue; } + if (property0.NameEquals("keys"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, SqlDatabaseKey.DeserializeSqlDatabaseKey(property1.Value)); + } + keys = dictionary; + continue; + } } continue; } } - return new RecoverableDatabaseData(id, name, type, systemData.Value, edition.Value, serviceLevelObjective.Value, elasticPoolName.Value, Optional.ToNullable(lastAvailableBackupDate)); + return new RecoverableDatabaseData(id, name, type, systemData.Value, edition.Value, serviceLevelObjective.Value, elasticPoolName.Value, Optional.ToNullable(lastAvailableBackupDate), Optional.ToDictionary(keys)); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RecoverableDatabaseListResult.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RecoverableDatabaseListResult.Serialization.cs index 3494c322414c..8fac92e999e5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RecoverableDatabaseListResult.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RecoverableDatabaseListResult.Serialization.cs @@ -20,11 +20,16 @@ internal static RecoverableDatabaseListResult DeserializeRecoverableDatabaseList { return null; } - IReadOnlyList value = default; + Optional> value = default; + Optional nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -33,8 +38,13 @@ internal static RecoverableDatabaseListResult DeserializeRecoverableDatabaseList value = array; continue; } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } } - return new RecoverableDatabaseListResult(value); + return new RecoverableDatabaseListResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RecoverableDatabaseListResult.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RecoverableDatabaseListResult.cs index 6c323ceec04b..72f04d020a88 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RecoverableDatabaseListResult.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RecoverableDatabaseListResult.cs @@ -5,35 +5,33 @@ #nullable disable -using System; using System.Collections.Generic; -using System.Linq; using Azure.Core; using Azure.ResourceManager.Sql; namespace Azure.ResourceManager.Sql.Models { - /// The response to a list recoverable databases request. + /// A list of recoverable databases. internal partial class RecoverableDatabaseListResult { /// Initializes a new instance of RecoverableDatabaseListResult. - /// A list of recoverable databases. - /// is null. - internal RecoverableDatabaseListResult(IEnumerable value) + internal RecoverableDatabaseListResult() { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of RecoverableDatabaseListResult. - /// A list of recoverable databases. - internal RecoverableDatabaseListResult(IReadOnlyList value) + /// Array of results. + /// Link to retrieve next page of results. + internal RecoverableDatabaseListResult(IReadOnlyList value, string nextLink) { Value = value; + NextLink = nextLink; } - /// A list of recoverable databases. + /// Array of results. public IReadOnlyList Value { get; } + /// Link to retrieve next page of results. + public string NextLink { get; } } } 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 d5841af266be..85a305f3bda2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs @@ -38,7 +38,7 @@ public SqlServerPatch() public string FullyQualifiedDomainName { get; } /// List of private endpoint connections on a server. public IReadOnlyList PrivateEndpointConnections { get; } - /// Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. public string MinimalTlsVersion { get; set; } /// 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'. public ServerNetworkAccessFlag? PublicNetworkAccess { get; set; } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlVulnerabilityAssessmentScanData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlVulnerabilityAssessmentScanData.Serialization.cs index a0b85e1392e4..df6f222e96c0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlVulnerabilityAssessmentScanData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlVulnerabilityAssessmentScanData.Serialization.cs @@ -51,6 +51,7 @@ internal static SqlVulnerabilityAssessmentScanData DeserializeSqlVulnerabilityAs Optional totalFailedRulesCount = default; Optional totalRulesCount = default; Optional isBaselineApplied = default; + Optional lastScanTime = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -219,11 +220,20 @@ internal static SqlVulnerabilityAssessmentScanData DeserializeSqlVulnerabilityAs isBaselineApplied = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("lastScanTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastScanTime = property0.Value.GetDateTimeOffset("O"); + continue; + } } continue; } } - return new SqlVulnerabilityAssessmentScanData(id, name, type, systemData.Value, scanId.Value, Optional.ToNullable(triggerType), Optional.ToNullable(state), Optional.ToNullable(startTime), Optional.ToNullable(endTime), Optional.ToList(errors), server.Value, database.Value, sqlVersion.Value, Optional.ToNullable(highSeverityFailedRulesCount), Optional.ToNullable(mediumSeverityFailedRulesCount), Optional.ToNullable(lowSeverityFailedRulesCount), Optional.ToNullable(totalPassedRulesCount), Optional.ToNullable(totalFailedRulesCount), Optional.ToNullable(totalRulesCount), Optional.ToNullable(isBaselineApplied)); + return new SqlVulnerabilityAssessmentScanData(id, name, type, systemData.Value, scanId.Value, Optional.ToNullable(triggerType), Optional.ToNullable(state), Optional.ToNullable(startTime), Optional.ToNullable(endTime), Optional.ToList(errors), server.Value, database.Value, sqlVersion.Value, Optional.ToNullable(highSeverityFailedRulesCount), Optional.ToNullable(mediumSeverityFailedRulesCount), Optional.ToNullable(lowSeverityFailedRulesCount), Optional.ToNullable(totalPassedRulesCount), Optional.ToNullable(totalFailedRulesCount), Optional.ToNullable(totalRulesCount), Optional.ToNullable(isBaselineApplied), Optional.ToNullable(lastScanTime)); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseCollection.cs index 7f5cb99d1cb6..84534c95f35f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseCollection.cs @@ -53,7 +53,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Gets a recoverable database, which is a resource representing a database's geo backup + /// Gets a recoverable database. /// /// /// Request Path @@ -66,10 +66,12 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The name of the database. + /// The child resources to include in the response. + /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string databaseName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string databaseName, string expand = null, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); @@ -77,7 +79,7 @@ public virtual async Task> GetAsync(string scope.Start(); try { - var response = await _recoverableDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, cancellationToken).ConfigureAwait(false); + var response = await _recoverableDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, expand, filter, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new RecoverableDatabaseResource(Client, response.Value), response.GetRawResponse()); @@ -90,7 +92,7 @@ public virtual async Task> GetAsync(string } /// - /// Gets a recoverable database, which is a resource representing a database's geo backup + /// Gets a recoverable database. /// /// /// Request Path @@ -103,10 +105,12 @@ public virtual async Task> GetAsync(string /// /// /// The name of the database. + /// The child resources to include in the response. + /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string databaseName, CancellationToken cancellationToken = default) + public virtual Response Get(string databaseName, string expand = null, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); @@ -114,7 +118,7 @@ public virtual Response Get(string databaseName, Ca scope.Start(); try { - var response = _recoverableDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, cancellationToken); + var response = _recoverableDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, expand, filter, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new RecoverableDatabaseResource(Client, response.Value), response.GetRawResponse()); @@ -127,7 +131,7 @@ public virtual Response Get(string databaseName, Ca } /// - /// Gets a list of recoverable databases + /// Gets a list of recoverable databases. /// /// /// Request Path @@ -144,11 +148,12 @@ public virtual Response Get(string databaseName, Ca public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => _recoverableDatabaseRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new RecoverableDatabaseResource(Client, RecoverableDatabaseData.DeserializeRecoverableDatabaseData(e)), _recoverableDatabaseClientDiagnostics, Pipeline, "RecoverableDatabaseCollection.GetAll", "value", null, cancellationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _recoverableDatabaseRestClient.CreateListByServerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new RecoverableDatabaseResource(Client, RecoverableDatabaseData.DeserializeRecoverableDatabaseData(e)), _recoverableDatabaseClientDiagnostics, Pipeline, "RecoverableDatabaseCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// Gets a list of recoverable databases + /// Gets a list of recoverable databases. /// /// /// Request Path @@ -165,7 +170,8 @@ public virtual AsyncPageable GetAllAsync(Cancellati public virtual Pageable GetAll(CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => _recoverableDatabaseRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, null, e => new RecoverableDatabaseResource(Client, RecoverableDatabaseData.DeserializeRecoverableDatabaseData(e)), _recoverableDatabaseClientDiagnostics, Pipeline, "RecoverableDatabaseCollection.GetAll", "value", null, cancellationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _recoverableDatabaseRestClient.CreateListByServerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RecoverableDatabaseResource(Client, RecoverableDatabaseData.DeserializeRecoverableDatabaseData(e)), _recoverableDatabaseClientDiagnostics, Pipeline, "RecoverableDatabaseCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -182,10 +188,12 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// The name of the database. + /// The child resources to include in the response. + /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> ExistsAsync(string databaseName, CancellationToken cancellationToken = default) + public virtual async Task> ExistsAsync(string databaseName, string expand = null, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); @@ -193,7 +201,7 @@ public virtual async Task> ExistsAsync(string databaseName, Cance scope.Start(); try { - var response = await _recoverableDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _recoverableDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, expand, filter, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -217,10 +225,12 @@ public virtual async Task> ExistsAsync(string databaseName, Cance /// /// /// The name of the database. + /// The child resources to include in the response. + /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Exists(string databaseName, CancellationToken cancellationToken = default) + public virtual Response Exists(string databaseName, string expand = null, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); @@ -228,7 +238,7 @@ public virtual Response Exists(string databaseName, CancellationToken canc scope.Start(); try { - var response = _recoverableDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, cancellationToken: cancellationToken); + var response = _recoverableDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, expand, filter, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseData.cs index 7b64b6f14301..c28f345a23fc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseData.cs @@ -6,20 +6,23 @@ #nullable disable using System; +using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Sql.Models; namespace Azure.ResourceManager.Sql { /// /// A class representing the RecoverableDatabase data model. - /// A recoverable database + /// A recoverable database resource. /// public partial class RecoverableDatabaseData : ResourceData { /// Initializes a new instance of RecoverableDatabaseData. public RecoverableDatabaseData() { + Keys = new ChangeTrackingDictionary(); } /// Initializes a new instance of RecoverableDatabaseData. @@ -30,13 +33,15 @@ public RecoverableDatabaseData() /// The edition of the database. /// The service level objective name of the database. /// The elastic pool name of the database. - /// The last available backup date of the database (ISO8601 format). - internal RecoverableDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string edition, string serviceLevelObjective, string elasticPoolName, DateTimeOffset? lastAvailableBackupOn) : base(id, name, resourceType, systemData) + /// The last available backup date. + /// The resource ids of the user assigned identities to use. + internal RecoverableDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string edition, string serviceLevelObjective, string elasticPoolName, DateTimeOffset? lastAvailableBackupOn, IDictionary keys) : base(id, name, resourceType, systemData) { Edition = edition; ServiceLevelObjective = serviceLevelObjective; ElasticPoolName = elasticPoolName; LastAvailableBackupOn = lastAvailableBackupOn; + Keys = keys; } /// The edition of the database. @@ -45,7 +50,9 @@ internal RecoverableDatabaseData(ResourceIdentifier id, string name, ResourceTyp public string ServiceLevelObjective { get; } /// The elastic pool name of the database. public string ElasticPoolName { get; } - /// The last available backup date of the database (ISO8601 format). + /// The last available backup date. public DateTimeOffset? LastAvailableBackupOn { get; } + /// The resource ids of the user assigned identities to use. + public IDictionary Keys { get; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseResource.cs index 52c7a26e4e3d..769efd848aa2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseResource.cs @@ -87,7 +87,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Gets a recoverable database, which is a resource representing a database's geo backup + /// Gets a recoverable database. /// /// /// Request Path @@ -99,14 +99,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// + /// The child resources to include in the response. + /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string expand = null, string filter = null, CancellationToken cancellationToken = default) { using var scope = _recoverableDatabaseClientDiagnostics.CreateScope("RecoverableDatabaseResource.Get"); scope.Start(); try { - var response = await _recoverableDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _recoverableDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, expand, filter, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new RecoverableDatabaseResource(Client, response.Value), response.GetRawResponse()); @@ -119,7 +121,7 @@ public virtual async Task> GetAsync(Cancel } /// - /// Gets a recoverable database, which is a resource representing a database's geo backup + /// Gets a recoverable database. /// /// /// Request Path @@ -131,14 +133,16 @@ public virtual async Task> GetAsync(Cancel /// /// /// + /// The child resources to include in the response. + /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(string expand = null, string filter = null, CancellationToken cancellationToken = default) { using var scope = _recoverableDatabaseClientDiagnostics.CreateScope("RecoverableDatabaseResource.Get"); scope.Start(); try { - var response = _recoverableDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _recoverableDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, expand, filter, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new RecoverableDatabaseResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentBaselinesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentBaselinesRestOperations.cs index 2fb8b082ec30..72e541f6f0dc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentBaselinesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentBaselinesRestOperations.cs @@ -33,7 +33,7 @@ public DatabaseSqlVulnerabilityAssessmentBaselinesRestOperations(HttpPipeline pi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentExecuteScanRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentExecuteScanRestOperations.cs index b3f531964603..587389236363 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentExecuteScanRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentExecuteScanRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseSqlVulnerabilityAssessmentExecuteScanRestOperations(HttpPipeline { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs index c76af454835c..07e52e7cc552 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs @@ -33,7 +33,7 @@ public DatabaseSqlVulnerabilityAssessmentRuleBaselinesRestOperations(HttpPipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScanResultRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScanResultRestOperations.cs index 291ecd644eb9..f06237336d82 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScanResultRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScanResultRestOperations.cs @@ -33,7 +33,7 @@ public DatabaseSqlVulnerabilityAssessmentScanResultRestOperations(HttpPipeline p { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScansRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScansRestOperations.cs index 1472644beeb2..50aeb7364466 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScansRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScansRestOperations.cs @@ -33,7 +33,7 @@ public DatabaseSqlVulnerabilityAssessmentScansRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentsSettingsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentsSettingsRestOperations.cs index 0f5af913ed4d..dd7d2e80e614 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentsSettingsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentsSettingsRestOperations.cs @@ -33,7 +33,7 @@ public DatabaseSqlVulnerabilityAssessmentsSettingsRestOperations(HttpPipeline pi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ElasticPoolsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ElasticPoolsRestOperations.cs index 8f0dd906f64d..a4f73581469b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ElasticPoolsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ElasticPoolsRestOperations.cs @@ -33,7 +33,7 @@ public ElasticPoolsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01-preview"; + _apiVersion = apiVersion ?? "2022-08-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 7a89267f3302..db2d5891dffa 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs @@ -33,10 +33,89 @@ public FailoverGroupsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-11-01-preview"; + _apiVersion = apiVersion ?? "2022-11-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("/failoverGroups", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the failover groups in 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 containing the failover group. + /// 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: + { + FailoverGroupListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FailoverGroupListResult.DeserializeFailoverGroupListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the failover groups in 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 containing the failover group. + /// 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: + { + FailoverGroupListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FailoverGroupListResult.DeserializeFailoverGroupListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName) { var message = _pipeline.CreateMessage(); @@ -372,11 +451,11 @@ public Response Update(string subscriptionId, string resourceGroupName, string s } } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateFailoverRequest(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -385,7 +464,9 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Sql/servers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/failoverGroups", false); + uri.AppendPath("/failoverGroups/", false); + uri.AppendPath(failoverGroupName, true); + uri.AppendPath("/failover", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -393,65 +474,61 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res return message; } - /// Lists the failover groups in a server. + /// Fails over from the current primary server to this 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 containing the failover group. + /// The name of the failover group. /// 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) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task FailoverAsync(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(failoverGroupName, nameof(failoverGroupName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateFailoverRequest(subscriptionId, resourceGroupName, serverName, failoverGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - FailoverGroupListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FailoverGroupListResult.DeserializeFailoverGroupListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Lists the failover groups in a server. + /// Fails over from the current primary server to this 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 containing the failover group. + /// The name of the failover group. /// 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) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Failover(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(failoverGroupName, nameof(failoverGroupName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateFailoverRequest(subscriptionId, resourceGroupName, serverName, failoverGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - FailoverGroupListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FailoverGroupListResult.DeserializeFailoverGroupListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateFailoverRequest(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName) + internal HttpMessage CreateForceFailoverAllowDataLossRequest(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -466,7 +543,7 @@ internal HttpMessage CreateFailoverRequest(string subscriptionId, string resourc uri.AppendPath(serverName, true); uri.AppendPath("/failoverGroups/", false); uri.AppendPath(failoverGroupName, true); - uri.AppendPath("/failover", false); + uri.AppendPath("/forceFailoverAllowDataLoss", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -474,7 +551,7 @@ internal HttpMessage CreateFailoverRequest(string subscriptionId, string resourc return message; } - /// Fails over from the current primary server to this server. + /// Fails over from the current primary server to this server. This operation might result in data loss. /// 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 containing the failover group. @@ -482,14 +559,14 @@ internal HttpMessage CreateFailoverRequest(string subscriptionId, string resourc /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task FailoverAsync(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default) + public async Task ForceFailoverAllowDataLossAsync(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(failoverGroupName, nameof(failoverGroupName)); - using var message = CreateFailoverRequest(subscriptionId, resourceGroupName, serverName, failoverGroupName); + using var message = CreateForceFailoverAllowDataLossRequest(subscriptionId, resourceGroupName, serverName, failoverGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -501,7 +578,7 @@ public async Task FailoverAsync(string subscriptionId, string resource } } - /// Fails over from the current primary server to this server. + /// Fails over from the current primary server to this server. This operation might result in data loss. /// 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 containing the failover group. @@ -509,14 +586,14 @@ public async Task FailoverAsync(string subscriptionId, string resource /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Failover(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default) + public Response ForceFailoverAllowDataLoss(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(failoverGroupName, nameof(failoverGroupName)); - using var message = CreateFailoverRequest(subscriptionId, resourceGroupName, serverName, failoverGroupName); + using var message = CreateForceFailoverAllowDataLossRequest(subscriptionId, resourceGroupName, serverName, failoverGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -528,7 +605,7 @@ public Response Failover(string subscriptionId, string resourceGroupName, string } } - internal HttpMessage CreateForceFailoverAllowDataLossRequest(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName) + internal HttpMessage CreateTryPlannedBeforeForcedFailoverRequest(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -543,7 +620,7 @@ internal HttpMessage CreateForceFailoverAllowDataLossRequest(string subscription uri.AppendPath(serverName, true); uri.AppendPath("/failoverGroups/", false); uri.AppendPath(failoverGroupName, true); - uri.AppendPath("/forceFailoverAllowDataLoss", false); + uri.AppendPath("/tryPlannedBeforeForcedFailover", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -551,22 +628,22 @@ internal HttpMessage CreateForceFailoverAllowDataLossRequest(string subscription return message; } - /// Fails over from the current primary server to this server. This operation might result in data loss. + /// Fails over from the current primary server to this server. This operation tries planned before forced failover but might still result in data loss. /// 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 containing the failover group. + /// The name of the server. /// The name of the failover group. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ForceFailoverAllowDataLossAsync(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default) + public async Task TryPlannedBeforeForcedFailoverAsync(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(failoverGroupName, nameof(failoverGroupName)); - using var message = CreateForceFailoverAllowDataLossRequest(subscriptionId, resourceGroupName, serverName, failoverGroupName); + using var message = CreateTryPlannedBeforeForcedFailoverRequest(subscriptionId, resourceGroupName, serverName, failoverGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -578,22 +655,22 @@ public async Task ForceFailoverAllowDataLossAsync(string subscriptionI } } - /// Fails over from the current primary server to this server. This operation might result in data loss. + /// Fails over from the current primary server to this server. This operation tries planned before forced failover but might still result in data loss. /// 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 containing the failover group. + /// The name of the server. /// The name of the failover group. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ForceFailoverAllowDataLoss(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default) + public Response TryPlannedBeforeForcedFailover(string subscriptionId, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(failoverGroupName, nameof(failoverGroupName)); - using var message = CreateForceFailoverAllowDataLossRequest(subscriptionId, resourceGroupName, serverName, failoverGroupName); + using var message = CreateTryPlannedBeforeForcedFailoverRequest(subscriptionId, resourceGroupName, serverName, failoverGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/IPv6FirewallRulesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/IPv6FirewallRulesRestOperations.cs index 936a0a6e9aeb..14041c74e31d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/IPv6FirewallRulesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/IPv6FirewallRulesRestOperations.cs @@ -33,7 +33,7 @@ public IPv6FirewallRulesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-11-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabasesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabasesRestOperations.cs index 7ea391acf5d0..93c2388616a0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabasesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabasesRestOperations.cs @@ -33,7 +33,7 @@ public ManagedDatabasesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-05-01-preview"; + _apiVersion = apiVersion ?? "2022-08-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RecoverableDatabasesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RecoverableDatabasesRestOperations.cs index b261222f8410..84a930c4b7e2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RecoverableDatabasesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RecoverableDatabasesRestOperations.cs @@ -33,11 +33,90 @@ public RecoverableDatabasesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2014-04-01"; + _apiVersion = apiVersion ?? "2022-08-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName) + 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("/recoverableDatabases", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of recoverable databases. + /// 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: + { + RecoverableDatabaseListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RecoverableDatabaseListResult.DeserializeRecoverableDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of recoverable databases. + /// 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: + { + RecoverableDatabaseListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RecoverableDatabaseListResult.DeserializeRecoverableDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName, string expand, string filter) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -52,6 +131,14 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(serverName, true); uri.AppendPath("/recoverableDatabases/", false); uri.AppendPath(databaseName, true); + if (expand != null) + { + uri.AppendQuery("$expand", expand, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -59,22 +146,24 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Gets a recoverable database, which is a resource representing a database's geo backup. + /// Gets a recoverable database. /// 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 name of the database. + /// The child resources to include in the response. + /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, string expand = null, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName, expand, filter); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -92,22 +181,24 @@ public async Task> GetAsync(string subscriptio } } - /// Gets a recoverable database, which is a resource representing a database's geo backup. + /// Gets a recoverable database. /// 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 name of the database. + /// The child resources to include in the response. + /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serverName, string databaseName, string expand = null, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName, expand, filter); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -125,21 +216,14 @@ public Response Get(string subscriptionId, string resou } } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateListByServerNextPageRequest(string nextLink, 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("/recoverableDatabases", false); - uri.AppendQuery("api-version", _apiVersion, true); + uri.AppendRawNextLink(nextLink, false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); @@ -147,19 +231,21 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res } /// Gets a list of recoverable databases. + /// The URL to the next page of results. /// 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 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) + public async Task> ListByServerNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { + Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateListByServerNextPageRequest(nextLink, subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -176,19 +262,21 @@ public async Task> ListByServerAsync(str } /// Gets a list of recoverable databases. + /// The URL to the next page of results. /// 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 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) + public Response ListByServerNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { + Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateListByServerNextPageRequest(nextLink, subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselineRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselineRestOperations.cs index bf717295b7f4..75d2172ca5ac 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselineRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselineRestOperations.cs @@ -33,7 +33,7 @@ public SqlVulnerabilityAssessmentBaselineRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselinesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselinesRestOperations.cs index 678bfc232831..9f4b6007bed2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselinesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselinesRestOperations.cs @@ -33,7 +33,7 @@ public SqlVulnerabilityAssessmentBaselinesRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentExecuteScanRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentExecuteScanRestOperations.cs index 7fd9c9d986e2..ae5f0b594c60 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentExecuteScanRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentExecuteScanRestOperations.cs @@ -32,7 +32,7 @@ public SqlVulnerabilityAssessmentExecuteScanRestOperations(HttpPipeline pipeline { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselineRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselineRestOperations.cs index 8dac863a4535..00f5d59c9b92 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselineRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselineRestOperations.cs @@ -33,7 +33,7 @@ public SqlVulnerabilityAssessmentRuleBaselineRestOperations(HttpPipeline pipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs index 8bbf4e147ee8..55138a7045a4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs @@ -32,7 +32,7 @@ public SqlVulnerabilityAssessmentRuleBaselinesRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScanResultRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScanResultRestOperations.cs index 85cd8d841641..d04e94bb5fd5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScanResultRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScanResultRestOperations.cs @@ -33,7 +33,7 @@ public SqlVulnerabilityAssessmentScanResultRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScansRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScansRestOperations.cs index ec786f97a96c..c304b428230e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScansRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScansRestOperations.cs @@ -33,7 +33,7 @@ public SqlVulnerabilityAssessmentScansRestOperations(HttpPipeline pipeline, stri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsRestOperations.cs index 3595c57cef08..4f84ecf89bc0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsRestOperations.cs @@ -32,7 +32,7 @@ public SqlVulnerabilityAssessmentsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsSettingsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsSettingsRestOperations.cs index cb48c2544649..ba98f21154bd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsSettingsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsSettingsRestOperations.cs @@ -33,7 +33,7 @@ public SqlVulnerabilityAssessmentsSettingsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.cs index 4d7132ffa41b..e47d5e1d0928 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.cs @@ -669,55 +669,6 @@ public virtual Response GetWorkloadGroup(string workloadG return GetWorkloadGroups().Get(workloadGroupName, cancellationToken); } - /// Gets a collection of LogicalDatabaseTransparentDataEncryptionResources in the SqlDatabase. - /// An object representing collection of LogicalDatabaseTransparentDataEncryptionResources and their operations over a LogicalDatabaseTransparentDataEncryptionResource. - public virtual LogicalDatabaseTransparentDataEncryptionCollection GetLogicalDatabaseTransparentDataEncryptions() - { - return GetCachedClient(Client => new LogicalDatabaseTransparentDataEncryptionCollection(Client, Id)); - } - - /// - /// Gets a logical database's transparent data encryption. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName} - /// - /// - /// Operation Id - /// TransparentDataEncryptions_Get - /// - /// - /// - /// The name of the transparent data encryption configuration. - /// The cancellation token to use. - [ForwardsClientCalls] - public virtual async Task> GetLogicalDatabaseTransparentDataEncryptionAsync(TransparentDataEncryptionName tdeName, CancellationToken cancellationToken = default) - { - return await GetLogicalDatabaseTransparentDataEncryptions().GetAsync(tdeName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a logical database's transparent data encryption. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName} - /// - /// - /// Operation Id - /// TransparentDataEncryptions_Get - /// - /// - /// - /// The name of the transparent data encryption configuration. - /// The cancellation token to use. - [ForwardsClientCalls] - public virtual Response GetLogicalDatabaseTransparentDataEncryption(TransparentDataEncryptionName tdeName, CancellationToken cancellationToken = default) - { - return GetLogicalDatabaseTransparentDataEncryptions().Get(tdeName, cancellationToken); - } - /// Gets a collection of BackupShortTermRetentionPolicyResources in the SqlDatabase. /// An object representing collection of BackupShortTermRetentionPolicyResources and their operations over a BackupShortTermRetentionPolicyResource. public virtual BackupShortTermRetentionPolicyCollection GetBackupShortTermRetentionPolicies() @@ -963,106 +914,155 @@ public virtual Response GetDatabaseAdv return GetDatabaseAdvancedThreatProtections().Get(advancedThreatProtectionName, cancellationToken); } - /// Gets a collection of SqlDatabaseSqlVulnerabilityAssessmentResources in the SqlDatabase. - /// An object representing collection of SqlDatabaseSqlVulnerabilityAssessmentResources and their operations over a SqlDatabaseSqlVulnerabilityAssessmentResource. - public virtual SqlDatabaseSqlVulnerabilityAssessmentCollection GetSqlDatabaseSqlVulnerabilityAssessments() + /// Gets a collection of SqlServerDatabaseReplicationLinkResources in the SqlDatabase. + /// An object representing collection of SqlServerDatabaseReplicationLinkResources and their operations over a SqlServerDatabaseReplicationLinkResource. + public virtual SqlServerDatabaseReplicationLinkCollection GetSqlServerDatabaseReplicationLinks() { - return GetCachedClient(Client => new SqlDatabaseSqlVulnerabilityAssessmentCollection(Client, Id)); + return GetCachedClient(Client => new SqlServerDatabaseReplicationLinkCollection(Client, Id)); } /// - /// Gets SQL Vulnerability Assessment policy for database. + /// Gets a replication link. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId} /// /// /// Operation Id - /// DatabaseSqlVulnerabilityAssessmentsSettings_Get + /// ReplicationLinks_Get /// /// /// - /// The name of the SQL Vulnerability Assessment. + /// The name of the replication link. /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetSqlDatabaseSqlVulnerabilityAssessmentAsync(VulnerabilityAssessmentName vulnerabilityAssessmentName, CancellationToken cancellationToken = default) + public virtual async Task> GetSqlServerDatabaseReplicationLinkAsync(string linkId, CancellationToken cancellationToken = default) { - return await GetSqlDatabaseSqlVulnerabilityAssessments().GetAsync(vulnerabilityAssessmentName, cancellationToken).ConfigureAwait(false); + return await GetSqlServerDatabaseReplicationLinks().GetAsync(linkId, cancellationToken).ConfigureAwait(false); } /// - /// Gets SQL Vulnerability Assessment policy for database. + /// Gets a replication link. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId} /// /// /// Operation Id - /// DatabaseSqlVulnerabilityAssessmentsSettings_Get + /// ReplicationLinks_Get /// /// /// - /// The name of the SQL Vulnerability Assessment. + /// The name of the replication link. /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetSqlDatabaseSqlVulnerabilityAssessment(VulnerabilityAssessmentName vulnerabilityAssessmentName, CancellationToken cancellationToken = default) + public virtual Response GetSqlServerDatabaseReplicationLink(string linkId, CancellationToken cancellationToken = default) { - return GetSqlDatabaseSqlVulnerabilityAssessments().Get(vulnerabilityAssessmentName, cancellationToken); + return GetSqlServerDatabaseReplicationLinks().Get(linkId, cancellationToken); } - /// Gets a collection of SqlServerDatabaseReplicationLinkResources in the SqlDatabase. - /// An object representing collection of SqlServerDatabaseReplicationLinkResources and their operations over a SqlServerDatabaseReplicationLinkResource. - public virtual SqlServerDatabaseReplicationLinkCollection GetSqlServerDatabaseReplicationLinks() + /// Gets a collection of LogicalDatabaseTransparentDataEncryptionResources in the SqlDatabase. + /// An object representing collection of LogicalDatabaseTransparentDataEncryptionResources and their operations over a LogicalDatabaseTransparentDataEncryptionResource. + public virtual LogicalDatabaseTransparentDataEncryptionCollection GetLogicalDatabaseTransparentDataEncryptions() { - return GetCachedClient(Client => new SqlServerDatabaseReplicationLinkCollection(Client, Id)); + return GetCachedClient(Client => new LogicalDatabaseTransparentDataEncryptionCollection(Client, Id)); } /// - /// Gets a replication link. + /// Gets a logical database's transparent data encryption. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName} /// /// /// Operation Id - /// ReplicationLinks_Get + /// TransparentDataEncryptions_Get /// /// /// - /// The name of the replication link. + /// The name of the transparent data encryption configuration. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. [ForwardsClientCalls] - public virtual async Task> GetSqlServerDatabaseReplicationLinkAsync(string linkId, CancellationToken cancellationToken = default) + public virtual async Task> GetLogicalDatabaseTransparentDataEncryptionAsync(TransparentDataEncryptionName tdeName, CancellationToken cancellationToken = default) { - return await GetSqlServerDatabaseReplicationLinks().GetAsync(linkId, cancellationToken).ConfigureAwait(false); + return await GetLogicalDatabaseTransparentDataEncryptions().GetAsync(tdeName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a replication link. + /// Gets a logical database's transparent data encryption. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName} /// /// /// Operation Id - /// ReplicationLinks_Get + /// TransparentDataEncryptions_Get /// /// /// - /// The name of the replication link. + /// The name of the transparent data encryption configuration. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. [ForwardsClientCalls] - public virtual Response GetSqlServerDatabaseReplicationLink(string linkId, CancellationToken cancellationToken = default) + public virtual Response GetLogicalDatabaseTransparentDataEncryption(TransparentDataEncryptionName tdeName, CancellationToken cancellationToken = default) { - return GetSqlServerDatabaseReplicationLinks().Get(linkId, cancellationToken); + return GetLogicalDatabaseTransparentDataEncryptions().Get(tdeName, cancellationToken); + } + + /// Gets a collection of SqlDatabaseSqlVulnerabilityAssessmentResources in the SqlDatabase. + /// An object representing collection of SqlDatabaseSqlVulnerabilityAssessmentResources and their operations over a SqlDatabaseSqlVulnerabilityAssessmentResource. + public virtual SqlDatabaseSqlVulnerabilityAssessmentCollection GetSqlDatabaseSqlVulnerabilityAssessments() + { + return GetCachedClient(Client => new SqlDatabaseSqlVulnerabilityAssessmentCollection(Client, Id)); + } + + /// + /// Gets SQL Vulnerability Assessment policy for database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName} + /// + /// + /// Operation Id + /// DatabaseSqlVulnerabilityAssessmentsSettings_Get + /// + /// + /// + /// The name of the SQL Vulnerability Assessment. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual async Task> GetSqlDatabaseSqlVulnerabilityAssessmentAsync(VulnerabilityAssessmentName vulnerabilityAssessmentName, CancellationToken cancellationToken = default) + { + return await GetSqlDatabaseSqlVulnerabilityAssessments().GetAsync(vulnerabilityAssessmentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets SQL Vulnerability Assessment policy for database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName} + /// + /// + /// Operation Id + /// DatabaseSqlVulnerabilityAssessmentsSettings_Get + /// + /// + /// + /// The name of the SQL Vulnerability Assessment. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual Response GetSqlDatabaseSqlVulnerabilityAssessment(VulnerabilityAssessmentName vulnerabilityAssessmentName, CancellationToken cancellationToken = default) + { + return GetSqlDatabaseSqlVulnerabilityAssessments().Get(vulnerabilityAssessmentName, cancellationToken); } /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs index 12302b9992f2..3ba0dde5c8b4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs @@ -41,7 +41,7 @@ public SqlServerData(AzureLocation location) : base(location) /// 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: '1.0', '1.1', '1.2'. + /// 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. @@ -87,7 +87,7 @@ internal SqlServerData(ResourceIdentifier id, string name, ResourceType resource public string FullyQualifiedDomainName { get; } /// List of private endpoint connections on a server. public IReadOnlyList PrivateEndpointConnections { get; } - /// Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. public string MinimalTlsVersion { get; set; } /// 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'. public ServerNetworkAccessFlag? PublicNetworkAccess { get; set; } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs index 634aa602de7a..089dd7aae2b0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs @@ -111,59 +111,6 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of RecoverableDatabaseResources in the SqlServer. - /// An object representing collection of RecoverableDatabaseResources and their operations over a RecoverableDatabaseResource. - public virtual RecoverableDatabaseCollection GetRecoverableDatabases() - { - return GetCachedClient(Client => new RecoverableDatabaseCollection(Client, Id)); - } - - /// - /// Gets a recoverable database, which is a resource representing a database's geo backup - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName} - /// - /// - /// Operation Id - /// RecoverableDatabases_Get - /// - /// - /// - /// The name of the database. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetRecoverableDatabaseAsync(string databaseName, CancellationToken cancellationToken = default) - { - return await GetRecoverableDatabases().GetAsync(databaseName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a recoverable database, which is a resource representing a database's geo backup - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName} - /// - /// - /// Operation Id - /// RecoverableDatabases_Get - /// - /// - /// - /// The name of the database. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetRecoverableDatabase(string databaseName, CancellationToken cancellationToken = default) - { - return GetRecoverableDatabases().Get(databaseName, cancellationToken); - } - /// Gets a collection of SqlServerCommunicationLinkResources in the SqlServer. /// An object representing collection of SqlServerCommunicationLinkResources and their operations over a SqlServerCommunicationLinkResource. public virtual SqlServerCommunicationLinkCollection GetSqlServerCommunicationLinks() @@ -372,59 +319,6 @@ public virtual Response GetEncryptionProtector(Encr return GetEncryptionProtectors().Get(encryptionProtectorName, 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 SqlFirewallRuleResources in the SqlServer. /// An object representing collection of SqlFirewallRuleResources and their operations over a SqlFirewallRuleResource. public virtual SqlFirewallRuleCollection GetSqlFirewallRules() @@ -1158,63 +1052,6 @@ public virtual Response GetOutboundFirewallRule(st return GetOutboundFirewallRules().Get(outboundRuleFqdn, cancellationToken); } - /// Gets a collection of RestorableDroppedDatabaseResources in the SqlServer. - /// An object representing collection of RestorableDroppedDatabaseResources and their operations over a RestorableDroppedDatabaseResource. - public virtual RestorableDroppedDatabaseCollection GetRestorableDroppedDatabases() - { - return GetCachedClient(Client => new RestorableDroppedDatabaseCollection(Client, Id)); - } - - /// - /// Gets a restorable dropped database. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId} - /// - /// - /// Operation Id - /// RestorableDroppedDatabases_Get - /// - /// - /// - /// The String to use. - /// The child resources to include in the response. - /// An OData filter expression that filters elements in the collection. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetRestorableDroppedDatabaseAsync(string restorableDroppedDatabaseId, string expand = null, string filter = null, CancellationToken cancellationToken = default) - { - return await GetRestorableDroppedDatabases().GetAsync(restorableDroppedDatabaseId, expand, filter, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a restorable dropped database. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId} - /// - /// - /// Operation Id - /// RestorableDroppedDatabases_Get - /// - /// - /// - /// The String to use. - /// The child resources to include in the response. - /// An OData filter expression that filters elements in the collection. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetRestorableDroppedDatabase(string restorableDroppedDatabaseId, string expand = null, string filter = null, CancellationToken cancellationToken = default) - { - return GetRestorableDroppedDatabases().Get(restorableDroppedDatabaseId, expand, filter, cancellationToken); - } - /// Gets a collection of SqlServerConnectionPolicyResources in the SqlServer. /// An object representing collection of SqlServerConnectionPolicyResources and their operations over a SqlServerConnectionPolicyResource. public virtual SqlServerConnectionPolicyCollection GetSqlServerConnectionPolicies() @@ -1264,363 +1101,530 @@ public virtual Response GetSqlServerConnectio return GetSqlServerConnectionPolicies().Get(connectionPolicyName, cancellationToken); } - /// Gets a collection of ElasticPoolResources in the SqlServer. - /// An object representing collection of ElasticPoolResources and their operations over a ElasticPoolResource. - public virtual ElasticPoolCollection GetElasticPools() + /// Gets a collection of SqlServerBlobAuditingPolicyResources in the SqlServer. + /// An object representing collection of SqlServerBlobAuditingPolicyResources and their operations over a SqlServerBlobAuditingPolicyResource. + public virtual SqlServerBlobAuditingPolicyCollection GetSqlServerBlobAuditingPolicies() { - return GetCachedClient(Client => new ElasticPoolCollection(Client, Id)); + return GetCachedClient(Client => new SqlServerBlobAuditingPolicyCollection(Client, Id)); } /// - /// Gets an elastic pool. + /// Gets a server's blob auditing policy. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName} /// /// /// Operation Id - /// ElasticPools_Get + /// ServerBlobAuditingPolicies_Get /// /// /// - /// The name of the elastic pool. + /// The name of the blob auditing policy. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. [ForwardsClientCalls] - public virtual async Task> GetElasticPoolAsync(string elasticPoolName, CancellationToken cancellationToken = default) + public virtual async Task> GetSqlServerBlobAuditingPolicyAsync(BlobAuditingPolicyName blobAuditingPolicyName, CancellationToken cancellationToken = default) { - return await GetElasticPools().GetAsync(elasticPoolName, cancellationToken).ConfigureAwait(false); + return await GetSqlServerBlobAuditingPolicies().GetAsync(blobAuditingPolicyName, cancellationToken).ConfigureAwait(false); } /// - /// Gets an elastic pool. + /// Gets a server's blob auditing policy. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName} /// /// /// Operation Id - /// ElasticPools_Get + /// ServerBlobAuditingPolicies_Get /// /// /// - /// The name of the elastic pool. + /// The name of the blob auditing policy. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. [ForwardsClientCalls] - public virtual Response GetElasticPool(string elasticPoolName, CancellationToken cancellationToken = default) + public virtual Response GetSqlServerBlobAuditingPolicy(BlobAuditingPolicyName blobAuditingPolicyName, CancellationToken cancellationToken = default) { - return GetElasticPools().Get(elasticPoolName, cancellationToken); + return GetSqlServerBlobAuditingPolicies().Get(blobAuditingPolicyName, 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() + /// Gets a collection of ExtendedServerBlobAuditingPolicyResources in the SqlServer. + /// An object representing collection of ExtendedServerBlobAuditingPolicyResources and their operations over a ExtendedServerBlobAuditingPolicyResource. + public virtual ExtendedServerBlobAuditingPolicyCollection GetExtendedServerBlobAuditingPolicies() { - return GetCachedClient(Client => new IPv6FirewallRuleCollection(Client, Id)); + return GetCachedClient(Client => new ExtendedServerBlobAuditingPolicyCollection(Client, Id)); } /// - /// Gets an IPv6 firewall rule. + /// Gets an extended server's blob auditing policy. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName} /// /// /// Operation Id - /// IPv6FirewallRules_Get + /// ExtendedServerBlobAuditingPolicies_Get /// /// /// - /// The name of the firewall rule. + /// The name of the blob auditing policy. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. [ForwardsClientCalls] - public virtual async Task> GetIPv6FirewallRuleAsync(string firewallRuleName, CancellationToken cancellationToken = default) + public virtual async Task> GetExtendedServerBlobAuditingPolicyAsync(BlobAuditingPolicyName blobAuditingPolicyName, CancellationToken cancellationToken = default) { - return await GetIPv6FirewallRules().GetAsync(firewallRuleName, cancellationToken).ConfigureAwait(false); + return await GetExtendedServerBlobAuditingPolicies().GetAsync(blobAuditingPolicyName, cancellationToken).ConfigureAwait(false); } /// - /// Gets an IPv6 firewall rule. + /// Gets an extended server's blob auditing policy. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName} /// /// /// Operation Id - /// IPv6FirewallRules_Get + /// ExtendedServerBlobAuditingPolicies_Get /// /// /// - /// The name of the firewall rule. + /// The name of the blob auditing policy. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. [ForwardsClientCalls] - public virtual Response GetIPv6FirewallRule(string firewallRuleName, CancellationToken cancellationToken = default) + public virtual Response GetExtendedServerBlobAuditingPolicy(BlobAuditingPolicyName blobAuditingPolicyName, CancellationToken cancellationToken = default) { - return GetIPv6FirewallRules().Get(firewallRuleName, cancellationToken); + return GetExtendedServerBlobAuditingPolicies().Get(blobAuditingPolicyName, cancellationToken); } - /// Gets a collection of SqlServerBlobAuditingPolicyResources in the SqlServer. - /// An object representing collection of SqlServerBlobAuditingPolicyResources and their operations over a SqlServerBlobAuditingPolicyResource. - public virtual SqlServerBlobAuditingPolicyCollection GetSqlServerBlobAuditingPolicies() + /// Gets a collection of ServerAdvancedThreatProtectionResources in the SqlServer. + /// An object representing collection of ServerAdvancedThreatProtectionResources and their operations over a ServerAdvancedThreatProtectionResource. + public virtual ServerAdvancedThreatProtectionCollection GetServerAdvancedThreatProtections() { - return GetCachedClient(Client => new SqlServerBlobAuditingPolicyCollection(Client, Id)); + return GetCachedClient(Client => new ServerAdvancedThreatProtectionCollection(Client, Id)); } /// - /// Gets a server's blob auditing policy. + /// Get a server's Advanced Threat Protection state. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName} /// /// /// Operation Id - /// ServerBlobAuditingPolicies_Get + /// ServerAdvancedThreatProtectionSettings_Get /// /// /// - /// The name of the blob auditing policy. + /// The name of the Advanced Threat Protection state. /// The cancellation token to use. [ForwardsClientCalls] - public virtual async Task> GetSqlServerBlobAuditingPolicyAsync(BlobAuditingPolicyName blobAuditingPolicyName, CancellationToken cancellationToken = default) + public virtual async Task> GetServerAdvancedThreatProtectionAsync(AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) { - return await GetSqlServerBlobAuditingPolicies().GetAsync(blobAuditingPolicyName, cancellationToken).ConfigureAwait(false); + return await GetServerAdvancedThreatProtections().GetAsync(advancedThreatProtectionName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a server's blob auditing policy. + /// Get a server's Advanced Threat Protection state. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName} /// /// /// Operation Id - /// ServerBlobAuditingPolicies_Get + /// ServerAdvancedThreatProtectionSettings_Get /// /// /// - /// The name of the blob auditing policy. + /// The name of the Advanced Threat Protection state. /// The cancellation token to use. [ForwardsClientCalls] - public virtual Response GetSqlServerBlobAuditingPolicy(BlobAuditingPolicyName blobAuditingPolicyName, CancellationToken cancellationToken = default) + public virtual Response GetServerAdvancedThreatProtection(AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) { - return GetSqlServerBlobAuditingPolicies().Get(blobAuditingPolicyName, cancellationToken); + return GetServerAdvancedThreatProtections().Get(advancedThreatProtectionName, cancellationToken); } - /// Gets a collection of ExtendedServerBlobAuditingPolicyResources in the SqlServer. - /// An object representing collection of ExtendedServerBlobAuditingPolicyResources and their operations over a ExtendedServerBlobAuditingPolicyResource. - public virtual ExtendedServerBlobAuditingPolicyCollection GetExtendedServerBlobAuditingPolicies() + /// Gets a collection of SqlDatabaseResources in the SqlServer. + /// An object representing collection of SqlDatabaseResources and their operations over a SqlDatabaseResource. + public virtual SqlDatabaseCollection GetSqlDatabases() { - return GetCachedClient(Client => new ExtendedServerBlobAuditingPolicyCollection(Client, Id)); + return GetCachedClient(Client => new SqlDatabaseCollection(Client, Id)); } /// - /// Gets an extended server's blob auditing policy. + /// Gets a database. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName} /// /// /// Operation Id - /// ExtendedServerBlobAuditingPolicies_Get + /// Databases_Get /// /// /// - /// The name of the blob auditing policy. + /// The name of the database. + /// The child resources to include in the response. + /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetExtendedServerBlobAuditingPolicyAsync(BlobAuditingPolicyName blobAuditingPolicyName, CancellationToken cancellationToken = default) + public virtual async Task> GetSqlDatabaseAsync(string databaseName, string expand = null, string filter = null, CancellationToken cancellationToken = default) { - return await GetExtendedServerBlobAuditingPolicies().GetAsync(blobAuditingPolicyName, cancellationToken).ConfigureAwait(false); + return await GetSqlDatabases().GetAsync(databaseName, expand, filter, cancellationToken).ConfigureAwait(false); } /// - /// Gets an extended server's blob auditing policy. + /// Gets a database. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName} /// /// /// Operation Id - /// ExtendedServerBlobAuditingPolicies_Get + /// Databases_Get /// /// /// - /// The name of the blob auditing policy. + /// The name of the database. + /// The child resources to include in the response. + /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetExtendedServerBlobAuditingPolicy(BlobAuditingPolicyName blobAuditingPolicyName, CancellationToken cancellationToken = default) + public virtual Response GetSqlDatabase(string databaseName, string expand = null, string filter = null, CancellationToken cancellationToken = default) { - return GetExtendedServerBlobAuditingPolicies().Get(blobAuditingPolicyName, cancellationToken); + return GetSqlDatabases().Get(databaseName, expand, filter, cancellationToken); } - /// Gets a collection of ServerAdvancedThreatProtectionResources in the SqlServer. - /// An object representing collection of ServerAdvancedThreatProtectionResources and their operations over a ServerAdvancedThreatProtectionResource. - public virtual ServerAdvancedThreatProtectionCollection GetServerAdvancedThreatProtections() + /// Gets a collection of ElasticPoolResources in the SqlServer. + /// An object representing collection of ElasticPoolResources and their operations over a ElasticPoolResource. + public virtual ElasticPoolCollection GetElasticPools() { - return GetCachedClient(Client => new ServerAdvancedThreatProtectionCollection(Client, Id)); + return GetCachedClient(Client => new ElasticPoolCollection(Client, Id)); } /// - /// Get a server's Advanced Threat Protection state. + /// Gets an elastic pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName} /// /// /// Operation Id - /// ServerAdvancedThreatProtectionSettings_Get + /// ElasticPools_Get /// /// /// - /// The name of the Advanced Threat Protection state. + /// The name of the elastic pool. /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetServerAdvancedThreatProtectionAsync(AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) + public virtual async Task> GetElasticPoolAsync(string elasticPoolName, CancellationToken cancellationToken = default) { - return await GetServerAdvancedThreatProtections().GetAsync(advancedThreatProtectionName, cancellationToken).ConfigureAwait(false); + return await GetElasticPools().GetAsync(elasticPoolName, cancellationToken).ConfigureAwait(false); } /// - /// Get a server's Advanced Threat Protection state. + /// Gets an elastic pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName} /// /// /// Operation Id - /// ServerAdvancedThreatProtectionSettings_Get + /// ElasticPools_Get /// /// /// - /// The name of the Advanced Threat Protection state. + /// The name of the elastic pool. /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetServerAdvancedThreatProtection(AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) + public virtual Response GetElasticPool(string elasticPoolName, CancellationToken cancellationToken = default) { - return GetServerAdvancedThreatProtections().Get(advancedThreatProtectionName, cancellationToken); + return GetElasticPools().Get(elasticPoolName, cancellationToken); } - /// Gets a collection of SqlServerSqlVulnerabilityAssessmentResources in the SqlServer. - /// An object representing collection of SqlServerSqlVulnerabilityAssessmentResources and their operations over a SqlServerSqlVulnerabilityAssessmentResource. - public virtual SqlServerSqlVulnerabilityAssessmentCollection GetSqlServerSqlVulnerabilityAssessments() + /// Gets a collection of RecoverableDatabaseResources in the SqlServer. + /// An object representing collection of RecoverableDatabaseResources and their operations over a RecoverableDatabaseResource. + public virtual RecoverableDatabaseCollection GetRecoverableDatabases() { - return GetCachedClient(Client => new SqlServerSqlVulnerabilityAssessmentCollection(Client, Id)); + return GetCachedClient(Client => new RecoverableDatabaseCollection(Client, Id)); } /// - /// Gets SQL Vulnerability Assessment policy. + /// Gets a recoverable database. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName} /// /// /// Operation Id - /// SqlVulnerabilityAssessmentsSettings_Get + /// RecoverableDatabases_Get /// /// /// - /// The name of the SQL Vulnerability Assessment. + /// The name of the database. + /// The child resources to include in the response. + /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetSqlServerSqlVulnerabilityAssessmentAsync(VulnerabilityAssessmentName vulnerabilityAssessmentName, CancellationToken cancellationToken = default) + public virtual async Task> GetRecoverableDatabaseAsync(string databaseName, string expand = null, string filter = null, CancellationToken cancellationToken = default) { - return await GetSqlServerSqlVulnerabilityAssessments().GetAsync(vulnerabilityAssessmentName, cancellationToken).ConfigureAwait(false); + return await GetRecoverableDatabases().GetAsync(databaseName, expand, filter, cancellationToken).ConfigureAwait(false); } /// - /// Gets SQL Vulnerability Assessment policy. + /// Gets a recoverable database. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName} /// /// /// Operation Id - /// SqlVulnerabilityAssessmentsSettings_Get + /// RecoverableDatabases_Get /// /// /// - /// The name of the SQL Vulnerability Assessment. + /// The name of the database. + /// The child resources to include in the response. + /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetSqlServerSqlVulnerabilityAssessment(VulnerabilityAssessmentName vulnerabilityAssessmentName, CancellationToken cancellationToken = default) + public virtual Response GetRecoverableDatabase(string databaseName, string expand = null, string filter = null, CancellationToken cancellationToken = default) { - return GetSqlServerSqlVulnerabilityAssessments().Get(vulnerabilityAssessmentName, cancellationToken); + return GetRecoverableDatabases().Get(databaseName, expand, filter, cancellationToken); } - /// Gets a collection of SqlDatabaseResources in the SqlServer. - /// An object representing collection of SqlDatabaseResources and their operations over a SqlDatabaseResource. - public virtual SqlDatabaseCollection GetSqlDatabases() + /// Gets a collection of RestorableDroppedDatabaseResources in the SqlServer. + /// An object representing collection of RestorableDroppedDatabaseResources and their operations over a RestorableDroppedDatabaseResource. + public virtual RestorableDroppedDatabaseCollection GetRestorableDroppedDatabases() { - return GetCachedClient(Client => new SqlDatabaseCollection(Client, Id)); + return GetCachedClient(Client => new RestorableDroppedDatabaseCollection(Client, Id)); } /// - /// Gets a database. + /// Gets a restorable dropped database. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId} /// /// /// Operation Id - /// Databases_Get + /// RestorableDroppedDatabases_Get /// /// /// - /// The name of the database. + /// The String to use. /// The child resources to include in the response. /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetSqlDatabaseAsync(string databaseName, string expand = null, string filter = null, CancellationToken cancellationToken = default) + public virtual async Task> GetRestorableDroppedDatabaseAsync(string restorableDroppedDatabaseId, string expand = null, string filter = null, CancellationToken cancellationToken = default) { - return await GetSqlDatabases().GetAsync(databaseName, expand, filter, cancellationToken).ConfigureAwait(false); + return await GetRestorableDroppedDatabases().GetAsync(restorableDroppedDatabaseId, expand, filter, cancellationToken).ConfigureAwait(false); } /// - /// Gets a database. + /// Gets a restorable dropped database. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId} /// /// /// Operation Id - /// Databases_Get + /// RestorableDroppedDatabases_Get /// /// /// - /// The name of the database. + /// The String to use. /// The child resources to include in the response. /// An OData filter expression that filters elements in the collection. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetSqlDatabase(string databaseName, string expand = null, string filter = null, CancellationToken cancellationToken = default) + public virtual Response GetRestorableDroppedDatabase(string restorableDroppedDatabaseId, string expand = null, string filter = null, CancellationToken cancellationToken = default) { - return GetSqlDatabases().Get(databaseName, expand, filter, cancellationToken); + 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() + { + return GetCachedClient(Client => new IPv6FirewallRuleCollection(Client, Id)); + } + + /// + /// Gets an IPv6 firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// IPv6FirewallRules_Get + /// + /// + /// + /// The name of the firewall rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetIPv6FirewallRuleAsync(string firewallRuleName, CancellationToken cancellationToken = default) + { + return await GetIPv6FirewallRules().GetAsync(firewallRuleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an IPv6 firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// IPv6FirewallRules_Get + /// + /// + /// + /// The name of the firewall rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetIPv6FirewallRule(string firewallRuleName, CancellationToken cancellationToken = default) + { + return GetIPv6FirewallRules().Get(firewallRuleName, cancellationToken); + } + + /// Gets a collection of SqlServerSqlVulnerabilityAssessmentResources in the SqlServer. + /// An object representing collection of SqlServerSqlVulnerabilityAssessmentResources and their operations over a SqlServerSqlVulnerabilityAssessmentResource. + public virtual SqlServerSqlVulnerabilityAssessmentCollection GetSqlServerSqlVulnerabilityAssessments() + { + return GetCachedClient(Client => new SqlServerSqlVulnerabilityAssessmentCollection(Client, Id)); + } + + /// + /// Gets SQL Vulnerability Assessment policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName} + /// + /// + /// Operation Id + /// SqlVulnerabilityAssessmentsSettings_Get + /// + /// + /// + /// The name of the SQL Vulnerability Assessment. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual async Task> GetSqlServerSqlVulnerabilityAssessmentAsync(VulnerabilityAssessmentName vulnerabilityAssessmentName, CancellationToken cancellationToken = default) + { + return await GetSqlServerSqlVulnerabilityAssessments().GetAsync(vulnerabilityAssessmentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets SQL Vulnerability Assessment policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName} + /// + /// + /// Operation Id + /// SqlVulnerabilityAssessmentsSettings_Get + /// + /// + /// + /// The name of the SQL Vulnerability Assessment. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual Response GetSqlServerSqlVulnerabilityAssessment(VulnerabilityAssessmentName vulnerabilityAssessmentName, CancellationToken cancellationToken = default) + { + return GetSqlServerSqlVulnerabilityAssessments().Get(vulnerabilityAssessmentName, cancellationToken); } /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlVulnerabilityAssessmentScanData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlVulnerabilityAssessmentScanData.cs index 288589c6fb58..c786375f3618 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlVulnerabilityAssessmentScanData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlVulnerabilityAssessmentScanData.cs @@ -46,7 +46,8 @@ public SqlVulnerabilityAssessmentScanData() /// The number of total failed rules. /// The number of total rules assessed. /// Baseline created for this database, and has one or more rules. - internal SqlVulnerabilityAssessmentScanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string scanId, VulnerabilityAssessmentScanTriggerType? triggerType, VulnerabilityAssessmentScanState? state, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList errors, string server, string database, string sqlVersion, int? highSeverityFailedRulesCount, int? mediumSeverityFailedRulesCount, int? lowSeverityFailedRulesCount, int? totalPassedRulesCount, int? totalFailedRulesCount, int? totalRulesCount, bool? isBaselineApplied) : base(id, name, resourceType, systemData) + /// The last scan time. + internal SqlVulnerabilityAssessmentScanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string scanId, VulnerabilityAssessmentScanTriggerType? triggerType, VulnerabilityAssessmentScanState? state, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList errors, string server, string database, string sqlVersion, int? highSeverityFailedRulesCount, int? mediumSeverityFailedRulesCount, int? lowSeverityFailedRulesCount, int? totalPassedRulesCount, int? totalFailedRulesCount, int? totalRulesCount, bool? isBaselineApplied, DateTimeOffset? lastScanOn) : base(id, name, resourceType, systemData) { ScanId = scanId; TriggerType = triggerType; @@ -64,6 +65,7 @@ internal SqlVulnerabilityAssessmentScanData(ResourceIdentifier id, string name, TotalFailedRulesCount = totalFailedRulesCount; TotalRulesCount = totalRulesCount; IsBaselineApplied = isBaselineApplied; + LastScanOn = lastScanOn; } /// The scan ID. @@ -98,5 +100,7 @@ internal SqlVulnerabilityAssessmentScanData(ResourceIdentifier id, string name, public int? TotalRulesCount { get; } /// Baseline created for this database, and has one or more rules. public bool? IsBaselineApplied { get; } + /// The last scan time. + public DateTimeOffset? LastScanOn { get; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md index c59cf5fc93fd..6713d1a62a0a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md @@ -4,7 +4,8 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -require: https://github.com/Azure/azure-rest-api-specs/blob/67527326606bd3c71700e2b96ff3c9ce9e655e29/specification/sql/resource-manager/readme.md +tag: package-composite-v5 +require: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/sql/resource-manager/readme.md namespace: Azure.ResourceManager.Sql output-folder: $(this-folder)/Generated clear-output-folder: true @@ -328,6 +329,12 @@ rename-mapping: OutboundEnvironmentEndpoint: SqlOutboundEnvironmentEndpoint OutboundEnvironmentEndpointCollection: SqlOutboundEnvironmentEndpointCollection MetricDefinition.resourceUri: ResourceUriString + FailoverGroup.properties.databases: FailoverDatabases + ManagedInstance.properties.dnsZonePartner: ManagedDnsZonePartner + ManagedInstanceUpdate.properties.dnsZonePartner: ManagedDnsZonePartner + +# mgmt-debug: +# show-serialized-names: true prompted-enum-values: - Default diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/tests/Scenario/ElasticPoolTests.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/tests/Scenario/ElasticPoolTests.cs new file mode 100644 index 000000000000..c3e6b65ab918 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/tests/Scenario/ElasticPoolTests.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Linq; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Sql.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Sql.Tests.Scenario +{ + public class ElasticPoolTests : SqlManagementTestBase + { + private ResourceGroupResource _resourceGroup; + private ResourceIdentifier _resourceGroupIdentifier; + private ElasticPoolCollection collection; + private static AzureLocation Location = AzureLocation.UKSouth; + private static SqlAlwaysEncryptedEnclaveType[] enclaveTypes = { SqlAlwaysEncryptedEnclaveType.Default, SqlAlwaysEncryptedEnclaveType.Vbs }; + + public ElasticPoolTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) + { + } + + [OneTimeSetUp] + public async Task GlobalSetUp() + { + var rgLro = await GlobalClient.GetDefaultSubscriptionAsync().Result.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, SessionRecording.GenerateAssetName("Sql-RG-"), new ResourceGroupData(Location)); + ResourceGroupResource rg = rgLro.Value; + _resourceGroupIdentifier = rg.Id; + await StopSessionRecordingAsync(); + } + + [SetUp] + public async Task TestSetUp() + { + ArmClientOptions options = new ArmClientOptions(); + var client = GetArmClient(options); + _resourceGroup = await client.GetResourceGroupResource(_resourceGroupIdentifier).GetAsync(); + + // create Sql Server + string serverName = Recording.GenerateAssetName("sql-server-"); + var sqlServer = await CreateDefaultSqlServer(serverName, Location, _resourceGroup); + collection = sqlServer.GetElasticPools(); + } + + [TearDown] + public async Task TearDown() + { + var sqlServerList = await _resourceGroup.GetSqlServers().GetAllAsync().ToEnumerableAsync(); + foreach (var item in sqlServerList) + { + await item.DeleteAsync(WaitUntil.Completed); + } + } + + [Test] + [RecordedTest] + public async Task ElasticPoolApiTests() + { + string poolName1 = Recording.GenerateAssetName("sql-pool-"); + string poolName2 = Recording.GenerateAssetName("sql-pool-"); + + // 1.CreateOrUpdate + ElasticPoolData data = new ElasticPoolData(Location) { }; + var pool1 = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName1, data); + Assert.IsNotNull(pool1.Value.Data); + Assert.AreEqual(poolName1, pool1.Value.Data.Name); + + // 2.CheckIfExist + Assert.IsTrue(await collection.ExistsAsync(poolName1)); + Assert.IsFalse(await collection.ExistsAsync(poolName2)); + + // 3.Get + var getPool = await collection.GetAsync(poolName1); + Assert.IsNotNull(getPool.Value.Data); + Assert.AreEqual(poolName1, getPool.Value.Data.Name); + + var pool2 = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName2, data); + Assert.IsNotNull(pool2.Value.Data); + Assert.AreEqual(poolName2, pool2.Value.Data.Name); + + // 4.GetAll + var list = await collection.GetAllAsync().ToEnumerableAsync(); + Assert.IsNotEmpty(list); + Assert.AreEqual(2, list.Count); + string[] poolNamesList = { list.First().Data.Name, list.Last().Data.Name }; + Assert.Contains(poolName1, poolNamesList); + Assert.Contains(poolName2, poolNamesList); + + // 5.Delete + var deletePool1 = await collection.GetAsync(poolName1); + await deletePool1.Value.DeleteAsync(WaitUntil.Completed); + + var deletePool2 = await collection.GetAsync(poolName2); + await deletePool2.Value.DeleteAsync(WaitUntil.Completed); + + list = await collection.GetAllAsync().ToEnumerableAsync(); + Assert.AreEqual(0, list.Count); + } + + [Test] + [TestCase("Default")] + [TestCase("VBS")] + [RecordedTest] + public async Task ElasticPoolApiTestsWithEnclaves(string preferredEnclaveType) + { + SqlAlwaysEncryptedEnclaveType enclaveType; + if (preferredEnclaveType == SqlAlwaysEncryptedEnclaveType.Default.ToString()) + { + enclaveType = SqlAlwaysEncryptedEnclaveType.Default; + } + else + { + enclaveType = SqlAlwaysEncryptedEnclaveType.Vbs; + } + string poolName1 = Recording.GenerateAssetName($"sql-pool-{preferredEnclaveType}-"); + string poolName2 = Recording.GenerateAssetName($"sql-pool-{preferredEnclaveType}-"); + + // 1.CreateOrUpdate + ElasticPoolData data = new ElasticPoolData(Location) + { + PreferredEnclaveType = preferredEnclaveType + }; + + var pool1 = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName1, data); + Assert.IsNotNull(pool1.Value.Data); + Assert.AreEqual(poolName1, pool1.Value.Data.Name); + Assert.AreEqual(enclaveType, pool1.Value.Data.PreferredEnclaveType); + + // 2.CheckIfExist + Assert.IsTrue(await collection.ExistsAsync(poolName1)); + Assert.IsFalse(await collection.ExistsAsync(poolName2)); + + // 3.Get + var getPool = await collection.GetAsync(poolName1); + Assert.IsNotNull(getPool.Value.Data); + Assert.AreEqual(poolName1, getPool.Value.Data.Name); + Assert.AreEqual(enclaveType, getPool.Value.Data.PreferredEnclaveType); + + var pool2 = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName2, data); + Assert.IsNotNull(pool2.Value.Data); + Assert.AreEqual(poolName2, pool2.Value.Data.Name); + + // 4.GetAll + var list = await collection.GetAllAsync().ToEnumerableAsync(); + Assert.IsNotEmpty(list); + Assert.AreEqual(2, list.Count); + string[] poolNamesList = { list.First().Data.Name, list.Last().Data.Name }; + Assert.Contains(poolName1, poolNamesList); + Assert.Contains(poolName2, poolNamesList); + + // 5.Delete + var deletePool1 = await collection.GetAsync(poolName1); + await deletePool1.Value.DeleteAsync(WaitUntil.Completed); + + var deletePool2 = await collection.GetAsync(poolName2); + await deletePool2.Value.DeleteAsync(WaitUntil.Completed); + + list = await collection.GetAllAsync().ToEnumerableAsync(); + Assert.AreEqual(0, list.Count); + } + } +}