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 438eed745804..4cc857539908 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 @@ -495,7 +495,6 @@ public FailoverGroupData() { } public System.Collections.Generic.IList FailoverDatabases { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } public System.Collections.Generic.IList PartnerServers { get { throw null; } } - public Azure.ResourceManager.Sql.Models.FailoverGroupReadOnlyEndpoint ReadOnlyEndpoint { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Sql.Models.ReadOnlyEndpointFailoverPolicy? ReadOnlyEndpointFailoverPolicy { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.FailoverGroupReadWriteEndpoint ReadWriteEndpoint { get { throw null; } set { } } @@ -698,6 +697,43 @@ protected IPv6FirewallRuleResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.IPv6FirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.IPv6FirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class JobPrivateEndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected JobPrivateEndpointCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointName, Azure.ResourceManager.Sql.JobPrivateEndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointName, Azure.ResourceManager.Sql.JobPrivateEndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string privateEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string privateEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.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 privateEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string privateEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string privateEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.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; } + } + public partial class JobPrivateEndpointData : Azure.ResourceManager.Models.ResourceData + { + public JobPrivateEndpointData() { } + public string PrivateEndpointId { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetServerAzureResourceId { get { throw null; } set { } } + } + public partial class JobPrivateEndpointResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected JobPrivateEndpointResource() { } + public virtual Azure.ResourceManager.Sql.JobPrivateEndpointData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serverName, string jobAgentName, string privateEndpointName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.JobPrivateEndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.JobPrivateEndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class LedgerDigestUploadCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected LedgerDigestUploadCollection() { } @@ -3411,6 +3447,7 @@ public static partial class SqlExtensions public static Azure.Pageable GetInstancePools(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetInstancePoolsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Sql.IPv6FirewallRuleResource GetIPv6FirewallRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Sql.JobPrivateEndpointResource GetJobPrivateEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Sql.LedgerDigestUploadResource GetLedgerDigestUploadResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Sql.LogicalDatabaseTransparentDataEncryptionResource GetLogicalDatabaseTransparentDataEncryptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -3982,7 +4019,6 @@ public SqlServerData(Azure.Core.AzureLocation location) : base (default(Azure.Co public System.Guid? FederatedClientId { get { throw null; } set { } } public string FullyQualifiedDomainName { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? IsIPv6Enabled { get { throw null; } set { } } public System.Uri KeyId { get { throw null; } set { } } public string Kind { get { throw null; } } public string MinimalTlsVersion { get { throw null; } set { } } @@ -4194,6 +4230,9 @@ protected SqlServerJobAgentResource() { } public virtual Azure.Pageable GetJobExecutionsByAgent(System.DateTimeOffset? createTimeMin = default(System.DateTimeOffset?), System.DateTimeOffset? createTimeMax = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeMin = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeMax = default(System.DateTimeOffset?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetJobExecutionsByAgentAsync(Azure.ResourceManager.Sql.Models.SqlServerJobAgentResourceGetJobExecutionsByAgentOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetJobExecutionsByAgentAsync(System.DateTimeOffset? createTimeMin = default(System.DateTimeOffset?), System.DateTimeOffset? createTimeMax = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeMin = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeMax = default(System.DateTimeOffset?), bool? isActive = default(bool?), int? skip = default(int?), int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetJobPrivateEndpoint(string privateEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetJobPrivateEndpointAsync(string privateEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Sql.JobPrivateEndpointCollection GetJobPrivateEndpoints() { throw null; } public virtual Azure.Response GetSqlServerJob(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSqlServerJobAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetSqlServerJobCredential(string credentialName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -5593,7 +5632,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.FailoverGroupReadOnlyEndpoint readOnlyEndpoint = null, Azure.ResourceManager.Sql.Models.FailoverGroupReplicationRole? replicationRole = default(Azure.ResourceManager.Sql.Models.FailoverGroupReplicationRole?), string replicationState = null, System.Collections.Generic.IEnumerable partnerServers = null, System.Collections.Generic.IEnumerable failoverDatabases = null) { throw null; } + public static Azure.ResourceManager.Sql.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; } @@ -5606,6 +5645,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.Models.InstancePoolVcoresCapability InstancePoolVcoresCapability(string name = null, int? value = default(int?), Azure.ResourceManager.Sql.Models.MaxSizeCapability storageLimit = null, Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.IPv6FirewallRuleData IPv6FirewallRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), string startIPv6Address = null, string endIPv6Address = null) { throw null; } public static Azure.ResourceManager.Sql.Models.JobExecutionTarget JobExecutionTarget(Azure.ResourceManager.Sql.Models.JobTargetType? targetType = default(Azure.ResourceManager.Sql.Models.JobTargetType?), string serverName = null, string databaseName = null) { throw null; } + public static Azure.ResourceManager.Sql.JobPrivateEndpointData JobPrivateEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier targetServerAzureResourceId = null, string privateEndpointId = null) { throw null; } public static Azure.ResourceManager.Sql.LedgerDigestUploadData LedgerDigestUploadData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string digestStorageEndpoint = null, Azure.ResourceManager.Sql.Models.LedgerDigestUploadsState? state = default(Azure.ResourceManager.Sql.Models.LedgerDigestUploadsState?)) { throw null; } public static Azure.ResourceManager.Sql.Models.LicenseTypeCapability LicenseTypeCapability(string name = null, Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.LogicalDatabaseTransparentDataEncryptionData LogicalDatabaseTransparentDataEncryptionData(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.TransparentDataEncryptionState? state = default(Azure.ResourceManager.Sql.Models.TransparentDataEncryptionState?)) { throw null; } @@ -5721,7 +5761,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.SqlServerBlobAuditingPolicyData SqlServerBlobAuditingPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isDevopsAuditEnabled = default(bool?), int? retentionDays = default(int?), System.Collections.Generic.IEnumerable auditActionsAndGroups = null, bool? isStorageSecondaryKeyInUse = default(bool?), bool? isAzureMonitorTargetEnabled = default(bool?), int? queueDelayMs = default(int?), bool? isManagedIdentityInUse = default(bool?), Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState? state = default(Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState?), string storageEndpoint = null, string storageAccountAccessKey = null, System.Guid? storageAccountSubscriptionId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.Sql.SqlServerCommunicationLinkData SqlServerCommunicationLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string kind = null, string state = null, string partnerServer = null) { throw null; } public static Azure.ResourceManager.Sql.SqlServerConnectionPolicyData SqlServerConnectionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string kind = null, Azure.ResourceManager.Sql.Models.ServerConnectionType? connectionType = default(Azure.ResourceManager.Sql.Models.ServerConnectionType?)) { throw null; } - public static Azure.ResourceManager.Sql.SqlServerData SqlServerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string kind = null, string administratorLogin = null, string administratorLoginPassword = null, string version = null, string state = null, string fullyQualifiedDomainName = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? publicNetworkAccess = default(Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag?), Azure.ResourceManager.Sql.Models.ServerWorkspaceFeature? workspaceFeature = default(Azure.ResourceManager.Sql.Models.ServerWorkspaceFeature?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Guid? federatedClientId = default(System.Guid?), System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ServerExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? restrictOutboundNetworkAccess = default(Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag?), Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? isIPv6Enabled = default(Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag?), Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?)) { throw null; } + public static Azure.ResourceManager.Sql.SqlServerData SqlServerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string kind = null, string administratorLogin = null, string administratorLoginPassword = null, string version = null, string state = null, string fullyQualifiedDomainName = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? publicNetworkAccess = default(Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag?), Azure.ResourceManager.Sql.Models.ServerWorkspaceFeature? workspaceFeature = default(Azure.ResourceManager.Sql.Models.ServerWorkspaceFeature?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Guid? federatedClientId = default(System.Guid?), System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ServerExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? restrictOutboundNetworkAccess = default(Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag?), Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?)) { throw null; } public static Azure.ResourceManager.Sql.SqlServerDatabaseReplicationLinkData SqlServerDatabaseReplicationLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string partnerServer = null, string partnerDatabase = null, Azure.Core.AzureLocation? partnerLocation = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole? role = default(Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole?), Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole? partnerRole = default(Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole?), string replicationMode = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), int? percentComplete = default(int?), Azure.ResourceManager.Sql.Models.ReplicationLinkState? replicationState = default(Azure.ResourceManager.Sql.Models.ReplicationLinkState?), bool? isTerminationAllowed = default(bool?), Azure.ResourceManager.Sql.Models.ReplicationLinkType? linkType = default(Azure.ResourceManager.Sql.Models.ReplicationLinkType?)) { throw null; } public static Azure.ResourceManager.Sql.SqlServerDatabaseRestorePointData SqlServerDatabaseRestorePointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Sql.Models.RestorePointType? restorePointType = default(Azure.ResourceManager.Sql.Models.RestorePointType?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?), System.DateTimeOffset? restorePointCreatedOn = default(System.DateTimeOffset?), string restorePointLabel = null) { throw null; } public static Azure.ResourceManager.Sql.SqlServerDevOpsAuditingSettingData SqlServerDevOpsAuditingSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isAzureMonitorTargetEnabled = default(bool?), bool? isManagedIdentityInUse = default(bool?), Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState? state = default(Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState?), string storageEndpoint = null, string storageAccountAccessKey = null, System.Guid? storageAccountSubscriptionId = default(System.Guid?)) { throw null; } @@ -6015,7 +6055,7 @@ public DatabaseImportDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType public string DatabaseName { get { throw null; } set { } } public string Edition { get { throw null; } set { } } public string MaxSizeBytes { get { throw null; } set { } } - public Azure.ResourceManager.Sql.Models.NetworkIsolationSettings NetworkIsolation { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.NetworkIsolationSettingsAutoGenerated NetworkIsolation { get { throw null; } set { } } public string ServiceObjectiveName { get { throw null; } set { } } public string StorageKey { get { throw null; } } public Azure.ResourceManager.Sql.Models.StorageKeyType StorageKeyType { get { throw null; } } @@ -6432,20 +6472,12 @@ public FailoverGroupPatch() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This property is obsolete and will be removed in a future release, please use FailoverDatabases instead.", false)] public System.Collections.Generic.IList Databases { get { throw null; } } - public System.Collections.Generic.IList FailoverDatabases { get { throw null; } } - public System.Collections.Generic.IList PartnerServers { get { throw null; } } - public Azure.ResourceManager.Sql.Models.FailoverGroupReadOnlyEndpoint ReadOnlyEndpoint { get { throw null; } set { } } + public System.Collections.Generic.IList FailoverDatabases { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Sql.Models.ReadOnlyEndpointFailoverPolicy? ReadOnlyEndpointFailoverPolicy { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.FailoverGroupReadWriteEndpoint ReadWriteEndpoint { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } } - public partial class FailoverGroupReadOnlyEndpoint - { - public FailoverGroupReadOnlyEndpoint() { } - public Azure.ResourceManager.Sql.Models.ReadOnlyEndpointFailoverPolicy? FailoverPolicy { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier TargetServer { get { throw null; } set { } } - } public partial class FailoverGroupReadWriteEndpoint { public FailoverGroupReadWriteEndpoint(Azure.ResourceManager.Sql.Models.ReadWriteEndpointFailoverPolicy failoverPolicy) { } @@ -7548,6 +7580,12 @@ public NetworkIsolationSettings() { } public Azure.Core.ResourceIdentifier SqlServerResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier StorageAccountResourceId { get { throw null; } set { } } } + public partial class NetworkIsolationSettingsAutoGenerated + { + public NetworkIsolationSettingsAutoGenerated() { } + public Azure.Core.ResourceIdentifier SqlServerResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier StorageAccountResourceId { get { throw null; } set { } } + } public partial class PartnerRegionInfo { public PartnerRegionInfo() { } @@ -8968,7 +9006,6 @@ public SqlServerPatch() { } public System.Guid? FederatedClientId { get { throw null; } set { } } public string FullyQualifiedDomainName { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? IsIPv6Enabled { get { throw null; } set { } } public System.Uri KeyId { get { throw null; } set { } } public string MinimalTlsVersion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrimaryUserAssignedIdentityId { get { throw null; } set { } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs index c4e33795e350..4a994791d4c3 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 @@ -23,7 +23,7 @@ public partial class Sample_FailoverGroupCollection [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/2023-02-01-preview/examples/FailoverGroupList.json + // 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 @@ -60,7 +60,7 @@ public async Task GetAll_ListFailoverGroup() [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/2023-02-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 @@ -72,7 +72,7 @@ public async Task Get_GetFailoverGroup() // 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 = "failovergroupprimaryserver"; + string serverName = "failover-group-primary-server"; ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); @@ -80,7 +80,7 @@ public async Task Get_GetFailoverGroup() FailoverGroupCollection collection = sqlServer.GetFailoverGroups(); // invoke the operation - string failoverGroupName = "failovergrouptest3"; + string failoverGroupName = "failover-group-test"; FailoverGroupResource result = await collection.GetAsync(failoverGroupName); // the variable result is a resource, you could call other operations on this instance as well @@ -95,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/2023-02-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 @@ -107,7 +107,7 @@ public async Task Exists_GetFailoverGroup() // 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 = "failovergroupprimaryserver"; + string serverName = "failover-group-primary-server"; ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); @@ -115,7 +115,7 @@ public async Task Exists_GetFailoverGroup() FailoverGroupCollection collection = sqlServer.GetFailoverGroups(); // invoke the operation - string failoverGroupName = "failovergrouptest3"; + string failoverGroupName = "failover-group-test"; bool result = await collection.ExistsAsync(failoverGroupName); Console.WriteLine($"Succeeded: {result}"); @@ -126,7 +126,7 @@ public async Task Exists_GetFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-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 @@ -138,7 +138,7 @@ public async Task GetIfExists_GetFailoverGroup() // 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 = "failovergroupprimaryserver"; + string serverName = "failover-group-primary-server"; ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); @@ -146,7 +146,7 @@ public async Task GetIfExists_GetFailoverGroup() FailoverGroupCollection collection = sqlServer.GetFailoverGroups(); // invoke the operation - string failoverGroupName = "failovergrouptest3"; + string failoverGroupName = "failover-group-test"; NullableResponse response = await collection.GetIfExistsAsync(failoverGroupName); FailoverGroupResource result = response.HasValue ? response.Value : null; @@ -169,7 +169,7 @@ public async Task GetIfExists_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/2023-02-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 @@ -196,10 +196,7 @@ public async Task CreateOrUpdate_CreateFailoverGroup() { FailoverWithDataLossGracePeriodMinutes = 480, }, - ReadOnlyEndpoint = new FailoverGroupReadOnlyEndpoint() - { - FailoverPolicy = ReadOnlyEndpointFailoverPolicy.Disabled, - }, + ReadOnlyEndpointFailoverPolicy = ReadOnlyEndpointFailoverPolicy.Disabled, PartnerServers = { new PartnerServerInfo(new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server")) 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 6046e47ea11a..58355ffadddd 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/2023-02-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 @@ -35,8 +35,8 @@ public async Task Get_GetFailoverGroup() // 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 = "failovergroupprimaryserver"; - string failoverGroupName = "failovergrouptest3"; + string serverName = "failover-group-primary-server"; + string failoverGroupName = "failover-group-test"; ResourceIdentifier failoverGroupResourceId = FailoverGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, failoverGroupName); FailoverGroupResource failoverGroup = client.GetFailoverGroupResource(failoverGroupResourceId); @@ -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/2023-02-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/2023-02-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 @@ -109,7 +109,7 @@ public async Task Update_UpdateFailoverGroup() }, FailoverDatabases = { -new ResourceIdentifier("/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-1" }, }; ArmOperation lro = await failoverGroup.UpdateAsync(WaitUntil.Completed, patch); @@ -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/2023-02-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/2023-02-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 @@ -193,7 +193,7 @@ public async Task ForceFailoverAllowDataLoss_ForcedFailoverOfAFailoverGroupAllow [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/2023-02-01-preview/examples/FailoverGroupTryPlannedBeforeForcedFailover.json + // 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 diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_JobPrivateEndpointCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_JobPrivateEndpointCollection.cs new file mode 100644 index 000000000000..c79ee0038e8c --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_JobPrivateEndpointCollection.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Sql; + +namespace Azure.ResourceManager.Sql.Samples +{ + public partial class Sample_JobPrivateEndpointCollection + { + // List private endpoints in a job agent + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListPrivateEndpointsInAJobAgent() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobPrivateEndpointsByAgent.json + // this example is just showing the usage of "JobPrivateEndpoints_ListByAgent" 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 SqlServerJobAgentResource created on azure + // for more information of creating SqlServerJobAgentResource, please refer to the document of SqlServerJobAgentResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "group1"; + string serverName = "server1"; + string jobAgentName = "agent1"; + ResourceIdentifier sqlServerJobAgentResourceId = SqlServerJobAgentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, jobAgentName); + SqlServerJobAgentResource sqlServerJobAgent = client.GetSqlServerJobAgentResource(sqlServerJobAgentResourceId); + + // get the collection of this JobPrivateEndpointResource + JobPrivateEndpointCollection collection = sqlServerJobAgent.GetJobPrivateEndpoints(); + + // invoke the operation and iterate over the result + await foreach (JobPrivateEndpointResource 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 + JobPrivateEndpointData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a private endpoint. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAPrivateEndpoint() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobPrivateEndpoint.json + // this example is just showing the usage of "JobPrivateEndpoints_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 SqlServerJobAgentResource created on azure + // for more information of creating SqlServerJobAgentResource, please refer to the document of SqlServerJobAgentResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "group1"; + string serverName = "server1"; + string jobAgentName = "agent1"; + ResourceIdentifier sqlServerJobAgentResourceId = SqlServerJobAgentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, jobAgentName); + SqlServerJobAgentResource sqlServerJobAgent = client.GetSqlServerJobAgentResource(sqlServerJobAgentResourceId); + + // get the collection of this JobPrivateEndpointResource + JobPrivateEndpointCollection collection = sqlServerJobAgent.GetJobPrivateEndpoints(); + + // invoke the operation + string privateEndpointName = "endpoint1"; + JobPrivateEndpointResource result = await collection.GetAsync(privateEndpointName); + + // 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 + JobPrivateEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a private endpoint. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAPrivateEndpoint() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobPrivateEndpoint.json + // this example is just showing the usage of "JobPrivateEndpoints_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 SqlServerJobAgentResource created on azure + // for more information of creating SqlServerJobAgentResource, please refer to the document of SqlServerJobAgentResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "group1"; + string serverName = "server1"; + string jobAgentName = "agent1"; + ResourceIdentifier sqlServerJobAgentResourceId = SqlServerJobAgentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, jobAgentName); + SqlServerJobAgentResource sqlServerJobAgent = client.GetSqlServerJobAgentResource(sqlServerJobAgentResourceId); + + // get the collection of this JobPrivateEndpointResource + JobPrivateEndpointCollection collection = sqlServerJobAgent.GetJobPrivateEndpoints(); + + // invoke the operation + string privateEndpointName = "endpoint1"; + bool result = await collection.ExistsAsync(privateEndpointName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a private endpoint. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAPrivateEndpoint() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobPrivateEndpoint.json + // this example is just showing the usage of "JobPrivateEndpoints_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 SqlServerJobAgentResource created on azure + // for more information of creating SqlServerJobAgentResource, please refer to the document of SqlServerJobAgentResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "group1"; + string serverName = "server1"; + string jobAgentName = "agent1"; + ResourceIdentifier sqlServerJobAgentResourceId = SqlServerJobAgentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, jobAgentName); + SqlServerJobAgentResource sqlServerJobAgent = client.GetSqlServerJobAgentResource(sqlServerJobAgentResourceId); + + // get the collection of this JobPrivateEndpointResource + JobPrivateEndpointCollection collection = sqlServerJobAgent.GetJobPrivateEndpoints(); + + // invoke the operation + string privateEndpointName = "endpoint1"; + NullableResponse response = await collection.GetIfExistsAsync(privateEndpointName); + JobPrivateEndpointResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // 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 + JobPrivateEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create a private endpoint. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateAPrivateEndpoint() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobPrivateEndpoint.json + // this example is just showing the usage of "JobPrivateEndpoints_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 SqlServerJobAgentResource created on azure + // for more information of creating SqlServerJobAgentResource, please refer to the document of SqlServerJobAgentResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "group1"; + string serverName = "server1"; + string jobAgentName = "agent1"; + ResourceIdentifier sqlServerJobAgentResourceId = SqlServerJobAgentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, jobAgentName); + SqlServerJobAgentResource sqlServerJobAgent = client.GetSqlServerJobAgentResource(sqlServerJobAgentResourceId); + + // get the collection of this JobPrivateEndpointResource + JobPrivateEndpointCollection collection = sqlServerJobAgent.GetJobPrivateEndpoints(); + + // invoke the operation + string privateEndpointName = "endpoint1"; + JobPrivateEndpointData data = new JobPrivateEndpointData() + { + TargetServerAzureResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointName, data); + JobPrivateEndpointResource 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 + JobPrivateEndpointData 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_JobPrivateEndpointResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_JobPrivateEndpointResource.cs new file mode 100644 index 000000000000..1fa1cc1e642b --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_JobPrivateEndpointResource.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Sql; + +namespace Azure.ResourceManager.Sql.Samples +{ + public partial class Sample_JobPrivateEndpointResource + { + // Get a private endpoint. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAPrivateEndpoint() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobPrivateEndpoint.json + // this example is just showing the usage of "JobPrivateEndpoints_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 JobPrivateEndpointResource created on azure + // for more information of creating JobPrivateEndpointResource, please refer to the document of JobPrivateEndpointResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "group1"; + string serverName = "server1"; + string jobAgentName = "agent1"; + string privateEndpointName = "endpoint1"; + ResourceIdentifier jobPrivateEndpointResourceId = JobPrivateEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, jobAgentName, privateEndpointName); + JobPrivateEndpointResource jobPrivateEndpoint = client.GetJobPrivateEndpointResource(jobPrivateEndpointResourceId); + + // invoke the operation + JobPrivateEndpointResource result = await jobPrivateEndpoint.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 + JobPrivateEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create a private endpoint. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateAPrivateEndpoint() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobPrivateEndpoint.json + // this example is just showing the usage of "JobPrivateEndpoints_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 JobPrivateEndpointResource created on azure + // for more information of creating JobPrivateEndpointResource, please refer to the document of JobPrivateEndpointResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "group1"; + string serverName = "server1"; + string jobAgentName = "agent1"; + string privateEndpointName = "endpoint1"; + ResourceIdentifier jobPrivateEndpointResourceId = JobPrivateEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, jobAgentName, privateEndpointName); + JobPrivateEndpointResource jobPrivateEndpoint = client.GetJobPrivateEndpointResource(jobPrivateEndpointResourceId); + + // invoke the operation + JobPrivateEndpointData data = new JobPrivateEndpointData() + { + TargetServerAzureResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1"), + }; + ArmOperation lro = await jobPrivateEndpoint.UpdateAsync(WaitUntil.Completed, data); + JobPrivateEndpointResource 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 + JobPrivateEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete a private endpoint + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAPrivateEndpoint() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobPrivateEndpoint.json + // this example is just showing the usage of "JobPrivateEndpoints_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this JobPrivateEndpointResource created on azure + // for more information of creating JobPrivateEndpointResource, please refer to the document of JobPrivateEndpointResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "group1"; + string serverName = "server1"; + string jobAgentName = "agent1"; + string privateEndpointName = "endpoint1"; + ResourceIdentifier jobPrivateEndpointResourceId = JobPrivateEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, jobAgentName, privateEndpointName); + JobPrivateEndpointResource jobPrivateEndpoint = client.GetJobPrivateEndpointResource(jobPrivateEndpointResourceId); + + // invoke the operation + await jobPrivateEndpoint.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerCollection.cs index 7aaf02c5f688..c3126fc21fdd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_SqlServerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListServersByResourceGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerListByResourceGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerListByResourceGroup.json // this example is just showing the usage of "Servers_ListByResourceGroup" 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_ListServersByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListServersByResourceGroupWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_ListByResourceGroup" 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 GetAll_ListServersByResourceGroupWithExpandAdministratorsActiv [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_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 Get_GetServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_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 @@ -160,7 +160,7 @@ public async Task Exists_GetServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_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 @@ -202,7 +202,7 @@ public async Task GetIfExists_GetServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetServerWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_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 @@ -236,7 +236,7 @@ public async Task Get_GetServerWithExpandAdministratorsActivedirectory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetServerWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_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 @@ -266,7 +266,7 @@ public async Task Exists_GetServerWithExpandAdministratorsActivedirectory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetServerWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_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 @@ -308,7 +308,7 @@ public async Task GetIfExists_GetServerWithExpandAdministratorsActivedirectory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerCreate.json // this example is just showing the usage of "Servers_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 @@ -342,7 +342,6 @@ public async Task CreateOrUpdate_CreateServer() IsAzureADOnlyAuthenticationEnabled = true, }, RestrictOutboundNetworkAccess = ServerNetworkAccessFlag.Enabled, - IsIPv6Enabled = ServerNetworkAccessFlag.Enabled, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serverName, data); SqlServerResource result = lro.Value; diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs index 0c88d473e028..d6a03cf8ce04 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs @@ -183,7 +183,7 @@ public async Task GetInaccessibleDatabases_GetsAListOfInaccessibleDatabasesInALo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatAlreadyExists() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json // this example is just showing the usage of "Servers_CheckNameAvailability" 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 @@ -209,7 +209,7 @@ public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatAlreadyE [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatIsAvailable() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CheckNameAvailabilityServerAvailable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/CheckNameAvailabilityServerAvailable.json // this example is just showing the usage of "Servers_CheckNameAvailability" 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 @@ -235,7 +235,7 @@ public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatIsAvaila [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatIsInvalid() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CheckNameAvailabilityServerInvalid.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/CheckNameAvailabilityServerInvalid.json // this example is just showing the usage of "Servers_CheckNameAvailability" 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 @@ -261,7 +261,7 @@ public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatIsInvali [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSqlServers_ListServers() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerList.json // this example is just showing the usage of "Servers_List" 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 @@ -293,7 +293,7 @@ public async Task GetSqlServers_ListServers() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSqlServers_ListServersWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerListWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerListWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_List" 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 GetSqlServers_ListServersWithExpandAdministratorsActivedirecto [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_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 @@ -356,7 +356,7 @@ public async Task Get_GetServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetServerWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_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 @@ -387,7 +387,7 @@ public async Task Get_GetServerWithExpandAdministratorsActivedirectory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerDelete.json // this example is just showing the usage of "Servers_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 @@ -414,7 +414,7 @@ public async Task Delete_DeleteServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ServerUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerUpdate.json // this example is just showing the usage of "Servers_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 @@ -437,7 +437,6 @@ public async Task Update_UpdateAServer() AdministratorLoginPassword = "placeholder", PublicNetworkAccess = ServerNetworkAccessFlag.Disabled, RestrictOutboundNetworkAccess = ServerNetworkAccessFlag.Enabled, - IsIPv6Enabled = ServerNetworkAccessFlag.Enabled, }; ArmOperation lro = await sqlServer.UpdateAsync(WaitUntil.Completed, patch); SqlServerResource result = lro.Value; @@ -454,7 +453,7 @@ public async Task Update_UpdateAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ImportDatabase_ImportsToANewDatabaseUsingPrivateLinkForTheSQLServerAndStorageAccount() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json // this example is just showing the usage of "Servers_ImportDatabase" 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 @@ -475,7 +474,7 @@ public async Task ImportDatabase_ImportsToANewDatabaseUsingPrivateLinkForTheSQLS { DatabaseName = "testdb", AuthenticationType = "Sql", - NetworkIsolation = new NetworkIsolationSettings() + NetworkIsolation = new NetworkIsolationSettingsAutoGenerated() { StorageAccountResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink"), SqlServerResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr"), @@ -492,7 +491,7 @@ public async Task ImportDatabase_ImportsToANewDatabaseUsingPrivateLinkForTheSQLS [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ImportDatabase_ImportsToANewDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ImportNewDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ImportNewDatabase.json // this example is just showing the usage of "Servers_ImportDatabase" 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 @@ -525,7 +524,7 @@ public async Task ImportDatabase_ImportsToANewDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RefreshStatus_RefreshExternalGovernanceEnablementStatus() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/RefreshExternalGovernanceStatus.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/RefreshExternalGovernanceStatus.json // this example is just showing the usage of "Servers_RefreshStatus" 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/Generated/ArmSqlModelFactory.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs index db2c5a2b1bf2..9cd5e285b525 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs @@ -699,6 +699,19 @@ public static JobExecutionTarget JobExecutionTarget(JobTargetType? targetType = return new JobExecutionTarget(targetType, serverName, databaseName); } + /// Initializes a new instance of JobPrivateEndpointData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// ARM resource id of the server the private endpoint will target. + /// Private endpoint id of the private endpoint. + /// A new instance for mocking. + public static JobPrivateEndpointData JobPrivateEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier targetServerAzureResourceId = null, string privateEndpointId = null) + { + return new JobPrivateEndpointData(id, name, resourceType, systemData, targetServerAzureResourceId, privateEndpointId); + } + /// Initializes a new instance of SqlServerJobData. /// The id. /// The name. @@ -3566,6 +3579,76 @@ public static ManagedInstanceServerConfigurationOptionData ManagedInstanceServer return new ManagedInstanceServerConfigurationOptionData(id, name, resourceType, systemData, serverConfigurationOptionValue, provisioningState); } + /// Initializes a new instance of SqlNameAvailabilityResponse. + /// The name whose availability was checked. + /// True if the name is available, otherwise false. + /// The reason code explaining why the name is unavailable. Will be undefined if the name is available. + /// A message explaining why the name is unavailable. Will be undefined if the name is available. + /// A new instance for mocking. + public static SqlNameAvailabilityResponse SqlNameAvailabilityResponse(string name = null, bool? isAvailable = null, SqlNameUnavailableReason? reason = null, string message = null) + { + return new SqlNameAvailabilityResponse(name, isAvailable, reason, message); + } + + /// Initializes a new instance of SqlServerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The Azure Active Directory identity of the server. + /// Kind of sql server. This is metadata used for the Azure portal experience. + /// Administrator username for the server. Once created it cannot be changed. + /// The administrator login password (required for server creation). + /// The version of the server. + /// The state of the server. + /// The fully qualified domain name of the server. + /// List of private endpoint connections on a server. + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. + /// Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. + /// Whether or not existing server has a workspace created and if it allows connection from workspace. + /// The resource id of a user assigned identity to be used by default. + /// The Client id used for cross tenant CMK scenario. + /// A CMK URI of the key to use for encryption. + /// The Azure Active Directory administrator of the server. This can only be used at server create time. If used for server update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. + /// Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Status of external governance. + /// A new instance for mocking. + public static SqlServerData SqlServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, string administratorLogin = null, string administratorLoginPassword = null, string version = null, string state = null, string fullyQualifiedDomainName = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, ServerNetworkAccessFlag? publicNetworkAccess = null, ServerWorkspaceFeature? workspaceFeature = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Guid? federatedClientId = null, Uri keyId = null, ServerExternalAdministrator administrators = null, ServerNetworkAccessFlag? restrictOutboundNetworkAccess = null, ExternalGovernanceStatus? externalGovernanceStatus = null) + { + tags ??= new Dictionary(); + privateEndpointConnections ??= new List(); + + return new SqlServerData(id, name, resourceType, systemData, tags, location, identity, kind, administratorLogin, administratorLoginPassword, version, state, fullyQualifiedDomainName, privateEndpointConnections?.ToList(), minimalTlsVersion, publicNetworkAccess, workspaceFeature, primaryUserAssignedIdentityId, federatedClientId, keyId, administrators, restrictOutboundNetworkAccess, externalGovernanceStatus); + } + + /// Initializes a new instance of SqlServerPrivateEndpointConnection. + /// Resource ID. + /// Private endpoint connection properties. + /// A new instance for mocking. + public static SqlServerPrivateEndpointConnection SqlServerPrivateEndpointConnection(ResourceIdentifier id = null, ServerPrivateEndpointConnectionProperties properties = null) + { + return new SqlServerPrivateEndpointConnection(id, properties); + } + + /// Initializes a new instance of RefreshExternalGovernanceStatusOperationResult. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Request Id. + /// Request type. + /// Queued time. + /// Server name. + /// Operation status. + /// Error message. + /// A new instance for mocking. + public static RefreshExternalGovernanceStatusOperationResult RefreshExternalGovernanceStatusOperationResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? requestId = null, string requestType = null, string queuedTime = null, string serverName = null, string status = null, string errorMessage = null) + { + return new RefreshExternalGovernanceStatusOperationResult(id, name, resourceType, systemData, requestId, requestType, queuedTime, serverName, status, errorMessage); + } + /// Initializes a new instance of ManagedInstanceStartStopScheduleData. /// The id. /// The name. @@ -3596,6 +3679,39 @@ public static LogicalDatabaseTransparentDataEncryptionData LogicalDatabaseTransp return new LogicalDatabaseTransparentDataEncryptionData(id, name, resourceType, systemData, state); } + /// Initializes a new instance of FailoverGroupData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resource location. + /// Resource tags. + /// Read-write endpoint of the failover group instance. + /// Read-only endpoint of the failover group instance. + /// Local replication role of the failover group instance. + /// Replication state of the failover group instance. + /// List of partner server information for the failover group. + /// List of databases in the failover group. + /// A new instance for mocking. + public static FailoverGroupData FailoverGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, IDictionary tags = null, FailoverGroupReadWriteEndpoint readWriteEndpoint = null, ReadOnlyEndpointFailoverPolicy? readOnlyEndpointFailoverPolicy = null, FailoverGroupReplicationRole? replicationRole = null, string replicationState = null, IEnumerable partnerServers = null, IEnumerable failoverDatabases = null) + { + tags ??= new Dictionary(); + partnerServers ??= new List(); + failoverDatabases ??= new List(); + + return new FailoverGroupData(id, name, resourceType, systemData, location, tags, readWriteEndpoint, readOnlyEndpointFailoverPolicy != null ? new FailoverGroupReadOnlyEndpoint(readOnlyEndpointFailoverPolicy) : null, replicationRole, replicationState, partnerServers?.ToList(), failoverDatabases?.ToList()); + } + + /// Initializes a new instance of PartnerServerInfo. + /// Resource identifier of the partner server. + /// Geo location of the partner server. + /// Replication role of the partner server. + /// A new instance for mocking. + public static PartnerServerInfo PartnerServerInfo(ResourceIdentifier id = null, AzureLocation? location = null, FailoverGroupReplicationRole? replicationRole = null) + { + return new PartnerServerInfo(id, location, replicationRole); + } + /// Initializes a new instance of IPv6FirewallRuleData. /// Resource ID. /// Resource name. @@ -3815,109 +3931,5 @@ public static SqlVulnerabilityAssessmentData SqlVulnerabilityAssessmentData(Reso { return new SqlVulnerabilityAssessmentData(id, name, resourceType, systemData, state); } - - /// Initializes a new instance of SqlNameAvailabilityResponse. - /// The name whose availability was checked. - /// True if the name is available, otherwise false. - /// The reason code explaining why the name is unavailable. Will be undefined if the name is available. - /// A message explaining why the name is unavailable. Will be undefined if the name is available. - /// A new instance for mocking. - public static SqlNameAvailabilityResponse SqlNameAvailabilityResponse(string name = null, bool? isAvailable = null, SqlNameUnavailableReason? reason = null, string message = null) - { - return new SqlNameAvailabilityResponse(name, isAvailable, reason, message); - } - - /// Initializes a new instance of SqlServerData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The Azure Active Directory identity of the server. - /// Kind of sql server. This is metadata used for the Azure portal experience. - /// Administrator username for the server. Once created it cannot be changed. - /// The administrator login password (required for server creation). - /// The version of the server. - /// The state of the server. - /// The fully qualified domain name of the server. - /// List of private endpoint connections on a server. - /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. - /// Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. - /// Whether or not existing server has a workspace created and if it allows connection from workspace. - /// The resource id of a user assigned identity to be used by default. - /// The Client id used for cross tenant CMK scenario. - /// A CMK URI of the key to use for encryption. - /// The Azure Active Directory administrator of the server. This can only be used at server create time. If used for server update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. - /// Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - /// Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - /// Status of external governance. - /// A new instance for mocking. - public static SqlServerData SqlServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, string administratorLogin = null, string administratorLoginPassword = null, string version = null, string state = null, string fullyQualifiedDomainName = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, ServerNetworkAccessFlag? publicNetworkAccess = null, ServerWorkspaceFeature? workspaceFeature = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Guid? federatedClientId = null, Uri keyId = null, ServerExternalAdministrator administrators = null, ServerNetworkAccessFlag? restrictOutboundNetworkAccess = null, ServerNetworkAccessFlag? isIPv6Enabled = null, ExternalGovernanceStatus? externalGovernanceStatus = null) - { - tags ??= new Dictionary(); - privateEndpointConnections ??= new List(); - - return new SqlServerData(id, name, resourceType, systemData, tags, location, identity, kind, administratorLogin, administratorLoginPassword, version, state, fullyQualifiedDomainName, privateEndpointConnections?.ToList(), minimalTlsVersion, publicNetworkAccess, workspaceFeature, primaryUserAssignedIdentityId, federatedClientId, keyId, administrators, restrictOutboundNetworkAccess, isIPv6Enabled, externalGovernanceStatus); - } - - /// Initializes a new instance of SqlServerPrivateEndpointConnection. - /// Resource ID. - /// Private endpoint connection properties. - /// A new instance for mocking. - public static SqlServerPrivateEndpointConnection SqlServerPrivateEndpointConnection(ResourceIdentifier id = null, ServerPrivateEndpointConnectionProperties properties = null) - { - return new SqlServerPrivateEndpointConnection(id, properties); - } - - /// Initializes a new instance of RefreshExternalGovernanceStatusOperationResult. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Request Id. - /// Request type. - /// Queued time. - /// Server name. - /// Operation status. - /// Error message. - /// A new instance for mocking. - public static RefreshExternalGovernanceStatusOperationResult RefreshExternalGovernanceStatusOperationResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? requestId = null, string requestType = null, string queuedTime = null, string serverName = null, string status = null, string errorMessage = null) - { - return new RefreshExternalGovernanceStatusOperationResult(id, name, resourceType, systemData, requestId, requestType, queuedTime, serverName, status, errorMessage); - } - - /// Initializes a new instance of FailoverGroupData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Resource location. - /// Resource tags. - /// Read-write endpoint of the failover group instance. - /// Read-only endpoint of the failover group instance. - /// Local replication role of the failover group instance. - /// Replication state of the failover group instance. - /// List of partner server information for the failover group. - /// List of databases in the failover group. - /// A new instance for mocking. - public static FailoverGroupData FailoverGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, IDictionary tags = null, FailoverGroupReadWriteEndpoint readWriteEndpoint = null, FailoverGroupReadOnlyEndpoint readOnlyEndpoint = null, FailoverGroupReplicationRole? replicationRole = null, string replicationState = null, IEnumerable partnerServers = null, IEnumerable failoverDatabases = null) - { - tags ??= new Dictionary(); - partnerServers ??= new List(); - failoverDatabases ??= new List(); - - return new FailoverGroupData(id, name, resourceType, systemData, location, tags, readWriteEndpoint, readOnlyEndpoint, replicationRole, replicationState, partnerServers?.ToList(), failoverDatabases?.ToList()); - } - - /// Initializes a new instance of PartnerServerInfo. - /// Resource identifier of the partner server. - /// Geo location of the partner server. - /// Replication role of the partner server. - /// A new instance for mocking. - public static PartnerServerInfo PartnerServerInfo(ResourceIdentifier id = null, AzureLocation? location = null, FailoverGroupReplicationRole? replicationRole = null) - { - return new PartnerServerInfo(id, location, replicationRole); - } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs index fd3093d6ab12..8102de2884df 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs @@ -640,6 +640,25 @@ public static SqlServerJobExecutionStepTargetResource GetSqlServerJobExecutionSt } #endregion + #region JobPrivateEndpointResource + /// + /// 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 JobPrivateEndpointResource GetJobPrivateEndpointResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + JobPrivateEndpointResource.ValidateResourceId(id); + return new JobPrivateEndpointResource(client, id); + } + ); + } + #endregion + #region SqlServerJobResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -2160,6 +2179,25 @@ public static ManagedInstanceServerConfigurationOptionResource GetManagedInstanc } #endregion + #region SqlServerResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static SqlServerResource GetSqlServerResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + SqlServerResource.ValidateResourceId(id); + return new SqlServerResource(client, id); + } + ); + } + #endregion + #region ManagedInstanceStartStopScheduleResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -2198,6 +2236,25 @@ public static LogicalDatabaseTransparentDataEncryptionResource GetLogicalDatabas } #endregion + #region FailoverGroupResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static FailoverGroupResource GetFailoverGroupResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + FailoverGroupResource.ValidateResourceId(id); + return new FailoverGroupResource(client, id); + } + ); + } + #endregion + #region IPv6FirewallRuleResource /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. @@ -2407,44 +2464,6 @@ public static SqlDatabaseSqlVulnerabilityAssessmentResource GetSqlDatabaseSqlVul } #endregion - #region SqlServerResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static SqlServerResource GetSqlServerResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - SqlServerResource.ValidateResourceId(id); - return new SqlServerResource(client, id); - } - ); - } - #endregion - - #region FailoverGroupResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static FailoverGroupResource GetFailoverGroupResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - FailoverGroupResource.ValidateResourceId(id); - return new FailoverGroupResource(client, id); - } - ); - } - #endregion - /// Gets a collection of InstancePoolResources in the ResourceGroupResource. /// The instance the method will execute against. /// An object representing collection of InstancePoolResources and their operations over a InstancePoolResource. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs index efa2b655dbe3..75ae758491b1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs @@ -58,7 +58,8 @@ internal FailoverGroupData(ResourceIdentifier id, string name, ResourceType reso /// Read-write endpoint of the failover group instance. public FailoverGroupReadWriteEndpoint ReadWriteEndpoint { get; set; } /// Read-only endpoint of the failover group instance. - public FailoverGroupReadOnlyEndpoint ReadOnlyEndpoint { get; set; } + internal FailoverGroupReadOnlyEndpoint ReadOnlyEndpoint { get; set; } + /// Local replication role of the failover group instance. public FailoverGroupReplicationRole? ReplicationRole { get; } /// Replication state of the failover group instance. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/JobPrivateEndpointCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/JobPrivateEndpointCollection.cs new file mode 100644 index 000000000000..556049af0d31 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/JobPrivateEndpointCollection.cs @@ -0,0 +1,415 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Sql +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetJobPrivateEndpoints method from an instance of . + /// + public partial class JobPrivateEndpointCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _jobPrivateEndpointClientDiagnostics; + private readonly JobPrivateEndpointsRestOperations _jobPrivateEndpointRestClient; + + /// Initializes a new instance of the class for mocking. + protected JobPrivateEndpointCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal JobPrivateEndpointCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _jobPrivateEndpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", JobPrivateEndpointResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(JobPrivateEndpointResource.ResourceType, out string jobPrivateEndpointApiVersion); + _jobPrivateEndpointRestClient = new JobPrivateEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, jobPrivateEndpointApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SqlServerJobAgentResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SqlServerJobAgentResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a private endpoint. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_CreateOrUpdate + /// + /// + /// + /// 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 name of the private endpoint. + /// The requested private endpoint state. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointName, JobPrivateEndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _jobPrivateEndpointRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointName, data, cancellationToken).ConfigureAwait(false); + var operation = new SqlArmOperation(new JobPrivateEndpointOperationSource(Client), _jobPrivateEndpointClientDiagnostics, Pipeline, _jobPrivateEndpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a private endpoint. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_CreateOrUpdate + /// + /// + /// + /// 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 name of the private endpoint. + /// The requested private endpoint state. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointName, JobPrivateEndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _jobPrivateEndpointRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointName, data, cancellationToken); + var operation = new SqlArmOperation(new JobPrivateEndpointOperationSource(Client), _jobPrivateEndpointClientDiagnostics, Pipeline, _jobPrivateEndpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a private endpoint. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_Get + /// + /// + /// + /// The name of the private endpoint to get. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string privateEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointCollection.Get"); + scope.Start(); + try + { + var response = await _jobPrivateEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new JobPrivateEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a private endpoint. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_Get + /// + /// + /// + /// The name of the private endpoint to get. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string privateEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointCollection.Get"); + scope.Start(); + try + { + var response = _jobPrivateEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new JobPrivateEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a list of job agent private endpoints. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints + /// + /// + /// Operation Id + /// JobPrivateEndpoints_ListByAgent + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _jobPrivateEndpointRestClient.CreateListByAgentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _jobPrivateEndpointRestClient.CreateListByAgentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new JobPrivateEndpointResource(Client, JobPrivateEndpointData.DeserializeJobPrivateEndpointData(e)), _jobPrivateEndpointClientDiagnostics, Pipeline, "JobPrivateEndpointCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of job agent private endpoints. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints + /// + /// + /// Operation Id + /// JobPrivateEndpoints_ListByAgent + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _jobPrivateEndpointRestClient.CreateListByAgentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _jobPrivateEndpointRestClient.CreateListByAgentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new JobPrivateEndpointResource(Client, JobPrivateEndpointData.DeserializeJobPrivateEndpointData(e)), _jobPrivateEndpointClientDiagnostics, Pipeline, "JobPrivateEndpointCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_Get + /// + /// + /// + /// The name of the private endpoint to get. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string privateEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointCollection.Exists"); + scope.Start(); + try + { + var response = await _jobPrivateEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_Get + /// + /// + /// + /// The name of the private endpoint to get. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string privateEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointCollection.Exists"); + scope.Start(); + try + { + var response = _jobPrivateEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_Get + /// + /// + /// + /// The name of the private endpoint to get. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string privateEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _jobPrivateEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new JobPrivateEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_Get + /// + /// + /// + /// The name of the private endpoint to get. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string privateEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointCollection.GetIfExists"); + scope.Start(); + try + { + var response = _jobPrivateEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new JobPrivateEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/JobPrivateEndpointData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/JobPrivateEndpointData.cs new file mode 100644 index 000000000000..b7e1c19ce582 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/JobPrivateEndpointData.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Sql +{ + /// + /// A class representing the JobPrivateEndpoint data model. + /// A job agent private endpoint. + /// + public partial class JobPrivateEndpointData : ResourceData + { + /// Initializes a new instance of JobPrivateEndpointData. + public JobPrivateEndpointData() + { + } + + /// Initializes a new instance of JobPrivateEndpointData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// ARM resource id of the server the private endpoint will target. + /// Private endpoint id of the private endpoint. + internal JobPrivateEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResourceIdentifier targetServerAzureResourceId, string privateEndpointId) : base(id, name, resourceType, systemData) + { + TargetServerAzureResourceId = targetServerAzureResourceId; + PrivateEndpointId = privateEndpointId; + } + + /// ARM resource id of the server the private endpoint will target. + public ResourceIdentifier TargetServerAzureResourceId { get; set; } + /// Private endpoint id of the private endpoint. + public string PrivateEndpointId { get; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/JobPrivateEndpointResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/JobPrivateEndpointResource.cs new file mode 100644 index 000000000000..d42702e46297 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/JobPrivateEndpointResource.cs @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Sql +{ + /// + /// A Class representing a JobPrivateEndpoint along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetJobPrivateEndpointResource method. + /// Otherwise you can get one from its parent resource using the GetJobPrivateEndpoint method. + /// + public partial class JobPrivateEndpointResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serverName, string jobAgentName, string privateEndpointName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _jobPrivateEndpointClientDiagnostics; + private readonly JobPrivateEndpointsRestOperations _jobPrivateEndpointRestClient; + private readonly JobPrivateEndpointData _data; + + /// Initializes a new instance of the class for mocking. + protected JobPrivateEndpointResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal JobPrivateEndpointResource(ArmClient client, JobPrivateEndpointData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal JobPrivateEndpointResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _jobPrivateEndpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string jobPrivateEndpointApiVersion); + _jobPrivateEndpointRestClient = new JobPrivateEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, jobPrivateEndpointApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Sql/servers/jobAgents/privateEndpoints"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual JobPrivateEndpointData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a private endpoint. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointResource.Get"); + scope.Start(); + try + { + var response = await _jobPrivateEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new JobPrivateEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a private endpoint. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointResource.Get"); + scope.Start(); + try + { + var response = _jobPrivateEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new JobPrivateEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a private endpoint. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_Delete + /// + /// + /// + /// 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 DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointResource.Delete"); + scope.Start(); + try + { + var response = await _jobPrivateEndpointRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SqlArmOperation(_jobPrivateEndpointClientDiagnostics, Pipeline, _jobPrivateEndpointRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a private endpoint. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_Delete + /// + /// + /// + /// 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 Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointResource.Delete"); + scope.Start(); + try + { + var response = _jobPrivateEndpointRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new SqlArmOperation(_jobPrivateEndpointClientDiagnostics, Pipeline, _jobPrivateEndpointRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a private endpoint. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_CreateOrUpdate + /// + /// + /// + /// 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 requested private endpoint state. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, JobPrivateEndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointResource.Update"); + scope.Start(); + try + { + var response = await _jobPrivateEndpointRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new SqlArmOperation(new JobPrivateEndpointOperationSource(Client), _jobPrivateEndpointClientDiagnostics, Pipeline, _jobPrivateEndpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a private endpoint. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_CreateOrUpdate + /// + /// + /// + /// 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 requested private endpoint state. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, JobPrivateEndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _jobPrivateEndpointClientDiagnostics.CreateScope("JobPrivateEndpointResource.Update"); + scope.Start(); + try + { + var response = _jobPrivateEndpointRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new SqlArmOperation(new JobPrivateEndpointOperationSource(Client), _jobPrivateEndpointClientDiagnostics, Pipeline, _jobPrivateEndpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongRunningOperation/JobPrivateEndpointOperationSource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongRunningOperation/JobPrivateEndpointOperationSource.cs new file mode 100644 index 000000000000..ee88f6ef2b06 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongRunningOperation/JobPrivateEndpointOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Sql +{ + internal class JobPrivateEndpointOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal JobPrivateEndpointOperationSource(ArmClient client) + { + _client = client; + } + + JobPrivateEndpointResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = JobPrivateEndpointData.DeserializeJobPrivateEndpointData(document.RootElement); + return new JobPrivateEndpointResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = JobPrivateEndpointData.DeserializeJobPrivateEndpointData(document.RootElement); + return new JobPrivateEndpointResource(_client, data); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseImportDefinition.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseImportDefinition.cs index 2918573cbd70..f48775d4dddc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseImportDefinition.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseImportDefinition.cs @@ -55,6 +55,6 @@ public DatabaseImportDefinition(StorageKeyType storageKeyType, string storageKey /// Authentication type. public string AuthenticationType { get; set; } /// Optional resource information to enable network isolation for request. - public NetworkIsolationSettings NetworkIsolation { get; set; } + public NetworkIsolationSettingsAutoGenerated NetworkIsolation { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.Serialization.cs index c4f36dd809de..980ad3c3498f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.Serialization.cs @@ -44,25 +44,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartArray(); foreach (var item in FailoverDatabases) { - if (item == null) - { - writer.WriteNullValue(); - continue; - } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(PartnerServers)) - { - writer.WritePropertyName("partnerServers"u8); - writer.WriteStartArray(); - foreach (var item in PartnerServers) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.cs index af2142d77a1b..9f6ab75367c2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.cs @@ -17,8 +17,7 @@ public partial class FailoverGroupPatch public FailoverGroupPatch() { Tags = new ChangeTrackingDictionary(); - FailoverDatabases = new ChangeTrackingList(); - PartnerServers = new ChangeTrackingList(); + FailoverDatabases = new ChangeTrackingList(); } /// Resource tags. @@ -26,10 +25,9 @@ public FailoverGroupPatch() /// Read-write endpoint of the failover group instance. public FailoverGroupReadWriteEndpoint ReadWriteEndpoint { get; set; } /// Read-only endpoint of the failover group instance. - public FailoverGroupReadOnlyEndpoint ReadOnlyEndpoint { get; set; } + internal FailoverGroupReadOnlyEndpoint ReadOnlyEndpoint { get; set; } + /// List of databases in the failover group. - public IList FailoverDatabases { get; } - /// List of partner server information for the failover group. - public IList PartnerServers { get; } + public IList FailoverDatabases { get; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.Serialization.cs index ce08b61e692c..d1d7d7899a3c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Sql.Models { - public partial class FailoverGroupReadOnlyEndpoint : IUtf8JsonSerializable + internal partial class FailoverGroupReadOnlyEndpoint : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -20,11 +20,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("failoverPolicy"u8); writer.WriteStringValue(FailoverPolicy.Value.ToString()); } - if (Optional.IsDefined(TargetServer)) - { - writer.WritePropertyName("targetServer"u8); - writer.WriteStringValue(TargetServer); - } writer.WriteEndObject(); } @@ -35,7 +30,6 @@ internal static FailoverGroupReadOnlyEndpoint DeserializeFailoverGroupReadOnlyEn return null; } Optional failoverPolicy = default; - Optional targetServer = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("failoverPolicy"u8)) @@ -47,17 +41,8 @@ internal static FailoverGroupReadOnlyEndpoint DeserializeFailoverGroupReadOnlyEn failoverPolicy = new ReadOnlyEndpointFailoverPolicy(property.Value.GetString()); continue; } - if (property.NameEquals("targetServer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - targetServer = new ResourceIdentifier(property.Value.GetString()); - continue; - } } - return new FailoverGroupReadOnlyEndpoint(Optional.ToNullable(failoverPolicy), targetServer.Value); + return new FailoverGroupReadOnlyEndpoint(Optional.ToNullable(failoverPolicy)); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.cs index dda31caa2580..71f21a76ef3b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupReadOnlyEndpoint.cs @@ -5,12 +5,10 @@ #nullable disable -using Azure.Core; - namespace Azure.ResourceManager.Sql.Models { /// Read-only endpoint of the failover group instance. - public partial class FailoverGroupReadOnlyEndpoint + internal partial class FailoverGroupReadOnlyEndpoint { /// Initializes a new instance of FailoverGroupReadOnlyEndpoint. public FailoverGroupReadOnlyEndpoint() @@ -19,16 +17,12 @@ public FailoverGroupReadOnlyEndpoint() /// Initializes a new instance of FailoverGroupReadOnlyEndpoint. /// Failover policy of the read-only endpoint for the failover group. - /// The target partner server where the read-only endpoint points to. - internal FailoverGroupReadOnlyEndpoint(ReadOnlyEndpointFailoverPolicy? failoverPolicy, ResourceIdentifier targetServer) + internal FailoverGroupReadOnlyEndpoint(ReadOnlyEndpointFailoverPolicy? failoverPolicy) { FailoverPolicy = failoverPolicy; - TargetServer = targetServer; } /// Failover policy of the read-only endpoint for the failover group. public ReadOnlyEndpointFailoverPolicy? FailoverPolicy { get; set; } - /// The target partner server where the read-only endpoint points to. - public ResourceIdentifier TargetServer { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/JobPrivateEndpointData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/JobPrivateEndpointData.Serialization.cs new file mode 100644 index 000000000000..853bed6308ff --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/JobPrivateEndpointData.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Sql +{ + public partial class JobPrivateEndpointData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(TargetServerAzureResourceId)) + { + writer.WritePropertyName("targetServerAzureResourceId"u8); + writer.WriteStringValue(TargetServerAzureResourceId); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static JobPrivateEndpointData DeserializeJobPrivateEndpointData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional targetServerAzureResourceId = default; + Optional privateEndpointId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("targetServerAzureResourceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetServerAzureResourceId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("privateEndpointId"u8)) + { + privateEndpointId = property0.Value.GetString(); + continue; + } + } + continue; + } + } + return new JobPrivateEndpointData(id, name, type, systemData.Value, targetServerAzureResourceId.Value, privateEndpointId.Value); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/JobPrivateEndpointListResult.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/JobPrivateEndpointListResult.Serialization.cs new file mode 100644 index 000000000000..48a9218272be --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/JobPrivateEndpointListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Sql; + +namespace Azure.ResourceManager.Sql.Models +{ + internal partial class JobPrivateEndpointListResult + { + internal static JobPrivateEndpointListResult DeserializeJobPrivateEndpointListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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()) + { + array.Add(JobPrivateEndpointData.DeserializeJobPrivateEndpointData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new JobPrivateEndpointListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/JobPrivateEndpointListResult.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/JobPrivateEndpointListResult.cs new file mode 100644 index 000000000000..b098686f4148 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/JobPrivateEndpointListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Sql; + +namespace Azure.ResourceManager.Sql.Models +{ + /// A list of job agent private endpoints. + internal partial class JobPrivateEndpointListResult + { + /// Initializes a new instance of JobPrivateEndpointListResult. + internal JobPrivateEndpointListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of JobPrivateEndpointListResult. + /// Array of results. + /// Link to retrieve next page of results. + internal JobPrivateEndpointListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// 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/NetworkIsolationSettingsAutoGenerated.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/NetworkIsolationSettingsAutoGenerated.Serialization.cs new file mode 100644 index 000000000000..68f2ea8d802c --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/NetworkIsolationSettingsAutoGenerated.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Sql.Models +{ + public partial class NetworkIsolationSettingsAutoGenerated : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(StorageAccountResourceId)) + { + writer.WritePropertyName("storageAccountResourceId"u8); + writer.WriteStringValue(StorageAccountResourceId); + } + if (Optional.IsDefined(SqlServerResourceId)) + { + writer.WritePropertyName("sqlServerResourceId"u8); + writer.WriteStringValue(SqlServerResourceId); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/NetworkIsolationSettingsAutoGenerated.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/NetworkIsolationSettingsAutoGenerated.cs new file mode 100644 index 000000000000..3b14c408a6a0 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/NetworkIsolationSettingsAutoGenerated.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Contains the ARM resources for which to create private endpoint connection. + public partial class NetworkIsolationSettingsAutoGenerated + { + /// Initializes a new instance of NetworkIsolationSettingsAutoGenerated. + public NetworkIsolationSettingsAutoGenerated() + { + } + + /// The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for StorageUri parameter. + public ResourceIdentifier StorageAccountResourceId { get; set; } + /// The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created for the SQL server. Must match server which is target of the operation. + public ResourceIdentifier SqlServerResourceId { get; set; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs index 80d2e29559d7..61b95ef6e807 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerData.Serialization.cs @@ -90,11 +90,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("restrictOutboundNetworkAccess"u8); writer.WriteStringValue(RestrictOutboundNetworkAccess.Value.ToString()); } - if (Optional.IsDefined(IsIPv6Enabled)) - { - writer.WritePropertyName("isIPv6Enabled"u8); - writer.WriteStringValue(IsIPv6Enabled.Value.ToString()); - } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -127,7 +122,6 @@ internal static SqlServerData DeserializeSqlServerData(JsonElement element) Optional keyId = default; Optional administrators = default; Optional restrictOutboundNetworkAccess = default; - Optional isIPv6Enabled = default; Optional externalGovernanceStatus = default; foreach (var property in element.EnumerateObject()) { @@ -305,15 +299,6 @@ internal static SqlServerData DeserializeSqlServerData(JsonElement element) restrictOutboundNetworkAccess = new ServerNetworkAccessFlag(property0.Value.GetString()); continue; } - if (property0.NameEquals("isIPv6Enabled"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isIPv6Enabled = new ServerNetworkAccessFlag(property0.Value.GetString()); - continue; - } if (property0.NameEquals("externalGovernanceStatus"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -327,7 +312,7 @@ internal static SqlServerData DeserializeSqlServerData(JsonElement element) continue; } } - return new SqlServerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, administratorLogin.Value, administratorLoginPassword.Value, version.Value, state.Value, fullyQualifiedDomainName.Value, Optional.ToList(privateEndpointConnections), minimalTlsVersion.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(workspaceFeature), primaryUserAssignedIdentityId.Value, Optional.ToNullable(federatedClientId), keyId.Value, administrators.Value, Optional.ToNullable(restrictOutboundNetworkAccess), Optional.ToNullable(isIPv6Enabled), Optional.ToNullable(externalGovernanceStatus)); + return new SqlServerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, administratorLogin.Value, administratorLoginPassword.Value, version.Value, state.Value, fullyQualifiedDomainName.Value, Optional.ToList(privateEndpointConnections), minimalTlsVersion.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(workspaceFeature), primaryUserAssignedIdentityId.Value, Optional.ToNullable(federatedClientId), keyId.Value, administrators.Value, Optional.ToNullable(restrictOutboundNetworkAccess), Optional.ToNullable(externalGovernanceStatus)); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.Serialization.cs index f7a54ec519da..c4278f9e2b15 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.Serialization.cs @@ -85,11 +85,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("restrictOutboundNetworkAccess"u8); writer.WriteStringValue(RestrictOutboundNetworkAccess.Value.ToString()); } - if (Optional.IsDefined(IsIPv6Enabled)) - { - writer.WritePropertyName("isIPv6Enabled"u8); - writer.WriteStringValue(IsIPv6Enabled.Value.ToString()); - } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs index faac4313df16..85a305f3bda2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerPatch.cs @@ -54,8 +54,6 @@ public SqlServerPatch() public ServerExternalAdministrator Administrators { get; set; } /// Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. public ServerNetworkAccessFlag? RestrictOutboundNetworkAccess { get; set; } - /// Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - public ServerNetworkAccessFlag? IsIPv6Enabled { get; set; } /// Status of external governance. public ExternalGovernanceStatus? ExternalGovernanceStatus { get; } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs index 316fa12bf8bf..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,7 +33,7 @@ public FailoverGroupsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-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/JobPrivateEndpointsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobPrivateEndpointsRestOperations.cs new file mode 100644 index 000000000000..86195928a6f9 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobPrivateEndpointsRestOperations.cs @@ -0,0 +1,474 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Sql.Models; + +namespace Azure.ResourceManager.Sql +{ + internal partial class JobPrivateEndpointsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of JobPrivateEndpointsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public JobPrivateEndpointsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-05-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByAgentRequest(string subscriptionId, string resourceGroupName, string serverName, string jobAgentName) + { + 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("/jobAgents/", false); + uri.AppendPath(jobAgentName, true); + uri.AppendPath("/privateEndpoints", 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 job agent private endpoints. + /// 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 job agent. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAgentAsync(string subscriptionId, string resourceGroupName, string serverName, string jobAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(jobAgentName, nameof(jobAgentName)); + + using var message = CreateListByAgentRequest(subscriptionId, resourceGroupName, serverName, jobAgentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + JobPrivateEndpointListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = JobPrivateEndpointListResult.DeserializeJobPrivateEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of job agent private endpoints. + /// 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 job agent. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByAgent(string subscriptionId, string resourceGroupName, string serverName, string jobAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(jobAgentName, nameof(jobAgentName)); + + using var message = CreateListByAgentRequest(subscriptionId, resourceGroupName, serverName, jobAgentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + JobPrivateEndpointListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = JobPrivateEndpointListResult.DeserializeJobPrivateEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string jobAgentName, string privateEndpointName) + { + 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("/jobAgents/", false); + uri.AppendPath(jobAgentName, true); + uri.AppendPath("/privateEndpoints/", false); + uri.AppendPath(privateEndpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a private endpoint. + /// 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 job agent. + /// The name of the private endpoint to get. + /// 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 jobAgentName, string privateEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(jobAgentName, nameof(jobAgentName)); + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, jobAgentName, privateEndpointName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + JobPrivateEndpointData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = JobPrivateEndpointData.DeserializeJobPrivateEndpointData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((JobPrivateEndpointData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a private endpoint. + /// 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 job agent. + /// The name of the private endpoint to get. + /// 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 jobAgentName, string privateEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(jobAgentName, nameof(jobAgentName)); + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, jobAgentName, privateEndpointName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + JobPrivateEndpointData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = JobPrivateEndpointData.DeserializeJobPrivateEndpointData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((JobPrivateEndpointData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string jobAgentName, string privateEndpointName, JobPrivateEndpointData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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("/jobAgents/", false); + uri.AppendPath(jobAgentName, true); + uri.AppendPath("/privateEndpoints/", false); + uri.AppendPath(privateEndpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a private endpoint. + /// 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 job agent. + /// The name of the private endpoint. + /// The requested private endpoint state. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string jobAgentName, string privateEndpointName, JobPrivateEndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(jobAgentName, nameof(jobAgentName)); + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, jobAgentName, privateEndpointName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a private endpoint. + /// 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 job agent. + /// The name of the private endpoint. + /// The requested private endpoint state. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string jobAgentName, string privateEndpointName, JobPrivateEndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(jobAgentName, nameof(jobAgentName)); + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, jobAgentName, privateEndpointName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, string jobAgentName, string privateEndpointName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + 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("/jobAgents/", false); + uri.AppendPath(jobAgentName, true); + uri.AppendPath("/privateEndpoints/", false); + uri.AppendPath(privateEndpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Deletes a private endpoint. + /// 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 job agent. + /// The name of the private endpoint to delete. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, string jobAgentName, string privateEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(jobAgentName, nameof(jobAgentName)); + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, jobAgentName, privateEndpointName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a private endpoint. + /// 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 job agent. + /// The name of the private endpoint to delete. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serverName, string jobAgentName, string privateEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(jobAgentName, nameof(jobAgentName)); + Argument.AssertNotNullOrEmpty(privateEndpointName, nameof(privateEndpointName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, jobAgentName, privateEndpointName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByAgentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serverName, string jobAgentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of job agent private endpoints. + /// 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 name of the job agent. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAgentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serverName, string jobAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(jobAgentName, nameof(jobAgentName)); + + using var message = CreateListByAgentNextPageRequest(nextLink, subscriptionId, resourceGroupName, serverName, jobAgentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + JobPrivateEndpointListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = JobPrivateEndpointListResult.DeserializeJobPrivateEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of job agent private endpoints. + /// 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 name of the job agent. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByAgentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serverName, string jobAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(jobAgentName, nameof(jobAgentName)); + + using var message = CreateListByAgentNextPageRequest(nextLink, subscriptionId, resourceGroupName, serverName, jobAgentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + JobPrivateEndpointListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = JobPrivateEndpointListResult.DeserializeJobPrivateEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs index d57541dfcf16..b9c2f078a170 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs @@ -33,7 +33,7 @@ public ServersRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2022-08-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs index febef08699f9..3ba0dde5c8b4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerData.cs @@ -49,9 +49,8 @@ public SqlServerData(AzureLocation location) : base(location) /// A CMK URI of the key to use for encryption. /// The Azure Active Directory administrator of the server. This can only be used at server create time. If used for server update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. /// Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - /// Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. /// Status of external governance. - internal SqlServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, string administratorLogin, string administratorLoginPassword, string version, string state, string fullyQualifiedDomainName, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, ServerNetworkAccessFlag? publicNetworkAccess, ServerWorkspaceFeature? workspaceFeature, ResourceIdentifier primaryUserAssignedIdentityId, Guid? federatedClientId, Uri keyId, ServerExternalAdministrator administrators, ServerNetworkAccessFlag? restrictOutboundNetworkAccess, ServerNetworkAccessFlag? isIPv6Enabled, ExternalGovernanceStatus? externalGovernanceStatus) : base(id, name, resourceType, systemData, tags, location) + internal SqlServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, string administratorLogin, string administratorLoginPassword, string version, string state, string fullyQualifiedDomainName, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, ServerNetworkAccessFlag? publicNetworkAccess, ServerWorkspaceFeature? workspaceFeature, ResourceIdentifier primaryUserAssignedIdentityId, Guid? federatedClientId, Uri keyId, ServerExternalAdministrator administrators, ServerNetworkAccessFlag? restrictOutboundNetworkAccess, ExternalGovernanceStatus? externalGovernanceStatus) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Kind = kind; @@ -69,7 +68,6 @@ internal SqlServerData(ResourceIdentifier id, string name, ResourceType resource KeyId = keyId; Administrators = administrators; RestrictOutboundNetworkAccess = restrictOutboundNetworkAccess; - IsIPv6Enabled = isIPv6Enabled; ExternalGovernanceStatus = externalGovernanceStatus; } @@ -105,8 +103,6 @@ internal SqlServerData(ResourceIdentifier id, string name, ResourceType resource public ServerExternalAdministrator Administrators { get; set; } /// Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. public ServerNetworkAccessFlag? RestrictOutboundNetworkAccess { get; set; } - /// Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - public ServerNetworkAccessFlag? IsIPv6Enabled { get; set; } /// Status of external governance. public ExternalGovernanceStatus? ExternalGovernanceStatus { get; } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentResource.cs index 27dd2c6d7d81..7c4a4f64496d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentResource.cs @@ -147,6 +147,59 @@ public virtual Response GetSqlServerJobCredentia return GetSqlServerJobCredentials().Get(credentialName, cancellationToken); } + /// Gets a collection of JobPrivateEndpointResources in the SqlServerJobAgent. + /// An object representing collection of JobPrivateEndpointResources and their operations over a JobPrivateEndpointResource. + public virtual JobPrivateEndpointCollection GetJobPrivateEndpoints() + { + return GetCachedClient(Client => new JobPrivateEndpointCollection(Client, Id)); + } + + /// + /// Gets a private endpoint. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_Get + /// + /// + /// + /// The name of the private endpoint to get. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetJobPrivateEndpointAsync(string privateEndpointName, CancellationToken cancellationToken = default) + { + return await GetJobPrivateEndpoints().GetAsync(privateEndpointName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a private endpoint. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName} + /// + /// + /// Operation Id + /// JobPrivateEndpoints_Get + /// + /// + /// + /// The name of the private endpoint to get. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetJobPrivateEndpoint(string privateEndpointName, CancellationToken cancellationToken = default) + { + return GetJobPrivateEndpoints().Get(privateEndpointName, cancellationToken); + } + /// Gets a collection of SqlServerJobResources in the SqlServerJobAgent. /// An object representing collection of SqlServerJobResources and their operations over a SqlServerJobResource. public virtual SqlServerJobCollection GetSqlServerJobs() diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs index 6cc822786c4a..32be4fa6306d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs @@ -1473,6 +1473,59 @@ public virtual Response GetRestorableDroppedD return GetRestorableDroppedDatabases().Get(restorableDroppedDatabaseId, expand, filter, cancellationToken); } + /// Gets a collection of FailoverGroupResources in the SqlServer. + /// An object representing collection of FailoverGroupResources and their operations over a FailoverGroupResource. + public virtual FailoverGroupCollection GetFailoverGroups() + { + return GetCachedClient(Client => new FailoverGroupCollection(Client, Id)); + } + + /// + /// Gets a failover group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName} + /// + /// + /// Operation Id + /// FailoverGroups_Get + /// + /// + /// + /// The name of the failover group. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetFailoverGroupAsync(string failoverGroupName, CancellationToken cancellationToken = default) + { + return await GetFailoverGroups().GetAsync(failoverGroupName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a failover group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName} + /// + /// + /// Operation Id + /// FailoverGroups_Get + /// + /// + /// + /// The name of the failover group. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetFailoverGroup(string failoverGroupName, CancellationToken cancellationToken = default) + { + return GetFailoverGroups().Get(failoverGroupName, cancellationToken); + } + /// Gets a collection of IPv6FirewallRuleResources in the SqlServer. /// An object representing collection of IPv6FirewallRuleResources and their operations over a IPv6FirewallRuleResource. public virtual IPv6FirewallRuleCollection GetIPv6FirewallRules() @@ -1575,59 +1628,6 @@ public virtual Response GetSqlServe return GetSqlServerSqlVulnerabilityAssessments().Get(vulnerabilityAssessmentName, cancellationToken); } - /// Gets a collection of FailoverGroupResources in the SqlServer. - /// An object representing collection of FailoverGroupResources and their operations over a FailoverGroupResource. - public virtual FailoverGroupCollection GetFailoverGroups() - { - return GetCachedClient(Client => new FailoverGroupCollection(Client, Id)); - } - - /// - /// Gets a failover group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName} - /// - /// - /// Operation Id - /// FailoverGroups_Get - /// - /// - /// - /// The name of the failover group. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetFailoverGroupAsync(string failoverGroupName, CancellationToken cancellationToken = default) - { - return await GetFailoverGroups().GetAsync(failoverGroupName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a failover group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName} - /// - /// - /// Operation Id - /// FailoverGroups_Get - /// - /// - /// - /// The name of the failover group. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetFailoverGroup(string failoverGroupName, CancellationToken cancellationToken = default) - { - return GetFailoverGroups().Get(failoverGroupName, cancellationToken); - } - /// /// Gets a server. /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md index c29f3445593f..006c5b964df6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md @@ -5,7 +5,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true tag: package-composite-v5 -require: https://github.com/Azure/azure-rest-api-specs/blob/fb1e2c65b2dd52ebb18bb835a3d0f0289875858e/specification/sql/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/sql/resource-manager/readme.md namespace: Azure.ResourceManager.Sql output-folder: $(this-folder)/Generated clear-output-folder: true