pulumi-docker 4.6.0b2__py3-none-any.whl → 4.6.1__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/network.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 *
@@ -23,11 +28,11 @@ class NetworkArgs:
23
28
  internal: Optional[pulumi.Input[bool]] = None,
24
29
  ipam_configs: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkIpamConfigArgs']]]] = None,
25
30
  ipam_driver: Optional[pulumi.Input[str]] = None,
26
- ipam_options: Optional[pulumi.Input[Mapping[str, Any]]] = None,
31
+ ipam_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
27
32
  ipv6: Optional[pulumi.Input[bool]] = None,
28
33
  labels: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkLabelArgs']]]] = None,
29
34
  name: Optional[pulumi.Input[str]] = None,
30
- options: Optional[pulumi.Input[Mapping[str, Any]]] = None):
35
+ options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):
31
36
  """
32
37
  The set of arguments for constructing a Network resource.
33
38
  :param pulumi.Input[bool] attachable: Enable manual container attachment to the network.
@@ -37,11 +42,11 @@ class NetworkArgs:
37
42
  :param pulumi.Input[bool] internal: Whether the network is internal.
38
43
  :param pulumi.Input[Sequence[pulumi.Input['NetworkIpamConfigArgs']]] ipam_configs: The IPAM configuration options
39
44
  :param pulumi.Input[str] ipam_driver: Driver used by the custom IP scheme of the network. Defaults to `default`
40
- :param pulumi.Input[Mapping[str, Any]] ipam_options: Provide explicit options to the IPAM driver. Valid options vary with `ipam_driver` and refer to that driver's documentation for more details.
45
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] ipam_options: Provide explicit options to the IPAM driver. Valid options vary with `ipam_driver` and refer to that driver's documentation for more details.
41
46
  :param pulumi.Input[bool] ipv6: Enable IPv6 networking. Defaults to `false`.
42
47
  :param pulumi.Input[Sequence[pulumi.Input['NetworkLabelArgs']]] labels: User-defined key/value metadata
43
48
  :param pulumi.Input[str] name: The name of the Docker network.
44
- :param pulumi.Input[Mapping[str, Any]] options: Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.
49
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] options: Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.
45
50
  """
46
51
  if attachable is not None:
47
52
  pulumi.set(__self__, "attachable", attachable)
@@ -154,14 +159,14 @@ class NetworkArgs:
154
159
 
155
160
  @property
156
161
  @pulumi.getter(name="ipamOptions")
