pulumi-docker 4.6.0b4__py3-none-any.whl → 4.6.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulumi-docker might be problematic. Click here for more details.

pulumi_docker/service.py CHANGED
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
  from ._inputs import *
@@ -321,73 +326,66 @@ class Service(pulumi.CustomResource):
321
326
  def __init__(__self__,
322
327
  resource_name: str,
323
328
  opts: Optional[pulumi.ResourceOptions] = None,
324
- auth: Optional[pulumi.Input[pulumi.InputType['ServiceAuthArgs']]] = None,
325
- converge_config: Optional[pulumi.Input[pulumi.InputType['ServiceConvergeConfigArgs']]] = None,
326
- endpoint_spec: Optional[pulumi.Input[pulumi.InputType['ServiceEndpointSpecArgs']]] = None,
327
- labels: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServiceLabelArgs']]]]] = None,
328
- mode: Optional[pulumi.Input[pulumi.InputType['ServiceModeArgs']]] = None,
329
+ auth: Optional[pulumi.Input[Union['ServiceAuthArgs', 'ServiceAuthArgsDict']]] = None,
330
+ converge_config: Optional[pulumi.Input[Union['ServiceConvergeConfigArgs', 'ServiceConvergeConfigArgsDict']]] = None,
331
+ endpoint_spec: Optional[pulumi.Input[Union['ServiceEndpointSpecArgs', 'ServiceEndpointSpecArgsDict']]] = None,
332
+ labels: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ServiceLabelArgs', 'ServiceLabelArgsDict']]]]] = None,
333
+ mode: Optional[pulumi.Input[Union['ServiceModeArgs', 'ServiceModeArgsDict']]] = None,
329
334
  name: Optional[pulumi.Input[str]] = None,
330
- rollback_config: Optional[pulumi.Input[pulumi.InputType['ServiceRollbackConfigArgs']]] = None,
331
- task_spec: Optional[pulumi.Input[pulumi.InputType['ServiceTaskSpecArgs']]] = None,
332
- update_config: Optional[pulumi.Input[pulumi.InputType['ServiceUpdateConfigArgs']]] = None,
335
+ rollback_config: Optional[pulumi.Input[Union['ServiceRollbackConfigArgs', 'ServiceRollbackConfigArgsDict']]] = None,
336
+ task_spec: Optional[pulumi.Input[Union['ServiceTaskSpecArgs', 'ServiceTaskSpecArgsDict']]] = None,
337
+ update_config: Optional[pulumi.Input[Union['ServiceUpdateConfigArgs', 'ServiceUpdateConfigArgsDict']]] = None,
333
338
  __props__=None):
