pulumi-http 0.0.2a1700544396__py3-none-any.whl → 0.2.0a1768974347__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.
pulumi_http/__init__.py CHANGED
@@ -1,7 +1,8 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
+ import builtins as _builtins
5
6
  from . import _utilities
6
7
  import typing
7
8
  # Export this package's modules as members:
pulumi_http/_inputs.py CHANGED
@@ -1,28 +1,53 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import copy
5
+ import builtins as _builtins
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__ = [
13
18
  'GetHttpRetryArgs',
19
+ 'GetHttpRetryArgsDict',
14
20
  ]
15
21
 
22
+ MYPY = False
23
+
24
+ if not MYPY:
25
+ class GetHttpRetryArgsDict(TypedDict):
26
+ attempts: NotRequired[_builtins.int]
27
+ """
28
+ The number of times the request is to be retried. For example, if 2 is specified, the request will be tried a maximum of 3 times.
29
+ """
30
+ max_delay_ms: NotRequired[_builtins.int]
31
+ """
32
+ The maximum delay between retry requests in milliseconds.
33
+ """
34
+ min_delay_ms: NotRequired[_builtins.int]
35
+ """
36
+ The minimum delay between retry requests in milliseconds.
37
+ """
38
+ elif False:
39
+ GetHttpRetryArgsDict: TypeAlias = Mapping[str, Any]
40
+
16
41
  @pulumi.input_type
17
42
  class GetHttpRetryArgs:
18
43
  def __init__(__self__, *,
19
- attempts: Optional[int] = None,
20
- max_delay_ms: Optional[int] = None,
21
- min_delay_ms: Optional[int] = None):
44
+ attempts: Optional[_builtins.int] = None,
45
+ max_delay_ms: Optional[_builtins.int] = None,
46
+ min_delay_ms: Optional[_builtins.int] = None):
22
47
  """
23
- :param int attempts: The number of times the request is to be retried. For example, if 2 is specified, the request will be tried a maximum of 3 times.
24
- :param int max_delay_ms: The maximum delay between retry requests in milliseconds.
25
- :param int min_delay_ms: The minimum delay between retry requests in milliseconds.
48
+ :param _builtins.int attempts: The number of times the request is to be retried. For example, if 2 is specified, the request will be tried a maximum of 3 times.
49
+ :param _builtins.int max_delay_ms: The maximum delay between retry requests in milliseconds.
50
+ :param _builtins.int min_delay_ms: The minimum delay between retry requests in milliseconds.
26
51
  """
27
52
  if attempts is not None:
28
53
  pulumi.set(__self__, "attempts", attempts)
@@ -31,40 +56,40 @@ class GetHttpRetryArgs:
31
56
  if min_delay_ms is not None:
32
57
  pulumi.set(__self__, "min_delay_ms", min_delay_ms)
33
58
 
34
- @property
59
+ @_builtins.property
35
60
  @pulumi.getter
36
- def attempts(self) -> Optional[int]:
61
+ def attempts(self) -> Optional[_builtins.int]:
37
62
  """
38
63
  The number of times the request is to be retried. For example, if 2 is specified, the request will be tried a maximum of 3 times.
39
64
  """
40
65
  return pulumi.get(self, "attempts")
41
66
 
42
67
  @attempts.setter
43
- def attempts(self, value: Optional[int]):
68
+ def attempts(self, value: Optional[_builtins.int]):
44
69
  pulumi.set(self, "attempts", value)
45
70
 
46
- @property
71
+ @_builtins.property
47
72
  @pulumi.getter(name="maxDelayMs")
48
- def max_delay_ms(self) -> Optional[int]:
73
+ def max_delay_ms(self) -> Optional[_builtins.int]:
49
74
  """
50
75
  The maximum delay between retry requests in milliseconds.
51
76
  """
52
77
  return pulumi.get(self, "max_delay_ms")
53
78
 
54
79
  @max_delay_ms.setter
55
- def max_delay_ms(self, value: Optional[int]):
80
+ def max_delay_ms(self, value: Optional[_builtins.int]):
56
81
  pulumi.set(self, "max_delay_ms", value)
57
82
 
58
- @property
83
+ @_builtins.property
59
84
  @pulumi.getter(name="minDelayMs")
60
- def min_delay_ms(self) -> Optional[int]:
85
+ def min_delay_ms(self) -> Optional[_builtins.int]:
61
86
  """
62
87
  The minimum delay between retry requests in milliseconds.
63
88
  """
64
89
  return pulumi.get(self, "min_delay_ms")
65
90
 
66
91
  @min_delay_ms.setter
67
- def min_delay_ms(self, value: Optional[int]):
92
+ def min_delay_ms(self, value: Optional[_builtins.int]):
68
93
  pulumi.set(self, "min_delay_ms", value)
69
94
 
70
95
 
pulumi_http/_utilities.py CHANGED
@@ -1,22 +1,30 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
5
 
6
+ import asyncio
7
+ import functools
8
+ import importlib.metadata
6
9
  import importlib.util
