1. Packages
  2. Docker
  3. API Docs
  4. Service
Docker v4.5.4 published on Friday, May 24, 2024 by Pulumi

docker.Service

Explore with Pulumi AI

docker logo
Docker v4.5.4 published on Friday, May 24, 2024 by Pulumi

    This resource manages the lifecycle of a Docker service. By default, the creation, update and delete of services are detached. With the Converge Config Name of the service

    • task_spec (Block List, Min: 1, Max: 1) User modifiable task configuration (see below for nested schema)

    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" },
                },
                StopSignal = "string",
                Dir = "string",
                DnsConfig = new Docker.Inputs.ServiceTaskSpecContainerSpecDnsConfigArgs
                {
                    Nameservers = new[]
                    {
                        "string",
                    },
                    Options = new[]
                    {
                        "string",
                    },
                    Searches = new[]
                    {
                        "string",
                    },
                },
                Args = new[]
                {
                    "string",
                },
                Groups = new[]
                {
                    "string",
                },
                Healthcheck = new Docker.Inputs.ServiceTaskSpecContainerSpecHealthcheckArgs
                {
                    Tests = new[]
                    {
                        "string",
                    },
                    Interval = "string",
                    Retries = 0,
                    StartPeriod = "string",
                    Timeout = "string",
                },
                Isolation = "string",
                User = "string",
                Configs = new[]
                {
                    new Docker.Inputs.ServiceTaskSpecContainerSpecConfigArgs
                    {
                        ConfigId = "string",
                        FileName = "string",
                        ConfigName = "string",
                        FileGid = "string",
                        FileMode = 0,
                        FileUid = "string",
                    },
                },
                Hostname = "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",
                Commands = new[]
                {
                    "string",
                },
                Sysctl = 
                {
                    { "string", "any" },
                },
                Hosts = new[]
                {
                    new Docker.Inputs.ServiceTaskSpecContainerSpecHostArgs
                    {
                        Host = "string",
                        Ip = "string",
                    },
                },
            },
            ForceUpdate = 0,
            LogDriver = new Docker.Inputs.ServiceTaskSpecLogDriverArgs
            {
                Name = "string",
                Options = 
                {
                    { "string", "string" },
                },
            },
            NetworksAdvanceds = new[]
            {
                new Docker.Inputs.ServiceTaskSpecNetworksAdvancedArgs
                {
                    Name = "string",
                    Aliases = new[]
                    {
                        "string",
                    },
                    DriverOpts = 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"),
    			},
    			StopSignal: pulumi.String("string"),
    			Dir:        pulumi.String("string"),
    			DnsConfig: &docker.ServiceTaskSpecContainerSpecDnsConfigArgs{
    				Nameservers: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Options: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Searches: 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"),
    			},
    			Isolation: pulumi.String("string"),
    			User:      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"),
    				},
    			},
    			Hostname: 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"),
    			Commands: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Sysctl: pulumi.Map{
    				"string": pulumi.Any("any"),
    			},
    			Hosts: docker.ServiceTaskSpecContainerSpecHostArray{
    				&docker.ServiceTaskSpecContainerSpecHostArgs{
    					Host: pulumi.String("string"),
    					Ip:   pulumi.String("string"),
    				},
    			},
    		},
    		ForceUpdate: pulumi.Int(0),
    		LogDriver: &docker.ServiceTaskSpecLogDriverArgs{
    			Name: pulumi.String("string"),
    			Options: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    		},
    		NetworksAdvanceds: docker.ServiceTaskSpecNetworksAdvancedArray{
    			&docker.ServiceTaskSpecNetworksAdvancedArgs{
    				Name: pulumi.String("string"),
    				Aliases: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				DriverOpts: 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"))
                .stopSignal("string")
                .dir("string")
                .dnsConfig(ServiceTaskSpecContainerSpecDnsConfigArgs.builder()
                    .nameservers("string")
                    .options("string")
                    .searches("string")
                    .build())
                .args("string")
                .groups("string")
                .healthcheck(ServiceTaskSpecContainerSpecHealthcheckArgs.builder()
                    .tests("string")
                    .interval("string")
                    .retries(0)
                    .startPeriod("string")
                    .timeout("string")
                    .build())
                .isolation("string")
                .user("string")
                .configs(ServiceTaskSpecContainerSpecConfigArgs.builder()
                    .configId("string")
                    .fileName("string")
                    .configName("string")
                    .fileGid("string")
                    .fileMode(0)
                    .fileUid("string")
                    .build())
                .hostname("string")
                .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")
                .commands("string")
                .sysctl(Map.of("string", "any"))
                .hosts(ServiceTaskSpecContainerSpecHostArgs.builder()
                    .host("string")
                    .ip("string")
                    .build())
                .build())
            .forceUpdate(0)
            .logDriver(ServiceTaskSpecLogDriverArgs.builder()
                .name("string")
                .options(Map.of("string", "string"))
                .build())
            .networksAdvanceds(ServiceTaskSpecNetworksAdvancedArgs.builder()
                .name("string")
                .aliases("string")
                .driverOpts("string")
                .build())
            .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=docker.ServiceTaskSpecArgs(
            container_spec=docker.ServiceTaskSpecContainerSpecArgs(
                image="string",
                env={
                    "string": "string",
                },
                stop_signal="string",
                dir="string",
                dns_config=docker.ServiceTaskSpecContainerSpecDnsConfigArgs(
                    nameservers=["string"],
                    options=["string"],
                    searches=["string"],
                ),
                args=["string"],
                groups=["string"],
                healthcheck=docker.ServiceTaskSpecContainerSpecHealthcheckArgs(
                    tests=["string"],
                    interval="string",
                    retries=0,
                    start_period="string",
                    timeout="string",
                ),
                isolation="string",
                user="string",
                configs=[docker.ServiceTaskSpecContainerSpecConfigArgs(
                    config_id="string",
                    file_name="string",
                    config_name="string",
                    file_gid="string",
                    file_mode=0,
                    file_uid="string",
                )],
                hostname="string",
                labels=[docker.ServiceTaskSpecContainerSpecLabelArgs(
                    label="string",
                    value="string",
                )],
                mounts=[docker.ServiceTaskSpecContainerSpecMountArgs(
                    target="string",
                    type="string",
                    bind_options=docker.ServiceTaskSpecContainerSpecMountBindOptionsArgs(
                        propagation="string",
                    ),
                    read_only=False,
                    source="string",
                    tmpfs_options=docker.ServiceTaskSpecContainerSpecMountTmpfsOptionsArgs(
                        mode=0,
                        size_bytes=0,
                    ),
                    volume_options=docker.ServiceTaskSpecContainerSpecMountVolumeOptionsArgs(
                        driver_name="string",
                        driver_options={
                            "string": "string",
                        },
                        labels=[docker.ServiceTaskSpecContainerSpecMountVolumeOptionsLabelArgs(
                            label="string",
                            value="string",
                        )],
                        no_copy=False,
                    ),
                )],
                privileges=docker.ServiceTaskSpecContainerSpecPrivilegesArgs(
                    credential_spec=docker.ServiceTaskSpecContainerSpecPrivilegesCredentialSpecArgs(
                        file="string",
                        registry="string",
                    ),
                    se_linux_context=docker.ServiceTaskSpecContainerSpecPrivilegesSeLinuxContextArgs(
                        disable=False,
                        level="string",
                        role="string",
                        type="string",
                        user="string",
                    ),
                ),
                read_only=False,
                secrets=[docker.ServiceTaskSpecContainerSpecSecretArgs(
                    file_name="string",
                    secret_id="string",
                    file_gid="string",
                    file_mode=0,
                    file_uid="string",
                    secret_name="string",
                )],
                stop_grace_period="string",
                commands=["string"],
                sysctl={
                    "string": "any",
                },
                hosts=[docker.ServiceTaskSpecContainerSpecHostArgs(
                    host="string",
                    ip="string",
                )],
            ),
            force_update=0,
            log_driver=docker.ServiceTaskSpecLogDriverArgs(
                name="string",
                options={
                    "string": "string",
                },
            ),
            networks_advanceds=[docker.ServiceTaskSpecNetworksAdvancedArgs(
                name="string",
                aliases=["string"],
                driver_opts=["string"],
            )],
            placement=docker.ServiceTaskSpecPlacementArgs(
                constraints=["string"],
                max_replicas=0,
                platforms=[docker.ServiceTaskSpecPlacementPlatformArgs(
                    architecture="string",
                    os="string",
                )],
                prefs=["string"],
            ),
            resources=docker.ServiceTaskSpecResourcesArgs(
                limits=docker.ServiceTaskSpecResourcesLimitsArgs(
                    memory_bytes=0,
                    nano_cpus=0,
                ),
                reservation=docker.ServiceTaskSpecResourcesReservationArgs(
                    generic_resources=docker.ServiceTaskSpecResourcesReservationGenericResourcesArgs(
                        discrete_resources_specs=["string"],
                        named_resources_specs=["string"],
                    ),
                    memory_bytes=0,
                    nano_cpus=0,
                ),
            ),
            restart_policy=docker.ServiceTaskSpecRestartPolicyArgs(
                condition="string",
                delay="string",
                max_attempts=0,
                window="string",
            ),
            runtime="string",
        ),
        auth=docker.ServiceAuthArgs(
            server_address="string",
            password="string",
            username="string",
        ),
        converge_config=docker.ServiceConvergeConfigArgs(
            delay="string",
            timeout="string",
        ),
        endpoint_spec=docker.ServiceEndpointSpecArgs(
            mode="string",
            ports=[docker.ServiceEndpointSpecPortArgs(
                target_port=0,
                name="string",
                protocol="string",
                publish_mode="string",
                published_port=0,
            )],
        ),
        labels=[docker.ServiceLabelArgs(
            label="string",
            value="string",
        )],
        mode=docker.ServiceModeArgs(
            global_=False,
            replicated=docker.ServiceModeReplicatedArgs(
                replicas=0,
            ),
        ),
        name="string",
        rollback_config=docker.ServiceRollbackConfigArgs(
            delay="string",
            failure_action="string",
            max_failure_ratio="string",
            monitor="string",
            order="string",
            parallelism=0,
        ),
        update_config=docker.ServiceUpdateConfigArgs(
            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",
                },
                stopSignal: "string",
                dir: "string",
                dnsConfig: {
                    nameservers: ["string"],
                    options: ["string"],
                    searches: ["string"],
                },
                args: ["string"],
                groups: ["string"],
                healthcheck: {
                    tests: ["string"],
                    interval: "string",
                    retries: 0,
                    startPeriod: "string",
                    timeout: "string",
                },
                isolation: "string",
                user: "string",
                configs: [{
                    configId: "string",
                    fileName: "string",
                    configName: "string",
                    fileGid: "string",
                    fileMode: 0,
                    fileUid: "string",
                }],
                hostname: "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",
                commands: ["string"],
                sysctl: {
                    string: "any",
                },
                hosts: [{
                    host: "string",
                    ip: "string",
                }],
            },
            forceUpdate: 0,
            logDriver: {
                name: "string",
                options: {
                    string: "string",
                },
            },
            networksAdvanceds: [{
                name: "string",
                aliases: ["string"],
                driverOpts: ["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
                sysctl:
                    string: any
                user: string
            forceUpdate: 0
            logDriver:
                name: string
                options:
                    string: string
            networksAdvanceds:
                - aliases:
                    - string
                  driverOpts:
                    - string
                  name: 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

    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)
    Resource lookup is not supported in YAML
    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
    The port inside the container
    Name string
    A random name for the port
    Protocol string
    Rrepresents the protocol of a port: tcp, udp or sctp. Defaults to tcp.
    PublishMode string
    Represents the mode in which the port is to be published: 'ingress' or 'host'. Defaults to ingress.
    PublishedPort int
    The port on the swarm hosts
    TargetPort int
    The port inside the container
    Name string
    A random name for the port
    Protocol string
    Rrepresents the protocol of a port: tcp, udp or sctp. Defaults to tcp.
    PublishMode string
    Represents the mode in which the port is to be published: 'ingress' or 'host'. Defaults to ingress.
    PublishedPort int
    The port on the swarm hosts
    targetPort Integer
    The port inside the container
    name String
    A random name for the port
    protocol String
    Rrepresents the protocol of a port: tcp, udp or sctp. Defaults to tcp.
    publishMode String
    Represents the mode in which the port is to be published: 'ingress' or 'host'. Defaults to ingress.
    publishedPort Integer
    The port on the swarm hosts
    targetPort number
    The port inside the container
    name string
    A random name for the port
    protocol string
    Rrepresents the protocol of a port: tcp, udp or sctp. Defaults to tcp.
    publishMode string
    Represents the mode in which the port is to be published: 'ingress' or 'host'. Defaults to ingress.
    publishedPort number
    The port on the swarm hosts
    target_port int
    The port inside the container
    name str
    A random name for the port
    protocol str
    Rrepresents the protocol of a port: tcp, udp or sctp. Defaults to tcp.
    publish_mode str
    Represents the mode in which the port is to be published: 'ingress' or 'host'. Defaults to ingress.
    published_port int
    The port on the swarm hosts
    targetPort Number
    The port inside the container
    name String
    A random name for the port
    protocol String
    Rrepresents the protocol of a port: tcp, udp or sctp. Defaults to tcp.
    publishMode String
    Represents the mode in which the port is to be published: 'ingress' or 'host'. Defaults to ingress.
    publishedPort Number
    The port on the swarm hosts

    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
    When true, tasks will run on every worker node. Conflicts with replicated
    Replicated ServiceModeReplicated
    The replicated service mode
    Global bool
    When true, tasks will run on every worker node. Conflicts with replicated
    Replicated ServiceModeReplicated
    The replicated service mode
    global Boolean
    When true, tasks will run on every worker node. Conflicts with replicated
    replicated ServiceModeReplicated
    The replicated service mode
    global boolean
    When true, tasks will run on every worker node. Conflicts with replicated
    replicated ServiceModeReplicated
    The replicated service mode
    global_ bool
    When true, tasks will run on every worker node. Conflicts with replicated
    replicated ServiceModeReplicated
    The replicated service mode
    global Boolean
    When true, tasks will run on every worker node. Conflicts with replicated
    replicated Property Map
    The replicated service mode

    ServiceModeReplicated, ServiceModeReplicatedArgs

    Replicas int
    The amount of replicas of the service. Defaults to 1
    Replicas int
    The amount of replicas of the service. Defaults to 1
    replicas Integer
    The amount of replicas of the service. Defaults to 1
    replicas number
    The amount of replicas of the service. Defaults to 1
    replicas int
    The amount of replicas of the service. Defaults to 1
    replicas Number
    The amount of replicas of the service. Defaults to 1

    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
    NetworksAdvanceds List<ServiceTaskSpecNetworksAdvanced>
    The networks the container is attached to
    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
    NetworksAdvanceds []ServiceTaskSpecNetworksAdvanced
    The networks the container is attached to
    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
    networksAdvanceds List<ServiceTaskSpecNetworksAdvanced>
    The networks the container is attached to
    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
    networksAdvanceds ServiceTaskSpecNetworksAdvanced[]
    The networks the container is attached to
    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_advanceds Sequence[ServiceTaskSpecNetworksAdvanced]
    The networks the container is attached to
    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
    networksAdvanceds List<Property Map>
    The networks the container is attached to
    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

    Image string
    The image name to use for the containers of the service, like nginx:1.17.6. Also use the data-source or resource of docker.RemoteImage with the repo_digest or docker.RegistryImage with the name attribute for this, as shown in the examples.
    Args List<string>
    Arguments to the command
    Commands List<string>
    The command/entrypoint to be run in the image. According to the docker cli the override of the entrypoint is also passed to the command property and there is no entrypoint attribute in the ContainerSpec of the service.
    Configs List<ServiceTaskSpecContainerSpecConfig>
    References to zero or more configs that will be exposed to the service
    Dir string
    The working directory for commands to run in
    DnsConfig ServiceTaskSpecContainerSpecDnsConfig
    Specification for DNS related configurations in resolver configuration file (resolv.conf)
    Env Dictionary<string, string>
    A list of environment variables in the form VAR="value"
    Groups List<string>
    A list of additional groups that the container process will run as
    Healthcheck ServiceTaskSpecContainerSpecHealthcheck
    A test to perform to check that the container is healthy
    Hostname string
    The hostname to use for the container, as a valid RFC 1123 hostname
    Hosts List<ServiceTaskSpecContainerSpecHost>
    A list of hostname/IP mappings to add to the container's hosts file
    Isolation string
    Isolation technology of the containers running the service. (Windows only). Defaults to default.
    Labels List<ServiceTaskSpecContainerSpecLabel>
    User-defined key/value metadata
    Mounts List<ServiceTaskSpecContainerSpecMount>
    Specification for mounts to be added to containers created as part of the service
    Privileges ServiceTaskSpecContainerSpecPrivileges
    Security options for the container
    ReadOnly bool
    Mount the container's root filesystem as read only
    Secrets List<ServiceTaskSpecContainerSpecSecret>
    References to zero or more secrets that will be exposed to the service
    StopGracePeriod string
    Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h). If not specified or '0s' the destroy will not check if all tasks/containers of the service terminate.
    StopSignal string
    Signal to stop the container
    Sysctl Dictionary<string, object>
    Sysctls config (Linux only)
    User string
    The user inside the container
    Image string
    The image name to use for the containers of the service, like nginx:1.17.6. Also use the data-source or resource of docker.RemoteImage with the repo_digest or docker.RegistryImage with the name attribute for this, as shown in the examples.
    Args []string
    Arguments to the command
    Commands []string
    The command/entrypoint to be run in the image. According to the docker cli the override of the entrypoint is also passed to the command property and there is no entrypoint attribute in the ContainerSpec of the service.
    Configs []ServiceTaskSpecContainerSpecConfig
    References to zero or more configs that will be exposed to the service
    Dir string
    The working directory for commands to run in
    DnsConfig ServiceTaskSpecContainerSpecDnsConfig
    Specification for DNS related configurations in resolver configuration file (resolv.conf)
    Env map[string]string
    A list of environment variables in the form VAR="value"
    Groups []string
    A list of additional groups that the container process will run as
    Healthcheck ServiceTaskSpecContainerSpecHealthcheck
    A test to perform to check that the container is healthy
    Hostname string
    The hostname to use for the container, as a valid RFC 1123 hostname
    Hosts []ServiceTaskSpecContainerSpecHost
    A list of hostname/IP mappings to add to the container's hosts file
    Isolation string
    Isolation technology of the containers running the service. (Windows only). Defaults to default.
    Labels []ServiceTaskSpecContainerSpecLabel
    User-defined key/value metadata
    Mounts []ServiceTaskSpecContainerSpecMount
    Specification for mounts to be added to containers created as part of the service
    Privileges ServiceTaskSpecContainerSpecPrivileges
    Security options for the container
    ReadOnly bool
    Mount the container's root filesystem as read only
    Secrets []ServiceTaskSpecContainerSpecSecret
    References to zero or more secrets that will be exposed to the service
    StopGracePeriod string
    Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h). If not specified or '0s' the destroy will not check if all tasks/containers of the service terminate.
    StopSignal string
    Signal to stop the container
    Sysctl map[string]interface{}
    Sysctls config (Linux only)
    User string
    The user inside the container
    image String
    The image name to use for the containers of the service, like nginx:1.17.6. Also use the data-source or resource of docker.RemoteImage with the repo_digest or docker.RegistryImage with the name attribute for this, as shown in the examples.
    args List<String>
    Arguments to the command
    commands List<String>
    The command/entrypoint to be run in the image. According to the docker cli the override of the entrypoint is also passed to the command property and there is no entrypoint attribute in the ContainerSpec of the service.
    configs List<ServiceTaskSpecContainerSpecConfig>
    References to zero or more configs that will be exposed to the service
    dir String
    The working directory for commands to run in
    dnsConfig ServiceTaskSpecContainerSpecDnsConfig
    Specification for DNS related configurations in resolver configuration file (resolv.conf)
    env Map<String,String>
    A list of environment variables in the form VAR="value"
    groups List<String>
    A list of additional groups that the container process will run as
    healthcheck ServiceTaskSpecContainerSpecHealthcheck
    A test to perform to check that the container is healthy
    hostname String
    The hostname to use for the container, as a valid RFC 1123 hostname
    hosts List<ServiceTaskSpecContainerSpecHost>
    A list of hostname/IP mappings to add to the container's hosts file
    isolation String
    Isolation technology of the containers running the service. (Windows only). Defaults to default.
    labels List<ServiceTaskSpecContainerSpecLabel>
    User-defined key/value metadata
    mounts List<ServiceTaskSpecContainerSpecMount>
    Specification for mounts to be added to containers created as part of the service
    privileges ServiceTaskSpecContainerSpecPrivileges
    Security options for the container
    readOnly Boolean
    Mount the container's root filesystem as read only
    secrets List<ServiceTaskSpecContainerSpecSecret>
    References to zero or more secrets that will be exposed to the service
    stopGracePeriod String
    Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h). If not specified or '0s' the destroy will not check if all tasks/containers of the service terminate.
    stopSignal String
    Signal to stop the container
    sysctl Map<String,Object>
    Sysctls config (Linux only)
    user String
    The user inside the container
    image string
    The image name to use for the containers of the service, like nginx:1.17.6. Also use the data-source or resource of docker.RemoteImage with the repo_digest or docker.RegistryImage with the name attribute for this, as shown in the examples.
    args string[]
    Arguments to the command
    commands string[]
    The command/entrypoint to be run in the image. According to the docker cli the override of the entrypoint is also passed to the command property and there is no entrypoint attribute in the ContainerSpec of the service.
    configs ServiceTaskSpecContainerSpecConfig[]
    References to zero or more configs that will be exposed to the service
    dir string
    The working directory for commands to run in
    dnsConfig ServiceTaskSpecContainerSpecDnsConfig
    Specification for DNS related configurations in resolver configuration file (resolv.conf)
    env {[key: string]: string}
    A list of environment variables in the form VAR="value"
    groups string[]
    A list of additional groups that the container process will run as
    healthcheck ServiceTaskSpecContainerSpecHealthcheck
    A test to perform to check that the container is healthy
    hostname string
    The hostname to use for the container, as a valid RFC 1123 hostname
    hosts ServiceTaskSpecContainerSpecHost[]
    A list of hostname/IP mappings to add to the container's hosts file
    isolation string
    Isolation technology of the containers running the service. (Windows only). Defaults to default.
    labels ServiceTaskSpecContainerSpecLabel[]
    User-defined key/value metadata
    mounts ServiceTaskSpecContainerSpecMount[]
    Specification for mounts to be added to containers created as part of the service
    privileges ServiceTaskSpecContainerSpecPrivileges
    Security options for the container
    readOnly boolean
    Mount the container's root filesystem as read only
    secrets ServiceTaskSpecContainerSpecSecret[]
    References to zero or more secrets that will be exposed to the service
    stopGracePeriod string
    Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h). If not specified or '0s' the destroy will not check if all tasks/containers of the service terminate.
    stopSignal string
    Signal to stop the container
    sysctl {[key: string]: any}
    Sysctls config (Linux only)
    user string
    The user inside the container
    image str
    The image name to use for the containers of the service, like nginx:1.17.6. Also use the data-source or resource of docker.RemoteImage with the repo_digest or docker.RegistryImage with the name attribute for this, as shown in the examples.
    args Sequence[str]
    Arguments to the command
    commands Sequence[str]
    The command/entrypoint to be run in the image. According to the docker cli the override of the entrypoint is also passed to the command property and there is no entrypoint attribute in the ContainerSpec of the service.
    configs Sequence[ServiceTaskSpecContainerSpecConfig]
    References to zero or more configs that will be exposed to the service
    dir str
    The working directory for commands to run in
    dns_config ServiceTaskSpecContainerSpecDnsConfig
    Specification for DNS related configurations in resolver configuration file (resolv.conf)
    env Mapping[str, str]
    A list of environment variables in the form VAR="value"
    groups Sequence[str]
    A list of additional groups that the container process will run as
    healthcheck ServiceTaskSpecContainerSpecHealthcheck
    A test to perform to check that the container is healthy
    hostname str
    The hostname to use for the container, as a valid RFC 1123 hostname
    hosts Sequence[ServiceTaskSpecContainerSpecHost]
    A list of hostname/IP mappings to add to the container's hosts file
    isolation str
    Isolation technology of the containers running the service. (Windows only). Defaults to default.
    labels Sequence[ServiceTaskSpecContainerSpecLabel]
    User-defined key/value metadata
    mounts Sequence[ServiceTaskSpecContainerSpecMount]
    Specification for mounts to be added to containers created as part of the service
    privileges ServiceTaskSpecContainerSpecPrivileges
    Security options for the container
    read_only bool
    Mount the container's root filesystem as read only
    secrets Sequence[ServiceTaskSpecContainerSpecSecret]
    References to zero or more secrets that will be exposed to the service
    stop_grace_period str
    Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h). If not specified or '0s' the destroy will not check if all tasks/containers of the service terminate.
    stop_signal str
    Signal to stop the container
    sysctl Mapping[str, Any]
    Sysctls config (Linux only)
    user str
    The user inside the container
    image String
    The image name to use for the containers of the service, like nginx:1.17.6. Also use the data-source or resource of docker.RemoteImage with the repo_digest or docker.RegistryImage with the name attribute for this, as shown in the examples.
    args List<String>
    Arguments to the command
    commands List<String>
    The command/entrypoint to be run in the image. According to the docker cli the override of the entrypoint is also passed to the command property and there is no entrypoint attribute in the ContainerSpec of the service.
    configs List<Property Map>
    References to zero or more configs that will be exposed to the service
    dir String
    The working directory for commands to run in
    dnsConfig Property Map
    Specification for DNS related configurations in resolver configuration file (resolv.conf)
    env Map<String>
    A list of environment variables in the form VAR="value"
    groups List<String>
    A list of additional groups that the container process will run as
    healthcheck Property Map
    A test to perform to check that the container is healthy
    hostname String
    The hostname to use for the container, as a valid RFC 1123 hostname
    hosts List<Property Map>
    A list of hostname/IP mappings to add to the container's hosts file
    isolation String
    Isolation technology of the containers running the service. (Windows only). Defaults to default.
    labels List<Property Map>
    User-defined key/value metadata
    mounts List<Property Map>
    Specification for mounts to be added to containers created as part of the service
    privileges Property Map
    Security options for the container
    readOnly Boolean
    Mount the container's root filesystem as read only
    secrets List<Property Map>
    References to zero or more secrets that will be exposed to the service
    stopGracePeriod String
    Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h). If not specified or '0s' the destroy will not check if all tasks/containers of the service terminate.
    stopSignal String
    Signal to stop the container
    sysctl Map<Any>
    Sysctls config (Linux only)
    user String
    The user inside the container

    ServiceTaskSpecContainerSpecConfig, ServiceTaskSpecContainerSpecConfigArgs

    ConfigId string
    ID of the specific config that we're referencing
    FileName string
    Represents the final filename in the filesystem
    ConfigName string
    Name of the config that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
    FileGid string
    Represents the file GID. Defaults to 0.
    FileMode int
    Represents represents the FileMode of the file. Defaults to 0o444.
    FileUid string
    Represents the file UID. Defaults to 0.
    ConfigId string
    ID of the specific config that we're referencing
    FileName string
    Represents the final filename in the filesystem
    ConfigName string
    Name of the config that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
    FileGid string
    Represents the file GID. Defaults to 0.
    FileMode int
    Represents represents the FileMode of the file. Defaults to 0o444.
    FileUid string
    Represents the file UID. Defaults to 0.
    configId String
    ID of the specific config that we're referencing
    fileName String
    Represents the final filename in the filesystem
    configName String
    Name of the config that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
    fileGid String
    Represents the file GID. Defaults to 0.
    fileMode Integer
    Represents represents the FileMode of the file. Defaults to 0o444.
    fileUid String
    Represents the file UID. Defaults to 0.
    configId string
    ID of the specific config that we're referencing
    fileName string
    Represents the final filename in the filesystem
    configName string
    Name of the config that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
    fileGid string
    Represents the file GID. Defaults to 0.
    fileMode number
    Represents represents the FileMode of the file. Defaults to 0o444.
    fileUid string
    Represents the file UID. Defaults to 0.
    config_id str
    ID of the specific config that we're referencing
    file_name str
    Represents the final filename in the filesystem
    config_name str
    Name of the config that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
    file_gid str
    Represents the file GID. Defaults to 0.
    file_mode int
    Represents represents the FileMode of the file. Defaults to 0o444.
    file_uid str
    Represents the file UID. Defaults to 0.
    configId String
    ID of the specific config that we're referencing
    fileName String
    Represents the final filename in the filesystem
    configName String
    Name of the config that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
    fileGid String
    Represents the file GID. Defaults to 0.
    fileMode Number
    Represents represents the FileMode of the file. Defaults to 0o444.
    fileUid String
    Represents the file UID. Defaults to 0.

    ServiceTaskSpecContainerSpecDnsConfig, ServiceTaskSpecContainerSpecDnsConfigArgs

    Nameservers List<string>
    The IP addresses of the name servers
    Options List<string>
    A list of internal resolver variables to be modified (e.g., debug, ndots:3, etc.)
    Searches List<string>
    A search list for host-name lookup
    Nameservers []string
    The IP addresses of the name servers
    Options []string
    A list of internal resolver variables to be modified (e.g., debug, ndots:3, etc.)
    Searches []string
    A search list for host-name lookup
    nameservers List<String>
    The IP addresses of the name servers
    options List<String>
    A list of internal resolver variables to be modified (e.g., debug, ndots:3, etc.)
    searches List<String>
    A search list for host-name lookup
    nameservers string[]
    The IP addresses of the name servers
    options string[]
    A list of internal resolver variables to be modified (e.g., debug, ndots:3, etc.)
    searches string[]
    A search list for host-name lookup
    nameservers Sequence[str]
    The IP addresses of the name servers
    options Sequence[str]
    A list of internal resolver variables to be modified (e.g., debug, ndots:3, etc.)
    searches Sequence[str]
    A search list for host-name lookup
    nameservers List<String>
    The IP addresses of the name servers
    options List<String>
    A list of internal resolver variables to be modified (e.g., debug, ndots:3, etc.)
    searches List<String>
    A search list for host-name lookup

    ServiceTaskSpecContainerSpecHealthcheck, ServiceTaskSpecContainerSpecHealthcheckArgs

    Tests List<string>
    The test to perform as list
    Interval string
    Time between running the check (ms|s|m|h). Defaults to 0s.
    Retries int
    Consecutive failures needed to report unhealthy. Defaults to 0
    StartPeriod string
    Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to 0s.
    Timeout string
    Maximum time to allow one check to run (ms|s|m|h). Defaults to 0s.
    Tests []string
    The test to perform as list
    Interval string
    Time between running the check (ms|s|m|h). Defaults to 0s.
    Retries int
    Consecutive failures needed to report unhealthy. Defaults to 0
    StartPeriod string
    Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to 0s.
    Timeout string
    Maximum time to allow one check to run (ms|s|m|h). Defaults to 0s.
    tests List<String>
    The test to perform as list
    interval String
    Time between running the check (ms|s|m|h). Defaults to 0s.
    retries Integer
    Consecutive failures needed to report unhealthy. Defaults to 0
    startPeriod String
    Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to 0s.
    timeout String
    Maximum time to allow one check to run (ms|s|m|h). Defaults to 0s.
    tests string[]
    The test to perform as list
    interval string
    Time between running the check (ms|s|m|h). Defaults to 0s.
    retries number
    Consecutive failures needed to report unhealthy. Defaults to 0
    startPeriod string
    Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to 0s.
    timeout string
    Maximum time to allow one check to run (ms|s|m|h). Defaults to 0s.
    tests Sequence[str]
    The test to perform as list
    interval str
    Time between running the check (ms|s|m|h). Defaults to 0s.
    retries int
    Consecutive failures needed to report unhealthy. Defaults to 0
    start_period str
    Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to 0s.
    timeout str
    Maximum time to allow one check to run (ms|s|m|h). Defaults to 0s.
    tests List<String>
    The test to perform as list
    interval String
    Time between running the check (ms|s|m|h). Defaults to 0s.
    retries Number
    Consecutive failures needed to report unhealthy. Defaults to 0
    startPeriod String
    Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to 0s.
    timeout String
    Maximum time to allow one check to run (ms|s|m|h). Defaults to 0s.

    ServiceTaskSpecContainerSpecHost, ServiceTaskSpecContainerSpecHostArgs

    Host string
    The name of the host
    Ip string
    The ip of the host
    Host string
    The name of the host
    Ip string
    The ip of the host
    host String
    The name of the host
    ip String
    The ip of the host
    host string
    The name of the host
    ip string
    The ip of the host
    host str
    The name of the host
    ip str
    The ip of the host
    host String
    The name of the host
    ip String
    The ip of the host

    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

    Target string
    Container path
    Type string
    The mount type
    BindOptions ServiceTaskSpecContainerSpecMountBindOptions
    Optional configuration for the bind type
    ReadOnly bool
    Whether the mount should be read-only
    Source string
    Mount source (e.g. a volume name, a host path)
    TmpfsOptions ServiceTaskSpecContainerSpecMountTmpfsOptions
    Optional configuration for the tmpfs type
    VolumeOptions ServiceTaskSpecContainerSpecMountVolumeOptions
    Optional configuration for the volume type
    Target string
    Container path
    Type string
    The mount type
    BindOptions ServiceTaskSpecContainerSpecMountBindOptions
    Optional configuration for the bind type
    ReadOnly bool
    Whether the mount should be read-only
    Source string
    Mount source (e.g. a volume name, a host path)
    TmpfsOptions ServiceTaskSpecContainerSpecMountTmpfsOptions
    Optional configuration for the tmpfs type
    VolumeOptions ServiceTaskSpecContainerSpecMountVolumeOptions
    Optional configuration for the volume type
    target String
    Container path
    type String
    The mount type
    bindOptions ServiceTaskSpecContainerSpecMountBindOptions
    Optional configuration for the bind type
    readOnly Boolean
    Whether the mount should be read-only
    source String
    Mount source (e.g. a volume name, a host path)
    tmpfsOptions ServiceTaskSpecContainerSpecMountTmpfsOptions
    Optional configuration for the tmpfs type
    volumeOptions ServiceTaskSpecContainerSpecMountVolumeOptions
    Optional configuration for the volume type
    target string
    Container path
    type string
    The mount type
    bindOptions ServiceTaskSpecContainerSpecMountBindOptions
    Optional configuration for the bind type
    readOnly boolean
    Whether the mount should be read-only
    source string
    Mount source (e.g. a volume name, a host path)
    tmpfsOptions ServiceTaskSpecContainerSpecMountTmpfsOptions
    Optional configuration for the tmpfs type
    volumeOptions ServiceTaskSpecContainerSpecMountVolumeOptions
    Optional configuration for the volume type
    target str
    Container path
    type str
    The mount type
    bind_options ServiceTaskSpecContainerSpecMountBindOptions
    Optional configuration for the bind type
    read_only bool
    Whether the mount should be read-only
    source str
    Mount source (e.g. a volume name, a host path)
    tmpfs_options ServiceTaskSpecContainerSpecMountTmpfsOptions
    Optional configuration for the tmpfs type
    volume_options ServiceTaskSpecContainerSpecMountVolumeOptions
    Optional configuration for the volume type
    target String
    Container path
    type String
    The mount type
    bindOptions Property Map
    Optional configuration for the bind type
    readOnly Boolean
    Whether the mount should be read-only
    source String
    Mount source (e.g. a volume name, a host path)
    tmpfsOptions Property Map
    Optional configuration for the tmpfs type
    volumeOptions Property Map
    Optional configuration for the volume type

    ServiceTaskSpecContainerSpecMountBindOptions, ServiceTaskSpecContainerSpecMountBindOptionsArgs

    Propagation string
    Bind propagation refers to whether or not mounts created within a given bind-mount or named volume can be propagated to replicas of that mount. See the docs for details. Defaults to rprivate
    Propagation string
    Bind propagation refers to whether or not mounts created within a given bind-mount or named volume can be propagated to replicas of that mount. See the docs for details. Defaults to rprivate
    propagation String
    Bind propagation refers to whether or not mounts created within a given bind-mount or named volume can be propagated to replicas of that mount. See the docs for details. Defaults to rprivate
    propagation string
    Bind propagation refers to whether or not mounts created within a given bind-mount or named volume can be propagated to replicas of that mount. See the docs for details. Defaults to rprivate
    propagation str
    Bind propagation refers to whether or not mounts created within a given bind-mount or named volume can be propagated to replicas of that mount. See the docs for details. Defaults to rprivate
    propagation String
    Bind propagation refers to whether or not mounts created within a given bind-mount or named volume can be propagated to replicas of that mount. See the docs for details. Defaults to rprivate

    ServiceTaskSpecContainerSpecMountTmpfsOptions, ServiceTaskSpecContainerSpecMountTmpfsOptionsArgs

    Mode int
    The permission mode for the tmpfs mount in an integer
    SizeBytes int
    The size for the tmpfs mount in bytes
    Mode int
    The permission mode for the tmpfs mount in an integer
    SizeBytes int
    The size for the tmpfs mount in bytes
    mode Integer
    The permission mode for the tmpfs mount in an integer
    sizeBytes Integer
    The size for the tmpfs mount in bytes
    mode number
    The permission mode for the tmpfs mount in an integer
    sizeBytes number
    The size for the tmpfs mount in bytes
    mode int
    The permission mode for the tmpfs mount in an integer
    size_bytes int
    The size for the tmpfs mount in bytes
    mode Number
    The permission mode for the tmpfs mount in an integer
    sizeBytes Number
    The size for the tmpfs mount in bytes

    ServiceTaskSpecContainerSpecMountVolumeOptions, ServiceTaskSpecContainerSpecMountVolumeOptionsArgs

    DriverName string
    Name of the driver to use to create the volume
    DriverOptions Dictionary<string, string>
    key/value map of driver specific options
    Labels List<ServiceTaskSpecContainerSpecMountVolumeOptionsLabel>
    User-defined key/value metadata
    NoCopy bool
    Populate volume with data from the target
    DriverName string
    Name of the driver to use to create the volume
    DriverOptions map[string]string
    key/value map of driver specific options
    Labels []ServiceTaskSpecContainerSpecMountVolumeOptionsLabel
    User-defined key/value metadata
    NoCopy bool
    Populate volume with data from the target
    driverName String
    Name of the driver to use to create the volume
    driverOptions Map<String,String>
    key/value map of driver specific options
    labels List<ServiceTaskSpecContainerSpecMountVolumeOptionsLabel>
    User-defined key/value metadata
    noCopy Boolean
    Populate volume with data from the target
    driverName string
    Name of the driver to use to create the volume
    driverOptions {[key: string]: string}
    key/value map of driver specific options
    labels ServiceTaskSpecContainerSpecMountVolumeOptionsLabel[]
    User-defined key/value metadata
    noCopy boolean
    Populate volume with data from the target
    driver_name str
    Name of the driver to use to create the volume
    driver_options Mapping[str, str]
    key/value map of driver specific options
    labels Sequence[ServiceTaskSpecContainerSpecMountVolumeOptionsLabel]
    User-defined key/value metadata
    no_copy bool
    Populate volume with data from the target
    driverName String
    Name of the driver to use to create the volume
    driverOptions Map<String>
    key/value map of driver specific options
    labels List<Property Map>
    User-defined key/value metadata
    noCopy Boolean
    Populate volume with data from the target

    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

    CredentialSpec ServiceTaskSpecContainerSpecPrivilegesCredentialSpec
    CredentialSpec for managed service account (Windows only)
    SeLinuxContext ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext
    SELinux labels of the container
    CredentialSpec ServiceTaskSpecContainerSpecPrivilegesCredentialSpec
    CredentialSpec for managed service account (Windows only)
    SeLinuxContext ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext
    SELinux labels of the container
    credentialSpec ServiceTaskSpecContainerSpecPrivilegesCredentialSpec
    CredentialSpec for managed service account (Windows only)
    seLinuxContext ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext
    SELinux labels of the container
    credentialSpec ServiceTaskSpecContainerSpecPrivilegesCredentialSpec
    CredentialSpec for managed service account (Windows only)
    seLinuxContext ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext
    SELinux labels of the container
    credential_spec ServiceTaskSpecContainerSpecPrivilegesCredentialSpec
    CredentialSpec for managed service account (Windows only)
    se_linux_context ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext
    SELinux labels of the container
    credentialSpec Property Map
    CredentialSpec for managed service account (Windows only)
    seLinuxContext Property Map
    SELinux labels of the container

    ServiceTaskSpecContainerSpecPrivilegesCredentialSpec, ServiceTaskSpecContainerSpecPrivilegesCredentialSpecArgs

    File string
    Load credential spec from this file
    Registry string
    Load credential spec from this value in the Windows registry
    File string
    Load credential spec from this file
    Registry string
    Load credential spec from this value in the Windows registry
    file String
    Load credential spec from this file
    registry String
    Load credential spec from this value in the Windows registry
    file string
    Load credential spec from this file
    registry string
    Load credential spec from this value in the Windows registry
    file str
    Load credential spec from this file
    registry str
    Load credential spec from this value in the Windows registry
    file String
    Load credential spec from this file
    registry String
    Load credential spec from this value in the Windows registry

    ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext, ServiceTaskSpecContainerSpecPrivilegesSeLinuxContextArgs

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

    ServiceTaskSpecContainerSpecSecret, ServiceTaskSpecContainerSpecSecretArgs

    FileName string
    Represents the final filename in the filesystem
    SecretId string
    ID of the specific secret that we're referencing
    FileGid string
    Represents the file GID. Defaults to 0
    FileMode int
    Represents represents the FileMode of the file. Defaults to 0o444
    FileUid string
    Represents the file UID. Defaults to 0
    SecretName string
    Name of the secret that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
    FileName string
    Represents the final filename in the filesystem
    SecretId string
    ID of the specific secret that we're referencing
    FileGid string
    Represents the file GID. Defaults to 0
    FileMode int
    Represents represents the FileMode of the file. Defaults to 0o444
    FileUid string
    Represents the file UID. Defaults to 0
    SecretName string
    Name of the secret that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
    fileName String
    Represents the final filename in the filesystem
    secretId String
    ID of the specific secret that we're referencing
    fileGid String
    Represents the file GID. Defaults to 0
    fileMode Integer
    Represents represents the FileMode of the file. Defaults to 0o444
    fileUid String
    Represents the file UID. Defaults to 0
    secretName String
    Name of the secret that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
    fileName string
    Represents the final filename in the filesystem
    secretId string
    ID of the specific secret that we're referencing
    fileGid string
    Represents the file GID. Defaults to 0
    fileMode number
    Represents represents the FileMode of the file. Defaults to 0o444
    fileUid string
    Represents the file UID. Defaults to 0
    secretName string
    Name of the secret that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
    file_name str
    Represents the final filename in the filesystem
    secret_id str
    ID of the specific secret that we're referencing
    file_gid str
    Represents the file GID. Defaults to 0
    file_mode int
    Represents represents the FileMode of the file. Defaults to 0o444
    file_uid str
    Represents the file UID. Defaults to 0
    secret_name str
    Name of the secret that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
    fileName String
    Represents the final filename in the filesystem
    secretId String
    ID of the specific secret that we're referencing
    fileGid String
    Represents the file GID. Defaults to 0
    fileMode Number
    Represents represents the FileMode of the file. Defaults to 0o444
    fileUid String
    Represents the file UID. Defaults to 0
    secretName String
    Name of the secret that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID

    ServiceTaskSpecLogDriver, ServiceTaskSpecLogDriverArgs

    Name string
    The logging driver to use
    Options Dictionary<string, string>
    The options for the logging driver
    Name string
    The logging driver to use
    Options map[string]string
    The options for the logging driver
    name String
    The logging driver to use
    options Map<String,String>
    The options for the logging driver
    name string
    The logging driver to use
    options {[key: string]: string}
    The options for the logging driver
    name str
    The logging driver to use
    options Mapping[str, str]
    The options for the logging driver
    name String
    The logging driver to use
    options Map<String>
    The options for the logging driver

    ServiceTaskSpecNetworksAdvanced, ServiceTaskSpecNetworksAdvancedArgs

    Name string
    The name/id of the network.
    Aliases List<string>
    The network aliases of the container in the specific network.
    DriverOpts List<string>
    An array of driver options for the network, e.g. opts1=value
    Name string
    The name/id of the network.
    Aliases []string
    The network aliases of the container in the specific network.
    DriverOpts []string
    An array of driver options for the network, e.g. opts1=value
    name String
    The name/id of the network.
    aliases List<String>
    The network aliases of the container in the specific network.
    driverOpts List<String>
    An array of driver options for the network, e.g. opts1=value
    name string
    The name/id of the network.
    aliases string[]
    The network aliases of the container in the specific network.
    driverOpts string[]
    An array of driver options for the network, e.g. opts1=value
    name str
    The name/id of the network.
    aliases Sequence[str]
    The network aliases of the container in the specific network.
    driver_opts Sequence[str]
    An array of driver options for the network, e.g. opts1=value
    name String
    The name/id of the network.
    aliases List<String>
    The network aliases of the container in the specific network.
    driverOpts List<String>
    An array of driver options for the network, e.g. opts1=value

    ServiceTaskSpecPlacement, ServiceTaskSpecPlacementArgs

    Constraints List<string>
    An array of constraints. e.g.: node.role==manager
    MaxReplicas int
    Maximum number of replicas for per node (default value is 0, which is unlimited)
    Platforms List<ServiceTaskSpecPlacementPlatform>
    Platforms stores all the platforms that the service's image can run on
    Prefs List<string>
    Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: spread=node.role.manager
    Constraints []string
    An array of constraints. e.g.: node.role==manager
    MaxReplicas int
    Maximum number of replicas for per node (default value is 0, which is unlimited)
    Platforms []ServiceTaskSpecPlacementPlatform
    Platforms stores all the platforms that the service's image can run on
    Prefs []string
    Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: spread=node.role.manager
    constraints List<String>
    An array of constraints. e.g.: node.role==manager
    maxReplicas Integer
    Maximum number of replicas for per node (default value is 0, which is unlimited)
    platforms List<ServiceTaskSpecPlacementPlatform>
    Platforms stores all the platforms that the service's image can run on
    prefs List<String>
    Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: spread=node.role.manager
    constraints string[]
    An array of constraints. e.g.: node.role==manager
    maxReplicas number
    Maximum number of replicas for per node (default value is 0, which is unlimited)
    platforms ServiceTaskSpecPlacementPlatform[]
    Platforms stores all the platforms that the service's image can run on
    prefs string[]
    Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: spread=node.role.manager
    constraints Sequence[str]
    An array of constraints. e.g.: node.role==manager
    max_replicas int
    Maximum number of replicas for per node (default value is 0, which is unlimited)
    platforms Sequence[ServiceTaskSpecPlacementPlatform]
    Platforms stores all the platforms that the service's image can run on
    prefs Sequence[str]
    Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: spread=node.role.manager
    constraints List<String>
    An array of constraints. e.g.: node.role==manager
    maxReplicas Number
    Maximum number of replicas for per node (default value is 0, which is unlimited)
    platforms List<Property Map>
    Platforms stores all the platforms that the service's image can run on
    prefs List<String>
    Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: spread=node.role.manager

    ServiceTaskSpecPlacementPlatform, ServiceTaskSpecPlacementPlatformArgs

    Architecture string
    The architecture, e.g. amd64
    Os string
    The operation system, e.g. linux
    Architecture string
    The architecture, e.g. amd64
    Os string
    The operation system, e.g. linux
    architecture String
    The architecture, e.g. amd64
    os String
    The operation system, e.g. linux
    architecture string
    The architecture, e.g. amd64
    os string
    The operation system, e.g. linux
    architecture str
    The architecture, e.g. amd64
    os str
    The operation system, e.g. linux
    architecture String
    The architecture, e.g. amd64
    os String
    The operation system, e.g. linux

    ServiceTaskSpecResources, ServiceTaskSpecResourcesArgs

    Limits ServiceTaskSpecResourcesLimits
    Describes the resources which can be advertised by a node and requested by a task
    Reservation ServiceTaskSpecResourcesReservation
    An object describing the resources which can be advertised by a node and requested by a task
    Limits ServiceTaskSpecResourcesLimits
    Describes the resources which can be advertised by a node and requested by a task
    Reservation ServiceTaskSpecResourcesReservation
    An object describing the resources which can be advertised by a node and requested by a task
    limits ServiceTaskSpecResourcesLimits
    Describes the resources which can be advertised by a node and requested by a task
    reservation ServiceTaskSpecResourcesReservation
    An object describing the resources which can be advertised by a node and requested by a task
    limits ServiceTaskSpecResourcesLimits
    Describes the resources which can be advertised by a node and requested by a task
    reservation ServiceTaskSpecResourcesReservation
    An object describing the resources which can be advertised by a node and requested by a task
    limits ServiceTaskSpecResourcesLimits
    Describes the resources which can be advertised by a node and requested by a task
    reservation ServiceTaskSpecResourcesReservation
    An object describing the resources which can be advertised by a node and requested by a task
    limits Property Map
    Describes the resources which can be advertised by a node and requested by a task
    reservation Property Map
    An object describing the resources which can be advertised by a node and requested by a task

    ServiceTaskSpecResourcesLimits, ServiceTaskSpecResourcesLimitsArgs

    MemoryBytes int
    The amounf of memory in bytes the container allocates
    NanoCpus int
    CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000
    MemoryBytes int
    The amounf of memory in bytes the container allocates
    NanoCpus int
    CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000
    memoryBytes Integer
    The amounf of memory in bytes the container allocates
    nanoCpus Integer
    CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000
    memoryBytes number
    The amounf of memory in bytes the container allocates
    nanoCpus number
    CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000
    memory_bytes int
    The amounf of memory in bytes the container allocates
    nano_cpus int
    CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000
    memoryBytes Number
    The amounf of memory in bytes the container allocates
    nanoCpus Number
    CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000

    ServiceTaskSpecResourcesReservation, ServiceTaskSpecResourcesReservationArgs

    GenericResources ServiceTaskSpecResourcesReservationGenericResources
    User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)
    MemoryBytes int
    The amounf of memory in bytes the container allocates
    NanoCpus int
    CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000
    GenericResources ServiceTaskSpecResourcesReservationGenericResources
    User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)
    MemoryBytes int
    The amounf of memory in bytes the container allocates
    NanoCpus int
    CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000
    genericResources ServiceTaskSpecResourcesReservationGenericResources
    User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)
    memoryBytes Integer
    The amounf of memory in bytes the container allocates
    nanoCpus Integer
    CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000
    genericResources ServiceTaskSpecResourcesReservationGenericResources
    User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)
    memoryBytes number
    The amounf of memory in bytes the container allocates
    nanoCpus number
    CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000
    generic_resources ServiceTaskSpecResourcesReservationGenericResources
    User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)
    memory_bytes int
    The amounf of memory in bytes the container allocates
    nano_cpus int
    CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000
    genericResources Property Map
    User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)
    memoryBytes Number
    The amounf of memory in bytes the container allocates
    nanoCpus Number
    CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000

    ServiceTaskSpecResourcesReservationGenericResources, ServiceTaskSpecResourcesReservationGenericResourcesArgs

    DiscreteResourcesSpecs List<string>
    The Integer resources
    NamedResourcesSpecs List<string>
    The String resources
    DiscreteResourcesSpecs []string
    The Integer resources
    NamedResourcesSpecs []string
    The String resources
    discreteResourcesSpecs List<String>
    The Integer resources
    namedResourcesSpecs List<String>
    The String resources
    discreteResourcesSpecs string[]
    The Integer resources
    namedResourcesSpecs string[]
    The String resources
    discrete_resources_specs Sequence[str]
    The Integer resources
    named_resources_specs Sequence[str]
    The String resources
    discreteResourcesSpecs List<String>
    The Integer resources
    namedResourcesSpecs List<String>
    The String resources

    ServiceTaskSpecRestartPolicy, ServiceTaskSpecRestartPolicyArgs

    Condition string
    Condition for restart
    Delay string
    Delay between restart attempts (ms|s|m|h)
    MaxAttempts int
    Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)
    Window string
    The time window used to evaluate the restart policy (default value is 0, which is unbounded) (ms|s|m|h)
    Condition string
    Condition for restart
    Delay string
    Delay between restart attempts (ms|s|m|h)
    MaxAttempts int
    Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)
    Window string
    The time window used to evaluate the restart policy (default value is 0, which is unbounded) (ms|s|m|h)
    condition String
    Condition for restart
    delay String
    Delay between restart attempts (ms|s|m|h)
    maxAttempts Integer
    Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)
    window String
    The time window used to evaluate the restart policy (default value is 0, which is unbounded) (ms|s|m|h)
    condition string
    Condition for restart
    delay string
    Delay between restart attempts (ms|s|m|h)
    maxAttempts number
    Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)
    window string
    The time window used to evaluate the restart policy (default value is 0, which is unbounded) (ms|s|m|h)
    condition str
    Condition for restart
    delay str
    Delay between restart attempts (ms|s|m|h)
    max_attempts int
    Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)
    window str
    The time window used to evaluate the restart policy (default value is 0, which is unbounded) (ms|s|m|h)
    condition String
    Condition for restart
    delay String
    Delay between restart attempts (ms|s|m|h)
    maxAttempts Number
    Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)
    window String
    The time window used to evaluate the restart policy (default value is 0, which is unbounded) (ms|s|m|h)

    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

    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
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Docker pulumi/pulumi-docker
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the docker Terraform Provider.
    docker logo
    Docker v4.5.4 published on Friday, May 24, 2024 by Pulumi