334
339
  """
335
- <!-- Bug: Type and Name are switched -->
336
- This resource manages the lifecycle of a Docker service. By default, the creation, update and delete of services are detached.
337
- With the Converge Config Name of the service
338
- - `task_spec` (Block List, Min: 1, Max: 1) User modifiable task configuration (see below for nested schema)
339
-
340
340
  ## Import
341
341
 
342
342
  ### Example
343
343
 
344
- Assuming you created a `service` as follows
345
-
346
- #!/bin/bash
347
-
348
- docker service create --name foo -p 8080:80 nginx
349
-
350
- prints th ID
351
-
352
- 4pcphbxkfn2rffhbhe6czytgi
353
-
354
- you provide the definition for the resource as follows
355
-
356
- terraform
344
+ Assuming you created a `service` as follows
357
345
 
358
- resource "docker_service" "foo" {
346
+ #!/bin/bash
359
347
 
360
- name = "foo"
348
+ docker service create --name foo -p 8080:80 nginx
361
349
 
362
- task_spec {
350
+ prints th ID
363
351
 
364
- container_spec {
352
+ 4pcphbxkfn2rffhbhe6czytgi
365
353
 
366
- image = "nginx"
354
+ you provide the definition for the resource as follows
367
355
 
368
- }
356
+ terraform
369
357
 
370
- }
358
+ resource "docker_service" "foo" {
371
359
 
372
- endpoint_spec {
360
+ name = "foo"
373
361
 
374
- ports {
362
+ task_spec {
375
363
 
376
- target_port
364
+ container_spec {
365
+
366
+ image = "nginx"
367
+
368
+ }
377
369
 
378
- = "80"
370
+ }
379
371
 
380
- published_port = "8080"
372
+ endpoint_spec {
381
373
 
382
- }
374
+ ports {
375
+
376
+ target_port = "80"
377
+
378
+ published_port = "8080"
379
+
380
+ }
383
381
 
384
- }
382
+ }
385
383
 
386
- }
384
+ }
387
385
 
388
- then the import command is as follows
386
+ then the import command is as follows
389
387
 
390
- #!/bin/bash
388
+ #!/bin/bash
391
389
 
392
390
  ```sh
393
391
  $ pulumi import docker:index/service:Service foo 4pcphbxkfn2rffhbhe6czytgi
@@ -395,15 +393,15 @@ class Service(pulumi.CustomResource):
395
393
 
396
394
  :param str resource_name: The name of the resource.
397
395
  :param pulumi.ResourceOptions opts: Options for the resource.
398
- :param pulumi.Input[pulumi.InputType['ServiceAuthArgs']] auth: Configuration for the authentication for pulling the images of the service
399
- :param pulumi.Input[pulumi.InputType['ServiceConvergeConfigArgs']] converge_config: A configuration to ensure that a service converges aka reaches the desired that of all task up and running
400
- :param pulumi.Input[pulumi.InputType['ServiceEndpointSpecArgs']] endpoint_spec: Properties that can be configured to access and load balance a service
401
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServiceLabelArgs']]]] labels: User-defined key/value metadata
402
- :param pulumi.Input[pulumi.InputType['ServiceModeArgs']] mode: Scheduling mode for the service
396
+ :param pulumi.Input[Union['ServiceAuthArgs', 'ServiceAuthArgsDict']] auth: Configuration for the authentication for pulling the images of the service
397
+ :param pulumi.Input[Union['ServiceConvergeConfigArgs', 'ServiceConvergeConfigArgsDict']] converge_config: A configuration to ensure that a service converges aka reaches the desired that of all task up and running
398
+ :param pulumi.Input[Union['ServiceEndpointSpecArgs', 'ServiceEndpointSpecArgsDict']] endpoint_spec: Properties that can be configured to access and load balance a service
399
+ :param pulumi.Input[Sequence[pulumi.Input[Union['ServiceLabelArgs', 'ServiceLabelArgsDict']]]] labels: User-defined key/value metadata
400
+ :param pulumi.Input[Union['ServiceModeArgs', 'ServiceModeArgsDict']] mode: Scheduling mode for the service
403
401
  :param pulumi.Input[str] name: Name of the service
404
- :param pulumi.Input[pulumi.InputType['ServiceRollbackConfigArgs']] rollback_config: Specification for the rollback strategy of the service
405
- :param pulumi.Input[pulumi.InputType['ServiceTaskSpecArgs']] task_spec: User modifiable task configuration
406
- :param pulumi.Input[pulumi.InputType['ServiceUpdateConfigArgs']] update_config: Specification for the update strategy of the service
402
+ :param pulumi.Input[Union['ServiceRollbackConfigArgs', 'ServiceRollbackConfigArgsDict']] rollback_config: Specification for the rollback strategy of the service
403
+ :param pulumi.Input[Union['ServiceTaskSpecArgs', 'ServiceTaskSpecArgsDict']] task_spec: User modifiable task configuration
404
+ :param pulumi.Input[Union['ServiceUpdateConfigArgs', 'ServiceUpdateConfigArgsDict']] update_config: Specification for the update strategy of the service
407
405
  """
408
406
  ...
409
407
  @overload
@@ -412,62 +410,55 @@ class Service(pulumi.CustomResource):
412
410
  args: ServiceArgs,
413
411
  opts: Optional[pulumi.ResourceOptions] = None):