7
10
  import inspect
8
11
  import json
9
12
  import os
10
- import pkg_resources
11
13
  import sys
12
14
  import typing
15
+ import warnings
16
+ import base64
13
17
 
14
18
  import pulumi
15
19
  import pulumi.runtime
20
+ from pulumi.runtime.sync_await import _sync_await
21
+ from pulumi.runtime.proto import resource_pb2
16
22
 
17
23
  from semver import VersionInfo as SemverVersion
18
24
  from parver import Version as PEP440Version
19
25
 
26
+ C = typing.TypeVar("C", bound=typing.Callable)
27
+
20
28
 
21
29
  def get_env(*args):
22
30
  for v in args:
@@ -70,7 +78,7 @@ def _get_semver_version():
70
78
  # to receive a valid semver string when receiving requests from the language host, so it's our
71
79
  # responsibility as the library to convert our own PEP440 version into a valid semver string.
72
80
 
73
- pep440_version_string = pkg_resources.require(root_package)[0].version
81
+ pep440_version_string = importlib.metadata.version(root_package)
74
82
  pep440_version = PEP440Version.parse(pep440_version_string)
75
83
  (major, minor, patch) = pep440_version.release
76
84
  prerelease = None
@@ -81,12 +89,16 @@ def _get_semver_version():
81
89
  elif pep440_version.pre_tag == 'rc':
82
90
  prerelease = f"rc.{pep440_version.pre}"
83
91
  elif pep440_version.dev is not None:
92
+ # PEP440 has explicit support for dev builds, while semver encodes them as "prerelease" versions. To bridge
93
+ # between the two, we convert our dev build version into a prerelease tag. This matches what all of our other
94
+ # packages do when constructing their own semver string.
84
95
  prerelease = f"dev.{pep440_version.dev}"
96
+ elif pep440_version.local is not None:
97
+ # PEP440 only allows a small set of prerelease tags, so when converting an arbitrary prerelease,
98
+ # PypiVersion in /pkg/codegen/python/utilities.go converts it to a local version. Therefore, we need to
99
+ # do the reverse conversion here and set the local version as the prerelease tag.
100
+ prerelease = pep440_version.local
85
101
 
86
- # The only significant difference between PEP440 and semver as it pertains to us is that PEP440 has explicit support
87
- # for dev builds, while semver encodes them as "prerelease" versions. In order to bridge between the two, we convert
88
- # our dev build version into a prerelease tag. This matches what all of our other packages do when constructing
89
- # their own semver string.
90
102
  return SemverVersion(major=major, minor=minor, patch=patch, prerelease=prerelease)
91
103
 
92
104
 
@@ -94,10 +106,6 @@ def _get_semver_version():
94
106
  _version = _get_semver_version()
95
107
  _version_str = str(_version)
96
108
 
97
-
98
- def get_version():
99
- return _version_str
100
-
101
109
  def get_resource_opts_defaults() -> pulumi.ResourceOptions:
102
110
  return pulumi.ResourceOptions(
103
111
  version=get_version(),
@@ -246,5 +254,78 @@ def lift_output_func(func: typing.Any) -> typing.Callable[[_F], _F]:
246
254
 
247
255
  return (lambda _: lifted_func)
248
256
 
257
+
258
+ def call_plain(
259
+ tok: str,
260
+ props: pulumi.Inputs,
261
+ res: typing.Optional[pulumi.Resource] = None,
262
+ typ: typing.Optional[type] = None,
263
+ ) -> typing.Any:
264
+ """
265
+ Wraps pulumi.runtime.plain to force the output and return it plainly.
266
+ """
267
+
268
+ output = pulumi.runtime.call(tok, props, res, typ)
269
+
270
+ # Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
271
+ result, known, secret, _ = _sync_await(asyncio.create_task(_await_output(output)))
272
+
273
+ problem = None
274
+ if not known:
275
+ problem = ' an unknown value'
276
+ elif secret:
277
+ problem = ' a secret value'
278
+
279
+ if problem:
280
+ raise AssertionError(
281
+ f"Plain resource method '{tok}' incorrectly returned {problem}. "
282
+ + "This is an error in the provider, please report this to the provider developer."
283
+ )
284
+
285
+ return result
286
+
287
+
288
+ async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bool, bool, set]:
289
+ return (
290
+ await o._future,
291
+ await o._is_known,
292
+ await o._is_secret,
293
+ await o._resources,
294
+ )
295
+
296
+
297
+ # This is included to provide an upgrade path for users who are using a version
298
+ # of the Pulumi SDK (<3.121.0) that does not include the `deprecated` decorator.
299
+ def deprecated(message: str) -> typing.Callable[[C], C]:
300
+ """
301
+ Decorator to indicate a function is deprecated.
302
+
303
+ As well as inserting appropriate statements to indicate that the function is
304
+ deprecated, this decorator also tags the function with a special attribute
305
+ so that Pulumi code can detect that it is deprecated and react appropriately
306
+ in certain situations.
307
+
308
+ message is the deprecation message that should be printed if the function is called.
309
+ """
310
+
311
+ def decorator(fn: C) -> C:
312
+ if not callable(fn):
313
+ raise TypeError("Expected fn to be callable")
314
+
315
+ @functools.wraps(fn)
316
+ def deprecated_fn(*args, **kwargs):
317
+ warnings.warn(message)
318
+ pulumi.warn(f"{fn.__name__} is deprecated: {message}")
319
+
320
+ return fn(*args, **kwargs)
321
+
322
+ deprecated_fn.__dict__["_pulumi_deprecated_callable"] = fn
323
+ return typing.cast(C, deprecated_fn)
324
+
325
+ return decorator
326
+
249
327
  def get_plugin_download_url():
