Failover Groups - Update
更新故障转移组。
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}?api-version=2023-08-01
		URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 | 
|---|---|---|---|---|
| 
						 failover 
					 | 
					path | True | 
			 string  | 
					
						 故障转移组的名称。  | 
				
| 
						 resource 
					 | 
					path | True | 
			 string  | 
					
						 包含资源的资源组的名称。 可以从 Azure 资源管理器 API 或门户获取此值。  | 
				
| 
						 server 
					 | 
					path | True | 
			 string  | 
					
						 包含故障转移组的服务器的名称。  | 
				
| 
						 subscription 
					 | 
					path | True | 
			 string  | 
					
						 标识 Azure 订阅的订阅 ID。  | 
				
| 
						 api-version 
					 | 
					query | True | 
			 string  | 
					
						 要用于请求的 API 版本。  | 
				
请求正文
| 名称 | 类型 | 说明 | 
|---|---|---|
| properties.databases | 
			 string[] (arm-id)  | 
	
		 故障转移组中的数据库列表。  | 
| properties.partnerServers | 
		 故障转移组的合作伙伴服务器信息列表。  | 
|
| properties.readOnlyEndpoint | 
		 故障转移组实例的只读终结点。  | 
|
| properties.readWriteEndpoint | 
		 故障转移组实例的读写终结点。  | 
|
| properties.secondaryType | 
		 合作伙伴服务器上的数据库辅助类型。  | 
|
| tags | 
			 object  | 
	
		 资源标记。  | 
响应
| 名称 | 类型 | 说明 | 
|---|---|---|
| 200 OK | 
		 已成功更新故障转移组。  | 
|
| 202 Accepted | 
		 接受 标头 Location: string  | 
|
| Other Status Codes | 
		 错误响应: *** 
  | 
示例
| Add database to failover group with standby secondary on partner server. | 
| Update failover group | 
Add database to failover group with standby secondary on partner server.
示例请求
PATCH https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-1?api-version=2023-08-01
{
  "properties": {
    "readWriteEndpoint": {
      "failoverPolicy": "Automatic",
      "failoverWithDataLossGracePeriodMinutes": 120
    },
    "databases": [
      "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1"
    ],
    "secondaryType": "Standby"
  }
}
示例响应
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3",
  "name": "failover-group-test-3",
  "type": "Microsoft.Sql/servers/failoverGroups",
  "location": "Japan East",
  "properties": {
    "readWriteEndpoint": {
      "failoverPolicy": "Automatic",
      "failoverWithDataLossGracePeriodMinutes": 120
    },
    "readOnlyEndpoint": {
      "failoverPolicy": "Disabled",
      "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"
    },
    "replicationRole": "Primary",
    "replicationState": "CATCH_UP",
    "partnerServers": [
      {
        "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server",
        "location": "Japan West",
        "replicationRole": "Secondary"
      }
    ],
    "databases": [
      "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1"
    ]
  }
}
						
							Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japaneast/failoverGroupOperationResults/11111111-1111-1111-1111-111111111111
				Update failover group
示例请求
PATCH https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-1?api-version=2023-08-01
{
  "properties": {
    "readWriteEndpoint": {
      "failoverPolicy": "Automatic",
      "failoverWithDataLossGracePeriodMinutes": 120
    },
    "databases": [
      "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1"
    ]
  }
}
示例响应
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3",
  "name": "failover-group-test-3",
  "type": "Microsoft.Sql/servers/failoverGroups",
  "location": "Japan East",
  "properties": {
    "readWriteEndpoint": {
      "failoverPolicy": "Automatic",
      "failoverWithDataLossGracePeriodMinutes": 120
    },
    "readOnlyEndpoint": {
      "failoverPolicy": "Disabled",
      "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"
    },
    "replicationRole": "Primary",
    "replicationState": "CATCH_UP",
    "partnerServers": [
      {
        "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server",
        "location": "Japan West",
        "replicationRole": "Secondary"
      }
    ],
    "databases": [
      "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1"
    ]
  }
}
						
							Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japaneast/failoverGroupOperationResults/11111111-1111-1111-1111-111111111111
				定义
| 名称 | 说明 | 
|---|---|
| 
							Error | 
						
							 资源管理错误附加信息。  | 
					
| 
							Error | 
						
							 错误详细信息。  | 
					
| 
							Error | 
						
							 错误响应  | 
					
| 
							Failover | 
						
							 故障转移组。  | 
					
| 
							Failover | 
						
							 合作伙伴服务器上的数据库辅助类型。  | 
					
| 
							Failover | 
						
							 故障转移组实例的只读终结点。  | 
					
| 
							Failover | 
						
							 故障转移组实例的读写终结点。  | 
					
| 
							Failover | 
						
							 故障转移组实例的本地复制角色。  | 
					
| 
							Failover | 
						
							 故障转移组更新请求。  | 
					
| 
							Partner | 
						
							 故障转移组的合作伙伴服务器信息。  | 
					
| 
							Read | 
						
							 故障转移组只读终结点的故障转移策略。  | 
					