414
412
  """
415
- <!-- Bug: Type and Name are switched -->
416
- This resource manages the lifecycle of a Docker service. By default, the creation, update and delete of services are detached.
417
- With the Converge Config Name of the service
418
- - `task_spec` (Block List, Min: 1, Max: 1) User modifiable task configuration (see below for nested schema)
419
-
420
413
  ## Import
421
414
 
422
415
  ### Example
423
416
 
424
- Assuming you created a `service` as follows
425
-
426
- #!/bin/bash
427
-
428
- docker service create --name foo -p 8080:80 nginx
429
-
430
- prints th ID
431
-
432
- 4pcphbxkfn2rffhbhe6czytgi
433
-
434
- you provide the definition for the resource as follows
435
-
436
- terraform
417
+ Assuming you created a `service` as follows
437
418
 
438
- resource "docker_service" "foo" {
419
+ #!/bin/bash
439
420
 
440
- name = "foo"
421
+ docker service create --name foo -p 8080:80 nginx
441
422
 
442
- task_spec {
423
+ prints th ID
443
424
 
444
- container_spec {
425
+ 4pcphbxkfn2rffhbhe6czytgi
445
426
 
446
- image = "nginx"
427
+ you provide the definition for the resource as follows
447
428
 
448
- }
429
+ terraform
449
430
 
450
- }
431
+ resource "docker_service" "foo" {
451
432
 
452
- endpoint_spec {
433
+ name = "foo"
453
434
 
454
- ports {
435
+ task_spec {
455
436
 
456
- target_port
437
+ container_spec {
438
+
439
+ image = "nginx"
440
+
441
+ }
457
442
 
458
- = "80"
443
+ }
459
444
 
460
- published_port = "8080"
445
+ endpoint_spec {
461
446
 
462
- }
447
+ ports {
448
+
449
+ target_port = "80"
450
+
451
+ published_port = "8080"
452
+
453
+ }
463
454
 
464
- }
455
+ }
465
456
 
466
- }
457
+ }
467
458
 
468
- then the import command is as follows
459
+ then the import command is as follows
469
460
 
470
- #!/bin/bash
461
+ #!/bin/bash
471
462
 
472
463
  ```sh
473
464
  $ pulumi import docker:index/service:Service foo 4pcphbxkfn2rffhbhe6czytgi
@@ -488,15 +479,15 @@ class Service(pulumi.CustomResource):
488
479
  def _internal_init(__self__,
489
480
  resource_name: str,
490
481
  opts: Optional[pulumi.ResourceOptions] = None,
491
- auth: Optional[pulumi.Input[pulumi.InputType['ServiceAuthArgs']]] = None,
492
- converge_config: Optional[pulumi.Input[pulumi.InputType['ServiceConvergeConfigArgs']]] = None,
493
- endpoint_spec: Optional[pulumi.Input[pulumi.InputType['ServiceEndpointSpecArgs']]] = None,
494
- labels: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServiceLabelArgs']]]]] = None,
495
- mode: Optional[pulumi.Input[pulumi.InputType['ServiceModeArgs']]] = None,
482
+ auth: Optional[pulumi.Input[Union['ServiceAuthArgs', 'ServiceAuthArgsDict']]] = None,
483
+ converge_config: Optional[pulumi.Input[Union['ServiceConvergeConfigArgs', 'ServiceConvergeConfigArgsDict']]] = None,
484
+ endpoint_spec: Optional[pulumi.Input[Union['ServiceEndpointSpecArgs', 'ServiceEndpointSpecArgsDict']]] = None,
485
+ labels: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ServiceLabelArgs', 'ServiceLabelArgsDict']]]]] = None,
486
+ mode: Optional[pulumi.Input[Union['ServiceModeArgs', 'ServiceModeArgsDict']]] = None,
496
487
  name: Optional[pulumi.Input[str]] = None,
497
- rollback_config: Optional[pulumi.Input[pulumi.InputType['ServiceRollbackConfigArgs']]] = None,
498
- task_spec: Optional[pulumi.Input[pulumi.InputType['ServiceTaskSpecArgs']]] = None,
499
- update_config: Optional[pulumi.Input[pulumi.InputType['ServiceUpdateConfigArgs']]] = None,
488
+ rollback_config: Optional[pulumi.Input[Union['ServiceRollbackConfigArgs', 'ServiceRollbackConfigArgsDict']]] = None,
489
+ task_spec: Optional[pulumi.Input[Union['ServiceTaskSpecArgs', 'ServiceTaskSpecArgsDict']]] = None,
490
+ update_config: Optional[pulumi.Input[Union['ServiceUpdateConfigArgs', 'ServiceUpdateConfigArgsDict']]] = None,
500
491
  __props__=None):
501
492
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
502
493
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -527,15 +518,15 @@ class Service(pulumi.CustomResource):
527
518
  def get(resource_name: str,
528
519
  id: pulumi.Input[str],
529
520
  opts: Optional[pulumi.ResourceOptions] = None,
530
- auth: Optional[pulumi.Input[pulumi.InputType['ServiceAuthArgs']]] = None,
531
- converge_config: Optional[pulumi.Input[pulumi.InputType['ServiceConvergeConfigArgs']]] = None,
532
- endpoint_spec: Optional[pulumi.Input[pulumi.InputType['ServiceEndpointSpecArgs']]] = None,
533
- labels: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServiceLabelArgs']]]]] = None,
534
- mode: Optional[pulumi.Input[pulumi.InputType['ServiceModeArgs']]] = None,
521
+ auth: Optional[pulumi.Input[Union['ServiceAuthArgs', 'ServiceAuthArgsDict']]] = None,
522
+ converge_config: Optional[pulumi.Input[Union['ServiceConvergeConfigArgs', 'ServiceConvergeConfigArgsDict']]] = None,
523
+ endpoint_spec: Optional[pulumi.Input[Union['ServiceEndpointSpecArgs', 'ServiceEndpointSpecArgsDict']]] = None,
524
+ labels: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ServiceLabelArgs', 'ServiceLabelArgsDict']]]]] = None,
525
+ mode: Optional[pulumi.Input[Union['ServiceModeArgs', 'ServiceModeArgsDict']]] = None,
535
526
  name: Optional[pulumi.Input[str]] = None,
536
- rollback_config: Optional[pulumi.Input[pulumi.InputType['ServiceRollbackConfigArgs']]] = None,
537
- task_spec: Optional[pulumi.Input[pulumi.InputType['ServiceTaskSpecArgs']]] = None,
538
- update_config: Optional[pulumi.Input[pulumi.InputType['ServiceUpdateConfigArgs']]] = None) -> 'Service':
527
+ rollback_config: Optional[pulumi.Input[Union['ServiceRollbackConfigArgs', 'ServiceRollbackConfigArgsDict']]] = None,
528
+ task_spec: Optional[pulumi.Input[Union['ServiceTaskSpecArgs', 'ServiceTaskSpecArgsDict']]] = None,
529
+ update_config: Optional[pulumi.Input[Union['ServiceUpdateConfigArgs', 'ServiceUpdateConfigArgsDict']]] = None) -> 'Service':
539
530
  """
