Share via


RestartPolicy.Condition Property

Definition

Specifies the condition under which a service's container will be restarted.

[YamlDotNet.Serialization.YamlMember(Alias="condition")]
public string? Condition { get; set; }
[<YamlDotNet.Serialization.YamlMember(Alias="condition")>]
member this.Condition : string with get, set
Public Property Condition As String

Property Value

Attributes
YamlDotNet.Serialization.YamlMemberAttribute

Remarks

This property determines the criteria for restarting a container. Possible values may include "none", "on-failure", or "any", which dictate when a restart should happen (e.g., never, only on failures, or always).

Applies to