pulumi-nomad 2.3.0__py3-none-any.whl → 2.3.0a1710918439__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.
Files changed (47) hide show
  1. pulumi_nomad/__init__.py +0 -1
  2. pulumi_nomad/_inputs.py +189 -221
  3. pulumi_nomad/acl_auth_method.py +20 -18
  4. pulumi_nomad/acl_policy.py +64 -0
  5. pulumi_nomad/acl_token.py +26 -18
  6. pulumi_nomad/csi_volume.py +72 -0
  7. pulumi_nomad/csi_volume_registration.py +72 -0
  8. pulumi_nomad/external_volume.py +78 -6
  9. pulumi_nomad/get_acl_policies.py +4 -0
  10. pulumi_nomad/get_acl_policy.py +4 -0
  11. pulumi_nomad/get_acl_role.py +4 -0
  12. pulumi_nomad/get_acl_roles.py +4 -0
  13. pulumi_nomad/get_acl_token.py +4 -0
  14. pulumi_nomad/get_acl_tokens.py +4 -0
  15. pulumi_nomad/get_allocations.py +4 -0
  16. pulumi_nomad/get_datacenters.py +8 -4
  17. pulumi_nomad/get_deployments.py +4 -5
  18. pulumi_nomad/get_job.py +4 -0
  19. pulumi_nomad/get_job_parser.py +24 -0
  20. pulumi_nomad/get_namespace.py +4 -0
  21. pulumi_nomad/get_namespaces.py +4 -2
  22. pulumi_nomad/get_node_pool.py +4 -0
  23. pulumi_nomad/get_node_pools.py +4 -0
  24. pulumi_nomad/get_plugin.py +4 -0
  25. pulumi_nomad/get_plugins.py +4 -0
  26. pulumi_nomad/get_regions.py +0 -34
  27. pulumi_nomad/get_scaling_policies.py +4 -0
  28. pulumi_nomad/get_scaling_policy.py +4 -0
  29. pulumi_nomad/get_scheduler_policy.py +4 -0
  30. pulumi_nomad/get_variable.py +4 -0
  31. pulumi_nomad/get_volumes.py +4 -0
  32. pulumi_nomad/job.py +16 -16
  33. pulumi_nomad/namespace.py +16 -14
  34. pulumi_nomad/node_pool.py +4 -2
  35. pulumi_nomad/outputs.py +182 -274
  36. pulumi_nomad/pulumi-plugin.json +1 -2
  37. pulumi_nomad/quote_specification.py +6 -4
  38. pulumi_nomad/scheduler_config.py +10 -6
  39. pulumi_nomad/sentinel_policy.py +10 -6
  40. pulumi_nomad/variable.py +18 -14
  41. pulumi_nomad/volume.py +80 -8
  42. {pulumi_nomad-2.3.0.dist-info → pulumi_nomad-2.3.0a1710918439.dist-info}/METADATA +1 -1
  43. pulumi_nomad-2.3.0a1710918439.dist-info/RECORD +54 -0
  44. pulumi_nomad/get_jwks.py +0 -116
  45. pulumi_nomad-2.3.0.dist-info/RECORD +0 -55
  46. {pulumi_nomad-2.3.0.dist-info → pulumi_nomad-2.3.0a1710918439.dist-info}/WHEEL +0 -0
  47. {pulumi_nomad-2.3.0.dist-info → pulumi_nomad-2.3.0a1710918439.dist-info}/top_level.txt +0 -0