157
- def ipam_options(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
162
+ def ipam_options(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
158
163
  """
159
164
  Provide explicit options to the IPAM driver. Valid options vary with `ipam_driver` and refer to that driver's documentation for more details.
160
165
  """
161
166
  return pulumi.get(self, "ipam_options")
162
167
 
163
168
  @ipam_options.setter
164
- def ipam_options(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
169
+ def ipam_options(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
165
170
  pulumi.set(self, "ipam_options", value)
166
171
 
167
172
  @property
@@ -202,14 +207,14 @@ class NetworkArgs:
202
207
 
203
208
  @property
204
209
  @pulumi.getter
205
- def options(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
210
+ def options(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
206
211
  """
207
212
  Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.
208
213
  """
209
214
  return pulumi.get(self, "options")
210
215
 
211
216
  @options.setter
212
- def options(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
217
+ def options(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
213
218
  pulumi.set(self, "options", value)
214
219
 
215
220
 
@@ -223,11 +228,11 @@ class _NetworkState:
223
228
  internal: Optional[pulumi.Input[bool]] = None,
224
229
  ipam_configs: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkIpamConfigArgs']]]] = None,
225
230
  ipam_driver: Optional[pulumi.Input[str]] = None,
226
- ipam_options: Optional[pulumi.Input[Mapping[str, Any]]] = None,
231
+ ipam_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
227
232
  ipv6: Optional[pulumi.Input[bool]] = None,
228
233
  labels: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkLabelArgs']]]] = None,
229
234
  name: Optional[pulumi.Input[str]] = None,
230
- options: Optional[pulumi.Input[Mapping[str, Any]]] = None,
235
+ options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
231
236
  scope: Optional[pulumi.Input[str]] = None):
232
237
  """
233
238
  Input properties used for looking up and filtering Network resources.
@@ -238,11 +243,11 @@ class _NetworkState:
238
243
  :param pulumi.Input[bool] internal: Whether the network is internal.
239
244
  :param pulumi.Input[Sequence[pulumi.Input['NetworkIpamConfigArgs']]] ipam_configs: The IPAM configuration options
240
245
  :param pulumi.Input[str] ipam_driver: Driver used by the custom IP scheme of the network. Defaults to `default`
241
- :param pulumi.Input[Mapping[str, Any]] ipam_options: Provide explicit options to the IPAM driver. Valid options vary with `ipam_driver` and refer to that driver's documentation for more details.
246
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] ipam_options: Provide explicit options to the IPAM driver. Valid options vary with `ipam_driver` and refer to that driver's documentation for more details.
242
247
  :param pulumi.Input[bool] ipv6: Enable IPv6 networking. Defaults to `false`.
243
248
  :param pulumi.Input[Sequence[pulumi.Input['NetworkLabelArgs']]] labels: User-defined key/value metadata
244
249
  :param pulumi.Input[str] name: The name of the Docker network.
245
- :param pulumi.Input[Mapping[str, Any]] options: Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.
250
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] options: Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.
246
251
  :param pulumi.Input[str] scope: Scope of the network. One of `swarm`, `global`, or `local`.
247
252
  """
248
253
  if attachable is not None:
@@ -358,14 +363,14 @@ class _NetworkState:
358
363
 
359
364
  @property
360
365
  @pulumi.getter(name="ipamOptions")
361
- def ipam_options(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
366
+ def ipam_options(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
362
367
  """
363
368
  Provide explicit options to the IPAM driver. Valid options vary with `ipam_driver` and refer to that driver's documentation for more details.
364
369
  """
365
370
  return pulumi.get(self, "ipam_options")
366
371
 
367
372
  @ipam_options.setter
368
- def ipam_options(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
373
+ def ipam_options(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
369
374
  pulumi.set(self, "ipam_options", value)
370
375
 
371
376
  @property
@@ -406,14 +411,14 @@ class _NetworkState:
406
411
 
407
412
  @property
408
413
  @pulumi.getter
409
- def options(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
414
+ def options(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
410
415
  """
411
416
  Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.
412
417
  """
413
418
  return pulumi.get(self, "options")
414
419
 
415
420
  @options.setter
416
- def options(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
421
+ def options(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
417
422
  pulumi.set(self, "options", value)
418
423
 
419
424
  @property
@@ -439,13 +444,13 @@ class Network(pulumi.CustomResource):
439
444
  driver: Optional[pulumi.Input[str]] = None,
440
445
  ingress: Optional[pulumi.Input[bool]] = None,
441
446
  internal: Optional[pulumi.Input[bool]] = None,
442
- ipam_configs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NetworkIpamConfigArgs']]]]] = None,
447
+ ipam_configs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NetworkIpamConfigArgs', 'NetworkIpamConfigArgsDict']]]]] = None,
443
448
  ipam_driver: Optional[pulumi.Input[str]] = None,
444
- ipam_options: Optional[pulumi.Input[Mapping[str, Any]]] = None,
449
+ ipam_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
445
450
  ipv6: Optional[pulumi.Input[bool]] = None,
446
- labels: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NetworkLabelArgs']]]]] = None,
451
+ labels: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NetworkLabelArgs', 'NetworkLabelArgsDict']]]]] = None,
447
452
  name: Optional[pulumi.Input[str]] = None,
448
- options: Optional[pulumi.Input[Mapping[str, Any]]] = None,
453
+ options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
449
454
  __props__=None):
450
455
  """
451
456
  <!-- Bug: Type and Name are switched -->
@@ -457,36 +462,36 @@ class Network(pulumi.CustomResource):
457
462
  import pulumi
458
463
  import pulumi_docker as docker
459
464
 
460
- private_network = docker.Network("privateNetwork")
465
+ private_network = docker.Network("private_network", name="my_network")
461
466
  ```
462
467
 
463
468
  ## Import
464
469
 
465
470
  ### Example
466
471
 
467
- Assuming you created a `network` as follows
472
+ Assuming you created a `network` as follows
468
473
 
469
- #!/bin/bash
474
+ #!/bin/bash
470
475
 
471
- docker network create foo
476
+ docker network create foo
472
477
 
473
- prints the long ID
478
+ prints the long ID
474
479
 
475
- 87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73
480
+ 87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73
476
481
 
477
- you provide the definition for the resource as follows
482
+ you provide the definition for the resource as follows
478
483
 
479
- terraform
484
+ terraform
480
485
 
481
- resource "docker_network" "foo" {
486
+ resource "docker_network" "foo" {
482
487
 
483
- name = "foo"
488
+ name = "foo"
484
489
 
485
- }
490
+ }
486
491
 
487
- then the import command is as follows
492
+ then the import command is as follows
488
493
 
489
- #!/bin/bash
494
+ #!/bin/bash
490
495
 
491
496
  ```sh
492
497
  $ pulumi import docker:index/network:Network foo 87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73
@@ -499,13 +504,13 @@ class Network(pulumi.CustomResource):
499
504
  :param pulumi.Input[str] driver: The driver of the Docker network. Possible values are `bridge`, `host`, `overlay`, `macvlan`. See [network docs](https://docs.docker.com/network/#network-drivers) for more details.
500
505
  :param pulumi.Input[bool] ingress: Create swarm routing-mesh network. Defaults to `false`.
501
506
  :param pulumi.Input[bool] internal: Whether the network is internal.
502
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NetworkIpamConfigArgs']]]] ipam_configs: The IPAM configuration options
507
+ :param pulumi.Input[Sequence[pulumi.Input[Union['NetworkIpamConfigArgs', 'NetworkIpamConfigArgsDict']]]] ipam_configs: The IPAM configuration options
503
508
  :param pulumi.Input[str] ipam_driver: Driver used by the custom IP scheme of the network. Defaults to `default`
504
- :param pulumi.Input[Mapping[str, Any]] ipam_options: Provide explicit options to the IPAM driver. Valid options vary with `ipam_driver` and refer to that driver's documentation for more details.
509
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] ipam_options: Provide explicit options to the IPAM driver. Valid options vary with `ipam_driver` and refer to that driver's documentation for more details.
505
510
  :param pulumi.Input[bool] ipv6: Enable IPv6 networking. Defaults to `false`.
506
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NetworkLabelArgs']]]] labels: User-defined key/value metadata
511
+ :param pulumi.Input[Sequence[pulumi.Input[Union['NetworkLabelArgs', 'NetworkLabelArgsDict']]]] labels: User-defined key/value metadata
507
512
  :param pulumi.Input[str] name: The name of the Docker network.
508
- :param pulumi.Input[Mapping[str, Any]] options: Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.
513
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] options: Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.
509
514
  """
510
515
  ...
511
516
  @overload
@@ -523,36 +528,36 @@ class Network(pulumi.CustomResource):
523
528
  import pulumi
524
529
  import pulumi_docker as docker
525
530
 
526
- private_network = docker.Network("privateNetwork")
531
+ private_network = docker.Network("private_network", name="my_network")
527
532
  ```
528
533
 
529
534
  ## Import
530
535
 
531
536
  ### Example
532
537
 
533
- Assuming you created a `network` as follows
538
+ Assuming you created a `network` as follows
534
539
 
535
- #!/bin/bash
540
+ #!/bin/bash
536
541
 
537
- docker network create foo
542
+ docker network create foo
538
543
 
539
- prints the long ID
544
+ prints the long ID
540
545
 
541
- 87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73
546
+ 87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73
542
547
 
543
- you provide the definition for the resource as follows
548
+ you provide the definition for the resource as follows
544
549
 
545
- terraform
550
+ terraform
546
551
 
547
- resource "docker_network" "foo" {
552
+ resource "docker_network" "foo" {
548
553
 
549
- name = "foo"
554
+ name = "foo"
550
555
 
551
- }
556
+ }
552
557
 
553
- then the import command is as follows
558
+ then the import command is as follows
554
559
 
555
- #!/bin/bash
560
+ #!/bin/bash
556
561
 
557
562
  ```sh
558
563
  $ pulumi import docker:index/network:Network foo 87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73
@@ -578,13 +583,13 @@ class Network(pulumi.CustomResource):
578
583
  driver: Optional[pulumi.Input[str]] = None,
579
584
  ingress: Optional[pulumi.Input[bool]] = None,
580
585
  internal: Optional[pulumi.Input[bool]] = None,
581
- ipam_configs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NetworkIpamConfigArgs']]]]] = None,
586
+ ipam_configs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NetworkIpamConfigArgs', 'NetworkIpamConfigArgsDict']]]]] = None,
582
587
  ipam_driver: Optional[pulumi.Input[str]] = None,
583
- ipam_options: Optional[pulumi.Input[Mapping[str, Any]]] = None,
588
+ ipam_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
584
589
  ipv6: Optional[pulumi.Input[bool]] = None,
585
- labels: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NetworkLabelArgs']]]]] = None,
590
+ labels: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NetworkLabelArgs', 'NetworkLabelArgsDict']]]]] = None,
586
591
  name: Optional[pulumi.Input[str]] = None,
587
- options: Optional[pulumi.Input[Mapping[str, Any]]] = None,
592
+ options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
588
593
  __props__=None):
589
594
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
590
595
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -622,13 +627,13 @@ class Network(pulumi.CustomResource):
622
627
  driver: Optional[pulumi.Input[str]] = None,
623
628
  ingress: Optional[pulumi.Input[bool]] = None,
624
629
  internal: Optional[pulumi.Input[bool]] = None,
625
- ipam_configs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NetworkIpamConfigArgs']]]]] = None,
630
+ ipam_configs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NetworkIpamConfigArgs', 'NetworkIpamConfigArgsDict']]]]] = None,
626
631
  ipam_driver: Optional[pulumi.Input[str]] = None,
627
- ipam_options: Optional[pulumi.Input[Mapping[str, Any]]] = None,
632
+ ipam_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
628
633
  ipv6: Optional[pulumi.Input[bool]] = None,
629
- labels: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NetworkLabelArgs']]]]] = None,
634
+ labels: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NetworkLabelArgs', 'NetworkLabelArgsDict']]]]] = None,
630
635
  name: Optional[pulumi.Input[str]] = None,
631
- options: Optional[pulumi.Input[Mapping[str, Any]]] = None,
636
+ options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
632
637
  scope: Optional[pulumi.Input[str]] = None) -> 'Network':
633
638
  """
634
639
  Get an existing Network resource's state with the given name, id, and optional extra
@@ -642,13 +647,13 @@ class Network(pulumi.CustomResource):
642
647
  :param pulumi.Input[str] driver: The driver of the Docker network. Possible values are `bridge`, `host`, `overlay`, `macvlan`. See [network docs](https://docs.docker.com/network/#network-drivers) for more details.
643
648
  :param pulumi.Input[bool] ingress: Create swarm routing-mesh network. Defaults to `false`.
644
649
  :param pulumi.Input[bool] internal: Whether the network is internal.
645
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NetworkIpamConfigArgs']]]] ipam_configs: The IPAM configuration options
650
+ :param pulumi.Input[Sequence[pulumi.Input[Union['NetworkIpamConfigArgs', 'NetworkIpamConfigArgsDict']]]] ipam_configs: The IPAM configuration options
646
651
  :param pulumi.Input[str] ipam_driver: Driver used by the custom IP scheme of the network. Defaults to `default`
647
- :param pulumi.Input[Mapping[str, Any]] ipam_options: Provide explicit options to the IPAM driver. Valid options vary with `ipam_driver` and refer to that driver's documentation for more details.
652
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] ipam_options: Provide explicit options to the IPAM driver. Valid options vary with `ipam_driver` and refer to that driver's documentation for more details.
648
653
  :param pulumi.Input[bool] ipv6: Enable IPv6 networking. Defaults to `false`.
649
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NetworkLabelArgs']]]] labels: User-defined key/value metadata
654
+ :param pulumi.Input[Sequence[pulumi.Input[Union['NetworkLabelArgs', 'NetworkLabelArgsDict']]]] labels: User-defined key/value metadata
650
655
  :param pulumi.Input[str] name: The name of the Docker network.
651
- :param pulumi.Input[Mapping[str, Any]] options: Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.
656
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] options: Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.
652
657
  :param pulumi.Input[str] scope: Scope of the network. One of `swarm`, `global`, or `local`.
653
658
  """
654
659
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
@@ -728,7 +733,7 @@ class Network(pulumi.CustomResource):
728
733
 
729
734
  @property
730
735
  @pulumi.getter(name="ipamOptions")
731
- def ipam_options(self) -> pulumi.Output[Optional[Mapping[str, Any]]]:
736
+ def ipam_options(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
732
737
  """
733
738
  Provide explicit options to the IPAM driver. Valid options vary with `ipam_driver` and refer to that driver's documentation for more details.
734
739
  """
@@ -760,7 +765,7 @@ class Network(pulumi.CustomResource):
760
765
 
761
766
  @property
762
767
  @pulumi.getter
763
- def options(self) -> pulumi.Output[Mapping[str, Any]]:
768
+ def options(self) -> pulumi.Output[Mapping[str, str]]:
764
769
  """
765
770
  Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.
766
771
  """
pulumi_docker/outputs.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 ._enums import *
@@ -1100,12 +1105,12 @@ class NetworkIpamConfig(dict):
1100
1105
  return super().get(key, default)
1101
1106
 
1102
1107
  def __init__(__self__, *,
1103
- aux_address: Optional[Mapping[str, Any]] = None,
1108
+ aux_address: Optional[Mapping[str, str]] = None,
1104
1109
  gateway: Optional[str] = None,
1105
1110
  ip_range: Optional[str] = None,
1106
1111
  subnet: Optional[str] = None):
1107
1112
  """
1108
- :param Mapping[str, Any] aux_address: Auxiliary IPv4 or IPv6 addresses used by Network driver
1113
+ :param Mapping[str, str] aux_address: Auxiliary IPv4 or IPv6 addresses used by Network driver
1109
1114
  :param str gateway: The IP address of the gateway
1110
1115
  :param str ip_range: The ip range in CIDR form
1111
1116
  :param str subnet: The subnet in CIDR form
@@ -1121,7 +1126,7 @@ class NetworkIpamConfig(dict):
1121
1126
 
1122
1127
  @property
1123
1128
  @pulumi.getter(name="auxAddress")
1124
- def aux_address(self) -> Optional[Mapping[str, Any]]:
1129
+ def aux_address(self) -> Optional[Mapping[str, str]]:
1125
1130
  """
1126
1131
  Auxiliary IPv4 or IPv6 addresses used by Network driver
1127
1132
  """
@@ -2465,7 +2470,7 @@ class ServiceTaskSpecContainerSpec(dict):
2465
2470
  secrets: Optional[Sequence['outputs.ServiceTaskSpecContainerSpecSecret']] = None,
2466
2471
  stop_grace_period: Optional[str] = None,
2467
2472
  stop_signal: Optional[str] = None,
2468
- sysctl: Optional[Mapping[str, Any]] = None,
2473
+ sysctl: Optional[Mapping[str, str]] = None,
2469
2474
  user: Optional[str] = None):
2470
2475
  """
2471
2476
  :param str image: The image name to use for the containers of the service, like `nginx:1.17.6`. Also use the data-source or resource of `RemoteImage` with the `repo_digest` or `RegistryImage` with the `name` attribute for this, as shown in the examples.
@@ -2487,7 +2492,7 @@ class ServiceTaskSpecContainerSpec(dict):
2487
2492
  :param Sequence['ServiceTaskSpecContainerSpecSecretArgs'] secrets: References to zero or more secrets that will be exposed to the service
2488
2493
  :param str stop_grace_period: 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.
2489
2494
  :param str stop_signal: Signal to stop the container
2490
- :param Mapping[str, Any] sysctl: Sysctls config (Linux only)
2495
+ :param Mapping[str, str] sysctl: Sysctls config (Linux only)
2491
2496
  :param str user: The user inside the container
2492
2497
  """
2493
2498
  pulumi.set(__self__, "image", image)
@@ -2686,7 +2691,7 @@ class ServiceTaskSpecContainerSpec(dict):
2686
2691
 
2687
2692
  @property
2688
2693
  @pulumi.getter
2689
- def sysctl(self) -> Optional[Mapping[str, Any]]:
2694
+ def sysctl(self) -> Optional[Mapping[str, str]]:
2690
2695
  """
2691
2696
  Sysctls config (Linux only)
2692
2697
  """
@@ -4111,12 +4116,12 @@ class VolumeLabel(dict):
4111
4116
  @pulumi.output_type
4112
4117
  class GetNetworkIpamConfigResult(dict):
4113
4118
  def __init__(__self__, *,
4114
- aux_address: Optional[Mapping[str, Any]] = None,
4119
+ aux_address: Optional[Mapping[str, str]] = None,
4115
4120
  gateway: Optional[str] = None,
4116
4121
  ip_range: Optional[str] = None,
4117
4122
  subnet: Optional[str] = None):
4118
4123
  """
4119
- :param Mapping[str, Any] aux_address: Auxiliary IPv4 or IPv6 addresses used by Network driver
4124
+ :param Mapping[str, str] aux_address: Auxiliary IPv4 or IPv6 addresses used by Network driver
4120
4125
  :param str gateway: The IP address of the gateway
4121
4126
  :param str ip_range: The ip range in CIDR form
4122
4127
  :param str subnet: The subnet in CIDR form
@@ -4132,7 +4137,7 @@ class GetNetworkIpamConfigResult(dict):
4132
4137
 
4133
4138
  @property
4134
4139
  @pulumi.getter(name="auxAddress")
4135
- def aux_address(self) -> Optional[Mapping[str, Any]]:
4140
+ def aux_address(self) -> Optional[Mapping[str, str]]:
4136
4141
  """
4137
4142
  Auxiliary IPv4 or IPv6 addresses used by Network driver
4138
4143
  """
pulumi_docker/plugin.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 *
@@ -35,7 +40,7 @@ class PluginArgs:
35
40
  :param pulumi.Input[bool] force_disable: If true, then the plugin is disabled forcibly
36
41
  :param pulumi.Input[bool] grant_all_permissions: If true, grant all permissions necessary to run the plugin
37
42
  :param pulumi.Input[Sequence[pulumi.Input['PluginGrantPermissionArgs']]] grant_permissions: Grant specific permissions only
38
- :param pulumi.Input[str] name: The name of the permission
43
+ :param pulumi.Input[str] name: Docker Plugin name
39
44
  """
40
45
  if alias is not None:
41
46
  pulumi.set(__self__, "alias", alias)
@@ -156,7 +161,7 @@ class PluginArgs:
156
161
  @pulumi.getter
157
162
  def name(self) -> Optional[pulumi.Input[str]]:
158
163
  """
159
- The name of the permission
164
+ Docker Plugin name
160
165
  """
161
166
  return pulumi.get(self, "name")
162
167
 
@@ -188,7 +193,7 @@ class _PluginState:
188
193
  :param pulumi.Input[bool] force_disable: If true, then the plugin is disabled forcibly
189
194
  :param pulumi.Input[bool] grant_all_permissions: If true, grant all permissions necessary to run the plugin
190
195
  :param pulumi.Input[Sequence[pulumi.Input['PluginGrantPermissionArgs']]] grant_permissions: Grant specific permissions only
191
- :param pulumi.Input[str] name: The name of the permission
196
+ :param pulumi.Input[str] name: Docker Plugin name
192
197
  :param pulumi.Input[str] plugin_reference: Docker Plugin Reference
193
198
  """
194
199
  if alias is not None:
@@ -312,7 +317,7 @@ class _PluginState:
312
317
  @pulumi.getter
313
318
  def name(self) -> Optional[pulumi.Input[str]]:
314
319
  """
315
- The name of the permission
320
+ Docker Plugin name
316
321
  """
317
322
  return pulumi.get(self, "name")
318
323
 
@@ -345,29 +350,13 @@ class Plugin(pulumi.CustomResource):
345
350
  force_destroy: Optional[pulumi.Input[bool]] = None,
346
351
  force_disable: Optional[pulumi.Input[bool]] = None,
347
352
  grant_all_permissions: Optional[pulumi.Input[bool]] = None,
348
- grant_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PluginGrantPermissionArgs']]]]] = None,
353
+ grant_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PluginGrantPermissionArgs', 'PluginGrantPermissionArgsDict']]]]] = None,
349
354
  name: Optional[pulumi.Input[str]] = None,
350
355
  __props__=None):
351
356
  """
352
357
  <!-- Bug: Type and Name are switched -->
353
358
  Manages the lifecycle of a Docker plugin.
354
359
 
355
- ## Example Usage
356
-
357
- ```python
358
- import pulumi
359
- import pulumi_docker as docker
360
-
361
- sample_volume_plugin = docker.Plugin("sample-volume-plugin",
362
- alias="sample-volume-plugin",
363
- enable_timeout=60,
364
- enabled=False,
365
- envs=["DEBUG=1"],
366
- force_destroy=True,
367
- force_disable=True,
368
- grant_all_permissions=True)
369
- ```
370
-
371
360
  ## Import
372
361
 
373
362
  #!/bin/bash
@@ -385,8 +374,8 @@ class Plugin(pulumi.CustomResource):
385
374
  :param pulumi.Input[bool] force_destroy: If true, then the plugin is destroyed forcibly
386
375
  :param pulumi.Input[bool] force_disable: If true, then the plugin is disabled forcibly
387
376
  :param pulumi.Input[bool] grant_all_permissions: If true, grant all permissions necessary to run the plugin
388
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PluginGrantPermissionArgs']]]] grant_permissions: Grant specific permissions only
389
- :param pulumi.Input[str] name: The name of the permission
377
+ :param pulumi.Input[Sequence[pulumi.Input[Union['PluginGrantPermissionArgs', 'PluginGrantPermissionArgsDict']]]] grant_permissions: Grant specific permissions only
378
+ :param pulumi.Input[str] name: Docker Plugin name
390
379
  """
391
380
  ...
392
381
  @overload
@@ -398,22 +387,6 @@ class Plugin(pulumi.CustomResource):
398
387
  <!-- Bug: Type and Name are switched -->
399
388
  Manages the lifecycle of a Docker plugin.
400
389
 
401
- ## Example Usage
402
-
403
- ```python
404
- import pulumi
405
- import pulumi_docker as docker
406
-
407
- sample_volume_plugin = docker.Plugin("sample-volume-plugin",
408
- alias="sample-volume-plugin",
409
- enable_timeout=60,
410
- enabled=False,
411
- envs=["DEBUG=1"],
412
- force_destroy=True,
413
- force_disable=True,
414
- grant_all_permissions=True)
415
- ```
416
-
417
390
  ## Import
418
391
 
419
392
  #!/bin/bash
@@ -444,7 +417,7 @@ class Plugin(pulumi.CustomResource):
444
417
  force_destroy: Optional[pulumi.Input[bool]] = None,
445
418
  force_disable: Optional[pulumi.Input[bool]] = None,
446
419
  grant_all_permissions: Optional[pulumi.Input[bool]] = None,
447
- grant_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PluginGrantPermissionArgs']]]]] = None,
420
+ grant_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PluginGrantPermissionArgs', 'PluginGrantPermissionArgsDict']]]]] = None,
448
421
  name: Optional[pulumi.Input[str]] = None,
449
422
  __props__=None):
450
423
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
@@ -482,7 +455,7 @@ class Plugin(pulumi.CustomResource):
482
455
  force_destroy: Optional[pulumi.Input[bool]] = None,
483
456
  force_disable: Optional[pulumi.Input[bool]] = None,
484
457
  grant_all_permissions: Optional[pulumi.Input[bool]] = None,
485
- grant_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PluginGrantPermissionArgs']]]]] = None,
458
+ grant_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PluginGrantPermissionArgs', 'PluginGrantPermissionArgsDict']]]]] = None,
486
459
  name: Optional[pulumi.Input[str]] = None,
487
460
  plugin_reference: Optional[pulumi.Input[str]] = None) -> 'Plugin':
488
461
  """
@@ -499,8 +472,8 @@ class Plugin(pulumi.CustomResource):
499
472
  :param pulumi.Input[bool] force_destroy: If true, then the plugin is destroyed forcibly
500
473
  :param pulumi.Input[bool] force_disable: If true, then the plugin is disabled forcibly
501
474
  :param pulumi.Input[bool] grant_all_permissions: If true, grant all permissions necessary to run the plugin
502
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PluginGrantPermissionArgs']]]] grant_permissions: Grant specific permissions only
503
- :param pulumi.Input[str] name: The name of the permission
475
+ :param pulumi.Input[Sequence[pulumi.Input[Union['PluginGrantPermissionArgs', 'PluginGrantPermissionArgsDict']]]] grant_permissions: Grant specific permissions only
476
+ :param pulumi.Input[str] name: Docker Plugin name
504
477
  :param pulumi.Input[str] plugin_reference: Docker Plugin Reference
505
478
  """
506
479
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
@@ -587,7 +560,7 @@ class Plugin(pulumi.CustomResource):
587
560
  @pulumi.getter
588
561
  def name(self) -> pulumi.Output[str]:
589
562
  """
590
- The name of the permission
563
+ Docker Plugin name
591
564
  """
592
565
  return pulumi.get(self, "name")
593
566