The Update-ServiceFabricService cmdlet updates 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 (using New-ServiceFabricService or New-ServiceFabricServiceFromTemplate). You can get current properties of your service using Get-ServiceFabricServiceDescription.
Please note that updating the properties of a running service is different than upgrading your service using Start-ServiceFabricApplicationUpgrade.Upgrading your service (i.e. application) is a long running background task that involves moving your application, from one version to another, one upgrade domain at a time. Please see
Service Fabric Application Upgrade for more details.
Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.
This command updates the service DNS name of a service.
Note : If the updated DNS name has already been queried on the cluster or the updating service already had a DNS name, DNS service should be restarted after the update to invalidate the cache.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Enables source Secondary replicas to be dropped before new Secondary replicas finish the build.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Stateful
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Force
Forces the command to run without asking for user confirmation.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InstanceCloseDelayDuration
Specifies the duration in seconds, to wait before a stateless instance which is impacted by application upgrade is closed, to allow the active requests to drain gracefully. This wait duration is effective only for the instances of those stateless services which have a non-zero value configured for the InstanceCloseDelayDuration, and will override the pre-configured value. See InstanceCloseDelayDuration for details. Do not specify this parameter for stateful services.
Parameter properties
Type:
TimeSpan
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Stateless
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InstanceCount
Specifies the updated number of instances for the Service Fabric stateless service.
Do not specify this parameter for stateful services.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Stateless
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InstanceLifecycleDescription
Lifecycle description of instances belonging to this service. If some configuration in this section is not specified, the default value is taken from the cluster parameter of the same name (if existing).
Parameter properties
Type:
InstanceLifecycleDescription
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Stateless
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InstanceRestartWaitDuration
When a stateless instance goes down, this timer starts. When it expires Service Fabric will create a new instance on any node in the cluster. This configuration is to reduce unnecessary creation of a new instance in situations where the instance going down is likely to recover in a short time. For example, during an upgrade. The default value is 0, which indicates that when stateless instance goes down, Service Fabric will immediately start building its replacement.
Specifies the updated minimum number of instances of the stateless service partition. See MinInstanceCount (in New-ServiceFabricService) for details. Do not specify this parameter for stateful services.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Stateless
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MinInstancePercentage
Specifies the updated minimum percentage of InstanceCount of a stateless service partition. See MinInstancePercentage (in New-ServiceFabricService) for details. Do not specify this parameter for stateful services.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Stateless
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MinReplicaSetSize
Specifies the updated minimum replica set size for the Service Fabric stateful service. The value must be less than the TargetReplicaSetSize of this service. For more details, see StatefulServiceDescription.MinReplicaSetSize.
Do not specify this parameter for stateless services.
Lifecycle description of replicas belonging to this service. If some configuration in this section is not specified, the default value is taken from the cluster parameter of the same name (if existing).
Parameter properties
Type:
ReplicaLifecycleDescription
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Stateful
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ReplicaRestartWaitDuration
Specifies the updated interval, as a TimeSpan object, that Service Fabric waits for the replica to restart before it creates a replacement replica.
To obtain a TimeSpan object, use the New-TimeSpan cmdlet.
Indicates that the service is a Service Fabric stateful service.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Stateful
Position:
0
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Stateless
Indicates that the service is a Service Fabric stateless service.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Stateless
Position:
0
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-TagsRequiredToPlace
Declares tags required for placement of a service. Useful for dynamically influencing service placement. For more information, see Service Fabric Dynamic Node Tags.
Parameter properties
Type:
System.Collections.Generic.List`1[System.String]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-TagsRequiredToRun
Declares tags required for placement and running of a service. Useful for dynamically influencing service placement and running. For more information, see Service Fabric Dynamic Node Tags
Do not specify this parameter for a stateless service.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Stateful
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-TimeoutSec
Specifies the time-out period, in seconds, for the operation.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Aliases:
wi
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.