取得 API 服務
取得服務的屬性。
作業會傳回服務的屬性。
要求
方法 | 要求 URI |
---|---|
GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services/{serviceName}?api-version=2018-07-01-preview |
參數
名稱 | 類型 | 必要 | Location |
---|---|---|---|
subscriptionId |
字串 | 是 | 路徑 |
resourceGroupName |
字串 | 是 | 路徑 |
applicationName |
字串 | 是 | 路徑 |
serviceName |
字串 | 是 | 路徑 |
api-version |
字串 | 是 | 查詢 |
subscriptionId
類型:字串
必要:是
客戶訂用帳戶識別碼
resourceGroupName
類型:字串
必要:是
Azure 資源群組名稱
applicationName
類型:字串
必要:是
應用程式的身分識別。
serviceName
類型:字串
必要:是
服務的身分識別。
api-version
類型:字串
必要:是
預設:2018-07-01-preview
API 的版本。 這個參數是必要的,而且其值必須是 2018-07-01-preview
。
回應
HTTP 狀態碼 | 描述 | 回應結構描述 |
---|---|---|
200 (確定) | 確定 |
ServiceResourceDescription |
範例
ServiceGet
要求
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/helloWorldApp/services/helloWorldService?api-version=2018-07-01-preview
200 回應
主體
{
"name": "helloWorldService",
"type": "Microsoft.ServiceFabricMesh/services",
"properties": {
"osType": "Linux",
"codePackages": [
{
"name": "helloWorldCode",
"image": "seabreeze/sbz-helloworld:1.0-alpine",
"endpoints": [
{
"name": "helloWorldListener",
"port": "80"
}
],
"resources": {
"requests": {
"memoryInGB": "1",
"cpu": "1"
}
}
},
{
"name": "helloWorldSideCar",
"image": "seabreeze/sbz-helloworld-sidecar:1.0-alpine",
"resources": {
"requests": {
"memoryInGB": "1",
"cpu": "1"
}
}
}
],
"networkRefs": [
{
"name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/helloWorldNetwork"
}
],
"description": "SeaBreeze Hello World Service.",
"replicaCount": "2",
"healthState": "Ok",
"status": "Unknown"
}
}