250
328
  return None
329
+
330
+ def get_version():
331
+ return _version_str
pulumi_http/get_http.py CHANGED
@@ -1,12 +1,17 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import copy
5
+ import builtins as _builtins
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,13 +28,19 @@ class GetHttpResult:
23
28
  """
24
29
  A collection of values returned by getHttp.
25
30
  """
26
- def __init__(__self__, body=None, ca_cert_pem=None, id=None, insecure=None, method=None, request_body=None, request_headers=None, request_timeout_ms=None, response_body=None, response_body_base64=None, response_headers=None, retry=None, status_code=None, url=None):
31
+ def __init__(__self__, body=None, ca_cert_pem=None, client_cert_pem=None, client_key_pem=None, id=None, insecure=None, method=None, request_body=None, request_headers=None, request_timeout_ms=None, response_body=None, response_body_base64=None, response_headers=None, retry=None, status_code=None, url=None):
27
32
  if body and not isinstance(body, str):
28
33
  raise TypeError("Expected argument 'body' to be a str")
29
34
  pulumi.set(__self__, "body", body)
30
35
  if ca_cert_pem and not isinstance(ca_cert_pem, str):
31
36
  raise TypeError("Expected argument 'ca_cert_pem' to be a str")
32
37
  pulumi.set(__self__, "ca_cert_pem", ca_cert_pem)
38
+ if client_cert_pem and not isinstance(client_cert_pem, str):
39
+ raise TypeError("Expected argument 'client_cert_pem' to be a str")
40
+ pulumi.set(__self__, "client_cert_pem", client_cert_pem)
41
+ if client_key_pem and not isinstance(client_key_pem, str):
42
+ raise TypeError("Expected argument 'client_key_pem' to be a str")
43
+ pulumi.set(__self__, "client_key_pem", client_key_pem)
33
44
  if id and not isinstance(id, str):
34
45
  raise TypeError("Expected argument 'id' to be a str")
35
46
  pulumi.set(__self__, "id", id)
@@ -67,116 +78,127 @@ class GetHttpResult:
67
78
  raise TypeError("Expected argument 'url' to be a str")
68
79
  pulumi.set(__self__, "url", url)
69
80
 
70
- @property
81
+ @_builtins.property
71
82
  @pulumi.getter
72
- def body(self) -> str:
83
+ @_utilities.deprecated("""Use response_body instead""")
84
+ def body(self) -> _builtins.str:
73
85
  """
74
86
  The response body returned as a string. **NOTE**: This is deprecated, use `response_body` instead.
75
87
  """
76
- warnings.warn("""Use response_body instead""", DeprecationWarning)
77
- pulumi.log.warn("""body is deprecated: Use response_body instead""")
78
-
79
88
  return pulumi.get(self, "body")
80
89
 
81
- @property
90
+ @_builtins.property
82
91
  @pulumi.getter(name="caCertPem")
83
- def ca_cert_pem(self) -> Optional[str]:
92
+ def ca_cert_pem(self) -> Optional[_builtins.str]:
84
93
  """
85
- Certificate data of the Certificate Authority (CA) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
94
+ Certificate Authority (CA) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
86
95
  """
87
96
  return pulumi.get(self, "ca_cert_pem")
88
97
 
89
- @property
98
+ @_builtins.property
99
+ @pulumi.getter(name="clientCertPem")
100
+ def client_cert_pem(self) -> Optional[_builtins.str]:
101
+ """
102
+ Client certificate in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
103
+ """
104
+ return pulumi.get(self, "client_cert_pem")
105
+
106
+ @_builtins.property
107
+ @pulumi.getter(name="clientKeyPem")
108
+ def client_key_pem(self) -> Optional[_builtins.str]:
109
+ """
110
+ Client key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
111
+ """
112
+ return pulumi.get(self, "client_key_pem")
113
+
114
+ @_builtins.property
90
115
  @pulumi.getter
91
- def id(self) -> str:
116
+ def id(self) -> _builtins.str:
92
117
  """
93
118
  The URL used for the request.
94
119
  """
95
120
  return pulumi.get(self, "id")
96
121
 
97
- @property
122
+ @_builtins.property
98
123
  @pulumi.getter
