TaskSpec
Table of Contents
- $containerSpec : TaskSpecContainerSpec|null
- Container spec for the service.
- $forceUpdate : int|null
- A counter that triggers an update even if no relevant parameters have.
- $logDriver : TaskSpecLogDriver|null
- Specifies the log driver to use for tasks created from this spec. If.
- $networkAttachmentSpec : TaskSpecNetworkAttachmentSpec|null
- Read-only spec type for non-swarm containers attached to swarm overlay.
- $networks : array<string|int, NetworkAttachmentConfig>|null
- Specifies which networks the service should attach to.
- $placement : TaskSpecPlacement|null
- $pluginSpec : TaskSpecPluginSpec|null
- Plugin spec for the service. *(Experimental release only.)*.
- $resources : TaskSpecResources|null
- Resource requirements which apply to each individual container created.
- $restartPolicy : TaskSpecRestartPolicy|null
- Specification for the restart policy which applies to containers.
- $runtime : string|null
- Runtime is the type of runtime specified for the task executor.
- getContainerSpec() : TaskSpecContainerSpec|null
- Container spec for the service.
- getForceUpdate() : int|null
- A counter that triggers an update even if no relevant parameters have.
- getLogDriver() : TaskSpecLogDriver|null
- Specifies the log driver to use for tasks created from this spec. If.
- getNetworkAttachmentSpec() : TaskSpecNetworkAttachmentSpec|null
- Read-only spec type for non-swarm containers attached to swarm overlay.
- getNetworks() : array<string|int, NetworkAttachmentConfig>|null
- Specifies which networks the service should attach to.
- getPlacement() : TaskSpecPlacement|null
- getPluginSpec() : TaskSpecPluginSpec|null
- Plugin spec for the service. *(Experimental release only.)*.
- getResources() : TaskSpecResources|null
- Resource requirements which apply to each individual container created.
- getRestartPolicy() : TaskSpecRestartPolicy|null
- Specification for the restart policy which applies to containers.
- getRuntime() : string|null
- Runtime is the type of runtime specified for the task executor.
- setContainerSpec() : self
- Container spec for the service.
- setForceUpdate() : self
- A counter that triggers an update even if no relevant parameters have.
- setLogDriver() : self
- Specifies the log driver to use for tasks created from this spec. If.
- setNetworkAttachmentSpec() : self
- Read-only spec type for non-swarm containers attached to swarm overlay.
- setNetworks() : self
- Specifies which networks the service should attach to.
- setPlacement() : self
- setPluginSpec() : self
- Plugin spec for the service. *(Experimental release only.)*.
- setResources() : self
- Resource requirements which apply to each individual container created.
- setRestartPolicy() : self
- Specification for the restart policy which applies to containers.
- setRuntime() : self
- Runtime is the type of runtime specified for the task executor.
Properties
$containerSpec
Container spec for the service.
protected
TaskSpecContainerSpec|null
$containerSpec
Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
$forceUpdate
A counter that triggers an update even if no relevant parameters have.
protected
int|null
$forceUpdate
$logDriver
Specifies the log driver to use for tasks created from this spec. If.
protected
TaskSpecLogDriver|null
$logDriver
$networkAttachmentSpec
Read-only spec type for non-swarm containers attached to swarm overlay.
protected
TaskSpecNetworkAttachmentSpec|null
$networkAttachmentSpec
Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
$networks
Specifies which networks the service should attach to.
protected
array<string|int, NetworkAttachmentConfig>|null
$networks
$placement
protected
TaskSpecPlacement|null
$placement
$pluginSpec
Plugin spec for the service. *(Experimental release only.)*.
protected
TaskSpecPluginSpec|null
$pluginSpec
Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
$resources
Resource requirements which apply to each individual container created.
protected
TaskSpecResources|null
$resources
$restartPolicy
Specification for the restart policy which applies to containers.
protected
TaskSpecRestartPolicy|null
$restartPolicy
$runtime
Runtime is the type of runtime specified for the task executor.
protected
string|null
$runtime
Methods
getContainerSpec()
Container spec for the service.
public
getContainerSpec() : TaskSpecContainerSpec|null
Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive. PluginSpec is only used when the Runtime field is set to
plugin
. NetworkAttachmentSpec is used when the Runtime field is set toattachment
.
Return values
TaskSpecContainerSpec|null —getForceUpdate()
A counter that triggers an update even if no relevant parameters have.
public
getForceUpdate() : int|null
been changed.
Return values
int|null —getLogDriver()
Specifies the log driver to use for tasks created from this spec. If.
public
getLogDriver() : TaskSpecLogDriver|null
falling back to the engine default if not specified.
Return values
TaskSpecLogDriver|null —getNetworkAttachmentSpec()
Read-only spec type for non-swarm containers attached to swarm overlay.
public
getNetworkAttachmentSpec() : TaskSpecNetworkAttachmentSpec|null
Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive. PluginSpec is only used when the Runtime field is set to
plugin
. NetworkAttachmentSpec is used when the Runtime field is set toattachment
.
Return values
TaskSpecNetworkAttachmentSpec|null —getNetworks()
Specifies which networks the service should attach to.
public
getNetworks() : array<string|int, NetworkAttachmentConfig>|null
Return values
array<string|int, NetworkAttachmentConfig>|null —getPlacement()
public
getPlacement() : TaskSpecPlacement|null
Return values
TaskSpecPlacement|null —getPluginSpec()
Plugin spec for the service. *(Experimental release only.)*.
public
getPluginSpec() : TaskSpecPluginSpec|null
Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive. PluginSpec is only used when the Runtime field is set to
plugin
. NetworkAttachmentSpec is used when the Runtime field is set toattachment
.
Return values
TaskSpecPluginSpec|null —getResources()
Resource requirements which apply to each individual container created.
public
getResources() : TaskSpecResources|null
as part of the service.
Return values
TaskSpecResources|null —getRestartPolicy()
Specification for the restart policy which applies to containers.
public
getRestartPolicy() : TaskSpecRestartPolicy|null
created as part of this service.
Return values
TaskSpecRestartPolicy|null —getRuntime()
Runtime is the type of runtime specified for the task executor.
public
getRuntime() : string|null
Return values
string|null —setContainerSpec()
Container spec for the service.
public
setContainerSpec(TaskSpecContainerSpec|null $containerSpec) : self
Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive. PluginSpec is only used when the Runtime field is set to
plugin
. NetworkAttachmentSpec is used when the Runtime field is set toattachment
.
Parameters
- $containerSpec : TaskSpecContainerSpec|null
Return values
self —setForceUpdate()
A counter that triggers an update even if no relevant parameters have.
public
setForceUpdate(int|null $forceUpdate) : self
been changed.
Parameters
- $forceUpdate : int|null
Return values
self —setLogDriver()
Specifies the log driver to use for tasks created from this spec. If.
public
setLogDriver(TaskSpecLogDriver|null $logDriver) : self
falling back to the engine default if not specified.
Parameters
- $logDriver : TaskSpecLogDriver|null
Return values
self —setNetworkAttachmentSpec()
Read-only spec type for non-swarm containers attached to swarm overlay.
public
setNetworkAttachmentSpec(TaskSpecNetworkAttachmentSpec|null $networkAttachmentSpec) : self
Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive. PluginSpec is only used when the Runtime field is set to
plugin
. NetworkAttachmentSpec is used when the Runtime field is set toattachment
.
Parameters
- $networkAttachmentSpec : TaskSpecNetworkAttachmentSpec|null
Return values
self —setNetworks()
Specifies which networks the service should attach to.
public
setNetworks(array<string|int, NetworkAttachmentConfig>|null $networks) : self
Parameters
- $networks : array<string|int, NetworkAttachmentConfig>|null
Return values
self —setPlacement()
public
setPlacement(TaskSpecPlacement|null $placement) : self
Parameters
- $placement : TaskSpecPlacement|null
Return values
self —setPluginSpec()
Plugin spec for the service. *(Experimental release only.)*.
public
setPluginSpec(TaskSpecPluginSpec|null $pluginSpec) : self
Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive. PluginSpec is only used when the Runtime field is set to
plugin
. NetworkAttachmentSpec is used when the Runtime field is set toattachment
.
Parameters
- $pluginSpec : TaskSpecPluginSpec|null
Return values
self —setResources()
Resource requirements which apply to each individual container created.
public
setResources(TaskSpecResources|null $resources) : self
as part of the service.
Parameters
- $resources : TaskSpecResources|null
Return values
self —setRestartPolicy()
Specification for the restart policy which applies to containers.
public
setRestartPolicy(TaskSpecRestartPolicy|null $restartPolicy) : self
created as part of this service.
Parameters
- $restartPolicy : TaskSpecRestartPolicy|null
Return values
self —setRuntime()
Runtime is the type of runtime specified for the task executor.
public
setRuntime(string|null $runtime) : self
Parameters
- $runtime : string|null