{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-service-fabric/json-schema/microsoft-azure-service-fabric-service-resource-list-schema.json",
  "title": "ServiceResourceList",
  "description": "The list of service resources.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-service-fabric-applications-api-openapi.yml#/components/schemas/ServiceResourceList",
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ServiceResource"
      }
    },
    "nextLink": {
      "type": "string",
      "description": "URL to get the next set of service list results if there are any.",
      "readOnly": true
    }
  },
  "$defs": {
    "CorrelationSchemeList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ServiceCorrelationDescription"
      },
      "description": "A list that describes the correlation of the service with other services."
    },
    "MoveCost": {
      "type": "string",
      "description": "Specifies the move cost for the service.",
      "enum": [
        "Zero",
        "Low",
        "Medium",
        "High"
      ],
      "x-ms-enum": {
        "name": "MoveCost",
        "modelAsString": true,
        "values": [
          {
            "value": "Zero",
            "description": "Zero move cost. This value is zero."
          },
          {
            "value": "Low",
            "description": "Specifies the move cost of the service as Low. The value is 1."
          },
          {
            "value": "Medium",
            "description": "Specifies the move cost of the service as Medium. The value is 2."
          },
          {
            "value": "High",
            "description": "Specifies the move cost of the service as High. The value is 3."
          }
        ]
      }
    },
    "PartitionScheme": {
      "type": "string",
      "description": "Enumerates the ways that a service can be partitioned.",
      "enum": [
        "Invalid",
        "Singleton",
        "UniformInt64Range",
        "Named"
      ],
      "x-ms-enum": {
        "name": "PartitionScheme",
        "modelAsString": true,
        "values": [
          {
            "value": "Invalid",
            "description": "Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero."
          },
          {
            "value": "Singleton",
            "description": "Indicates that the partition is based on string names, and is a SingletonPartitionSchemeDescription object, The value is 1."
          },
          {
            "value": "UniformInt64Range",
            "description": "Indicates that the partition is based on Int64 key ranges, and is a UniformInt64RangePartitionSchemeDescription object. The value is 2."
          },
          {
            "value": "Named",
            "description": "Indicates that the partition is based on string names, and is a NamedPartitionSchemeDescription object. The value is 3"
          }
        ]
      }
    },
    "PartitionSchemeDescription": {
      "type": "object",
      "description": "Describes how the service is partitioned.",
      "required": [
        "partitionScheme"
      ],
      "properties": {
        "partitionScheme": {
          "$ref": "#/$defs/PartitionScheme"
        }
      }
    },
    "ProxyResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Azure resource identifier.",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Azure resource name.",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "Azure resource type.",
          "readOnly": true
        },
        "location": {
          "type": "string",
          "description": "It will be deprecated in New API, resource location depends on the parent resource.",
          "x-ms-mutability": [
            "create",
            "read"
          ]
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Azure resource tags.",
          "x-ms-mutability": [
            "create",
            "read"
          ]
        },
        "etag": {
          "type": "string",
          "description": "Azure resource etag.",
          "readOnly": true
        },
        "systemData": {
          "$ref": "#/$defs/SystemData"
        }
      },
      "description": "The resource model definition for proxy-only resource.",
      "x-ms-azure-resource": true
    },
    "ServiceCorrelationDescription": {
      "type": "object",
      "description": "Creates a particular correlation between services.",
      "required": [
        "scheme",
        "serviceName"
      ],
      "properties": {
        "scheme": {
          "$ref": "#/$defs/ServiceCorrelationScheme"
        },
        "serviceName": {
          "$ref": "#/$defs/ServiceName"
        }
      }
    },
    "ServiceCorrelationScheme": {
      "type": "string",
      "description": "The service correlation scheme.",
      "enum": [
        "Invalid",
        "Affinity",
        "AlignedAffinity",
        "NonAlignedAffinity"
      ],
      "x-ms-enum": {
        "name": "ServiceCorrelationScheme",
        "modelAsString": true,
        "values": [
          {
            "value": "Invalid",
            "description": "An invalid correlation scheme. Cannot be used. The value is zero."
          },
          {
            "value": "Affinity",
            "description": "Indicates that this service has an affinity relationship with another service. Provided for backwards compatibility, consider preferring the Aligned or NonAlignedAffinity options. The value is 1."
          },
          {
            "value": "AlignedAffinity",
            "description": "Aligned affinity ensures that the primaries of the partitions of the affinitized services are collocated on the same nodes. This is the default and is the same as selecting the Affinity scheme. The value is 2."
          },
          {
            "value": "NonAlignedAffinity",
            "description": "Non-Aligned affinity guarantees that all replicas of each service will be placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will be collocated. The value is 3."
          }
        ]
      }
    },
    "ServiceKind": {
      "type": "string",
      "description": "The kind of service (Stateless or Stateful).",
      "enum": [
        "Invalid",
        "Stateless",
        "Stateful"
      ],
      "x-ms-enum": {
        "name": "ServiceKind",
        "modelAsString": true,
        "values": [
          {
            "value": "Invalid",
            "description": "Indicates the service kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero."
          },
          {
            "value": "Stateless",
            "description": "Does not use Service Fabric to make its state highly available or reliable. The value is 1."
          },
          {
            "value": "Stateful",
            "description": "Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 2."
          }
        ]
      }
    },
    "ServiceLoadMetricDescription": {
      "type": "object",
      "description": "Specifies a metric to load balance a service during runtime.",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive."
        },
        "weight": {
          "$ref": "#/$defs/ServiceLoadMetricWeight"
        },
        "primaryDefaultLoad": {
          "type": "integer",
          "format": "int32",
          "description": "Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica."
        },
        "secondaryDefaultLoad": {
          "type": "integer",
          "format": "int32",
          "description": "Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica."
        },
        "defaultLoad": {
          "type": "integer",
          "format": "int32",
          "description": "Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric."
        }
      }
    },
    "ServiceLoadMetricWeight": {
      "type": "string",
      "description": "Determines the metric weight relative to the other metrics that are configured for this service. During runtime, if two metrics end up in conflict, the Cluster Resource Manager prefers the metric with the higher weight.",
      "enum": [
        "Zero",
        "Low",
        "Medium",
        "High"
      ],
      "x-ms-enum": {
        "name": "ServiceLoadMetricWeight",
        "modelAsString": true,
        "values": [
          {
            "value": "Zero",
            "description": "Disables resource balancing for this metric. This value is zero."
          },
          {
            "value": "Low",
            "description": "Specifies the metric weight of the service load as Low. The value is 1."
          },
          {
            "value": "Medium",
            "description": "Specifies the metric weight of the service load as Medium. The value is 2."
          },
          {
            "value": "High",
            "description": "Specifies the metric weight of the service load as High. The value is 3."
          }
        ]
      }
    },
    "ServiceLoadMetricsList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ServiceLoadMetricDescription"
      },
      "description": "The service load metrics is given as an array of ServiceLoadMetricDescription objects."
    },
    "ServiceName": {
      "type": "string",
      "description": "The full name of the service with 'fabric:' URI scheme."
    },
    "ServicePlacementPoliciesList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ServicePlacementPolicyDescription"
      },
      "description": "A list that describes the correlation of the service with other services."
    },
    "ServicePlacementPolicyDescription": {
      "type": "object",
      "description": "Describes the policy to be used for placement of a Service Fabric service.",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "$ref": "#/$defs/ServicePlacementPolicyType"
        }
      }
    },
    "ServicePlacementPolicyType": {
      "type": "string",
      "description": "The type of placement policy for a service fabric service. Following are the possible values.",
      "enum": [
        "Invalid",
        "InvalidDomain",
        "RequiredDomain",
        "PreferredPrimaryDomain",
        "RequiredDomainDistribution",
        "NonPartiallyPlaceService"
      ],
      "x-ms-enum": {
        "name": "ServicePlacementPolicyType",
        "modelAsString": true,
        "values": [
          {
            "value": "Invalid",
            "description": "Indicates the type of the placement policy is invalid. All Service Fabric enumerations have the invalid type. The value is zero."
          },
          {
            "value": "InvalidDomain",
            "description": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or upgrade domain cannot be used for placement of this service. The value is 1."
          },
          {
            "value": "RequiredDomain",
            "description": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service must be placed in a specific domain. The value is 2."
          },
          {
            "value": "PreferredPrimaryDomain",
            "description": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the Primary replica for the partitions of the service should be located in a particular domain as an optimization. The value is 3."
          },
          {
            "value": "RequiredDomainDistribution",
            "description": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will disallow placement of any two replicas from the same partition in the same domain at any time. The value is 4."
          },
          {
            "value": "NonPartiallyPlaceService",
            "description": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all replicas of a particular partition of the service should be placed atomically. The value is 5."
          }
        ]
      }
    },
    "ServiceResource": {
      "type": "object",
      "description": "The service resource.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/ServiceResourceProperties"
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/ProxyResource"
        }
      ]
    },
    "ServiceResourceProperties": {
      "type": "object",
      "description": "The service resource properties.",
      "allOf": [
        {
          "$ref": "#/$defs/ServiceResourcePropertiesBase"
        }
      ],
      "required": [
        "serviceKind"
      ],
      "properties": {
        "provisioningState": {
          "readOnly": true,
          "type": "string",
          "description": "The current deployment or provisioning state, which only appears in the response"
        },
        "serviceKind": {
          "$ref": "#/$defs/ServiceKind"
        },
        "serviceTypeName": {
          "type": "string",
          "description": "The name of the service type"
        },
        "partitionDescription": {
          "$ref": "#/$defs/PartitionSchemeDescription"
        },
        "servicePackageActivationMode": {
          "type": "string",
          "description": "The activation Mode of the service package",
          "enum": [
            "SharedProcess",
            "ExclusiveProcess"
          ],
          "x-ms-enum": {
            "name": "ArmServicePackageActivationMode",
            "modelAsString": true,
            "values": [
              {
                "value": "SharedProcess",
                "description": "Indicates the application package activation mode will use shared process."
              },
              {
                "value": "ExclusiveProcess",
                "description": "Indicates the application package activation mode will use exclusive process."
              }
            ]
          }
        },
        "serviceDnsName": {
          "type": "string",
          "description": "Dns name used for the service. If this is specified, then the service can be accessed via its DNS name instead of service name."
        }
      }
    },
    "ServiceResourcePropertiesBase": {
      "type": "object",
      "description": "The common service resource properties.",
      "properties": {
        "placementConstraints": {
          "type": "string",
          "description": "The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: \"NodeColor == blue)\"."
        },
        "correlationScheme": {
          "$ref": "#/$defs/CorrelationSchemeList"
        },
        "serviceLoadMetrics": {
          "$ref": "#/$defs/ServiceLoadMetricsList"
        },
        "servicePlacementPolicies": {
          "$ref": "#/$defs/ServicePlacementPoliciesList"
        },
        "defaultMoveCost": {
          "$ref": "#/$defs/MoveCost"
        }
      }
    },
    "SystemData": {
      "description": "Metadata pertaining to creation and last modification of the resource.",
      "type": "object",
      "readOnly": true,
      "properties": {
        "createdBy": {
          "type": "string",
          "description": "The identity that created the resource."
        },
        "createdByType": {
          "type": "string",
          "description": "The type of identity that created the resource."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource creation (UTC)."
        },
        "lastModifiedBy": {
          "type": "string",
          "description": "The identity that last modified the resource."
        },
        "lastModifiedByType": {
          "type": "string",
          "description": "The type of identity that last modified the resource."
        },
        "lastModifiedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource last modification (UTC)."
        }
      }
    }
  }
}