| 
							Read | 
						
							 故障转移组的读写终结点的故障转移策略。 如果 failoverPolicy 为 Automatic,则需要 failoverWithDataLossGracePeriodMinutes。  | 
					
ErrorAdditionalInfo  
			
			资源管理错误附加信息。
| 名称 | 类型 | 说明 | 
|---|---|---|
| info | 
			 object  | 
	
		 其他信息。  | 
| type | 
			 string  | 
	
		 其他信息类型。  | 
ErrorDetail 
			
			错误详细信息。
| 名称 | 类型 | 说明 | 
|---|---|---|
| additionalInfo | 
		 错误附加信息。  | 
|
| code | 
			 string  | 
	
		 错误代码。  | 
| details | 
		 错误详细信息。  | 
|
| message | 
			 string  | 
	
		 错误消息。  | 
| target | 
			 string  | 
	
		 错误目标。  | 
ErrorResponse 
			
			错误响应
| 名称 | 类型 | 说明 | 
|---|---|---|
| error | 
		 错误对象。  | 
FailoverGroup 
			
			故障转移组。
| 名称 | 类型 | 说明 | 
|---|---|---|
| id | 
			 string  | 
	
		 资源 ID。  | 
| location | 
			 string  | 
	
		 资源位置。  | 
| name | 
			 string  | 
	
		 资源名称。  | 
| properties.databases | 
			 string[] (arm-id)  | 
	
		 故障转移组中的数据库列表。  | 
| properties.partnerServers | 
		 故障转移组的合作伙伴服务器信息列表。  | 
|
| properties.readOnlyEndpoint | 
		 故障转移组实例的只读终结点。  | 
|
| properties.readWriteEndpoint | 
		 故障转移组实例的读写终结点。  | 
|
| properties.replicationRole | 
		 故障转移组实例的本地复制角色。  | 
|
| properties.replicationState | 
			 string  | 
	
		 故障转移组实例的复制状态。  | 
| properties.secondaryType | 
		 合作伙伴服务器上的数据库辅助类型。  | 
|
| tags | 
			 object  | 
	
		 资源标记。  | 
| type | 
			 string  | 
	
		 资源类型。  | 
FailoverGroupDatabasesSecondaryType    
			
			合作伙伴服务器上的数据库辅助类型。
| 值 | 说明 | 
|---|---|
| Geo | |
| Standby | 
FailoverGroupReadOnlyEndpoint    
			
			故障转移组实例的只读终结点。
| 名称 | 类型 | 说明 | 
|---|---|---|
| failoverPolicy | 
		 故障转移组只读终结点的故障转移策略。  | 
|
| targetServer | 
			 string (arm-id)  | 
	
		 只读终结点指向的目标伙伴服务器。  | 
FailoverGroupReadWriteEndpoint    
			
			故障转移组实例的读写终结点。
| 名称 | 类型 | 说明 | 
|---|---|---|
| failoverPolicy | 
		 故障转移组的读写终结点的故障转移策略。 如果 failoverPolicy 为 Automatic,则需要 failoverWithDataLossGracePeriodMinutes。  | 
|
| failoverWithDataLossGracePeriodMinutes | 
			 integer (int32)  | 
	
		 尝试对读写终结点执行故障转移前的宽限期,并丢失数据。 如果 failoverPolicy 为 Automatic,则需要 failoverWithDataLossGracePeriodMinutes。  | 
FailoverGroupReplicationRole   
			
			故障转移组实例的本地复制角色。
| 值 | 说明 | 
|---|---|
| Primary | |
| Secondary | 
FailoverGroupUpdate  
			
			故障转移组更新请求。
| 名称 | 类型 | 说明 | 
|---|---|---|
| properties.databases | 
			 string[] (arm-id)  | 
	
		 故障转移组中的数据库列表。  | 
| properties.partnerServers | 
		 故障转移组的合作伙伴服务器信息列表。  | 
|
| properties.readOnlyEndpoint | 
		 故障转移组实例的只读终结点。  | 
|
| properties.readWriteEndpoint | 
		 故障转移组实例的读写终结点。  | 
|
| properties.secondaryType | 
		 合作伙伴服务器上的数据库辅助类型。  | 
|
| tags | 
			 object  | 
	
		 资源标记。  | 
PartnerInfo 
			
			故障转移组的合作伙伴服务器信息。
| 名称 | 类型 | 说明 | 
|---|---|---|
| id | 
			 string (arm-id)  | 
	
		 合作伙伴服务器的资源标识符。  | 
| location | 
			 string  | 
	
		 合作伙伴服务器的地理位置。  | 
| replicationRole | 
		 合作伙伴服务器的复制角色。  | 
ReadOnlyEndpointFailoverPolicy    
			
			故障转移组只读终结点的故障转移策略。
| 值 | 说明 | 
|---|---|
| Disabled | |
| Enabled | 
ReadWriteEndpointFailoverPolicy    
			
			故障转移组的读写终结点的故障转移策略。 如果 failoverPolicy 为 Automatic,则需要 failoverWithDataLossGracePeriodMinutes。
| 值 | 说明 | 
|---|---|
| Manual | |
| Automatic |