你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

按服务名称列出

获取给定服务的副本。

获取有关应用程序给定服务的所有副本的信息。 该信息包括 副本 (replica) 实例的运行时属性。

请求

方法 请求 URI
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services/{serviceName}/replicas?api-version=2018-07-01-preview

参数

名称 类型 必须 位置
subscriptionId string 路径
resourceGroupName 字符串 路径
applicationName 字符串 路径
serviceName 字符串 路径
api-version 字符串 查询

subscriptionId

类型:字符串
必需:是

客户订阅标识符


resourceGroupName

类型:字符串
必需:是

Azure 资源组名称


applicationName

类型:字符串
必需:是

应用程序的标识。


serviceName

类型:字符串
必需:是

服务的标识。


api-version

类型:字符串
必需:是
默认

API 的版本。 此参数是必需的,其值必须为 2018-07-01-preview

响应

HTTP 状态代码 说明 响应架构
200 (正常) 确定
ServiceReplicaList

示例

ReplicasGetAll

请求

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/helloWorldApp/services/helloWorldService/replicas?api-version=2018-07-01-preview

200 响应

正文
{
  "value": [
    {
      "osType": "Linux",
      "codePackages": [
        {
          "name": "helloWorldCode",
          "image": "seabreeze/sbz-helloworld:1.0-alpine",
          "endpoints": [
            {
              "name": "helloWorldListener",
              "port": "80"
            }
          ],
          "resources": {
            "requests": {
              "memoryInGB": "1",
              "cpu": "1"
            }
          },
          "instanceView": {
            "restartCount": "1",
            "currentState": {
              "state": "Running",
              "exitCode": "0"
            },
            "previousState": {
              "state": "NotSpecified",
              "exitCode": "0"
            },
            "events": [
              {
                "count": "3",
                "firstTimestamp": "2018-04-05T22:37:20.9016844",
                "lastTimestamp": "2018-04-06T06:36:06.0887046",
                "name": "Created",
                "message": "Container created and started.",
                "type": "Normal"
              },
              {
                "count": "1",
                "firstTimestamp": "2018-04-06T06:34:00.6622454",
                "lastTimestamp": "2018-04-06T06:34:00.6622454",
                "name": "Stopped",
                "message": "Container was stopped.",
                "type": "Normal"
              }
            ]
          }
        },
        {
          "name": "helloWorldSideCar",
          "image": "seabreeze/sbz-helloworld-sidecar:1.0-alpine",
          "resources": {
            "requests": {
              "memoryInGB": "1",
              "cpu": "1"
            }
          },
          "instanceView": {
            "restartCount": "1",
            "currentState": {
              "state": "Running",
              "exitCode": "0"
            },
            "previousState": {
              "state": "NotSpecified",
              "exitCode": "0"
            },
            "events": [
              {
                "count": "3",
                "firstTimestamp": "2018-04-05T22:37:20.906688",
                "lastTimestamp": "2018-04-06T06:36:06.0827003",
                "name": "Created",
                "message": "Container created and started.",
                "type": "Normal"
              },
              {
                "count": "1",
                "firstTimestamp": "2018-04-06T06:34:00.656241",
                "lastTimestamp": "2018-04-06T06:34:00.656241",
                "name": "Stopped",
                "message": "Container was stopped.",
                "type": "Normal"
              }
            ]
          }
        }
      ],
      "networkRefs": [
        {
          "name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/helloWorldNetwork"
        }
      ],
      "replicaName": "1"
    },
    {
      "osType": "Linux",
      "codePackages": [
        {
          "name": "helloWorldCode",
          "image": "seabreeze/sbz-helloworld:1.0-alpine",
          "endpoints": [
            {
              "name": "helloWorldListener",
              "port": "80"
            }
          ],
          "resources": {
            "requests": {
              "memoryInGB": "1",
              "cpu": "1"
            }
          },
          "instanceView": {
            "restartCount": "1",
            "currentState": {
              "state": "Running",
              "exitCode": "0"
            },
            "previousState": {
              "state": "NotSpecified",
              "exitCode": "0"
            },
            "events": [
              {
                "count": "3",
                "firstTimestamp": "2018-04-05T22:37:20.9016844",
                "lastTimestamp": "2018-04-06T06:36:06.0887046",
                "name": "Created",
                "message": "Container created and started.",
                "type": "Normal"
              },
              {
                "count": "1",
                "firstTimestamp": "2018-04-06T06:34:00.6622454",
                "lastTimestamp": "2018-04-06T06:34:00.6622454",
                "name": "Stopped",
                "message": "Container was stopped.",
                "type": "Normal"
              }
            ]
          }
        },
        {
          "name": "helloWorldSideCar",
          "image": "seabreeze/sbz-helloworld-sidecar:1.0-alpine",
          "resources": {
            "requests": {
              "memoryInGB": "1",
              "cpu": "1"
            }
          },
          "instanceView": {
            "restartCount": "1",
            "currentState": {
              "state": "Running",
              "exitCode": "0"
            },
            "previousState": {
              "state": "NotSpecified",
              "exitCode": "0"
            },
            "events": [
              {
                "count": "3",
                "firstTimestamp": "2018-04-05T22:37:20.906688",
                "lastTimestamp": "2018-04-06T06:36:06.0827003",
                "name": "Created",
                "message": "Container created and started.",
                "type": "Normal"
              },
              {
                "count": "1",
                "firstTimestamp": "2018-04-06T06:34:00.656241",
                "lastTimestamp": "2018-04-06T06:34:00.656241",
                "name": "Stopped",
                "message": "Container was stopped.",
                "type": "Normal"
              }
            ]
          }
        }
      ],
      "networkRefs": [
        {
          "name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/helloWorldNetwork"
        }
      ],
      "replicaName": "0"
    }
  ]
}