@@ -97,12 +97,14 @@ def get_allocations(filter: Optional[str] = None,
97
97
 
98
98
  ## Example Usage
99
99
 
100
+ <!--Start PulumiCodeChooser -->
100
101
  ```python
101
102
  import pulumi
102
103
  import pulumi_nomad as nomad
103
104
 
104
105
  example = nomad.get_allocations(filter="JobID == \\"example\\"")
105
106
  ```
107
+ <!--End PulumiCodeChooser -->
106
108
 
107
109
 
108
110
  :param str filter: `(string: <optional>)` - Specifies the
@@ -137,12 +139,14 @@ def get_allocations_output(filter: Optional[pulumi.Input[Optional[str]]] = None,
137
139
 
138
140
  ## Example Usage
139
141
 
142
+ <!--Start PulumiCodeChooser -->
140
143
  ```python
141
144
  import pulumi
142
145
  import pulumi_nomad as nomad
143
146
 
144
147
  example = nomad.get_allocations(filter="JobID == \\"example\\"")
145
148
  ```
149
+ <!--End PulumiCodeChooser -->
146
150
 
147
151
 
148
152
  :param str filter: `(string: <optional>)` - Specifies the
@@ -82,13 +82,15 @@ def get_datacenters(ignore_down_nodes: Optional[bool] = None,
82
82
 
83
83
  ## Example Usage
84
84
 
85
+ <!--Start PulumiCodeChooser -->
85
86
  ```python
86
87
  import pulumi
87
88
  import pulumi_nomad as nomad
88
89
 
89
- datacenters = nomad.get_datacenters(prefix="prod",
90
- ignore_down_nodes=True)
90
+ datacenters = nomad.get_datacenters(ignore_down_nodes=True,
91
+ prefix="prod")
91
92
  ```
93
+ <!--End PulumiCodeChooser -->
92
94
 
93
95
 
94
96
  :param bool ignore_down_nodes: `(bool: false)`: An optional flag that, if set to `true` will ignore down nodes when compiling the list of datacenters.
@@ -116,13 +118,15 @@ def get_datacenters_output(ignore_down_nodes: Optional[pulumi.Input[Optional[boo
116
118
 
117
119
  ## Example Usage
118
120
 
121
+ <!--Start PulumiCodeChooser -->
119
122
  ```python
120
123
  import pulumi
121
124
  import pulumi_nomad as nomad
122
125
 
123
- datacenters = nomad.get_datacenters(prefix="prod",
124
- ignore_down_nodes=True)
126
+ datacenters = nomad.get_datacenters(ignore_down_nodes=True,
127
+ prefix="prod")
125
128
  ```
129
+ <!--End PulumiCodeChooser -->
126
130
 
127
131
 
128
132
  :param bool ignore_down_nodes: `(bool: false)`: An optional flag that, if set to `true` will ignore down nodes when compiling the list of datacenters.
@@ -34,11 +34,6 @@ class GetDeploymentsResult:
34
34
  def deployments(self) -> Sequence[Mapping[str, Any]]:
35
35
  """
36
36
  `list of maps` a list of deployments in the cluster.
37
- * `ID`: `string` Deployment ID.
38
- * `JobID`: `string` Job ID associated with the deployment.
39
- * `JobVersion`: `string` Job version.
40
- * `Status`: `string` Deployment status.
41
- * `StatusDescription`: `string` Detailed description of the deployment's status.
42
37
  """
43
38
  return pulumi.get(self, "deployments")
44
39
 
@@ -67,12 +62,14 @@ def get_deployments(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGet
67
62
 
68
63
  ## Example Usage
69
64
 
65
+ <!--Start PulumiCodeChooser -->
70
66
  ```python
71
67
  import pulumi
72
68
  import pulumi_nomad as nomad
73
69
 
74
70
  example = nomad.get_deployments()
75
71
  ```
72
+ <!--End PulumiCodeChooser -->
76
73
  """
77
74
  __args__ = dict()
78
75
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
@@ -90,11 +87,13 @@ def get_deployments_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulum
90
87
 
91
88
  ## Example Usage
92
89
 
90
+ <!--Start PulumiCodeChooser -->
93
91
  ```python
94
92
  import pulumi
95
93
  import pulumi_nomad as nomad
96
94
 
97
95
  example = nomad.get_deployments()
98
96
  ```
97
+ <!--End PulumiCodeChooser -->
99
98
  """
100
99
  ...
pulumi_nomad/get_job.py CHANGED
@@ -301,6 +301,7 @@ def get_job(job_id: Optional[str] = None,
301
301
 
302
302
  Get the data about a snapshot:
303
303
 
304
+ <!--Start PulumiCodeChooser -->
304
305
  ```python
305
306
  import pulumi
306
307
  import pulumi_nomad as nomad
@@ -308,6 +309,7 @@ def get_job(job_id: Optional[str] = None,
308
309
  example = nomad.get_job(job_id="example",
309
310
  namespace="dev")
310
311
  ```
312
+ <!--End PulumiCodeChooser -->
311
313
 
312
314
 
313
315
  :param str job_id: `(string)` ID of the job.
@@ -358,6 +360,7 @@ def get_job_output(job_id: Optional[pulumi.Input[str]] = None,
358
360
 
359
361
  Get the data about a snapshot:
360
362
 
363
+ <!--Start PulumiCodeChooser -->
361
364
  ```python
362
365
  import pulumi
363
366
  import pulumi_nomad as nomad
@@ -365,6 +368,7 @@ def get_job_output(job_id: Optional[pulumi.Input[str]] = None,
365
368
  example = nomad.get_job(job_id="example",
366
369
  namespace="dev")
367
370
  ```
371
+ <!--End PulumiCodeChooser -->
368
372
 
369
373
 
370
374
  :param str job_id: `(string)` ID of the job.
@@ -86,6 +86,18 @@ def get_job_parser(canonicalize: Optional[bool] = None,
86
86
  """
87
87
  Parse a HCL jobspec and produce the equivalent JSON encoded job.
88
88
 
89
+ ## Example Usage
90
+
91
+ <!--Start PulumiCodeChooser -->
92
+ ```python
93
+ import pulumi
94
+ import pulumi_nomad as nomad
95
+
96
+ my_job = nomad.get_job_parser(hcl=(lambda path: open(path).read())(f"{path['module']}/jobspec.hcl"),
97
+ canonicalize=False)
98
+ ```
99
+ <!--End PulumiCodeChooser -->
100
+
89
101
 
90
102
  :param bool canonicalize: `(boolean: true)` - flag to enable setting any unset fields to their default values.
91
103
  :param str hcl: `(string)` - the HCL definition of the job.
@@ -110,6 +122,18 @@ def get_job_parser_output(canonicalize: Optional[pulumi.Input[Optional[bool]]] =
110
122
  """
111
123
  Parse a HCL jobspec and produce the equivalent JSON encoded job.
112
124
 
125
+ ## Example Usage
126
+
127
+ <!--Start PulumiCodeChooser -->
128
+ ```python
129
+ import pulumi
130
+ import pulumi_nomad as nomad
131
+
132
+ my_job = nomad.get_job_parser(hcl=(lambda path: open(path).read())(f"{path['module']}/jobspec.hcl"),
133
+ canonicalize=False)
134
+ ```
135
+ <!--End PulumiCodeChooser -->
136
+
113
137
 
114
138
  :param bool canonicalize: `(boolean: true)` - flag to enable setting any unset fields to their default values.
115
139
  :param str hcl: `(string)` - the HCL definition of the job.
@@ -118,12 +118,14 @@ def get_namespace(name: Optional[str] = None,
118
118
 
119
119
  ## Example Usage
120
120
 
121
+ <!--Start PulumiCodeChooser -->
121
122
  ```python
122
123
  import pulumi
123
124
  import pulumi_nomad as nomad
124
125
 
125
126
  namespaces = nomad.get_namespace(name="default")
126
127
  ```
128
+ <!--End PulumiCodeChooser -->
127
129
 
128
130
 
129
131
  :param str name: `(string)` - The name of the namespace.
@@ -151,12 +153,14 @@ def get_namespace_output(name: Optional[pulumi.Input[str]] = None,
151
153
 
152
154
  ## Example Usage
153
155
 
156
+ <!--Start PulumiCodeChooser -->
154
157
  ```python
155
158
  import pulumi
156
159
  import pulumi_nomad as nomad
157
160
 
158
161
  namespaces = nomad.get_namespace(name="default")
159
162
  ```
163
+ <!--End PulumiCodeChooser -->
160
164
 
161
165
 
162
166
  :param str name: `(string)` - The name of the namespace.
@@ -62,6 +62,7 @@ def get_namespaces(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetN
62
62
 
63
63
  ## Example Usage
64
64
 
65
+ <!--Start PulumiCodeChooser -->
65
66
  ```python
66
67
  import pulumi
67
68
  import pulumi_nomad as nomad
@@ -70,13 +71,13 @@ def get_namespaces(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetN
70
71
  namespace = []
71
72
  for range in [{"value": i} for i in range(0, len(namespaces.namespaces))]:
72
73
  namespace.append(nomad.AclPolicy(f"namespace-{range['value']}",
73
- name=f"namespace-{namespaces[range['value']]}",
74
74
  description=f"Write to the namespace {namespaces[range['value']]}",
75
75
  rules_hcl=f\"\"\"namespace "{namespaces[range["value"]]}" {{
76
76
  policy = "write"
77
77
  }}
78
78
  \"\"\"))
79
79
  ```
80
+ <!--End PulumiCodeChooser -->
80
81
  """
81
82
  __args__ = dict()
82
83
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
@@ -94,6 +95,7 @@ def get_namespaces_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi
94
95
 
95
96
  ## Example Usage
96
97
 
98
+ <!--Start PulumiCodeChooser -->
97
99
  ```python
98
100
  import pulumi
99
101
  import pulumi_nomad as nomad
@@ -102,12 +104,12 @@ def get_namespaces_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi
102
104
  namespace = []
103
105
  for range in [{"value": i} for i in range(0, len(namespaces.namespaces))]:
104
106
  namespace.append(nomad.AclPolicy(f"namespace-{range['value']}",
105
- name=f"namespace-{namespaces[range['value']]}",
106
107
  description=f"Write to the namespace {namespaces[range['value']]}",
107
108
  rules_hcl=f\"\"\"namespace "{namespaces[range["value"]]}" {{
108
109
  policy = "write"
109
110
  }}
110
111
  \"\"\"))
111
112
  ```
113
+ <!--End PulumiCodeChooser -->
112
114
  """
113
115
  ...
@@ -98,12 +98,14 @@ def get_node_pool(name: Optional[str] = None,
98
98
 
99
99
  ## Example Usage
100
100
 
101
+ <!--Start PulumiCodeChooser -->
101
102
  ```python
102
103
  import pulumi
103
104
  import pulumi_nomad as nomad
104
105
 
105
106
  dev = nomad.get_node_pool(name="dev")
106
107
  ```
108
+ <!--End PulumiCodeChooser -->
107
109
 
108
110
 
109
111
  :param str name: `(string)` - The name of the node pool to fetch.
@@ -129,12 +131,14 @@ def get_node_pool_output(name: Optional[pulumi.Input[str]] = None,
129
131
 
130
132
  ## Example Usage
131
133
 
134
+ <!--Start PulumiCodeChooser -->
132
135
  ```python
133
136
  import pulumi
134
137
  import pulumi_nomad as nomad
135
138
 
136
139
  dev = nomad.get_node_pool(name="dev")
137
140
  ```
141
+ <!--End PulumiCodeChooser -->
138
142
 
139
143
 
140
144
  :param str name: `(string)` - The name of the node pool to fetch.
@@ -84,12 +84,14 @@ def get_node_pools(filter: Optional[str] = None,
84
84
 
85
85
  ## Example Usage
86
86
 
87
+ <!--Start PulumiCodeChooser -->
87
88
  ```python
88
89
  import pulumi
89
90
  import pulumi_nomad as nomad
90
91
 
91
92
  prod = nomad.get_node_pools(filter="Meta.env == \\"prod\\"")
92
93
  ```
94
+ <!--End PulumiCodeChooser -->
93
95
 
94
96
 
95
97
  :param str filter: `(string)` - Specifies the [expression][nomad_api_filter] used to
@@ -119,12 +121,14 @@ def get_node_pools_output(filter: Optional[pulumi.Input[Optional[str]]] = None,
119
121
 
120
122
  ## Example Usage
121
123
 
124
+ <!--Start PulumiCodeChooser -->
122
125
  ```python
123
126
  import pulumi
124
127
  import pulumi_nomad as nomad
125
128
 
126
129
  prod = nomad.get_node_pools(filter="Meta.env == \\"prod\\"")
127
130
  ```
131
+ <!--End PulumiCodeChooser -->
128
132
 
129
133
 
130
134
  :param str filter: `(string)` - Specifies the [expression][nomad_api_filter] used to
@@ -186,6 +186,7 @@ def get_plugin(plugin_id: Optional[str] = None,
186
186
 
187
187
  Check for the existence of a plugin:
188
188
 
189
+ <!--Start PulumiCodeChooser -->
189
190
  ```python
190
191
  import pulumi
191
192
  import pulumi_nomad as nomad
@@ -193,6 +194,7 @@ def get_plugin(plugin_id: Optional[str] = None,
193
194
  ebs = nomad.get_plugin(plugin_id="aws-ebs0",
194
195
  wait_for_healthy=True)
195
196
  ```
197
+ <!--End PulumiCodeChooser -->
196
198
 
197
199
  This will check for a plugin with the ID `aws-ebs0`, waiting until the plugin
198
200
  is healthy before returning.
@@ -243,6 +245,7 @@ def get_plugin_output(plugin_id: Optional[pulumi.Input[str]] = None,
243
245
 
244
246
  Check for the existence of a plugin:
245
247
 
248
+ <!--Start PulumiCodeChooser -->
246
249
  ```python
247
250
  import pulumi
248
251
  import pulumi_nomad as nomad
@@ -250,6 +253,7 @@ def get_plugin_output(plugin_id: Optional[pulumi.Input[str]] = None,
250
253
  ebs = nomad.get_plugin(plugin_id="aws-ebs0",
251
254
  wait_for_healthy=True)
252
255
  ```
256
+ <!--End PulumiCodeChooser -->
253
257
 
254
258
  This will check for a plugin with the ID `aws-ebs0`, waiting until the plugin
255
259
  is healthy before returning.
@@ -72,12 +72,14 @@ def get_plugins(type: Optional[str] = None,
72
72
 
73
73
  ## Example Usage
74
74
 
75
+ <!--Start PulumiCodeChooser -->
75
76
  ```python
76
77
  import pulumi
77
78
  import pulumi_nomad as nomad
78
79
 
79
80
  example = nomad.get_plugins()
80
81
  ```
82
+ <!--End PulumiCodeChooser -->
81
83
  """
82
84
  __args__ = dict()
83
85
  __args__['type'] = type
@@ -98,11 +100,13 @@ def get_plugins_output(type: Optional[pulumi.Input[Optional[str]]] = None,
98
100
 
99
101
  ## Example Usage
100
102
 
103
+ <!--Start PulumiCodeChooser -->
101
104
  ```python
102
105
  import pulumi
103
106
  import pulumi_nomad as nomad
104
107
 
105
108
  example = nomad.get_plugins()
106
109
  ```
110
+ <!--End PulumiCodeChooser -->
107
111
  """
108
112
  ...
@@ -59,23 +59,6 @@ class AwaitableGetRegionsResult(GetRegionsResult):
59
59
  def get_regions(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRegionsResult:
60
60
  """
61
61
  Retrieve a list of regions available in Nomad.
62
-
63
- ## Example Usage
64
-
65
- ```python
66
- import pulumi
67
- import pulumi_nomad as nomad
68
-
69
-
70
- def not_implemented(msg):
71
- raise NotImplementedError(msg)
72
-
73
- my_regions = nomad.get_regions()
74
- jobs = not_implemented("The template_file data resource is not yet supported.")
75
- app = []
76
- for range in [{"value": i} for i in range(0, len(my_regions.regions))]:
77
- app.append(nomad.Job(f"app-{range['value']}", jobspec=jobs[range["value"]]["rendered"]))
78
- ```
79
62
  """
80
63
  __args__ = dict()
81
64
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
@@ -90,22 +73,5 @@ def get_regions(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRegi
90
73
  def get_regions_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRegionsResult]:
91
74
  """
92
75
  Retrieve a list of regions available in Nomad.
93
-
94
- ## Example Usage
95
-
96
- ```python
97
- import pulumi
98
- import pulumi_nomad as nomad
99
-
100
-
101
- def not_implemented(msg):
102
- raise NotImplementedError(msg)
103
-
104
- my_regions = nomad.get_regions()
105
- jobs = not_implemented("The template_file data resource is not yet supported.")
106
- app = []
107
- for range in [{"value": i} for i in range(0, len(my_regions.regions))]:
108
- app.append(nomad.Job(f"app-{range['value']}", jobspec=jobs[range["value"]]["rendered"]))
109
- ```
110
76
  """
111
77
  ...
@@ -86,6 +86,7 @@ def get_scaling_policies(job_id: Optional[str] = None,
86
86
 
87
87
  ## Example Usage
88
88
 
89
+ <!--Start PulumiCodeChooser -->
89
90
  ```python
90
91
  import pulumi
91
92
  import pulumi_nomad as nomad
@@ -93,6 +94,7 @@ def get_scaling_policies(job_id: Optional[str] = None,
93
94
  example = nomad.get_scaling_policies(job_id="webapp",
94
95
  type="horizontal")
95
96
  ```
97
+ <!--End PulumiCodeChooser -->
96
98
 
97
99
 
98
100
  :param str job_id: `(string)` - An optional string to filter scaling policies based on the target job. If not provided, policies for all jobs are returned.
@@ -120,6 +122,7 @@ def get_scaling_policies_output(job_id: Optional[pulumi.Input[Optional[str]]] =
120
122
 
121
123
  ## Example Usage
122
124
 
125
+ <!--Start PulumiCodeChooser -->
123
126
  ```python
124
127
  import pulumi
125
128
  import pulumi_nomad as nomad
@@ -127,6 +130,7 @@ def get_scaling_policies_output(job_id: Optional[pulumi.Input[Optional[str]]] =
127
130
  example = nomad.get_scaling_policies(job_id="webapp",
128
131
  type="horizontal")
129
132
  ```
133
+ <!--End PulumiCodeChooser -->
130
134
 
131
135
 
132
136
  :param str job_id: `(string)` - An optional string to filter scaling policies based on the target job. If not provided, policies for all jobs are returned.
@@ -120,12 +120,14 @@ def get_scaling_policy(id: Optional[str] = None,
120
120
 
121
121
  ## Example Usage
122
122
 
123
+ <!--Start PulumiCodeChooser -->
123
124
  ```python
124
125
  import pulumi
125
126
  import pulumi_nomad as nomad
126
127
 
127
128
  example = nomad.get_scaling_policy(id="ad19848d-1921-179c-affa-244a3543be88")
128
129
  ```
130
+ <!--End PulumiCodeChooser -->
129
131
 
130
132
 
131
133
  :param str id: `(string: <required>)` - The ID of the scaling policy.
@@ -153,12 +155,14 @@ def get_scaling_policy_output(id: Optional[pulumi.Input[str]] = None,
153
155
 
154
156
  ## Example Usage
155
157
 
158
+ <!--Start PulumiCodeChooser -->
156
159
  ```python
157
160
  import pulumi
158
161
  import pulumi_nomad as nomad
159
162
 
160
163
  example = nomad.get_scaling_policy(id="ad19848d-1921-179c-affa-244a3543be88")
161
164
  ```
165
+ <!--End PulumiCodeChooser -->
162
166
 
163
167
 
164
168
  :param str id: `(string: <required>)` - The ID of the scaling policy.
@@ -86,12 +86,14 @@ def get_scheduler_policy(opts: Optional[pulumi.InvokeOptions] = None) -> Awaitab
86
86
 
87
87
  ## Example Usage
88
88
 
89
+ <!--Start PulumiCodeChooser -->
89
90
  ```python
90
91
  import pulumi
91
92
  import pulumi_nomad as nomad
92
93
 
93
94
  global_ = nomad.get_scheduler_policy()
94
95
  ```
96
+ <!--End PulumiCodeChooser -->
95
97
  """
96
98
  __args__ = dict()
97
99
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
@@ -111,11 +113,13 @@ def get_scheduler_policy_output(opts: Optional[pulumi.InvokeOptions] = None) ->
111
113
 
112
114
  ## Example Usage
113
115
 
116
+ <!--Start PulumiCodeChooser -->
114
117
  ```python
115
118
  import pulumi
116
119
  import pulumi_nomad as nomad
117
120
 
118
121
  global_ = nomad.get_scheduler_policy()
119
122
  ```
123
+ <!--End PulumiCodeChooser -->
120
124
  """
121
125
  ...
@@ -86,12 +86,14 @@ def get_variable(namespace: Optional[str] = None,
86
86
  """
87
87
  ## Example Usage
88
88
 
89
+ <!--Start PulumiCodeChooser -->
89
90
  ```python
90
91
  import pulumi
91
92
  import pulumi_nomad as nomad
92
93
 
93
94
  example = nomad.Variable("example", path="path/of/existing/variable")
94
95
  ```
96
+ <!--End PulumiCodeChooser -->
95
97
 
96
98
 
97
99
  :param str namespace: `(string: "default")` - The namepsace in which the variable exists.
@@ -117,12 +119,14 @@ def get_variable_output(namespace: Optional[pulumi.Input[Optional[str]]] = None,
117
119
  """
118
120
  ## Example Usage
119
121
 
122
+ <!--Start PulumiCodeChooser -->
120
123
  ```python
121
124
  import pulumi
122
125
  import pulumi_nomad as nomad
123
126
 
124
127
  example = nomad.Variable("example", path="path/of/existing/variable")
125
128
  ```
129
+ <!--End PulumiCodeChooser -->
126
130
 
127
131
 
128
132
  :param str namespace: `(string: "default")` - The namepsace in which the variable exists.
@@ -105,12 +105,14 @@ def get_volumes(namespace: Optional[str] = None,
105
105
 
106
106
  ## Example Usage
107
107
 
108
+ <!--Start PulumiCodeChooser -->
108
109
  ```python
109
110
  import pulumi
110
111
  import pulumi_nomad as nomad
111
112
 
112
113
  example = nomad.get_volumes()
113
114
  ```
115
+ <!--End PulumiCodeChooser -->
114
116
 
115
117
 
116
118
  :param str namespace: `(string: "default")` Nomad namespace.
@@ -146,12 +148,14 @@ def get_volumes_output(namespace: Optional[pulumi.Input[Optional[str]]] = None,
146
148
 
147
149
  ## Example Usage
148
150
 
151
+ <!--Start PulumiCodeChooser -->
149
152
  ```python
150
153
  import pulumi
151
154
  import pulumi_nomad as nomad
152
155
 
153
156
  example = nomad.get_volumes()
154
157
  ```
158
+ <!--End PulumiCodeChooser -->
155
159
 
156
160
 
157
161
  :param str namespace: `(string: "default")` Nomad namespace.
pulumi_nomad/job.py CHANGED
@@ -74,8 +74,8 @@ class JobArgs:
74
74
  if purge_on_destroy is not None:
75
75
  pulumi.set(__self__, "purge_on_destroy", purge_on_destroy)
76
76
  if read_allocation_ids is not None:
77
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
78
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
77
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
78
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
79
79
  if read_allocation_ids is not None:
80
80
  pulumi.set(__self__, "read_allocation_ids", read_allocation_ids)
81
81
  if rerun_if_dead is not None:
@@ -214,8 +214,8 @@ class JobArgs:
214
214
  @property
215
215
  @pulumi.getter(name="readAllocationIds")
216
216
  def read_allocation_ids(self) -> Optional[pulumi.Input[bool]]:
217
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
218
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
217
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
218
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
219
219
 
220
220
  return pulumi.get(self, "read_allocation_ids")
221
221
 
@@ -313,8 +313,8 @@ class _JobState:
313
313
  Will fallback to the value declared in Nomad provider configuration, if any.
314
314
  """
315
315
  if allocation_ids is not None:
316
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
317
- pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
316
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
317
+ pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
318
318
  if allocation_ids is not None:
319
319
  pulumi.set(__self__, "allocation_ids", allocation_ids)
320
320
  if consul_token is not None:
@@ -350,8 +350,8 @@ class _JobState:
350
350
  if purge_on_destroy is not None:
351
351
  pulumi.set(__self__, "purge_on_destroy", purge_on_destroy)
352
352
  if read_allocation_ids is not None:
353
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
354
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
353
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
354
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
355
355
  if read_allocation_ids is not None:
356
356
  pulumi.set(__self__, "read_allocation_ids", read_allocation_ids)
357
357
  if region is not None:
@@ -373,8 +373,8 @@ class _JobState:
373
373
  """
374
374
  The IDs for allocations associated with this job.
375
375
  """
376
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
377
- pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
376
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
377
+ pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
378
378
 
379
379
  return pulumi.get(self, "allocation_ids")
380
380
 
@@ -585,8 +585,8 @@ class _JobState:
585
585
  @property
586
586
  @pulumi.getter(name="readAllocationIds")
587
587
  def read_allocation_ids(self) -> Optional[pulumi.Input[bool]]:
588
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
589
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
588
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
589
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
590
590
 
591
591
  return pulumi.get(self, "read_allocation_ids")
592
592
 
@@ -895,8 +895,8 @@ class Job(pulumi.CustomResource):
895
895
  """
896
896
  The IDs for allocations associated with this job.
897
897
  """
898
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
899
- pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
898
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
899
+ pulumi.log.warn("""allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
900
900
 
901
901
  return pulumi.get(self, "allocation_ids")
902
902
 
@@ -1039,8 +1039,8 @@ class Job(pulumi.CustomResource):
1039
1039
  @property
1040
1040
  @pulumi.getter(name="readAllocationIds")
1041
1041
  def read_allocation_ids(self) -> pulumi.Output[Optional[bool]]:
1042
- warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""", DeprecationWarning)
1043
- pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the get_allocations data source instead.""")
1042
+ warnings.warn("""Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""", DeprecationWarning)
1043
+ pulumi.log.warn("""read_allocation_ids is deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad_allocations data source instead.""")
1044
1044
 
1045
1045
  return pulumi.get(self, "read_allocation_ids")
1046
1046