540
531
  Get an existing Service resource's state with the given name, id, and optional extra
541
532
  properties used to qualify the lookup.
@@ -543,15 +534,15 @@ class Service(pulumi.CustomResource):
543
534
  :param str resource_name: The unique name of the resulting resource.
544
535
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
545
536
  :param pulumi.ResourceOptions opts: Options for the resource.
546
- :param pulumi.Input[pulumi.InputType['ServiceAuthArgs']] auth: Configuration for the authentication for pulling the images of the service
547
- :param pulumi.Input[pulumi.InputType['ServiceConvergeConfigArgs']] converge_config: A configuration to ensure that a service converges aka reaches the desired that of all task up and running
548
- :param pulumi.Input[pulumi.InputType['ServiceEndpointSpecArgs']] endpoint_spec: Properties that can be configured to access and load balance a service
549
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServiceLabelArgs']]]] labels: User-defined key/value metadata
550
- :param pulumi.Input[pulumi.InputType['ServiceModeArgs']] mode: Scheduling mode for the service
537
+ :param pulumi.Input[Union['ServiceAuthArgs', 'ServiceAuthArgsDict']] auth: Configuration for the authentication for pulling the images of the service
538
+ :param pulumi.Input[Union['ServiceConvergeConfigArgs', 'ServiceConvergeConfigArgsDict']] converge_config: A configuration to ensure that a service converges aka reaches the desired that of all task up and running
539
+ :param pulumi.Input[Union['ServiceEndpointSpecArgs', 'ServiceEndpointSpecArgsDict']] endpoint_spec: Properties that can be configured to access and load balance a service
540
+ :param pulumi.Input[Sequence[pulumi.Input[Union['ServiceLabelArgs', 'ServiceLabelArgsDict']]]] labels: User-defined key/value metadata
541
+ :param pulumi.Input[Union['ServiceModeArgs', 'ServiceModeArgsDict']] mode: Scheduling mode for the service
551
542
  :param pulumi.Input[str] name: Name of the service
