Service Fabric 更新服務
更新 Service Fabric 服務資源。
使用指定的名稱更新 Service Fabric 服務資源。
要求
方法 | 要求 URI |
---|---|
PATCH | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}/services/{serviceName}?api-version=2017-07-01-preview |
參數
名稱 | 類型 | 必要 | Location |
---|---|---|---|
subscriptionId | string | 是 | 路徑 |
resourceGroupName | string | 是 | 路徑 |
clusterName | string | 是 | 路徑 |
applicationName | 字串 | 是 | 路徑 |
serviceName | string | 是 | 路徑 |
api-version | string | 是 | 查詢 |
parameters | ServiceResourceUpdate | 是 | body |
subscriptionId
類型:字串
必要:是
客戶訂用帳戶識別碼。
resourceGroupName
類型:字串
必要:是
資源群組的名稱。
clusterName
類型:字串
必要:是
叢集資源的名稱。
applicationName
類型:字串
必要:是
應用程式資源的名稱。
serviceName
類型:字串
必要:是
格式為 {applicationName}~{serviceName} 的服務資源名稱。
api-version
類型:字串
必要:是
預設值:2017-07-01-preview
Service Fabric 資源提供者 API 的版本。 這是必要的參數,而且此值必須是此規格的 「2017-07-01-preview」。
參數
類型: ServiceResourceUpdate
必要:是
修補作業的服務資源。
回應
HTTP 狀態碼 | 描述 | 回應結構描述 |
---|---|---|
202 (已接受) | 已接受要求,且作業會以非同步方式完成。 |
ServiceResourceUpdate |
所有其他狀態碼 | 詳細的錯誤回應。 |
ErrorModel |
範例
修補服務
要求
PATCH https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService?api-version=2017-07-01-preview
主體
{
"type": "services",
"location": "eastus",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService",
"name": "myCluster",
"tags": {},
"properties": {
"serviceKind": "Stateless",
"serviceTypeName": "myServiceType",
"serviceLoadMetrics": [
{
"name": "metric1",
"weight": "Low"
}
]
}
}
202 回應
標題
Retry-After: 10
Location: http://10.91.140.224/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/operationResults/4dde8d8b-b6b2-4c56-99c6-9b83932bb09a?api-version=2017-07-01-preview
主體
{
"type": "services",
"location": "eastus",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService",
"name": "myCluster",
"tags": {},
"etag": "W/\"636462502183671257\"",
"properties": {
"provisioningState": "Updating",
"serviceKind": "Stateless",
"serviceTypeName": "myServiceType",
"partitionDescription": {
"partitionScheme": "Singleton"
},
"serviceLoadMetrics": [
{
"name": "metric1",
"weight": "Low"
}
],
"instanceCount": "1"
}
}