v2

latestSwagger 2.0raw.githubusercontent.com2019-06-202346811.1 MB
Service

Updates a Service Fabric service using the specified update description.

This API allows updating properties of a running Service Fabric service. The set of properties that can be updated are a subset of the properties that were specified at the time of creating the service. The current set of properties can be obtained using GetServiceDescription API. Note that updating the properties of a running service is different than upgrading your application using StartApplicationUpgrade API. The upgrade is a long running background operation that involves moving the application from one version to another, one upgrade domain at a time, whereas update applies the new properties immediately to the service.

post/Services/{serviceId}/$/Update

Path parameters

serviceIdstring required

The identity of the service. This ID is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "" character. For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be "myappapp1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions.

Query parameters

api-version'6.0' required

The version of the API. This parameter is required and its value must be '6.0'.

Service Fabric REST API version is based on the runtime version in which the API was introduced or was changed. Service Fabric runtime supports more than one version of the API. This is the latest supported version of the API. If a lower API version is passed, the returned response may be different from the one documented in this specification.

Additionally the runtime accept any version that is higher than the latest supported version up to the current version of the runtime. So if the latest API version is 6.0, but if the runtime is 6.1, in order to make it easier to write the clients, the runtime will accept version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 version.

timeoutinteger

The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds.

Request body

ServiceKind'Invalid' | 'Stateless' | 'Stateful' required

The kind of service (Stateless or Stateful).

Flagsstring

Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, specified below, which, if set, indicate that the property is specified. This property can be a combination of those flags obtained using bitwise 'OR' operator. For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set.

  • None - Does not indicate any other properties are set. The value is zero.
  • TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property (for Stateful services) or the InstanceCount property (for Stateless services) is set. The value is 1.
  • ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The value is 2.
  • QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is 4.
  • StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The value is 8.
  • MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16.
  • PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32.
  • PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is 64.
  • Correlation - Indicates the CorrelationScheme property is set. The value is 128.
  • Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256.
  • DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512.
  • ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024.
PlacementConstraintsstring

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)".

DefaultMoveCost'Zero' | 'Low' | 'Medium' | 'High'

Specifies the move cost for the service.

Response

A successful operation will return 202 status code.