99
- def insecure(self) -> Optional[bool]:
124
+ def insecure(self) -> Optional[_builtins.bool]:
100
125
  """
101
126
  Disables verification of the server's certificate chain and hostname. Defaults to `false`
102
127
  """
103
128
  return pulumi.get(self, "insecure")
104
129
 
105
- @property
130
+ @_builtins.property
106
131
  @pulumi.getter
107
- def method(self) -> Optional[str]:
132
+ def method(self) -> Optional[_builtins.str]:
108
133
  """
109
134
  The HTTP Method for the request. Allowed methods are a subset of methods defined in [RFC7231](https://datatracker.ietf.org/doc/html/rfc7231#section-4.3) namely, `GET`, `HEAD`, and `POST`. `POST` support is only intended for read-only URLs, such as submitting a search.
110
135
  """
111
136
  return pulumi.get(self, "method")
112
137
 
113
- @property
138
+ @_builtins.property
114
139
  @pulumi.getter(name="requestBody")
115
- def request_body(self) -> Optional[str]:
140
+ def request_body(self) -> Optional[_builtins.str]:
116
141
  """
117
142
  The request body as a string.
118
143
  """
119
144
  return pulumi.get(self, "request_body")
120
145
 
121
- @property
146
+ @_builtins.property
122
147
  @pulumi.getter(name="requestHeaders")
123
- def request_headers(self) -> Optional[Mapping[str, str]]:
148
+ def request_headers(self) -> Optional[Mapping[str, _builtins.str]]:
124
149
  """
125
150
  A map of request header field names and values.
126
151
  """
127
152
  return pulumi.get(self, "request_headers")
128
153
 
129
- @property
154
+ @_builtins.property
130
155
  @pulumi.getter(name="requestTimeoutMs")
131
- def request_timeout_ms(self) -> Optional[int]:
156
+ def request_timeout_ms(self) -> Optional[_builtins.int]:
132
157
  """
133
158
  The request timeout in milliseconds.
134
159
  """
135
160
  return pulumi.get(self, "request_timeout_ms")
136
161
 
137
- @property
162
+ @_builtins.property
138
163
  @pulumi.getter(name="responseBody")
139
- def response_body(self) -> str:
164
+ def response_body(self) -> _builtins.str:
140
165
  """
141
166
  The response body returned as a string.
142
167
  """
143
168
  return pulumi.get(self, "response_body")
144
169
 
145
- @property
170
+ @_builtins.property
146
171
  @pulumi.getter(name="responseBodyBase64")
147
- def response_body_base64(self) -> str:
172
+ def response_body_base64(self) -> _builtins.str:
148
173
  """
149
174
  The response body encoded as base64 (standard) as defined in [RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648#section-4).
150
175
  """
151
176
  return pulumi.get(self, "response_body_base64")
152
177
 
153
- @property
178
+ @_builtins.property
154
179
  @pulumi.getter(name="responseHeaders")
155
- def response_headers(self) -> Mapping[str, str]:
180
+ def response_headers(self) -> Mapping[str, _builtins.str]:
156
181
  """
157
182
  A map of response header field names and values. Duplicate headers are concatenated according to [RFC2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2).
158
183
  """
159
184
  return pulumi.get(self, "response_headers")
160
185
 
161
- @property
186
+ @_builtins.property
162
187
  @pulumi.getter
163
188
  def retry(self) -> Optional['outputs.GetHttpRetryResult']:
164
- """
165
- Retry request configuration. By default there are no retries. Configuring this block will result in retries if an error is returned by the client (e.g., connection errors) or if a 5xx-range (except 501) status code is received. For further details see [go-retryablehttp](https://pkg.go.dev/github.com/hashicorp/go-retryablehttp).
166
- """
167
189
  return pulumi.get(self, "retry")
168
190
 
169
- @property
191
+ @_builtins.property
170
192
  @pulumi.getter(name="statusCode")
171
- def status_code(self) -> int:
193
+ def status_code(self) -> _builtins.int:
172
194
  """
173
195
  The HTTP response status code.
174
196
  """
175
197
  return pulumi.get(self, "status_code")
176
198
 
177
- @property
199
+ @_builtins.property
178
200
  @pulumi.getter
179
- def url(self) -> str:
201
+ def url(self) -> _builtins.str:
180
202
  """
181
203
  The URL for the request. Supported schemes are `get_http` and `https`.
182
204
  """
@@ -191,6 +213,8 @@ class AwaitableGetHttpResult(GetHttpResult):
191
213
  return GetHttpResult(
192
214
  body=self.body,
193
215
  ca_cert_pem=self.ca_cert_pem,
216
+ client_cert_pem=self.client_cert_pem,
217
+ client_key_pem=self.client_key_pem,
194
218
  id=self.id,
195
219
  insecure=self.insecure,
196
220
  method=self.method,
@@ -205,29 +229,34 @@ class AwaitableGetHttpResult(GetHttpResult):
205
229
  url=self.url)
206
230
 
