你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
获取 API 副本
获取给定服务的特定副本 (replica) 。
获取有关应用程序给定服务的指定副本 (replica) 的信息。 该信息包括 副本 (replica) 实例的运行时属性。
请求
方法 | 请求 URI |
---|---|
GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services/{serviceName}/replicas/{replicaName}?api-version=2018-07-01-preview |
参数
名称 | 类型 | 必须 | 位置 |
---|---|---|---|
subscriptionId |
string | 是 | 路径 |
resourceGroupName |
string | 是 | 路径 |
applicationName |
string | 是 | 路径 |
serviceName |
string | 是 | 路径 |
replicaName |
string | 是 | 路径 |
api-version |
string | 是 | 查询 |
subscriptionId
类型:字符串
必需:是
客户订阅标识符
resourceGroupName
类型:字符串
必需:是
Azure 资源组名称
applicationName
类型:字符串
必需:是
应用程序的标识。
serviceName
类型:字符串
必需:是
服务的标识。
replicaName
类型:字符串
必需:是
服务副本 (replica) 的标识。
api-version
类型:字符串
必需:是
默认:
API 的版本。 此参数是必需的,其值必须为 2018-07-01-preview
。
响应
HTTP 状态代码 | 说明 | 响应架构 |
---|---|---|
200 (正常) | 确定 |
ServiceReplicaDescription |
示例
ReplicaGet
请求
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/helloWorldApp/services/helloWorldService/replicas/1?api-version=2018-07-01-preview
200 响应
正文
{
"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"
}