Service Fabric 取得服務
取得 Service Fabric 服務資源。
取得在 Service Fabric 應用程式資源中建立或正在建立的 Service Fabric 服務資源。
要求
方法 | 要求 URI |
---|---|
GET | /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 | 是 | 查詢 |
subscriptionId
類型:字串
必要:是
客戶訂用帳戶識別碼。
resourceGroupName
類型:字串
必要:是
資源群組的名稱。
clusterName
類型:字串
必要:是
叢集資源的名稱。
applicationName
類型:字串
必要:是
應用程式資源的名稱。
serviceName
類型:字串
必要:是
服務資源的名稱,格式為 {applicationName}~{serviceName}。
api-version
類型:字串
必要:是
預設值:2017-07-01-preview
Service Fabric 資源提供者 API 的版本。 這是必要的參數,而且此值必須是此規格的 「2017-07-01-preview」。
回應
HTTP 狀態碼 | 描述 | 回應結構描述 |
---|---|---|
200 (確定) | 作業已成功完成。 |
ServiceResource |
所有其他狀態碼 | 詳細的錯誤回應。 |
ErrorModel |
範例
取得服務
要求
GET 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
200 回應
主體
{
"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/\"636462502183671258\"",
"properties": {
"provisioningState": "Updating",
"serviceKind": "Stateless",
"placementConstraints": "NodeType==frontend",
"serviceTypeName": "myServiceType",
"partitionDescription": {
"partitionScheme": "Singleton"
},
"serviceLoadMetrics": [
{
"name": "metric1",
"weight": "Low"
}
],
"servicePlacementPolicies": [],
"defaultMoveCost": "Medium",
"instanceCount": "5"
}
}