你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ArmSqlModelFactory.SqlDatabaseData 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 SqlDatabaseData 的新实例。
public static Azure.ResourceManager.Sql.SqlDatabaseData SqlDatabaseData (Azure.Core.ResourceIdentifier id = default, string name = default, Azure.Core.ResourceType resourceType = default, Azure.ResourceManager.Models.SystemData systemData = default, System.Collections.Generic.IDictionary<string,string> tags = default, Azure.Core.AzureLocation location = default, Azure.ResourceManager.Sql.Models.SqlSku sku = default, string kind = default, string managedBy = default, Azure.ResourceManager.Sql.Models.DatabaseIdentity identity = default, Azure.ResourceManager.Sql.Models.SqlDatabaseCreateMode? createMode = default, string collation = default, long? maxSizeBytes = default, Azure.ResourceManager.Sql.Models.SampleSchemaName? sampleName = default, Azure.Core.ResourceIdentifier elasticPoolId = default, Azure.Core.ResourceIdentifier sourceDatabaseId = default, Azure.ResourceManager.Sql.Models.SqlDatabaseStatus? status = default, Guid? databaseId = default, DateTimeOffset? createdOn = default, string currentServiceObjectiveName = default, string requestedServiceObjectiveName = default, Azure.Core.AzureLocation? defaultSecondaryLocation = default, Azure.Core.ResourceIdentifier failoverGroupId = default, DateTimeOffset? restorePointInTime = default, DateTimeOffset? sourceDatabaseDeletedOn = default, Azure.Core.ResourceIdentifier recoveryServicesRecoveryPointId = default, Azure.Core.ResourceIdentifier longTermRetentionBackupResourceId = default, Azure.Core.ResourceIdentifier recoverableDatabaseId = default, Azure.Core.ResourceIdentifier restorableDroppedDatabaseId = default, Azure.ResourceManager.Sql.Models.CatalogCollationType? catalogCollation = default, bool? isZoneRedundant = default, Azure.ResourceManager.Sql.Models.DatabaseLicenseType? licenseType = default, long? maxLogSizeBytes = default, DateTimeOffset? earliestRestoreOn = default, Azure.ResourceManager.Sql.Models.DatabaseReadScale? readScale = default, int? highAvailabilityReplicaCount = default, Azure.ResourceManager.Sql.Models.SecondaryType? secondaryType = default, Azure.ResourceManager.Sql.Models.SqlSku currentSku = default, int? autoPauseDelay = default, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default, double? minCapacity = default, DateTimeOffset? pausedOn = default, DateTimeOffset? resumedOn = default, Azure.Core.ResourceIdentifier maintenanceConfigurationId = default, bool? isLedgerOn = default, bool? isInfraEncryptionEnabled = default, Guid? federatedClientId = default, System.Collections.Generic.IDictionary<string,Azure.ResourceManager.Sql.Models.SqlDatabaseKey> keys = default, string encryptionProtector = default, Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType? preferredEnclaveType = default, bool? useFreeLimit = default, Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior? freeLimitExhaustionBehavior = default, Azure.Core.ResourceIdentifier sourceResourceId = default, bool? manualCutover = default, bool? performCutover = default, Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType? availabilityZone = default, bool? encryptionProtectorAutoRotation = default);
static member SqlDatabaseData : Azure.Core.ResourceIdentifier * string * Azure.Core.ResourceType * Azure.ResourceManager.Models.SystemData * System.Collections.Generic.IDictionary<string, string> * Azure.Core.AzureLocation * Azure.ResourceManager.Sql.Models.SqlSku * string * string * Azure.ResourceManager.Sql.Models.DatabaseIdentity * Nullable<Azure.ResourceManager.Sql.Models.SqlDatabaseCreateMode> * string * Nullable<int64> * Nullable<Azure.ResourceManager.Sql.Models.SampleSchemaName> * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * Nullable<Azure.ResourceManager.Sql.Models.SqlDatabaseStatus> * Nullable<Guid> * Nullable<DateTimeOffset> * string * string * Nullable<Azure.Core.AzureLocation> * Azure.Core.ResourceIdentifier * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * Azure.Core.ResourceIdentifier * Nullable<Azure.ResourceManager.Sql.Models.CatalogCollationType> * Nullable<bool> * Nullable<Azure.ResourceManager.Sql.Models.DatabaseLicenseType> * Nullable<int64> * Nullable<DateTimeOffset> * Nullable<Azure.ResourceManager.Sql.Models.DatabaseReadScale> * Nullable<int> * Nullable<Azure.ResourceManager.Sql.Models.SecondaryType> * Azure.ResourceManager.Sql.Models.SqlSku * Nullable<int> * Nullable<Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy> * Nullable<Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy> * Nullable<double> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Azure.Core.ResourceIdentifier * Nullable<bool> * Nullable<bool> * Nullable<Guid> * System.Collections.Generic.IDictionary<string, Azure.ResourceManager.Sql.Models.SqlDatabaseKey> * string * Nullable<Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType> * Nullable<bool> * Nullable<Azure.ResourceManager.Sql.Models.FreeLimitExhaustionBehavior> * Azure.Core.ResourceIdentifier * Nullable<bool> * Nullable<bool> * Nullable<Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType> * Nullable<bool> -> Azure.ResourceManager.Sql.SqlDatabaseData
Public Shared Function SqlDatabaseData (Optional id As ResourceIdentifier = Nothing, Optional name As String = Nothing, Optional resourceType As ResourceType = Nothing, Optional systemData As SystemData = Nothing, Optional tags As IDictionary(Of String, String) = Nothing, Optional location As AzureLocation = Nothing, Optional sku As SqlSku = Nothing, Optional kind As String = Nothing, Optional managedBy As String = Nothing, Optional identity As DatabaseIdentity = Nothing, Optional createMode As Nullable(Of SqlDatabaseCreateMode) = Nothing, Optional collation As String = Nothing, Optional maxSizeBytes As Nullable(Of Long) = Nothing, Optional sampleName As Nullable(Of SampleSchemaName) = Nothing, Optional elasticPoolId As ResourceIdentifier = Nothing, Optional sourceDatabaseId As ResourceIdentifier = Nothing, Optional status As Nullable(Of SqlDatabaseStatus) = Nothing, Optional databaseId As Nullable(Of Guid) = Nothing, Optional createdOn As Nullable(Of DateTimeOffset) = Nothing, Optional currentServiceObjectiveName As String = Nothing, Optional requestedServiceObjectiveName As String = Nothing, Optional defaultSecondaryLocation As Nullable(Of AzureLocation) = Nothing, Optional failoverGroupId As ResourceIdentifier = Nothing, Optional restorePointInTime As Nullable(Of DateTimeOffset) = Nothing, Optional sourceDatabaseDeletedOn As Nullable(Of DateTimeOffset) = Nothing, Optional recoveryServicesRecoveryPointId As ResourceIdentifier = Nothing, Optional longTermRetentionBackupResourceId As ResourceIdentifier = Nothing, Optional recoverableDatabaseId As ResourceIdentifier = Nothing, Optional restorableDroppedDatabaseId As ResourceIdentifier = Nothing, Optional catalogCollation As Nullable(Of CatalogCollationType) = Nothing, Optional isZoneRedundant As Nullable(Of Boolean) = Nothing, Optional licenseType As Nullable(Of DatabaseLicenseType) = Nothing, Optional maxLogSizeBytes As Nullable(Of Long) = Nothing, Optional earliestRestoreOn As Nullable(Of DateTimeOffset) = Nothing, Optional readScale As Nullable(Of DatabaseReadScale) = Nothing, Optional highAvailabilityReplicaCount As Nullable(Of Integer) = Nothing, Optional secondaryType As Nullable(Of SecondaryType) = Nothing, Optional currentSku As SqlSku = Nothing, Optional autoPauseDelay As Nullable(Of Integer) = Nothing, Optional currentBackupStorageRedundancy As Nullable(Of SqlBackupStorageRedundancy) = Nothing, Optional requestedBackupStorageRedundancy As Nullable(Of SqlBackupStorageRedundancy) = Nothing, Optional minCapacity As Nullable(Of Double) = Nothing, Optional pausedOn As Nullable(Of DateTimeOffset) = Nothing, Optional resumedOn As Nullable(Of DateTimeOffset) = Nothing, Optional maintenanceConfigurationId As ResourceIdentifier = Nothing, Optional isLedgerOn As Nullable(Of Boolean) = Nothing, Optional isInfraEncryptionEnabled As Nullable(Of Boolean) = Nothing, Optional federatedClientId As Nullable(Of Guid) = Nothing, Optional keys As IDictionary(Of String, SqlDatabaseKey) = Nothing, Optional encryptionProtector As String = Nothing, Optional preferredEnclaveType As Nullable(Of SqlAlwaysEncryptedEnclaveType) = Nothing, Optional useFreeLimit As Nullable(Of Boolean) = Nothing, Optional freeLimitExhaustionBehavior As Nullable(Of FreeLimitExhaustionBehavior) = Nothing, Optional sourceResourceId As ResourceIdentifier = Nothing, Optional manualCutover As Nullable(Of Boolean) = Nothing, Optional performCutover As Nullable(Of Boolean) = Nothing, Optional availabilityZone As Nullable(Of SqlAvailabilityZoneType) = Nothing, Optional encryptionProtectorAutoRotation As Nullable(Of Boolean) = Nothing) As SqlDatabaseData
参数
ID。
- name
- String
名称。
- resourceType
- ResourceType
resourceType。
- systemData
- SystemData
systemData。
- tags
- IDictionary<String,String>
标记。
- location
- AzureLocation
位置。
- sku
- SqlSku
数据库 SKU。
SKU 列表可能因区域和支持产品/服务而异。 若要确定 SKU (包括 AZURE 区域中订阅可用的 SKU 名称、层/版本、系列和容量) ,请使用 Capabilities_ListByLocation
REST API 或以下命令之一:
az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
- kind
- String
数据库类型。 这是用于Azure 门户体验的元数据。
- managedBy
- String
管理数据库的资源。
- identity
- DatabaseIdentity
数据库的 Azure Active Directory 标识。
- createMode
- Nullable<SqlDatabaseCreateMode>
指定数据库创建模式。
默认值:常规数据库创建。
复制:将数据库创建为现有数据库的副本。 sourceDatabaseId 必须指定为源数据库的资源 ID。
辅助数据库:将数据库创建为现有数据库的辅助副本 (replica) 。 sourceDatabaseId 必须指定为现有主数据库的资源 ID。
PointInTimeRestore:通过还原现有数据库的时间点备份来创建数据库。 sourceDatabaseId 必须指定为现有数据库的资源 ID,并且必须指定 restorePointInTime。
恢复:通过还原异地复制的备份来创建数据库。 sourceDatabaseId 必须指定为要还原的可恢复数据库资源 ID。
还原:通过还原已删除数据库的备份来创建数据库。 必须指定 sourceDatabaseId。 如果 sourceDatabaseId 是数据库的原始资源 ID,则必须指定 sourceDatabaseDeletionDate。 否则,sourceDatabaseId 必须是可还原的已删除数据库资源 ID,并且 sourceDatabaseDeletionDate 将被忽略。 还可以指定 restorePointInTime 从较早的时间点还原。
RestoreLongTermRetentionBackup:通过从长期保留保管库还原来创建数据库。 recoveryServicesRecoveryPointResourceId 必须指定为恢复点资源 ID。
DataWarehouse 版本不支持 Copy、Secondary 和 RestoreLongTermRetentionBackup。
- collation
- String
数据库的排序规则。
- sampleName
- Nullable<SampleSchemaName>
创建此数据库时要应用的示例架构的名称。
- elasticPoolId
- ResourceIdentifier
包含此数据库的弹性池的资源标识符。
- sourceDatabaseId
- ResourceIdentifier
与此数据库的创建操作关联的源数据库的资源标识符。
- status
- Nullable<SqlDatabaseStatus>
数据库的状态。
- createdOn
- Nullable<DateTimeOffset>
数据库的创建日期 (ISO8601 格式) 。
- currentServiceObjectiveName
- String
数据库的当前服务级别目标名称。
- requestedServiceObjectiveName
- String
数据库请求的服务级别目标名称。
- defaultSecondaryLocation
- Nullable<AzureLocation>
此数据库的默认次要区域。
- failoverGroupId
- ResourceIdentifier
此数据库所属的故障转移组资源标识符。
- restorePointInTime
- Nullable<DateTimeOffset>
指定要还原以创建新数据库的源数据库的时间点 (ISO8601 格式) 。
- sourceDatabaseDeletedOn
- Nullable<DateTimeOffset>
指定数据库被删除的时间。
- recoveryServicesRecoveryPointId
- ResourceIdentifier
与此数据库的创建操作关联的恢复点的资源标识符。
- longTermRetentionBackupResourceId
- ResourceIdentifier
与此数据库的创建操作关联的长期保留备份的资源标识符。
- recoverableDatabaseId
- ResourceIdentifier
与此数据库的创建操作关联的可恢复数据库的资源标识符。
- restorableDroppedDatabaseId
- ResourceIdentifier
与此数据库的创建操作关联的可还原删除数据库的资源标识符。
- catalogCollation
- Nullable<CatalogCollationType>
元数据目录的排序规则。
- licenseType
- Nullable<DatabaseLicenseType>
要为此数据库申请的许可证类型。 LicenseIncluded
如果需要许可证,或者BasePrice
如果你有许可证并且有资格获得Azure 混合权益。
- earliestRestoreOn
- Nullable<DateTimeOffset>
这会记录可用于此数据库的最早还原日期和时间, (ISO8601 格式) 。
- readScale
- Nullable<DatabaseReadScale>
只读路由的状态。 如果启用,连接字符串中应用程序意向设置为只读的连接可能会路由到同一区域中的只读辅助副本 (replica) 。 不适用于弹性池中的超大规模数据库。
- secondaryType
- Nullable<SecondaryType>
数据库的辅助类型(如果它是辅助数据库)。 有效值为 Geo、Named 和 Standby。
- currentSku
- SqlSku
SKU 的名称和层。
- currentBackupStorageRedundancy
- Nullable<SqlBackupStorageRedundancy>
用于存储此数据库的备份的存储帐户类型。
- requestedBackupStorageRedundancy
- Nullable<SqlBackupStorageRedundancy>
用于存储此数据库的备份的存储帐户类型。
- pausedOn
- Nullable<DateTimeOffset>
用户配置或操作暂停数据库的日期 (ISO8601 格式) 。 如果数据库已准备就绪,则为 Null。
- resumedOn
- Nullable<DateTimeOffset>
用户操作或数据库登录恢复数据库的日期 (ISO8601 格式) 。 如果数据库已暂停,则为 Null。
- maintenanceConfigurationId
- ResourceIdentifier
分配给数据库的维护配置 ID。 此配置定义将发生维护更新的时间段。
- keys
- IDictionary<String,SqlDatabaseKey>
要使用的用户分配标识的资源 ID。
- encryptionProtector
- String
数据库的 Azure 密钥保管库 URI(如果配置了每个数据库客户管理的密钥)。
- preferredEnclaveType
- Nullable<SqlAlwaysEncryptedEnclaveType>
对数据库请求的 enclave 类型,即默认或 VBS enclave。
- freeLimitExhaustionBehavior
- Nullable<FreeLimitExhaustionBehavior>
指定免费数据库的每月可用限制用尽时的行为。
AutoPause:当该月剩余时间的可用限制用尽时,数据库将自动暂停。
BillForUsage:在用尽免费限制后,数据库将继续联机,任何超额都将计费。
- sourceResourceId
- ResourceIdentifier
与此数据库的创建操作关联的源的资源标识符。
此属性仅支持 DataWarehouse 版本,并允许跨订阅还原。
指定 sourceResourceId 时,不得指定 sourceDatabaseId、recoverableDatabaseId、restoreableDroppedDatabaseId 和 sourceDatabaseDeletionDate,并且 CreateMode 必须为 PointInTimeRestore、Restore 或 Recover。
当 createMode 为 PointInTimeRestore 时,sourceResourceId 必须是现有数据库或现有 sql 池的资源 ID,并且必须指定 restorePointInTime。
当 createMode 为 Restore 时,sourceResourceId 必须是可还原的已删除数据库或可还原的已删除 sql 池的资源 ID。
当 createMode 为“恢复”时,sourceResourceId 必须是可恢复数据库或可恢复 sql 池的资源 ID。
当源订阅属于与目标订阅不同的租户时,“x-ms-authorization-auxiliary”标头必须包含源租户的身份验证令牌。 有关“x-ms-authorization-auxiliary”标头的更多详细信息,请参阅 https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant
是否需要在“将数据库更新到超大规模”层的操作期间完成客户控制的手动直接转换。
此属性仅适用于将数据库从 业务关键/常规用途/高级/标准层缩放到超大规模层时。
指定 manualCutover 时,缩放操作将等待用户输入触发到超大规模数据库的直接转换。
若要触发直接转换,请在缩放操作处于等待状态时提供“performCutover”参数。
在缩放操作正在进行时,在等待状态期间触发客户控制的手动直接转换。
此属性参数仅适用于随“manualCutover”参数一起启动的缩放操作。
仅当数据库从业务关键/常规用途/高级/标准层扩展到超大规模层时,此属性才适用。
指定 performCutover 时,缩放操作将触发直接转换并执行对超大规模数据库的角色更改。
- availabilityZone
- Nullable<SqlAvailabilityZoneType>
指定数据库固定到的可用性区域。
返回
用于模拟的新 SqlDatabaseData 实例。