1. Packages
  2. Packages
  3. Docker Provider
  4. API Docs
  5. Service
Viewing docs for Docker v3.6.1 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
docker logo
Viewing docs for Docker v3.6.1 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Import

    Example Assuming you created a service as follows #!/bin/bash docker service create –name foo -p 8080:80 nginx prints th ID 4pcphbxkfn2rffhbhe6czytgi you provide the definition for the resource as follows terraform resource “docker_service” “foo” {

    name = “foo”

    task_spec {

    container_spec {

    image = “nginx”

    }

    }

    endpoint_spec {

    ports {

    target_port

    = “80”

    published_port = “8080”

    }

    } } then the import command is as follows #!/bin/bash

     $ pulumi import docker:index/service:Service foo 4pcphbxkfn2rffhbhe6czytgi
    

    Create Service Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Service(name: string, args: ServiceArgs, opts?: CustomResourceOptions);
    @overload
    def Service(resource_name: str,
                args: ServiceArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Service(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                task_spec: Optional[ServiceTaskSpecArgs] = None,
                auth: Optional[ServiceAuthArgs] = None,
                converge_config: Optional[ServiceConvergeConfigArgs] = None,
                endpoint_spec: Optional[ServiceEndpointSpecArgs] = None,
                labels: Optional[Sequence[ServiceLabelArgs]] = None,
                mode: Optional[ServiceModeArgs] = None,
                name: Optional[str] = None,
                rollback_config: Optional[ServiceRollbackConfigArgs] = None,
                update_config: Optional[ServiceUpdateConfigArgs] = None)
    func NewService(ctx *Context, name string, args ServiceArgs, opts ...ResourceOption) (*Service, error)
    public Service(string name, ServiceArgs args, CustomResourceOptions? opts = null)
    public Service(String name, ServiceArgs args)
    public Service(String name, ServiceArgs args, CustomResourceOptions options)
    
    type: docker:Service
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var serviceResource = new Docker.Service("serviceResource", new()
    {
        TaskSpec = new Docker.Inputs.ServiceTaskSpecArgs
        {
            ContainerSpec = new Docker.Inputs.ServiceTaskSpecContainerSpecArgs
            {
                Image = "string",
                Env = 
                {
                    { "string", "string" },
                },
                Isolation = "string",
                Dir = "string",
                Commands = new[]
                {
                    "string",
                },
                Args = new[]
                {
                    "string",
                },
                Groups = new[]
                {
                    "string",
                },
                Healthcheck = new Docker.Inputs.ServiceTaskSpecContainerSpecHealthcheckArgs
                {
                    Tests = new[]
                    {
                        "string",
                    },
                    Interval = "string",
                    Retries = 0,
                    StartPeriod = "string",
                    Timeout = "string",
                },
                Hostname = "string",
                Configs = new[]
                {
                    new Docker.Inputs.ServiceTaskSpecContainerSpecConfigArgs
                    {
                        ConfigId = "string",
                        FileName = "string",
                        ConfigName = "string",
                        FileGid = "string",
                        FileMode = 0,
                        FileUid = "string",
                    },
                },
                Hosts = new[]
                {
                    new Docker.Inputs.ServiceTaskSpecContainerSpecHostArgs
                    {
                        Host = "string",
                        Ip = "string",
                    },
                },
                DnsConfig = new Docker.Inputs.ServiceTaskSpecContainerSpecDnsConfigArgs
                {
                    Nameservers = new[]
                    {
                        "string",
                    },
                    Options = new[]
                    {
                        "string",
                    },
                    Searches = new[]
                    {
                        "string",
                    },
                },
                Labels = new[]
                {
                    new Docker.Inputs.ServiceTaskSpecContainerSpecLabelArgs
                    {
                        Label = "string",
                        Value = "string",
                    },
                },
                Mounts = new[]
                {
                    new Docker.Inputs.ServiceTaskSpecContainerSpecMountArgs
                    {
                        Target = "string",
                        Type = "string",
                        BindOptions = new Docker.Inputs.ServiceTaskSpecContainerSpecMountBindOptionsArgs
                        {
                            Propagation = "string",
                        },
                        ReadOnly = false,
                        Source = "string",
                        TmpfsOptions = new Docker.Inputs.ServiceTaskSpecContainerSpecMountTmpfsOptionsArgs
                        {
                            Mode = 0,
                            SizeBytes = 0,
                        },
                        VolumeOptions = new Docker.Inputs.ServiceTaskSpecContainerSpecMountVolumeOptionsArgs
                        {
                            DriverName = "string",
                            DriverOptions = 
                            {
                                { "string", "string" },
                            },
                            Labels = new[]
                            {
                                new Docker.Inputs.ServiceTaskSpecContainerSpecMountVolumeOptionsLabelArgs
                                {
                                    Label = "string",
                                    Value = "string",
                                },
                            },
                            NoCopy = false,
                        },
                    },
                },
                Privileges = new Docker.Inputs.ServiceTaskSpecContainerSpecPrivilegesArgs
                {
                    CredentialSpec = new Docker.Inputs.ServiceTaskSpecContainerSpecPrivilegesCredentialSpecArgs
                    {
                        File = "string",
                        Registry = "string",
                    },
                    SeLinuxContext = new Docker.Inputs.ServiceTaskSpecContainerSpecPrivilegesSeLinuxContextArgs
                    {
                        Disable = false,
                        Level = "string",
                        Role = "string",
                        Type = "string",
                        User = "string",
                    },
                },
                ReadOnly = false,
                Secrets = new[]
                {
                    new Docker.Inputs.ServiceTaskSpecContainerSpecSecretArgs
                    {
                        FileName = "string",
                        SecretId = "string",
                        FileGid = "string",
                        FileMode = 0,
                        FileUid = "string",
                        SecretName = "string",
                    },
                },
                StopGracePeriod = "string",
                StopSignal = "string",
                User = "string",
            },
            ForceUpdate = 0,
            LogDriver = new Docker.Inputs.ServiceTaskSpecLogDriverArgs
            {
                Name = "string",
                Options = 
                {
                    { "string", "string" },
                },
            },
            Networks = new[]
            {
                "string",
            },
            Placement = new Docker.Inputs.ServiceTaskSpecPlacementArgs
            {
                Constraints = new[]
                {
                    "string",
                },
                MaxReplicas = 0,
                Platforms = new[]
                {
                    new Docker.Inputs.ServiceTaskSpecPlacementPlatformArgs
                    {
                        Architecture = "string",
                        Os = "string",
                    },
                },
                Prefs = new[]
                {
                    "string",
                },
            },
            Resources = new Docker.Inputs.ServiceTaskSpecResourcesArgs
            {
                Limits = new Docker.Inputs.ServiceTaskSpecResourcesLimitsArgs
                {
                    MemoryBytes = 0,
                    NanoCpus = 0,
                },
                Reservation = new Docker.Inputs.ServiceTaskSpecResourcesReservationArgs
                {
                    GenericResources = new Docker.Inputs.ServiceTaskSpecResourcesReservationGenericResourcesArgs
                    {
                        DiscreteResourcesSpecs = new[]
                        {
                            "string",
                        },
                        NamedResourcesSpecs = new[]
                        {
                            "string",
                        },
                    },
                    MemoryBytes = 0,
                    NanoCpus = 0,
                },
            },
            RestartPolicy = new Docker.Inputs.ServiceTaskSpecRestartPolicyArgs
            {
                Condition = "string",
                Delay = "string",
                MaxAttempts = 0,
                Window = "string",
            },
            Runtime = "string",
        },
        Auth = new Docker.Inputs.ServiceAuthArgs
        {
            ServerAddress = "string",
            Password = "string",
            Username = "string",
        },
        ConvergeConfig = new Docker.Inputs.ServiceConvergeConfigArgs
        {
            Delay = "string",
            Timeout = "string",
        },
        EndpointSpec = new Docker.Inputs.ServiceEndpointSpecArgs
        {
            Mode = "string",
            Ports = new[]
            {
                new Docker.Inputs.ServiceEndpointSpecPortArgs
                {
                    TargetPort = 0,
                    Name = "string",
                    Protocol = "string",
                    PublishMode = "string",
                    PublishedPort = 0,
                },
            },
        },
        Labels = new[]
        {
            new Docker.Inputs.ServiceLabelArgs
            {
                Label = "string",
                Value = "string",
            },
        },
        Mode = new Docker.Inputs.ServiceModeArgs
        {
            Global = false,
            Replicated = new Docker.Inputs.ServiceModeReplicatedArgs
            {
                Replicas = 0,
            },
        },
        Name = "string",
        RollbackConfig = new Docker.Inputs.ServiceRollbackConfigArgs
        {
            Delay = "string",
            FailureAction = "string",
            MaxFailureRatio = "string",
            Monitor = "string",
            Order = "string",
            Parallelism = 0,
        },
        UpdateConfig = new Docker.Inputs.ServiceUpdateConfigArgs
        {
            Delay = "string",
            FailureAction = "string",
            MaxFailureRatio = "string",
            Monitor = "string",
            Order = "string",
            Parallelism = 0,
        },
    });
    
    example, err := docker.NewService(ctx, "serviceResource", &docker.ServiceArgs{
    	TaskSpec: &docker.ServiceTaskSpecArgs{
    		ContainerSpec: &docker.ServiceTaskSpecContainerSpecArgs{
    			Image: pulumi.String("string"),
    			Env: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			Isolation: pulumi.String("string"),
    			Dir:       pulumi.String("string"),
    			Commands: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Args: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Groups: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Healthcheck: &docker.ServiceTaskSpecContainerSpecHealthcheckArgs{
    				Tests: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Interval:    pulumi.String("string"),
    				Retries:     pulumi.Int(0),
    				StartPeriod: pulumi.String("string"),
    				Timeout:     pulumi.String("string"),
    			},
    			Hostname: pulumi.String("string"),
    			Configs: docker.ServiceTaskSpecContainerSpecConfigArray{
    				&docker.ServiceTaskSpecContainerSpecConfigArgs{
    					ConfigId:   pulumi.String("string"),
    					FileName:   pulumi.String("string"),
    					ConfigName: pulumi.String("string"),
    					FileGid:    pulumi.String("string"),
    					FileMode:   pulumi.Int(0),
    					FileUid:    pulumi.String("string"),
    				},
    			},
    			Hosts: docker.ServiceTaskSpecContainerSpecHostArray{
    				&docker.ServiceTaskSpecContainerSpecHostArgs{
    					Host: pulumi.String("string"),
    					Ip:   pulumi.String("string"),
    				},
    			},
    			DnsConfig: &docker.ServiceTaskSpecContainerSpecDnsConfigArgs{
    				Nameservers: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Options: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Searches: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    			Labels: docker.ServiceTaskSpecContainerSpecLabelArray{
    				&docker.ServiceTaskSpecContainerSpecLabelArgs{
    					Label: pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    			Mounts: docker.ServiceTaskSpecContainerSpecMountArray{
    				&docker.ServiceTaskSpecContainerSpecMountArgs{
    					Target: pulumi.String("string"),
    					Type:   pulumi.String("string"),
    					BindOptions: &docker.ServiceTaskSpecContainerSpecMountBindOptionsArgs{
    						Propagation: pulumi.String("string"),
    					},
    					ReadOnly: pulumi.Bool(false),
    					Source:   pulumi.String("string"),
    					TmpfsOptions: &docker.ServiceTaskSpecContainerSpecMountTmpfsOptionsArgs{
    						Mode:      pulumi.Int(0),
    						SizeBytes: pulumi.Int(0),
    					},
    					VolumeOptions: &docker.ServiceTaskSpecContainerSpecMountVolumeOptionsArgs{
    						DriverName: pulumi.String("string"),
    						DriverOptions: pulumi.StringMap{
    							"string": pulumi.String("string"),
    						},
    						Labels: docker.ServiceTaskSpecContainerSpecMountVolumeOptionsLabelArray{
    							&docker.ServiceTaskSpecContainerSpecMountVolumeOptionsLabelArgs{
    								Label: pulumi.String("string"),
    								Value: pulumi.String("string"),
    							},
    						},
    						NoCopy: pulumi.Bool(false),
    					},
    				},
    			},
    			Privileges: &docker.ServiceTaskSpecContainerSpecPrivilegesArgs{
    				CredentialSpec: &docker.ServiceTaskSpecContainerSpecPrivilegesCredentialSpecArgs{
    					File:     pulumi.String("string"),
    					Registry: pulumi.String("string"),
    				},
    				SeLinuxContext: &docker.ServiceTaskSpecContainerSpecPrivilegesSeLinuxContextArgs{
    					Disable: pulumi.Bool(false),
    					Level:   pulumi.String("string"),
    					Role:    pulumi.String("string"),
    					Type:    pulumi.String("string"),
    					User:    pulumi.String("string"),
    				},
    			},
    			ReadOnly: pulumi.Bool(false),
    			Secrets: docker.ServiceTaskSpecContainerSpecSecretArray{
    				&docker.ServiceTaskSpecContainerSpecSecretArgs{
    					FileName:   pulumi.String("string"),
    					SecretId:   pulumi.String("string"),
    					FileGid:    pulumi.String("string"),
    					FileMode:   pulumi.Int(0),
    					FileUid:    pulumi.String("string"),
    					SecretName: pulumi.String("string"),
    				},
    			},
    			StopGracePeriod: pulumi.String("string"),
    			StopSignal:      pulumi.String("string"),
    			User:            pulumi.String("string"),
    		},
    		ForceUpdate: pulumi.Int(0),
    		LogDriver: &docker.ServiceTaskSpecLogDriverArgs{
    			Name: pulumi.String("string"),
    			Options: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    		},
    		Networks: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Placement: &docker.ServiceTaskSpecPlacementArgs{
    			Constraints: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			MaxReplicas: pulumi.Int(0),
    			Platforms: docker.ServiceTaskSpecPlacementPlatformArray{
    				&docker.ServiceTaskSpecPlacementPlatformArgs{
    					Architecture: pulumi.String("string"),
    					Os:           pulumi.String("string"),
    				},
    			},
    			Prefs: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		Resources: &docker.ServiceTaskSpecResourcesArgs{
    			Limits: &docker.ServiceTaskSpecResourcesLimitsArgs{
    				MemoryBytes: pulumi.Int(0),
    				NanoCpus:    pulumi.Int(0),
    			},
    			Reservation: &docker.ServiceTaskSpecResourcesReservationArgs{
    				GenericResources: &docker.ServiceTaskSpecResourcesReservationGenericResourcesArgs{
    					DiscreteResourcesSpecs: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					NamedResourcesSpecs: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    				MemoryBytes: pulumi.Int(0),
    				NanoCpus:    pulumi.Int(0),
    			},
    		},
    		RestartPolicy: &docker.ServiceTaskSpecRestartPolicyArgs{
    			Condition:   pulumi.String("string"),
    			Delay:       pulumi.String("string"),
    			MaxAttempts: pulumi.Int(0),
    			Window:      pulumi.String("string"),
    		},
    		Runtime: pulumi.String("string"),
    	},
    	Auth: &docker.ServiceAuthArgs{
    		ServerAddress: pulumi.String("string"),
    		Password:      pulumi.String("string"),
    		Username:      pulumi.String("string"),
    	},
    	ConvergeConfig: &docker.ServiceConvergeConfigArgs{
    		Delay:   pulumi.String("string"),
    		Timeout: pulumi.String("string"),
    	},
    	EndpointSpec: &docker.ServiceEndpointSpecArgs{
    		Mode: pulumi.String("string"),
    		Ports: docker.ServiceEndpointSpecPortArray{
    			&docker.ServiceEndpointSpecPortArgs{
    				TargetPort:    pulumi.Int(0),
    				Name:          pulumi.String("string"),
    				Protocol:      pulumi.String("string"),
    				PublishMode:   pulumi.String("string"),
    				PublishedPort: pulumi.Int(0),
    			},
    		},
    	},
    	Labels: docker.ServiceLabelArray{
    		&docker.ServiceLabelArgs{
    			Label: pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	Mode: &docker.ServiceModeArgs{
    		Global: pulumi.Bool(false),
    		Replicated: &docker.ServiceModeReplicatedArgs{
    			Replicas: pulumi.Int(0),
    		},
    	},
    	Name: pulumi.String("string"),
    	RollbackConfig: &docker.ServiceRollbackConfigArgs{
    		Delay:           pulumi.String("string"),
    		FailureAction:   pulumi.String("string"),
    		MaxFailureRatio: pulumi.String("string"),
    		Monitor:         pulumi.String("string"),
    		Order:           pulumi.String("string"),
    		Parallelism:     pulumi.Int(0),
    	},
    	UpdateConfig: &docker.ServiceUpdateConfigArgs{
    		Delay:           pulumi.String("string"),
    		FailureAction:   pulumi.String("string"),
    		MaxFailureRatio: pulumi.String("string"),
    		Monitor:         pulumi.String("string"),
    		Order:           pulumi.String("string"),
    		Parallelism:     pulumi.Int(0),
    	},
    })
    
    var serviceResource = new Service("serviceResource", ServiceArgs.builder()
        .taskSpec(ServiceTaskSpecArgs.builder()
            .containerSpec(ServiceTaskSpecContainerSpecArgs.builder()
                .image("string")
                .env(Map.of("string", "string"))
                .isolation("string")
                .dir("string")
                .commands("string")
                .args("string")
                .groups("string")
                .healthcheck(ServiceTaskSpecContainerSpecHealthcheckArgs.builder()
                    .tests("string")
                    .interval("string")
                    .retries(0)
                    .startPeriod("string")
                    .timeout("string")
                    .build())
                .hostname("string")
                .configs(ServiceTaskSpecContainerSpecConfigArgs.builder()
                    .configId("string")
                    .fileName("string")
                    .configName("string")
                    .fileGid("string")
                    .fileMode(0)
                    .fileUid("string")
                    .build())
                .hosts(ServiceTaskSpecContainerSpecHostArgs.builder()
                    .host("string")
                    .ip("string")
                    .build())
                .dnsConfig(ServiceTaskSpecContainerSpecDnsConfigArgs.builder()
                    .nameservers("string")
                    .options("string")
                    .searches("string")
                    .build())
                .labels(ServiceTaskSpecContainerSpecLabelArgs.builder()
                    .label("string")
                    .value("string")
                    .build())
                .mounts(ServiceTaskSpecContainerSpecMountArgs.builder()
                    .target("string")
                    .type("string")
                    .bindOptions(ServiceTaskSpecContainerSpecMountBindOptionsArgs.builder()
                        .propagation("string")
                        .build())
                    .readOnly(false)
                    .source("string")
                    .tmpfsOptions(ServiceTaskSpecContainerSpecMountTmpfsOptionsArgs.builder()
                        .mode(0)
                        .sizeBytes(0)
                        .build())
                    .volumeOptions(ServiceTaskSpecContainerSpecMountVolumeOptionsArgs.builder()
                        .driverName("string")
                        .driverOptions(Map.of("string", "string"))
                        .labels(ServiceTaskSpecContainerSpecMountVolumeOptionsLabelArgs.builder()
                            .label("string")
                            .value("string")
                            .build())
                        .noCopy(false)
                        .build())
                    .build())
                .privileges(ServiceTaskSpecContainerSpecPrivilegesArgs.builder()
                    .credentialSpec(ServiceTaskSpecContainerSpecPrivilegesCredentialSpecArgs.builder()
                        .file("string")
                        .registry("string")
                        .build())
                    .seLinuxContext(ServiceTaskSpecContainerSpecPrivilegesSeLinuxContextArgs.builder()
                        .disable(false)
                        .level("string")
                        .role("string")
                        .type("string")
                        .user("string")
                        .build())
                    .build())
                .readOnly(false)
                .secrets(ServiceTaskSpecContainerSpecSecretArgs.builder()
                    .fileName("string")
                    .secretId("string")
                    .fileGid("string")
                    .fileMode(0)
                    .fileUid("string")
                    .secretName("string")
                    .build())
                .stopGracePeriod("string")
                .stopSignal("string")
                .user("string")
                .build())
            .forceUpdate(0)
            .logDriver(ServiceTaskSpecLogDriverArgs.builder()
                .name("string")
                .options(Map.of("string", "string"))
                .build())
            .networks("string")
            .placement(ServiceTaskSpecPlacementArgs.builder()
                .constraints("string")
                .maxReplicas(0)
                .platforms(ServiceTaskSpecPlacementPlatformArgs.builder()
                    .architecture("string")
                    .os("string")
                    .build())
                .prefs("string")
                .build())
            .resources(ServiceTaskSpecResourcesArgs.builder()
                .limits(ServiceTaskSpecResourcesLimitsArgs.builder()
                    .memoryBytes(0)
                    .nanoCpus(0)
                    .build())
                .reservation(ServiceTaskSpecResourcesReservationArgs.builder()
                    .genericResources(ServiceTaskSpecResourcesReservationGenericResourcesArgs.builder()
                        .discreteResourcesSpecs("string")
                        .namedResourcesSpecs("string")
                        .build())
                    .memoryBytes(0)
                    .nanoCpus(0)
                    .build())
                .build())
            .restartPolicy(ServiceTaskSpecRestartPolicyArgs.builder()
                .condition("string")
                .delay("string")
                .maxAttempts(0)
                .window("string")
                .build())
            .runtime("string")
            .build())
        .auth(ServiceAuthArgs.builder()
            .serverAddress("string")
            .password("string")
            .username("string")
            .build())
        .convergeConfig(ServiceConvergeConfigArgs.builder()
            .delay("string")
            .timeout("string")
            .build())
        .endpointSpec(ServiceEndpointSpecArgs.builder()
            .mode("string")
            .ports(ServiceEndpointSpecPortArgs.builder()
                .targetPort(0)
                .name("string")
                .protocol("string")
                .publishMode("string")
                .publishedPort(0)
                .build())
            .build())
        .labels(ServiceLabelArgs.builder()
            .label("string")
            .value("string")
            .build())
        .mode(ServiceModeArgs.builder()
            .global(false)
            .replicated(ServiceModeReplicatedArgs.builder()
                .replicas(0)
                .build())
            .build())
        .name("string")
        .rollbackConfig(ServiceRollbackConfigArgs.builder()
            .delay("string")
            .failureAction("string")
            .maxFailureRatio("string")
            .monitor("string")
            .order("string")
            .parallelism(0)
            .build())
        .updateConfig(ServiceUpdateConfigArgs.builder()
            .delay("string")
            .failureAction("string")
            .maxFailureRatio("string")
            .monitor("string")
            .order("string")
            .parallelism(0)
            .build())
        .build());
    
    service_resource = docker.Service("serviceResource",
        task_spec={
            "container_spec": {
                "image": "string",
                "env": {
                    "string": "string",
                },
                "isolation": "string",
                "dir": "string",
                "commands": ["string"],
                "args": ["string"],
                "groups": ["string"],
                "healthcheck": {
                    "tests": ["string"],
                    "interval": "string",
                    "retries": 0,
                    "start_period": "string",
                    "timeout": "string",
                },
                "hostname": "string",
                "configs": [{
                    "config_id": "string",
                    "file_name": "string",
                    "config_name": "string",
                    "file_gid": "string",
                    "file_mode": 0,
                    "file_uid": "string",
                }],
                "hosts": [{
                    "host": "string",
                    "ip": "string",
                }],
                "dns_config": {
                    "nameservers": ["string"],
                    "options": ["string"],
                    "searches": ["string"],
                },
                "labels": [{
                    "label": "string",
                    "value": "string",
                }],
                "mounts": [{
                    "target": "string",
                    "type": "string",
                    "bind_options": {
                        "propagation": "string",
                    },
                    "read_only": False,
                    "source": "string",
                    "tmpfs_options": {
                        "mode": 0,
                        "size_bytes": 0,
                    },
                    "volume_options": {
                        "driver_name": "string",
                        "driver_options": {
                            "string": "string",
                        },
                        "labels": [{
                            "label": "string",
                            "value": "string",
                        }],
                        "no_copy": False,
                    },
                }],
                "privileges": {
                    "credential_spec": {
                        "file": "string",
                        "registry": "string",
                    },
                    "se_linux_context": {
                        "disable": False,
                        "level": "string",
                        "role": "string",
                        "type": "string",
                        "user": "string",
                    },
                },
                "read_only": False,
                "secrets": [{
                    "file_name": "string",
                    "secret_id": "string",
                    "file_gid": "string",
                    "file_mode": 0,
                    "file_uid": "string",
                    "secret_name": "string",
                }],
                "stop_grace_period": "string",
                "stop_signal": "string",
                "user": "string",
            },
            "force_update": 0,
            "log_driver": {
                "name": "string",
                "options": {
                    "string": "string",
                },
            },
            "networks": ["string"],
            "placement": {
                "constraints": ["string"],
                "max_replicas": 0,
                "platforms": [{
                    "architecture": "string",
                    "os": "string",
                }],
                "prefs": ["string"],
            },
            "resources": {
                "limits": {
                    "memory_bytes": 0,
                    "nano_cpus": 0,
                },
                "reservation": {
                    "generic_resources": {
                        "discrete_resources_specs": ["string"],
                        "named_resources_specs": ["string"],
                    },
                    "memory_bytes": 0,
                    "nano_cpus": 0,
                },
            },
            "restart_policy": {
                "condition": "string",
                "delay": "string",
                "max_attempts": 0,
                "window": "string",
            },
            "runtime": "string",
        },
        auth={
            "server_address": "string",
            "password": "string",
            "username": "string",
        },
        converge_config={
            "delay": "string",
            "timeout": "string",
        },
        endpoint_spec={
            "mode": "string",
            "ports": [{
                "target_port": 0,
                "name": "string",
                "protocol": "string",
                "publish_mode": "string",
                "published_port": 0,
            }],
        },
        labels=[{
            "label": "string",
            "value": "string",
        }],
        mode={
            "global_": False,
            "replicated": {
                "replicas": 0,
            },
        },
        name="string",
        rollback_config={
            "delay": "string",
            "failure_action": "string",
            "max_failure_ratio": "string",
            "monitor": "string",
            "order": "string",
            "parallelism": 0,
        },
        update_config={
            "delay": "string",
            "failure_action": "string",
            "max_failure_ratio": "string",
            "monitor": "string",
            "order": "string",
            "parallelism": 0,
        })
    
    const serviceResource = new docker.Service("serviceResource", {
        taskSpec: {
            containerSpec: {
                image: "string",
                env: {
                    string: "string",
                },
                isolation: "string",
                dir: "string",
                commands: ["string"],
                args: ["string"],
                groups: ["string"],
                healthcheck: {
                    tests: ["string"],
                    interval: "string",
                    retries: 0,
                    startPeriod: "string",
                    timeout: "string",
                },
                hostname: "string",
                configs: [{
                    configId: "string",
                    fileName: "string",
                    configName: "string",
                    fileGid: "string",
                    fileMode: 0,
                    fileUid: "string",
                }],
                hosts: [{
                    host: "string",
                    ip: "string",
                }],
                dnsConfig: {
                    nameservers: ["string"],
                    options: ["string"],
                    searches: ["string"],
                },
                labels: [{
                    label: "string",
                    value: "string",
                }],
                mounts: [{
                    target: "string",
                    type: "string",
                    bindOptions: {
                        propagation: "string",
                    },
                    readOnly: false,
                    source: "string",
                    tmpfsOptions: {
                        mode: 0,
                        sizeBytes: 0,
                    },
                    volumeOptions: {
                        driverName: "string",
                        driverOptions: {
                            string: "string",
                        },
                        labels: [{
                            label: "string",
                            value: "string",
                        }],
                        noCopy: false,
                    },
                }],
                privileges: {
                    credentialSpec: {
                        file: "string",
                        registry: "string",
                    },
                    seLinuxContext: {
                        disable: false,
                        level: "string",
                        role: "string",
                        type: "string",
                        user: "string",
                    },
                },
                readOnly: false,
                secrets: [{
                    fileName: "string",
                    secretId: "string",
                    fileGid: "string",
                    fileMode: 0,
                    fileUid: "string",
                    secretName: "string",
                }],
                stopGracePeriod: "string",
                stopSignal: "string",
                user: "string",
            },
            forceUpdate: 0,
            logDriver: {
                name: "string",
                options: {
                    string: "string",
                },
            },
            networks: ["string"],
            placement: {
                constraints: ["string"],
                maxReplicas: 0,
                platforms: [{
                    architecture: "string",
                    os: "string",
                }],
                prefs: ["string"],
            },
            resources: {
                limits: {
                    memoryBytes: 0,
                    nanoCpus: 0,
                },
                reservation: {
                    genericResources: {
                        discreteResourcesSpecs: ["string"],
                        namedResourcesSpecs: ["string"],
                    },
                    memoryBytes: 0,
                    nanoCpus: 0,
                },
            },
            restartPolicy: {
                condition: "string",
                delay: "string",
                maxAttempts: 0,
                window: "string",
            },
            runtime: "string",
        },
        auth: {
            serverAddress: "string",
            password: "string",
            username: "string",
        },
        convergeConfig: {
            delay: "string",
            timeout: "string",
        },
        endpointSpec: {
            mode: "string",
            ports: [{
                targetPort: 0,
                name: "string",
                protocol: "string",
                publishMode: "string",
                publishedPort: 0,
            }],
        },
        labels: [{
            label: "string",
            value: "string",
        }],
        mode: {
            global: false,
            replicated: {
                replicas: 0,
            },
        },
        name: "string",
        rollbackConfig: {
            delay: "string",
            failureAction: "string",
            maxFailureRatio: "string",
            monitor: "string",
            order: "string",
            parallelism: 0,
        },
        updateConfig: {
            delay: "string",
            failureAction: "string",
            maxFailureRatio: "string",
            monitor: "string",
            order: "string",
            parallelism: 0,
        },
    });
    
    type: docker:Service
    properties:
        auth:
            password: string
            serverAddress: string
            username: string
        convergeConfig:
            delay: string
            timeout: string
        endpointSpec:
            mode: string
            ports:
                - name: string
                  protocol: string
                  publishMode: string
                  publishedPort: 0
                  targetPort: 0
        labels:
            - label: string
              value: string
        mode:
            global: false
            replicated:
                replicas: 0
        name: string
        rollbackConfig:
            delay: string
            failureAction: string
            maxFailureRatio: string
            monitor: string
            order: string
            parallelism: 0
        taskSpec:
            containerSpec:
                args:
                    - string
                commands:
                    - string
                configs:
                    - configId: string
                      configName: string
                      fileGid: string
                      fileMode: 0
                      fileName: string
                      fileUid: string
                dir: string
                dnsConfig:
                    nameservers:
                        - string
                    options:
                        - string
                    searches:
                        - string
                env:
                    string: string
                groups:
                    - string
                healthcheck:
                    interval: string
                    retries: 0
                    startPeriod: string
                    tests:
                        - string
                    timeout: string
                hostname: string
                hosts:
                    - host: string
                      ip: string
                image: string
                isolation: string
                labels:
                    - label: string
                      value: string
                mounts:
                    - bindOptions:
                        propagation: string
                      readOnly: false
                      source: string
                      target: string
                      tmpfsOptions:
                        mode: 0
                        sizeBytes: 0
                      type: string
                      volumeOptions:
                        driverName: string
                        driverOptions:
                            string: string
                        labels:
                            - label: string
                              value: string
                        noCopy: false
                privileges:
                    credentialSpec:
                        file: string
                        registry: string
                    seLinuxContext:
                        disable: false
                        level: string
                        role: string
                        type: string
                        user: string
                readOnly: false
                secrets:
                    - fileGid: string
                      fileMode: 0
                      fileName: string
                      fileUid: string
                      secretId: string
                      secretName: string
                stopGracePeriod: string
                stopSignal: string
                user: string
            forceUpdate: 0
            logDriver:
                name: string
                options:
                    string: string
            networks:
                - string
            placement:
                constraints:
                    - string
                maxReplicas: 0
                platforms:
                    - architecture: string
                      os: string
                prefs:
                    - string
            resources:
                limits:
                    memoryBytes: 0
                    nanoCpus: 0
                reservation:
                    genericResources:
                        discreteResourcesSpecs:
                            - string
                        namedResourcesSpecs:
                            - string
                    memoryBytes: 0
                    nanoCpus: 0
            restartPolicy:
                condition: string
                delay: string
                maxAttempts: 0
                window: string
            runtime: string
        updateConfig:
            delay: string
            failureAction: string
            maxFailureRatio: string
            monitor: string
            order: string
            parallelism: 0
    

    Service Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Service resource accepts the following input properties:

    TaskSpec ServiceTaskSpec
    User modifiable task configuration
    Auth ServiceAuth
    Configuration for the authentication for pulling the images of the service
    ConvergeConfig ServiceConvergeConfig
    A configuration to ensure that a service converges aka reaches the desired that of all task up and running
    EndpointSpec ServiceEndpointSpec
    Properties that can be configured to access and load balance a service
    Labels List<ServiceLabel>
    User-defined key/value metadata
    Mode ServiceMode
    Scheduling mode for the service
    Name string
    Name of the service
    RollbackConfig ServiceRollbackConfig
    Specification for the rollback strategy of the service
    UpdateConfig ServiceUpdateConfig
    Specification for the update strategy of the service
    TaskSpec ServiceTaskSpecArgs
    User modifiable task configuration
    Auth ServiceAuthArgs
    Configuration for the authentication for pulling the images of the service
    ConvergeConfig ServiceConvergeConfigArgs
    A configuration to ensure that a service converges aka reaches the desired that of all task up and running
    EndpointSpec ServiceEndpointSpecArgs
    Properties that can be configured to access and load balance a service
    Labels []ServiceLabelArgs
    User-defined key/value metadata
    Mode ServiceModeArgs
    Scheduling mode for the service
    Name string
    Name of the service
    RollbackConfig ServiceRollbackConfigArgs
    Specification for the rollback strategy of the service
    UpdateConfig ServiceUpdateConfigArgs
    Specification for the update strategy of the service
    taskSpec ServiceTaskSpec
    User modifiable task configuration
    auth ServiceAuth
    Configuration for the authentication for pulling the images of the service
    convergeConfig ServiceConvergeConfig
    A configuration to ensure that a service converges aka reaches the desired that of all task up and running
    endpointSpec ServiceEndpointSpec
    Properties that can be configured to access and load balance a service
    labels List<ServiceLabel>
    User-defined key/value metadata
    mode ServiceMode
    Scheduling mode for the service
    name String
    Name of the service
    rollbackConfig ServiceRollbackConfig
    Specification for the rollback strategy of the service
    updateConfig ServiceUpdateConfig
    Specification for the update strategy of the service
    taskSpec ServiceTaskSpec
    User modifiable task configuration
    auth ServiceAuth
    Configuration for the authentication for pulling the images of the service
    convergeConfig ServiceConvergeConfig
    A configuration to ensure that a service converges aka reaches the desired that of all task up and running
    endpointSpec ServiceEndpointSpec
    Properties that can be configured to access and load balance a service
    labels ServiceLabel[]
    User-defined key/value metadata
    mode ServiceMode
    Scheduling mode for the service
    name string
    Name of the service
    rollbackConfig ServiceRollbackConfig
    Specification for the rollback strategy of the service
    updateConfig ServiceUpdateConfig
    Specification for the update strategy of the service
    task_spec ServiceTaskSpecArgs
    User modifiable task configuration
    auth ServiceAuthArgs
    Configuration for the authentication for pulling the images of the service
    converge_config ServiceConvergeConfigArgs
    A configuration to ensure that a service converges aka reaches the desired that of all task up and running
    endpoint_spec ServiceEndpointSpecArgs
    Properties that can be configured to access and load balance a service
    labels Sequence[ServiceLabelArgs]
    User-defined key/value metadata
    mode ServiceModeArgs
    Scheduling mode for the service
    name str
    Name of the service
    rollback_config ServiceRollbackConfigArgs
    Specification for the rollback strategy of the service
    update_config ServiceUpdateConfigArgs
    Specification for the update strategy of the service
    taskSpec Property Map
    User modifiable task configuration
    auth Property Map
    Configuration for the authentication for pulling the images of the service
    convergeConfig Property Map
    A configuration to ensure that a service converges aka reaches the desired that of all task up and running
    endpointSpec Property Map
    Properties that can be configured to access and load balance a service
    labels List<Property Map>
    User-defined key/value metadata
    mode Property Map
    Scheduling mode for the service
    name String
    Name of the service
    rollbackConfig Property Map
    Specification for the rollback strategy of the service
    updateConfig Property Map
    Specification for the update strategy of the service

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Service resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Service Resource

    Get an existing Service resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ServiceState, opts?: CustomResourceOptions): Service
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auth: Optional[ServiceAuthArgs] = None,
            converge_config: Optional[ServiceConvergeConfigArgs] = None,
            endpoint_spec: Optional[ServiceEndpointSpecArgs] = None,
            labels: Optional[Sequence[ServiceLabelArgs]] = None,
            mode: Optional[ServiceModeArgs] = None,
            name: Optional[str] = None,
            rollback_config: Optional[ServiceRollbackConfigArgs] = None,
            task_spec: Optional[ServiceTaskSpecArgs] = None,
            update_config: Optional[ServiceUpdateConfigArgs] = None) -> Service
    func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)
    public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)
    public static Service get(String name, Output<String> id, ServiceState state, CustomResourceOptions options)
    resources:  _:    type: docker:Service    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Auth ServiceAuth
    Configuration for the authentication for pulling the images of the service
    ConvergeConfig ServiceConvergeConfig
    A configuration to ensure that a service converges aka reaches the desired that of all task up and running
    EndpointSpec ServiceEndpointSpec
    Properties that can be configured to access and load balance a service
    Labels List<ServiceLabel>
    User-defined key/value metadata
    Mode ServiceMode
    Scheduling mode for the service
    Name string
    Name of the service
    RollbackConfig ServiceRollbackConfig
    Specification for the rollback strategy of the service
    TaskSpec ServiceTaskSpec
    User modifiable task configuration
    UpdateConfig ServiceUpdateConfig
    Specification for the update strategy of the service
    Auth ServiceAuthArgs
    Configuration for the authentication for pulling the images of the service
    ConvergeConfig ServiceConvergeConfigArgs
    A configuration to ensure that a service converges aka reaches the desired that of all task up and running
    EndpointSpec ServiceEndpointSpecArgs
    Properties that can be configured to access and load balance a service
    Labels []ServiceLabelArgs
    User-defined key/value metadata
    Mode ServiceModeArgs
    Scheduling mode for the service
    Name string
    Name of the service
    RollbackConfig ServiceRollbackConfigArgs
    Specification for the rollback strategy of the service
    TaskSpec ServiceTaskSpecArgs
    User modifiable task configuration
    UpdateConfig ServiceUpdateConfigArgs
    Specification for the update strategy of the service
    auth ServiceAuth
    Configuration for the authentication for pulling the images of the service
    convergeConfig ServiceConvergeConfig
    A configuration to ensure that a service converges aka reaches the desired that of all task up and running
    endpointSpec ServiceEndpointSpec
    Properties that can be configured to access and load balance a service
    labels List<ServiceLabel>
    User-defined key/value metadata
    mode ServiceMode
    Scheduling mode for the service
    name String
    Name of the service
    rollbackConfig ServiceRollbackConfig
    Specification for the rollback strategy of the service
    taskSpec ServiceTaskSpec
    User modifiable task configuration
    updateConfig ServiceUpdateConfig
    Specification for the update strategy of the service
    auth ServiceAuth
    Configuration for the authentication for pulling the images of the service
    convergeConfig ServiceConvergeConfig
    A configuration to ensure that a service converges aka reaches the desired that of all task up and running
    endpointSpec ServiceEndpointSpec
    Properties that can be configured to access and load balance a service
    labels ServiceLabel[]
    User-defined key/value metadata
    mode ServiceMode
    Scheduling mode for the service
    name string
    Name of the service
    rollbackConfig ServiceRollbackConfig
    Specification for the rollback strategy of the service
    taskSpec ServiceTaskSpec
    User modifiable task configuration
    updateConfig ServiceUpdateConfig
    Specification for the update strategy of the service
    auth ServiceAuthArgs
    Configuration for the authentication for pulling the images of the service
    converge_config ServiceConvergeConfigArgs
    A configuration to ensure that a service converges aka reaches the desired that of all task up and running
    endpoint_spec ServiceEndpointSpecArgs
    Properties that can be configured to access and load balance a service
    labels Sequence[ServiceLabelArgs]
    User-defined key/value metadata
    mode ServiceModeArgs
    Scheduling mode for the service
    name str
    Name of the service
    rollback_config ServiceRollbackConfigArgs
    Specification for the rollback strategy of the service
    task_spec ServiceTaskSpecArgs
    User modifiable task configuration
    update_config ServiceUpdateConfigArgs
    Specification for the update strategy of the service
    auth Property Map
    Configuration for the authentication for pulling the images of the service
    convergeConfig Property Map
    A configuration to ensure that a service converges aka reaches the desired that of all task up and running
    endpointSpec Property Map
    Properties that can be configured to access and load balance a service
    labels List<Property Map>
    User-defined key/value metadata
    mode Property Map
    Scheduling mode for the service
    name String
    Name of the service
    rollbackConfig Property Map
    Specification for the rollback strategy of the service
    taskSpec Property Map
    User modifiable task configuration
    updateConfig Property Map
    Specification for the update strategy of the service

    Supporting Types

    ServiceAuth, ServiceAuthArgs

    ServerAddress string
    The address of the server for the authentication
    Password string
    The password
    Username string
    The username
    ServerAddress string
    The address of the server for the authentication
    Password string
    The password
    Username string
    The username
    serverAddress String
    The address of the server for the authentication
    password String
    The password
    username String
    The username
    serverAddress string
    The address of the server for the authentication
    password string
    The password
    username string
    The username
    server_address str
    The address of the server for the authentication
    password str
    The password
    username str
    The username
    serverAddress String
    The address of the server for the authentication
    password String
    The password
    username String
    The username

    ServiceConvergeConfig, ServiceConvergeConfigArgs

    Delay string
    The interval to check if the desired state is reached (ms|s). Defaults to 7s.
    Timeout string
    The timeout of the service to reach the desired state (s|m). Defaults to 3m
    Delay string
    The interval to check if the desired state is reached (ms|s). Defaults to 7s.
    Timeout string
    The timeout of the service to reach the desired state (s|m). Defaults to 3m
    delay String
    The interval to check if the desired state is reached (ms|s). Defaults to 7s.
    timeout String
    The timeout of the service to reach the desired state (s|m). Defaults to 3m
    delay string
    The interval to check if the desired state is reached (ms|s). Defaults to 7s.
    timeout string
    The timeout of the service to reach the desired state (s|m). Defaults to 3m
    delay str
    The interval to check if the desired state is reached (ms|s). Defaults to 7s.
    timeout str
    The timeout of the service to reach the desired state (s|m). Defaults to 3m
    delay String
    The interval to check if the desired state is reached (ms|s). Defaults to 7s.
    timeout String
    The timeout of the service to reach the desired state (s|m). Defaults to 3m

    ServiceEndpointSpec, ServiceEndpointSpecArgs

    Mode string
    The mode of resolution to use for internal load balancing between tasks
    Ports List<ServiceEndpointSpecPort>
    List of exposed ports that this service is accessible on from the outside. Ports can only be provided if 'vip' resolution mode is used
    Mode string
    The mode of resolution to use for internal load balancing between tasks
    Ports []ServiceEndpointSpecPort
    List of exposed ports that this service is accessible on from the outside. Ports can only be provided if 'vip' resolution mode is used
    mode String
    The mode of resolution to use for internal load balancing between tasks
    ports List<ServiceEndpointSpecPort>
    List of exposed ports that this service is accessible on from the outside. Ports can only be provided if 'vip' resolution mode is used
    mode string
    The mode of resolution to use for internal load balancing between tasks
    ports ServiceEndpointSpecPort[]
    List of exposed ports that this service is accessible on from the outside. Ports can only be provided if 'vip' resolution mode is used
    mode str
    The mode of resolution to use for internal load balancing between tasks
    ports Sequence[ServiceEndpointSpecPort]
    List of exposed ports that this service is accessible on from the outside. Ports can only be provided if 'vip' resolution mode is used
    mode String
    The mode of resolution to use for internal load balancing between tasks
    ports List<Property Map>
    List of exposed ports that this service is accessible on from the outside. Ports can only be provided if 'vip' resolution mode is used

    ServiceEndpointSpecPort, ServiceEndpointSpecPortArgs

    TargetPort int
    Name string
    Name of the service
    Protocol string
    PublishMode string
    PublishedPort int
    TargetPort int
    Name string
    Name of the service
    Protocol string
    PublishMode string
    PublishedPort int
    targetPort Integer
    name String
    Name of the service
    protocol String
    publishMode String
    publishedPort Integer
    targetPort number
    name string
    Name of the service
    protocol string
    publishMode string
    publishedPort number
    target_port int
    name str
    Name of the service
    protocol str
    publish_mode str
    published_port int
    targetPort Number
    name String
    Name of the service
    protocol String
    publishMode String
    publishedPort Number

    ServiceLabel, ServiceLabelArgs

    Label string
    Name of the label
    Value string
    Value of the label
    Label string
    Name of the label
    Value string
    Value of the label
    label String
    Name of the label
    value String
    Value of the label
    label string
    Name of the label
    value string
    Value of the label
    label str
    Name of the label
    value str
    Value of the label
    label String
    Name of the label
    value String
    Value of the label

    ServiceMode, ServiceModeArgs

    Global bool
    The global service mode. Defaults to false
    Replicated ServiceModeReplicated
    The replicated service mode
    Global bool
    The global service mode. Defaults to false
    Replicated ServiceModeReplicated
    The replicated service mode
    global Boolean
    The global service mode. Defaults to false
    replicated ServiceModeReplicated
    The replicated service mode
    global boolean
    The global service mode. Defaults to false
    replicated ServiceModeReplicated
    The replicated service mode
    global_ bool
    The global service mode. Defaults to false
    replicated ServiceModeReplicated
    The replicated service mode
    global Boolean
    The global service mode. Defaults to false
    replicated Property Map
    The replicated service mode

    ServiceModeReplicated, ServiceModeReplicatedArgs

    replicas Integer
    replicas number
    replicas Number

    ServiceRollbackConfig, ServiceRollbackConfigArgs

    Delay string
    Delay between task rollbacks (ns|us|ms|s|m|h). Defaults to 0s.
    FailureAction string
    Action on rollback failure: pause | continue. Defaults to pause.
    MaxFailureRatio string
    Failure rate to tolerate during a rollback. Defaults to 0.0.
    Monitor string
    Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h). Defaults to 5s.
    Order string
    Rollback order: either 'stop-first' or 'start-first'. Defaults to stop-first.
    Parallelism int
    Maximum number of tasks to be rollbacked in one iteration. Defaults to 1
    Delay string
    Delay between task rollbacks (ns|us|ms|s|m|h). Defaults to 0s.
    FailureAction string
    Action on rollback failure: pause | continue. Defaults to pause.
    MaxFailureRatio string
    Failure rate to tolerate during a rollback. Defaults to 0.0.
    Monitor string
    Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h). Defaults to 5s.
    Order string
    Rollback order: either 'stop-first' or 'start-first'. Defaults to stop-first.
    Parallelism int
    Maximum number of tasks to be rollbacked in one iteration. Defaults to 1
    delay String
    Delay between task rollbacks (ns|us|ms|s|m|h). Defaults to 0s.
    failureAction String
    Action on rollback failure: pause | continue. Defaults to pause.
    maxFailureRatio String
    Failure rate to tolerate during a rollback. Defaults to 0.0.
    monitor String
    Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h). Defaults to 5s.
    order String
    Rollback order: either 'stop-first' or 'start-first'. Defaults to stop-first.
    parallelism Integer
    Maximum number of tasks to be rollbacked in one iteration. Defaults to 1
    delay string
    Delay between task rollbacks (ns|us|ms|s|m|h). Defaults to 0s.
    failureAction string
    Action on rollback failure: pause | continue. Defaults to pause.
    maxFailureRatio string
    Failure rate to tolerate during a rollback. Defaults to 0.0.
    monitor string
    Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h). Defaults to 5s.
    order string
    Rollback order: either 'stop-first' or 'start-first'. Defaults to stop-first.
    parallelism number
    Maximum number of tasks to be rollbacked in one iteration. Defaults to 1
    delay str
    Delay between task rollbacks (ns|us|ms|s|m|h). Defaults to 0s.
    failure_action str
    Action on rollback failure: pause | continue. Defaults to pause.
    max_failure_ratio str
    Failure rate to tolerate during a rollback. Defaults to 0.0.
    monitor str
    Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h). Defaults to 5s.
    order str
    Rollback order: either 'stop-first' or 'start-first'. Defaults to stop-first.
    parallelism int
    Maximum number of tasks to be rollbacked in one iteration. Defaults to 1
    delay String
    Delay between task rollbacks (ns|us|ms|s|m|h). Defaults to 0s.
    failureAction String
    Action on rollback failure: pause | continue. Defaults to pause.
    maxFailureRatio String
    Failure rate to tolerate during a rollback. Defaults to 0.0.
    monitor String
    Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h). Defaults to 5s.
    order String
    Rollback order: either 'stop-first' or 'start-first'. Defaults to stop-first.
    parallelism Number
    Maximum number of tasks to be rollbacked in one iteration. Defaults to 1

    ServiceTaskSpec, ServiceTaskSpecArgs

    ContainerSpec ServiceTaskSpecContainerSpec
    The spec for each container
    ForceUpdate int
    A counter that triggers an update even if no relevant parameters have been changed. See the spec.
    LogDriver ServiceTaskSpecLogDriver
    Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified
    Networks List<string>
    Ids of the networks in which the container will be put in
    Placement ServiceTaskSpecPlacement
    The placement preferences
    Resources ServiceTaskSpecResources
    Resource requirements which apply to each individual container created as part of the service
    RestartPolicy ServiceTaskSpecRestartPolicy
    Specification for the restart policy which applies to containers created as part of this service.
    Runtime string
    Runtime is the type of runtime specified for the task executor. See the types.
    ContainerSpec ServiceTaskSpecContainerSpec
    The spec for each container
    ForceUpdate int
    A counter that triggers an update even if no relevant parameters have been changed. See the spec.
    LogDriver ServiceTaskSpecLogDriver
    Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified
    Networks []string
    Ids of the networks in which the container will be put in
    Placement ServiceTaskSpecPlacement
    The placement preferences
    Resources ServiceTaskSpecResources
    Resource requirements which apply to each individual container created as part of the service
    RestartPolicy ServiceTaskSpecRestartPolicy
    Specification for the restart policy which applies to containers created as part of this service.
    Runtime string
    Runtime is the type of runtime specified for the task executor. See the types.
    containerSpec ServiceTaskSpecContainerSpec
    The spec for each container
    forceUpdate Integer
    A counter that triggers an update even if no relevant parameters have been changed. See the spec.
    logDriver ServiceTaskSpecLogDriver
    Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified
    networks List<String>
    Ids of the networks in which the container will be put in
    placement ServiceTaskSpecPlacement
    The placement preferences
    resources ServiceTaskSpecResources
    Resource requirements which apply to each individual container created as part of the service
    restartPolicy ServiceTaskSpecRestartPolicy
    Specification for the restart policy which applies to containers created as part of this service.
    runtime String
    Runtime is the type of runtime specified for the task executor. See the types.
    containerSpec ServiceTaskSpecContainerSpec
    The spec for each container
    forceUpdate number
    A counter that triggers an update even if no relevant parameters have been changed. See the spec.
    logDriver ServiceTaskSpecLogDriver
    Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified
    networks string[]
    Ids of the networks in which the container will be put in
    placement ServiceTaskSpecPlacement
    The placement preferences
    resources ServiceTaskSpecResources
    Resource requirements which apply to each individual container created as part of the service
    restartPolicy ServiceTaskSpecRestartPolicy
    Specification for the restart policy which applies to containers created as part of this service.
    runtime string
    Runtime is the type of runtime specified for the task executor. See the types.
    container_spec ServiceTaskSpecContainerSpec
    The spec for each container
    force_update int
    A counter that triggers an update even if no relevant parameters have been changed. See the spec.
    log_driver ServiceTaskSpecLogDriver
    Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified
    networks Sequence[str]
    Ids of the networks in which the container will be put in
    placement ServiceTaskSpecPlacement
    The placement preferences
    resources ServiceTaskSpecResources
    Resource requirements which apply to each individual container created as part of the service
    restart_policy ServiceTaskSpecRestartPolicy
    Specification for the restart policy which applies to containers created as part of this service.
    runtime str
    Runtime is the type of runtime specified for the task executor. See the types.
    containerSpec Property Map
    The spec for each container
    forceUpdate Number
    A counter that triggers an update even if no relevant parameters have been changed. See the spec.
    logDriver Property Map
    Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified
    networks List<String>
    Ids of the networks in which the container will be put in
    placement Property Map
    The placement preferences
    resources Property Map
    Resource requirements which apply to each individual container created as part of the service
    restartPolicy Property Map
    Specification for the restart policy which applies to containers created as part of this service.
    runtime String
    Runtime is the type of runtime specified for the task executor. See the types.

    ServiceTaskSpecContainerSpec, ServiceTaskSpecContainerSpecArgs

    ServiceTaskSpecContainerSpecConfig, ServiceTaskSpecContainerSpecConfigArgs

    ConfigId string
    FileName string
    ConfigName string
    FileGid string
    FileMode int
    FileUid string
    ConfigId string
    FileName string
    ConfigName string
    FileGid string
    FileMode int
    FileUid string
    configId String
    fileName String
    configName String
    fileGid String
    fileMode Integer
    fileUid String
    configId string
    fileName string
    configName string
    fileGid string
    fileMode number
    fileUid string
    configId String
    fileName String
    configName String
    fileGid String
    fileMode Number
    fileUid String

    ServiceTaskSpecContainerSpecDnsConfig, ServiceTaskSpecContainerSpecDnsConfigArgs

    Nameservers List<string>
    Options List<string>
    Searches List<string>
    Nameservers []string
    Options []string
    Searches []string
    nameservers List<String>
    options List<String>
    searches List<String>
    nameservers string[]
    options string[]
    searches string[]
    nameservers Sequence[str]
    options Sequence[str]
    searches Sequence[str]
    nameservers List<String>
    options List<String>
    searches List<String>

    ServiceTaskSpecContainerSpecHealthcheck, ServiceTaskSpecContainerSpecHealthcheckArgs

    Tests List<string>
    Interval string
    Retries int
    StartPeriod string
    Timeout string
    Tests []string
    Interval string
    Retries int
    StartPeriod string
    Timeout string
    tests List<String>
    interval String
    retries Integer
    startPeriod String
    timeout String
    tests string[]
    interval string
    retries number
    startPeriod string
    timeout string
    tests Sequence[str]
    interval str
    retries int
    start_period str
    timeout str
    tests List<String>
    interval String
    retries Number
    startPeriod String
    timeout String

    ServiceTaskSpecContainerSpecHost, ServiceTaskSpecContainerSpecHostArgs

    Host string
    Ip string
    Host string
    Ip string
    host String
    ip String
    host string
    ip string
    host str
    ip str
    host String
    ip String

    ServiceTaskSpecContainerSpecLabel, ServiceTaskSpecContainerSpecLabelArgs

    Label string
    Name of the label
    Value string
    Value of the label
    Label string
    Name of the label
    Value string
    Value of the label
    label String
    Name of the label
    value String
    Value of the label
    label string
    Name of the label
    value string
    Value of the label
    label str
    Name of the label
    value str
    Value of the label
    label String
    Name of the label
    value String
    Value of the label

    ServiceTaskSpecContainerSpecMount, ServiceTaskSpecContainerSpecMountArgs

    ServiceTaskSpecContainerSpecMountBindOptions, ServiceTaskSpecContainerSpecMountBindOptionsArgs

    ServiceTaskSpecContainerSpecMountTmpfsOptions, ServiceTaskSpecContainerSpecMountTmpfsOptionsArgs

    Mode int
    Scheduling mode for the service
    SizeBytes int
    Mode int
    Scheduling mode for the service
    SizeBytes int
    mode Integer
    Scheduling mode for the service
    sizeBytes Integer
    mode number
    Scheduling mode for the service
    sizeBytes number
    mode int
    Scheduling mode for the service
    size_bytes int
    mode Number
    Scheduling mode for the service
    sizeBytes Number

    ServiceTaskSpecContainerSpecMountVolumeOptions, ServiceTaskSpecContainerSpecMountVolumeOptionsArgs

    DriverName string
    DriverOptions Dictionary<string, string>
    Labels List<ServiceTaskSpecContainerSpecMountVolumeOptionsLabel>
    User-defined key/value metadata
    NoCopy bool
    DriverName string
    DriverOptions map[string]string
    Labels []ServiceTaskSpecContainerSpecMountVolumeOptionsLabel
    User-defined key/value metadata
    NoCopy bool
    driverName String
    driverOptions Map<String,String>
    labels List<ServiceTaskSpecContainerSpecMountVolumeOptionsLabel>
    User-defined key/value metadata
    noCopy Boolean
    driverName string
    driverOptions {[key: string]: string}
    labels ServiceTaskSpecContainerSpecMountVolumeOptionsLabel[]
    User-defined key/value metadata
    noCopy boolean
    driverName String
    driverOptions Map<String>
    labels List<Property Map>
    User-defined key/value metadata
    noCopy Boolean

    ServiceTaskSpecContainerSpecMountVolumeOptionsLabel, ServiceTaskSpecContainerSpecMountVolumeOptionsLabelArgs

    Label string
    Name of the label
    Value string
    Value of the label
    Label string
    Name of the label
    Value string
    Value of the label
    label String
    Name of the label
    value String
    Value of the label
    label string
    Name of the label
    value string
    Value of the label
    label str
    Name of the label
    value str
    Value of the label
    label String
    Name of the label
    value String
    Value of the label

    ServiceTaskSpecContainerSpecPrivileges, ServiceTaskSpecContainerSpecPrivilegesArgs

    ServiceTaskSpecContainerSpecPrivilegesCredentialSpec, ServiceTaskSpecContainerSpecPrivilegesCredentialSpecArgs

    File string
    Registry string
    File string
    Registry string
    file String
    registry String
    file string
    registry string
    file str
    registry str
    file String
    registry String

    ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext, ServiceTaskSpecContainerSpecPrivilegesSeLinuxContextArgs

    Disable bool
    Level string
    Role string
    Type string
    User string
    Disable bool
    Level string
    Role string
    Type string
    User string
    disable Boolean
    level String
    role String
    type String
    user String
    disable boolean
    level string
    role string
    type string
    user string
    disable bool
    level str
    role str
    type str
    user str
    disable Boolean
    level String
    role String
    type String
    user String

    ServiceTaskSpecContainerSpecSecret, ServiceTaskSpecContainerSpecSecretArgs

    FileName string
    SecretId string
    FileGid string
    FileMode int
    FileUid string
    SecretName string
    FileName string
    SecretId string
    FileGid string
    FileMode int
    FileUid string
    SecretName string
    fileName String
    secretId String
    fileGid String
    fileMode Integer
    fileUid String
    secretName String
    fileName string
    secretId string
    fileGid string
    fileMode number
    fileUid string
    secretName string
    fileName String
    secretId String
    fileGid String
    fileMode Number
    fileUid String
    secretName String

    ServiceTaskSpecLogDriver, ServiceTaskSpecLogDriverArgs

    Name string
    Name of the service
    Options Dictionary<string, string>
    Name string
    Name of the service
    Options map[string]string
    name String
    Name of the service
    options Map<String,String>
    name string
    Name of the service
    options {[key: string]: string}
    name str
    Name of the service
    options Mapping[str, str]
    name String
    Name of the service
    options Map<String>

    ServiceTaskSpecPlacement, ServiceTaskSpecPlacementArgs

    ServiceTaskSpecPlacementPlatform, ServiceTaskSpecPlacementPlatformArgs

    Architecture string
    Os string
    Architecture string
    Os string
    architecture String
    os String
    architecture string
    os string
    architecture String
    os String

    ServiceTaskSpecResources, ServiceTaskSpecResourcesArgs

    ServiceTaskSpecResourcesLimits, ServiceTaskSpecResourcesLimitsArgs

    memoryBytes Integer
    nanoCpus Integer
    memoryBytes number
    nanoCpus number
    memoryBytes Number
    nanoCpus Number

    ServiceTaskSpecResourcesReservation, ServiceTaskSpecResourcesReservationArgs

    ServiceTaskSpecResourcesReservationGenericResources, ServiceTaskSpecResourcesReservationGenericResourcesArgs

    ServiceTaskSpecRestartPolicy, ServiceTaskSpecRestartPolicyArgs

    Condition string
    Delay string
    MaxAttempts int
    Window string
    Condition string
    Delay string
    MaxAttempts int
    Window string
    condition String
    delay String
    maxAttempts Integer
    window String
    condition string
    delay string
    maxAttempts number
    window string
    condition String
    delay String
    maxAttempts Number
    window String

    ServiceUpdateConfig, ServiceUpdateConfigArgs

    Delay string
    Delay between task updates (ns|us|ms|s|m|h). Defaults to 0s.
    FailureAction string
    Action on update failure: pause, continue or rollback. Defaults to pause.
    MaxFailureRatio string
    Failure rate to tolerate during an update. Defaults to 0.0.
    Monitor string
    Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to 5s.
    Order string
    Update order: either 'stop-first' or 'start-first'. Defaults to stop-first.
    Parallelism int
    Maximum number of tasks to be updated in one iteration. Defaults to 1
    Delay string
    Delay between task updates (ns|us|ms|s|m|h). Defaults to 0s.
    FailureAction string
    Action on update failure: pause, continue or rollback. Defaults to pause.
    MaxFailureRatio string
    Failure rate to tolerate during an update. Defaults to 0.0.
    Monitor string
    Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to 5s.
    Order string
    Update order: either 'stop-first' or 'start-first'. Defaults to stop-first.
    Parallelism int
    Maximum number of tasks to be updated in one iteration. Defaults to 1
    delay String
    Delay between task updates (ns|us|ms|s|m|h). Defaults to 0s.
    failureAction String
    Action on update failure: pause, continue or rollback. Defaults to pause.
    maxFailureRatio String
    Failure rate to tolerate during an update. Defaults to 0.0.
    monitor String
    Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to 5s.
    order String
    Update order: either 'stop-first' or 'start-first'. Defaults to stop-first.
    parallelism Integer
    Maximum number of tasks to be updated in one iteration. Defaults to 1
    delay string
    Delay between task updates (ns|us|ms|s|m|h). Defaults to 0s.
    failureAction string
    Action on update failure: pause, continue or rollback. Defaults to pause.
    maxFailureRatio string
    Failure rate to tolerate during an update. Defaults to 0.0.
    monitor string
    Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to 5s.
    order string
    Update order: either 'stop-first' or 'start-first'. Defaults to stop-first.
    parallelism number
    Maximum number of tasks to be updated in one iteration. Defaults to 1
    delay str
    Delay between task updates (ns|us|ms|s|m|h). Defaults to 0s.
    failure_action str
    Action on update failure: pause, continue or rollback. Defaults to pause.
    max_failure_ratio str
    Failure rate to tolerate during an update. Defaults to 0.0.
    monitor str
    Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to 5s.
    order str
    Update order: either 'stop-first' or 'start-first'. Defaults to stop-first.
    parallelism int
    Maximum number of tasks to be updated in one iteration. Defaults to 1
    delay String
    Delay between task updates (ns|us|ms|s|m|h). Defaults to 0s.
    failureAction String
    Action on update failure: pause, continue or rollback. Defaults to pause.
    maxFailureRatio String
    Failure rate to tolerate during an update. Defaults to 0.0.
    monitor String
    Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to 5s.
    order String
    Update order: either 'stop-first' or 'start-first'. Defaults to stop-first.
    parallelism Number
    Maximum number of tasks to be updated in one iteration. Defaults to 1

    Package Details

    Repository
    Docker pulumi/pulumi-docker
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the docker Terraform Provider.
    docker logo
    Viewing docs for Docker v3.6.1 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.