207
231
 
208
- def get_http(ca_cert_pem: Optional[str] = None,
209
- insecure: Optional[bool] = None,
210
- method: Optional[str] = None,
211
- request_body: Optional[str] = None,
212
- request_headers: Optional[Mapping[str, str]] = None,
213
- request_timeout_ms: Optional[int] = None,
214
- retry: Optional[pulumi.InputType['GetHttpRetryArgs']] = None,
215
- url: Optional[str] = None,
232
+ def get_http(ca_cert_pem: Optional[_builtins.str] = None,
233
+ client_cert_pem: Optional[_builtins.str] = None,
234
+ client_key_pem: Optional[_builtins.str] = None,
235
+ insecure: Optional[_builtins.bool] = None,
236
+ method: Optional[_builtins.str] = None,
237
+ request_body: Optional[_builtins.str] = None,
238
+ request_headers: Optional[Mapping[str, _builtins.str]] = None,
239
+ request_timeout_ms: Optional[_builtins.int] = None,
240
+ retry: Optional[Union['GetHttpRetryArgs', 'GetHttpRetryArgsDict']] = None,
241
+ url: Optional[_builtins.str] = None,
216
242
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetHttpResult:
217
243
  """
218
244
  Use this data source to access information about an existing resource.
219
245
 
220
- :param str ca_cert_pem: Certificate data of the Certificate Authority (CA) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
221
- :param bool insecure: Disables verification of the server's certificate chain and hostname. Defaults to `false`
222
- :param str method: The HTTP Method for the request. Allowed methods are a subset of methods defined in [RFC7231](https://datatracker.ietf.org/doc/html/rfc7231#section-4.3) namely, `GET`, `HEAD`, and `POST`. `POST` support is only intended for read-only URLs, such as submitting a search.
223
- :param str request_body: The request body as a string.
224
- :param Mapping[str, str] request_headers: A map of request header field names and values.
225
- :param int request_timeout_ms: The request timeout in milliseconds.
226
- :param pulumi.InputType['GetHttpRetryArgs'] retry: Retry request configuration. By default there are no retries. Configuring this block will result in retries if an error is returned by the client (e.g., connection errors) or if a 5xx-range (except 501) status code is received. For further details see [go-retryablehttp](https://pkg.go.dev/github.com/hashicorp/go-retryablehttp).
227
- :param str url: The URL for the request. Supported schemes are `get_http` and `https`.
246
+ :param _builtins.str ca_cert_pem: Certificate Authority (CA) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
247
+ :param _builtins.str client_cert_pem: Client certificate in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
248
+ :param _builtins.str client_key_pem: Client key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
249
+ :param _builtins.bool insecure: Disables verification of the server's certificate chain and hostname. Defaults to `false`
250
+ :param _builtins.str method: The HTTP Method for the request. Allowed methods are a subset of methods defined in [RFC7231](https://datatracker.ietf.org/doc/html/rfc7231#section-4.3) namely, `GET`, `HEAD`, and `POST`. `POST` support is only intended for read-only URLs, such as submitting a search.
251
+ :param _builtins.str request_body: The request body as a string.
252
+ :param Mapping[str, _builtins.str] request_headers: A map of request header field names and values.
253
+ :param _builtins.int request_timeout_ms: The request timeout in milliseconds.
254
+ :param _builtins.str url: The URL for the request. Supported schemes are `get_http` and `https`.
228
255
  """
229
256
  __args__ = dict()
230
257
  __args__['caCertPem'] = ca_cert_pem
258
+ __args__['clientCertPem'] = client_cert_pem
259
+ __args__['clientKeyPem'] = client_key_pem
231
260
  __args__['insecure'] = insecure
232
261
  __args__['method'] = method
233
262
  __args__['requestBody'] = request_body
@@ -241,6 +270,8 @@ def get_http(ca_cert_pem: Optional[str] = None,
241
270
  return AwaitableGetHttpResult(
242
271
  body=pulumi.get(__ret__, 'body'),
243
272
  ca_cert_pem=pulumi.get(__ret__, 'ca_cert_pem'),
273
+ client_cert_pem=pulumi.get(__ret__, 'client_cert_pem'),
274
+ client_key_pem=pulumi.get(__ret__, 'client_key_pem'),
244
275
  id=pulumi.get(__ret__, 'id'),
245
276
  insecure=pulumi.get(__ret__, 'insecure'),
246
277
  method=pulumi.get(__ret__, 'method'),
@@ -253,28 +284,57 @@ def get_http(ca_cert_pem: Optional[str] = None,
253
284
  retry=pulumi.get(__ret__, 'retry'),
254
285
  status_code=pulumi.get(__ret__, 'status_code'),
255
286
  url=pulumi.get(__ret__, 'url'))
256
-
257
-
258
- @_utilities.lift_output_func(get_http)
259
- def get_http_output(ca_cert_pem: Optional[pulumi.Input[Optional[str]]] = None,
260
- insecure: Optional[pulumi.Input[Optional[bool]]] = None,
261
- method: Optional[pulumi.Input[Optional[str]]] = None,
262
- request_body: Optional[pulumi.Input[Optional[str]]] = None,
263
- request_headers: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
264
- request_timeout_ms: Optional[pulumi.Input[Optional[int]]] = None,
265
- retry: Optional[pulumi.Input[Optional[pulumi.InputType['GetHttpRetryArgs']]]] = None,
266
- url: Optional[pulumi.Input[str]] = None,
267
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetHttpResult]:
287
+ def get_http_output(ca_cert_pem: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
288
+ client_cert_pem: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
289
+ client_key_pem: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
290
+ insecure: Optional[pulumi.Input[Optional[_builtins.bool]]] = None,
291
+ method: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
292
+ request_body: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
293
+ request_headers: Optional[pulumi.Input[Optional[Mapping[str, _builtins.str]]]] = None,
294
+ request_timeout_ms: Optional[pulumi.Input[Optional[_builtins.int]]] = None,
295
+ retry: Optional[pulumi.Input[Optional[Union['GetHttpRetryArgs', 'GetHttpRetryArgsDict']]]] = None,
296
+ url: Optional[pulumi.Input[_builtins.str]] = None,
297
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetHttpResult]:
268
298
  """
269
299
  Use this data source to access information about an existing resource.
270
300
 
271
- :param str ca_cert_pem: Certificate data of the Certificate Authority (CA) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
272
- :param bool insecure: Disables verification of the server's certificate chain and hostname. Defaults to `false`
273
- :param str method: The HTTP Method for the request. Allowed methods are a subset of methods defined in [RFC7231](https://datatracker.ietf.org/doc/html/rfc7231#section-4.3) namely, `GET`, `HEAD`, and `POST`. `POST` support is only intended for read-only URLs, such as submitting a search.
274
- :param str request_body: The request body as a string.
275
- :param Mapping[str, str] request_headers: A map of request header field names and values.
276
- :param int request_timeout_ms: The request timeout in milliseconds.
277
- :param pulumi.InputType['GetHttpRetryArgs'] retry: Retry request configuration. By default there are no retries. Configuring this block will result in retries if an error is returned by the client (e.g., connection errors) or if a 5xx-range (except 501) status code is received. For further details see [go-retryablehttp](https://pkg.go.dev/github.com/hashicorp/go-retryablehttp).
278
- :param str url: The URL for the request. Supported schemes are `get_http` and `https`.
301
+ :param _builtins.str ca_cert_pem: Certificate Authority (CA) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
302
+ :param _builtins.str client_cert_pem: Client certificate in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
303
+ :param _builtins.str client_key_pem: Client key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
304
+ :param _builtins.bool insecure: Disables verification of the server's certificate chain and hostname. Defaults to `false`
305
+ :param _builtins.str method: The HTTP Method for the request. Allowed methods are a subset of methods defined in [RFC7231](https://datatracker.ietf.org/doc/html/rfc7231#section-4.3) namely, `GET`, `HEAD`, and `POST`. `POST` support is only intended for read-only URLs, such as submitting a search.
306
+ :param _builtins.str request_body: The request body as a string.
307
+ :param Mapping[str, _builtins.str] request_headers: A map of request header field names and values.
308
+ :param _builtins.int request_timeout_ms: The request timeout in milliseconds.
309
+ :param _builtins.str url: The URL for the request. Supported schemes are `get_http` and `https`.
279
310
  """
280
- ...
311
+ __args__ = dict()
312
+ __args__['caCertPem'] = ca_cert_pem
313
+ __args__['clientCertPem'] = client_cert_pem
314
+ __args__['clientKeyPem'] = client_key_pem
315
+ __args__['insecure'] = insecure
316
+ __args__['method'] = method
317
+ __args__['requestBody'] = request_body
318
+ __args__['requestHeaders'] = request_headers
319
+ __args__['requestTimeoutMs'] = request_timeout_ms
320
+ __args__['retry'] = retry
321
+ __args__['url'] = url
322
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
323
+ __ret__ = pulumi.runtime.invoke_output('http:index/getHttp:getHttp', __args__, opts=opts, typ=GetHttpResult)
324
+ return __ret__.apply(lambda __response__: GetHttpResult(
325
+ body=pulumi.get(__response__, 'body'),
326
+ ca_cert_pem=pulumi.get(__response__, 'ca_cert_pem'),
327
+ client_cert_pem=pulumi.get(__response__, 'client_cert_pem'),
328
+ client_key_pem=pulumi.get(__response__, 'client_key_pem'),
329
+ id=pulumi.get(__response__, 'id'),
330
+ insecure=pulumi.get(__response__, 'insecure'),
331
+ method=pulumi.get(__response__, 'method'),
332
+ request_body=pulumi.get(__response__, 'request_body'),
333
+ request_headers=pulumi.get(__response__, 'request_headers'),
334
+ request_timeout_ms=pulumi.get(__response__, 'request_timeout_ms'),
335
+ response_body=pulumi.get(__response__, 'response_body'),
336
+ response_body_base64=pulumi.get(__response__, 'response_body_base64'),
337
+ response_headers=pulumi.get(__response__, 'response_headers'),
338
+ retry=pulumi.get(__response__, 'retry'),
339
+ status_code=pulumi.get(__response__, 'status_code'),
340
+ url=pulumi.get(__response__, 'url')))
pulumi_http/outputs.py CHANGED
@@ -1,12 +1,17 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import copy
5
+ import builtins as _builtins
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__ = [
@@ -16,13 +21,13 @@ __all__ = [
16
21
  @pulumi.output_type
17
22
  class GetHttpRetryResult(dict):
18
23
  def __init__(__self__, *,
19
- attempts: Optional[int] = None,
20
- max_delay_ms: Optional[int] = None,
21
- min_delay_ms: Optional[int] = None):
24
+ attempts: Optional[_builtins.int] = None,
25
+ max_delay_ms: Optional[_builtins.int] = None,
26
+ min_delay_ms: Optional[_builtins.int] = None):
22
27
  """
23
- :param int attempts: The number of times the request is to be retried. For example, if 2 is specified, the request will be tried a maximum of 3 times.
24
- :param int max_delay_ms: The maximum delay between retry requests in milliseconds.
25
- :param int min_delay_ms: The minimum delay between retry requests in milliseconds.
28
+ :param _builtins.int attempts: The number of times the request is to be retried. For example, if 2 is specified, the request will be tried a maximum of 3 times.
29
+ :param _builtins.int max_delay_ms: The maximum delay between retry requests in milliseconds.
30
+ :param _builtins.int min_delay_ms: The minimum delay between retry requests in milliseconds.
26
31
  """
27
32
  if attempts is not None:
28
33
  pulumi.set(__self__, "attempts", attempts)
@@ -31,25 +36,25 @@ class GetHttpRetryResult(dict):
31
36
  if min_delay_ms is not None:
32
37
  pulumi.set(__self__, "min_delay_ms", min_delay_ms)
33
38
 
34
- @property
39
+ @_builtins.property
35
40
  @pulumi.getter
36
- def attempts(self) -> Optional[int]:
41
+ def attempts(self) -> Optional[_builtins.int]:
37
42
  """
38
43
  The number of times the request is to be retried. For example, if 2 is specified, the request will be tried a maximum of 3 times.
39
44
  """
40
45
  return pulumi.get(self, "attempts")
41
46
 
42
- @property
47
+ @_builtins.property
43
48
  @pulumi.getter(name="maxDelayMs")
44
- def max_delay_ms(self) -> Optional[int]:
49
+ def max_delay_ms(self) -> Optional[_builtins.int]:
45
50
  """
46
51
  The maximum delay between retry requests in milliseconds.
47
52
  """
48
53
  return pulumi.get(self, "max_delay_ms")
49
54
 
50
- @property
55
+ @_builtins.property
51
56
  @pulumi.getter(name="minDelayMs")
52
- def min_delay_ms(self) -> Optional[int]:
57
+ def min_delay_ms(self) -> Optional[_builtins.int]:
53
58
  """
54
59
  The minimum delay between retry requests in milliseconds.
55
60
  """
pulumi_http/provider.py CHANGED
@@ -1,12 +1,17 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import copy
5
+ import builtins as _builtins
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__ = ['ProviderArgs', 'Provider']
@@ -20,6 +25,7 @@ class ProviderArgs:
20
25
  pass
21
26
 
22
27
 
28
+ @pulumi.type_token("pulumi:providers:http")
23
29
  class Provider(pulumi.ProviderResource):
24
30
  @overload
25
31
  def __init__(__self__,
@@ -77,3 +83,23 @@ class Provider(pulumi.ProviderResource):
77
83
  __props__,
78
84
  opts)
79
85
 
86
+ @pulumi.output_type
87
+ class TerraformConfigResult:
88
+ def __init__(__self__, result=None):
89
+ if result and not isinstance(result, dict):
90
+ raise TypeError("Expected argument 'result' to be a dict")
91
+ pulumi.set(__self__, "result", result)
92
+
93
+ @_builtins.property
94
+ @pulumi.getter
95
+ def result(self) -> Mapping[str, Any]:
96
+ return pulumi.get(self, "result")
97
+
98
+ def terraform_config(__self__) -> pulumi.Output['Provider.TerraformConfigResult']:
99
+ """
100
+ This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider.
101
+ """
102
+ __args__ = dict()
103
+ __args__['__self__'] = __self__
104
+ return pulumi.runtime.call('pulumi:providers:http/terraformConfig', __args__, res=__self__, typ=Provider.TerraformConfigResult)
105
+
@@ -1,4 +1,5 @@
1
1
  {
2
2
  "resource": true,
3
- "name": "http"
3
+ "name": "http",
4
+ "version": "0.2.0-alpha.1768974347"
4
5
  }
@@ -1,16 +1,17 @@
1
- Metadata-Version: 2.1
2
- Name: pulumi-http
3
- Version: 0.0.2a1700544396
1
+ Metadata-Version: 2.4
2
+ Name: pulumi_http
3
+ Version: 0.2.0a1768974347
4
4
  Summary: A Pulumi package for creating and managing HTTP cloud resources.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://www.pulumi.com/
7
7
  Project-URL: Repository, https://github.com/pulumi/pulumi-http
8
8
  Keywords: pulumi,category/cloud
9
- Requires-Python: >=3.7
9
+ Requires-Python: >=3.9
10
10
  Description-Content-Type: text/markdown
11
- Requires-Dist: parver >=0.2.1
12
- Requires-Dist: pulumi <4.0.0,>=3.0.0
13
- Requires-Dist: semver >=2.8.1
11
+ Requires-Dist: parver>=0.2.1
12
+ Requires-Dist: pulumi<4.0.0,>=3.165.0
13
+ Requires-Dist: semver>=2.8.1
14
+ Requires-Dist: typing-extensions<5,>=4.11; python_version < "3.11"
14
15
 
15
16
  [![Actions Status](https://github.com/pulumi/pulumi-http/workflows/master/badge.svg)](https://github.com/pulumi/pulumi-http/actions)
16
17
  [![NPM version](https://img.shields.io/npm/v/@pulumi/http)](https://www.npmjs.com/package/@pulumi/http)
@@ -0,0 +1,12 @@
1
+ pulumi_http/__init__.py,sha256=BUgm-RaFl_U9noE_a93CA-Bmk7uti2TnFnlnmZ2BDWA,567
2
+ pulumi_http/_inputs.py,sha256=v3_9omW7xkQk0Jn1B7HR_BIyMUn-DxN6dm-04MSwx2E,3355
3
+ pulumi_http/_utilities.py,sha256=66uLGQDI1oMFOI3Fe5igAphtexWhcSLDyuVW50jW3ik,10789
4
+ pulumi_http/get_http.py,sha256=E1Hhbc9Laxc7mHesx63a-B047W3YtxyGrdQO-w-5LrA,16934
5
+ pulumi_http/outputs.py,sha256=IqTZcqUFlY1RDgq3bAOAz4nWTm9u-yI2T7IBtBlywVE,2324
6
+ pulumi_http/provider.py,sha256=1iTDzZoRzD64djf00bbHhhMSs5GKNdeWC4G5iV0vsEI,4508
7
+ pulumi_http/pulumi-plugin.json,sha256=ohfhcDu-1V76YsVju5vAtkreDbe-PdC--kD_PLthDgw,80
8
+ pulumi_http/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ pulumi_http-0.2.0a1768974347.dist-info/METADATA,sha256=s9GGIMa9TlOmNHYvMMYJx-b_hNm3LPtMlT0goEITvh0,2832
10
+ pulumi_http-0.2.0a1768974347.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ pulumi_http-0.2.0a1768974347.dist-info/top_level.txt,sha256=DJeho3a5hNVbN-MMxF4_tupaJNPcOAo_svuTYKRCbPQ,12
12
+ pulumi_http-0.2.0a1768974347.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.3)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,12 +0,0 @@
1
- pulumi_http/__init__.py,sha256=bWrKWVVC4uC8izPlGm-pSI2nj86IEnLKYlfxOanCdOg,556
2
- pulumi_http/_inputs.py,sha256=MtVbQ_5AcfDaGilWHA-Bq74Zb1T_u5lsY7HkaywRKxY,2380
3
- pulumi_http/_utilities.py,sha256=fRvpCIKutW049SlpPUAoouFyjnSSk1J-OY0b8SDzJaE,8081
4
- pulumi_http/get_http.py,sha256=O2Xm7hPTfZN2DkKVQBnIodiLLUfpzeoTQhM7kj2APWI,13629
5
- pulumi_http/outputs.py,sha256=SLJb8LV86ZlXthWHrvOhUNKM5kdj-bMoWCTffltYzew,2031
6
- pulumi_http/provider.py,sha256=oCyxUVaidi_b2-TxyK-wsfKgI1fe0myTXb0KR8MsEZ4,3414
7
- pulumi_http/pulumi-plugin.json,sha256=G9PW4Q0BhL1f761JOo2vV9ZZC0V-FNLu4zJaX0Ur7IY,41
8
- pulumi_http/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- pulumi_http-0.0.2a1700544396.dist-info/METADATA,sha256=oZ5WrhlQxfneP_BU8kyn36bVzjrgK8s9ycYDx_VNGk4,2766
10
- pulumi_http-0.0.2a1700544396.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
11
- pulumi_http-0.0.2a1700544396.dist-info/top_level.txt,sha256=DJeho3a5hNVbN-MMxF4_tupaJNPcOAo_svuTYKRCbPQ,12
12
- pulumi_http-0.0.2a1700544396.dist-info/RECORD,,