552
- :param pulumi.Input[pulumi.InputType['ServiceRollbackConfigArgs']] rollback_config: Specification for the rollback strategy of the service
553
- :param pulumi.Input[pulumi.InputType['ServiceTaskSpecArgs']] task_spec: User modifiable task configuration
554
- :param pulumi.Input[pulumi.InputType['ServiceUpdateConfigArgs']] update_config: Specification for the update strategy of the service
543
+ :param pulumi.Input[Union['ServiceRollbackConfigArgs', 'ServiceRollbackConfigArgsDict']] rollback_config: Specification for the rollback strategy of the service
544
+ :param pulumi.Input[Union['ServiceTaskSpecArgs', 'ServiceTaskSpecArgsDict']] task_spec: User modifiable task configuration
545
+ :param pulumi.Input[Union['ServiceUpdateConfigArgs', 'ServiceUpdateConfigArgsDict']] update_config: Specification for the update strategy of the service
555
546
  """
556
547
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
557
548
 
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = ['ServiceConfigArgs', 'ServiceConfig']
@@ -103,31 +108,31 @@ class ServiceConfig(pulumi.CustomResource):
103
108
 
104
109
  ### Example
105
110
 
106
- Assuming you created a `config` as follows
111
+ Assuming you created a `config` as follows
107
112
 
108
- #!/bin/bash
113
+ #!/bin/bash
109
114
 
110
- printf '{"a":"b"}' | docker config create foo -
115
+ printf '{"a":"b"}' | docker config create foo -
111
116
 
112
- prints the id
117
+ prints the id
113
118
 
114
- 08c26c477474478d971139f750984775a7f019dbe8a2e7f09d66a187c009e66d
119
+ 08c26c477474478d971139f750984775a7f019dbe8a2e7f09d66a187c009e66d
115
120
 
116
- you provide the definition for the resource as follows
121
+ you provide the definition for the resource as follows
117
122
 
118
- terraform
123
+ terraform
119
124
 
120
- resource "docker_config" "foo" {
125
+ resource "docker_config" "foo" {
121
126
 
122
- name = "foo"
127
+ name = "foo"
123
128
 
124
- data = base64encode("{\\"a\\": \\"b\\"}")
129
+ data = base64encode("{\\"a\\": \\"b\\"}")
125
130
 
126
- }
131
+ }
127
132
 
128
- then the import command is as follows
133
+ then the import command is as follows
129
134
 
130
- #!/bin/bash
135
+ #!/bin/bash
131
136
 
132
137
  ```sh
133
138
  $ pulumi import docker:index/serviceConfig:ServiceConfig foo 08c26c477474478d971139f750984775a7f019dbe8a2e7f09d66a187c009e66d
@@ -149,31 +154,31 @@ class ServiceConfig(pulumi.CustomResource):
149
154
 
150
155
  ### Example
151
156
 
152
- Assuming you created a `config` as follows
157
+ Assuming you created a `config` as follows
153
158
 
154
- #!/bin/bash
159
+ #!/bin/bash
155
160
 
156
- printf '{"a":"b"}' | docker config create foo -
161
+ printf '{"a":"b"}' | docker config create foo -
157
162
 
158
- prints the id
163
+ prints the id
159
164
 
160
- 08c26c477474478d971139f750984775a7f019dbe8a2e7f09d66a187c009e66d
165
+ 08c26c477474478d971139f750984775a7f019dbe8a2e7f09d66a187c009e66d
161
166
 
162
- you provide the definition for the resource as follows
167
+ you provide the definition for the resource as follows
163
168
 
164
- terraform
169
+ terraform
165
170
 
166
- resource "docker_config" "foo" {
171
+ resource "docker_config" "foo" {
167
172
 
168
- name = "foo"
173
+ name = "foo"
169
174
 
170
- data = base64encode("{\\"a\\": \\"b\\"}")
175
+ data = base64encode("{\\"a\\": \\"b\\"}")
171
176
 
172
- }
177
+ }
173
178
 
174
- then the import command is as follows
179
+ then the import command is as follows
175
180
 
176
- #!/bin/bash
181
+ #!/bin/bash
177
182
 
178
183
  ```sh
179
184
  $ pulumi import docker:index/serviceConfig:ServiceConfig foo 08c26c477474478d971139f750984775a7f019dbe8a2e7f09d66a187c009e66d
pulumi_docker/tag.py CHANGED
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = ['TagArgs', 'Tag']