---
title: "Gets the given replica of the service of an application."
method: GET
path: "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}"
tags: ["MeshServiceReplicas"]
---

# Gets the given replica of the service of an application.

`GET /Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}`

Gets the information about the service replica with the given name. The information include the description and other properties of the service replica.

## Path parameters

- `applicationResourceName` string, required
- `serviceResourceName` string, required
- `replicaName` string, required

## Query parameters

- `api-version` '6.4-preview', required

## Response `200`

OK

- ServiceReplicaDescription — Describes the properties of a service replica.
  - `osType` 'Linux' | 'Windows', required — The operation system required by the code in service.
  - `codePackages` ContainerCodePackageProperties[], required — Describes the set of code packages that forms the service. A code package describes the container and the properties for running it. All the code packages are started together on the same host and share the same context (network, process etc.).
    - `name` string, required — The name of the code package.
    - `image` string, required — The Container image to use.
    - `imageRegistryCredential` ImageRegistryCredential — Image registry credential.
      - `server` string, required — Docker image registry server, without protocol such as `http` and `https`.
      - `username` string, required — The username for the private registry.
      - `password` string — The password for the private registry. The password is required for create or update operations, however it is not returned in the get or list operations.
    - `entrypoint` string — Override for the default entry point in the container.
    - `commands` string[] — Command array to execute within the container in exec form.
    - `environmentVariables` EnvironmentVariable[] — The environment variables to set in this container
      - `name` string — The name of the environment variable.
      - `value` string — The value of the environment variable.
    - `settings` Setting[] — The settings to set in this container. The setting file path can be fetched from environment variable "Fabric_SettingPath". The path for Windows container is "C:\\secrets". The path for Linux container is "/var/secrets".
      - `name` string — The name of the setting.
      - `value` string — The value of the setting.
    - `labels` ContainerLabel[] — The labels to set in this container.
      - `name` string, required — The name of the container label.
      - `value` string, required — The value of the container label.
    - `endpoints` EndpointProperties[] — The endpoints exposed by this container.
      - `name` string, required — The name of the endpoint.
      - `port` integer — Port used by the container.
    - `resources` ResourceRequirements, required — This type describes the resource requirements for a container or a service.
      - `requests` ResourceRequests, required — This type describes the requested resources for a given container. It describes the least amount of resources required for the container. A container can consume more than requested resources up to the specified limits before being restarted. Currently, the requested resources are treated as limits.
        - `memoryInGB` number, double, required — The memory request in GB for this container.
        - `cpu` number, double, required — Requested number of CPU cores. At present, only full cores are supported.
      - `limits` ResourceLimits — This type describes the resource limits for a given container. It describes the most amount of resources a container is allowed to use before being restarted.
        - `memoryInGB` number, double — The memory limit in GB.
        - `cpu` number, double — CPU limits in cores. At present, only full cores are supported.
    - `volumeRefs` VolumeReference[] — Volumes to be attached to the container. The lifetime of these volumes is independent of the application's lifetime.
      - `name` string, required — Name of the volume being referenced.
      - `readOnly` boolean — The flag indicating whether the volume is read only. Default is 'false'.
      - `destinationPath` string, required — The path within the container at which the volume should be mounted. Only valid path characters are allowed.
    - `volumes` ApplicationScopedVolume[] — Volumes to be attached to the container. The lifetime of these volumes is scoped to the application's lifetime.
      - `name` string, required — Name of the volume being referenced.
      - `readOnly` boolean — The flag indicating whether the volume is read only. Default is 'false'.
      - `destinationPath` string, required — The path within the container at which the volume should be mounted. Only valid path characters are allowed.
    - `diagnostics` DiagnosticsRef — Reference to sinks in DiagnosticsDescription.
      - `enabled` boolean — Status of whether or not sinks are enabled.
      - `sinkRefs` string[] — List of sinks to be used if enabled. References the list of sinks in DiagnosticsDescription.
    - `reliableCollectionsRefs` ReliableCollectionsRef[] — A list of ReliableCollection resources used by this particular code package. Please refer to ReliableCollectionsRef for more details.
      - `name` string, required — Name of ReliableCollection resource. Right now it's not used and you can use any string.
      - `doNotPersistState` boolean — False (the default) if ReliableCollections state is persisted to disk as usual. True if you do not want to persist state, in which case replication is still enabled and you can use ReliableCollections as distributed cache.
    - `instanceView` ContainerInstanceView — Runtime information of a container instance.
      - `restartCount` integer — The number of times the container has been restarted.
      - `currentState` ContainerState — The container state.
        - `state` string — The state of this container
        - `startTime` string, date-time — Date/time when the container state started.
        - `exitCode` string — The container exit code.
        - `finishTime` string, date-time — Date/time when the container state finished.
        - `detailStatus` string — Human-readable status of this state.
      - `previousState` ContainerState — The container state.
        - `state` string — The state of this container
        - `startTime` string, date-time — Date/time when the container state started.
        - `exitCode` string — The container exit code.
        - `finishTime` string, date-time — Date/time when the container state finished.
        - `detailStatus` string — Human-readable status of this state.
      - `events` ContainerEvent[] — The events of this container instance.
        - `name` string — The name of the container event.
        - `count` integer — The count of the event.
        - `firstTimestamp` string — Date/time of the first event.
        - `lastTimestamp` string — Date/time of the last event.
        - `message` string — The event message
        - `type` string — The event type.
  - `networkRefs` NetworkRef[] — The names of the private networks that this service needs to be part of.
    - `name` string — Name of the network
    - `endpointRefs` EndpointRef[] — A list of endpoints that are exposed on this network.
      - `name` string — Name of the endpoint.
  - `diagnostics` DiagnosticsRef — Reference to sinks in DiagnosticsDescription.
    - `enabled` boolean — Status of whether or not sinks are enabled.
    - `sinkRefs` string[] — List of sinks to be used if enabled. References the list of sinks in DiagnosticsDescription.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/azure/apis/service-fabric-client-apis.md) · [All operations](https://skmtc.net/azure/apis/service-fabric-client-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/service-fabric-client-apis/versions/6df9f2f4d542/schema)
