pulumi-http 0.0.1__tar.gz
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-0.0.1/PKG-INFO +77 -0
- pulumi_http-0.0.1/README.md +63 -0
- pulumi_http-0.0.1/pulumi_http/__init__.py +26 -0
- pulumi_http-0.0.1/pulumi_http/_inputs.py +70 -0
- pulumi_http-0.0.1/pulumi_http/_utilities.py +250 -0
- pulumi_http-0.0.1/pulumi_http/get_http.py +281 -0
- pulumi_http-0.0.1/pulumi_http/outputs.py +58 -0
- pulumi_http-0.0.1/pulumi_http/provider.py +79 -0
- pulumi_http-0.0.1/pulumi_http/pulumi-plugin.json +4 -0
- pulumi_http-0.0.1/pulumi_http/py.typed +0 -0
- pulumi_http-0.0.1/pulumi_http.egg-info/PKG-INFO +77 -0
- pulumi_http-0.0.1/pulumi_http.egg-info/SOURCES.txt +16 -0
- pulumi_http-0.0.1/pulumi_http.egg-info/dependency_links.txt +1 -0
- pulumi_http-0.0.1/pulumi_http.egg-info/not-zip-safe +1 -0
- pulumi_http-0.0.1/pulumi_http.egg-info/requires.txt +3 -0
- pulumi_http-0.0.1/pulumi_http.egg-info/top_level.txt +1 -0
- pulumi_http-0.0.1/setup.cfg +4 -0
- pulumi_http-0.0.1/setup.py +67 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pulumi_http
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A Pulumi package for creating and managing HTTP cloud resources.
|
|
5
|
+
Home-page: https://www.pulumi.com/
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Repository, https://github.com/pulumi/pulumi-http
|
|
8
|
+
Keywords: pulumi category/cloud
|
|
9
|
+
Platform: UNKNOWN
|
|
10
|
+
Requires-Python: >=3.7
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
[](https://github.com/pulumi/pulumi-http/actions)
|
|
14
|
+
[](https://www.npmjs.com/package/@pulumi/http)
|
|
15
|
+
[](https://pypi.org/project/pulumi_http)
|
|
16
|
+
[](https://www.nuget.org/packages/Pulumi.Http)
|
|
17
|
+
[](https://pkg.go.dev/github.com/pulumi/pulumi-http/sdk/go)
|
|
18
|
+
[](https://github.com/pulumi/pulumi-http/blob/master/LICENSE)
|
|
19
|
+
|
|
20
|
+
# HTTP Resource Provider
|
|
21
|
+
|
|
22
|
+
The HTTP resource provider for Pulumi lets you use HTTP resources in your cloud programs.
|
|
23
|
+
To use this package, please [install the Pulumi CLI first](https://www.pulumi.com/docs/install/).
|
|
24
|
+
|
|
25
|
+
## Installing
|
|
26
|
+
|
|
27
|
+
This package is available in many languages in the standard packaging formats.
|
|
28
|
+
|
|
29
|
+
### Node.js (Java/TypeScript)
|
|
30
|
+
|
|
31
|
+
To use from JavaScript or TypeScript in Node.js, install using either `npm`:
|
|
32
|
+
|
|
33
|
+
$ npm install @pulumi/http
|
|
34
|
+
|
|
35
|
+
or `yarn`:
|
|
36
|
+
|
|
37
|
+
$ yarn add @pulumi/http
|
|
38
|
+
|
|
39
|
+
### Python
|
|
40
|
+
|
|
41
|
+
To use from Python, install using `pip`:
|
|
42
|
+
|
|
43
|
+
$ pip install pulumi_http
|
|
44
|
+
|
|
45
|
+
### Go
|
|
46
|
+
|
|
47
|
+
To use from Go, use `go get` to grab the latest version of the library:
|
|
48
|
+
|
|
49
|
+
$ go get github.com/pulumi/pulumi-http/sdk
|
|
50
|
+
|
|
51
|
+
### .NET
|
|
52
|
+
|
|
53
|
+
To use from .NET, install using `dotnet add package`:
|
|
54
|
+
|
|
55
|
+
$ dotnet add package Pulumi.Http
|
|
56
|
+
|
|
57
|
+
<!-- If your provider has configuration, remove this comment and the comment tags below, updating the documentation. -->
|
|
58
|
+
<!--
|
|
59
|
+
|
|
60
|
+
## Configuration
|
|
61
|
+
|
|
62
|
+
The following Pulumi configuration can be used:
|
|
63
|
+
|
|
64
|
+
- `http:token` - (Required) The API token to use with HTTP. When not set, the provider will use the `HTTP_TOKEN` environment variable.
|
|
65
|
+
|
|
66
|
+
-->
|
|
67
|
+
|
|
68
|
+
<!-- If your provider has reference material available elsewhere, remove this comment and the comment tags below, updating the documentation. -->
|
|
69
|
+
<!--
|
|
70
|
+
|
|
71
|
+
## Reference
|
|
72
|
+
|
|
73
|
+
For further information, please visit [HTTP reference documentation](https://example.com/http).
|
|
74
|
+
|
|
75
|
+
-->
|
|
76
|
+
|
|
77
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
[](https://github.com/pulumi/pulumi-http/actions)
|
|
2
|
+
[](https://www.npmjs.com/package/@pulumi/http)
|
|
3
|
+
[](https://pypi.org/project/pulumi_http)
|
|
4
|
+
[](https://www.nuget.org/packages/Pulumi.Http)
|
|
5
|
+
[](https://pkg.go.dev/github.com/pulumi/pulumi-http/sdk/go)
|
|
6
|
+
[](https://github.com/pulumi/pulumi-http/blob/master/LICENSE)
|
|
7
|
+
|
|
8
|
+
# HTTP Resource Provider
|
|
9
|
+
|
|
10
|
+
The HTTP resource provider for Pulumi lets you use HTTP resources in your cloud programs.
|
|
11
|
+
To use this package, please [install the Pulumi CLI first](https://www.pulumi.com/docs/install/).
|
|
12
|
+
|
|
13
|
+
## Installing
|
|
14
|
+
|
|
15
|
+
This package is available in many languages in the standard packaging formats.
|
|
16
|
+
|
|
17
|
+
### Node.js (Java/TypeScript)
|
|
18
|
+
|
|
19
|
+
To use from JavaScript or TypeScript in Node.js, install using either `npm`:
|
|
20
|
+
|
|
21
|
+
$ npm install @pulumi/http
|
|
22
|
+
|
|
23
|
+
or `yarn`:
|
|
24
|
+
|
|
25
|
+
$ yarn add @pulumi/http
|
|
26
|
+
|
|
27
|
+
### Python
|
|
28
|
+
|
|
29
|
+
To use from Python, install using `pip`:
|
|
30
|
+
|
|
31
|
+
$ pip install pulumi_http
|
|
32
|
+
|
|
33
|
+
### Go
|
|
34
|
+
|
|
35
|
+
To use from Go, use `go get` to grab the latest version of the library:
|
|
36
|
+
|
|
37
|
+
$ go get github.com/pulumi/pulumi-http/sdk
|
|
38
|
+
|
|
39
|
+
### .NET
|
|
40
|
+
|
|
41
|
+
To use from .NET, install using `dotnet add package`:
|
|
42
|
+
|
|
43
|
+
$ dotnet add package Pulumi.Http
|
|
44
|
+
|
|
45
|
+
<!-- If your provider has configuration, remove this comment and the comment tags below, updating the documentation. -->
|
|
46
|
+
<!--
|
|
47
|
+
|
|
48
|
+
## Configuration
|
|
49
|
+
|
|
50
|
+
The following Pulumi configuration can be used:
|
|
51
|
+
|
|
52
|
+
- `http:token` - (Required) The API token to use with HTTP. When not set, the provider will use the `HTTP_TOKEN` environment variable.
|
|
53
|
+
|
|
54
|
+
-->
|
|
55
|
+
|
|
56
|
+
<!-- If your provider has reference material available elsewhere, remove this comment and the comment tags below, updating the documentation. -->
|
|
57
|
+
<!--
|
|
58
|
+
|
|
59
|
+
## Reference
|
|
60
|
+
|
|
61
|
+
For further information, please visit [HTTP reference documentation](https://example.com/http).
|
|
62
|
+
|
|
63
|
+
-->
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
from . import _utilities
|
|
6
|
+
import typing
|
|
7
|
+
# Export this package's modules as members:
|
|
8
|
+
from .get_http import *
|
|
9
|
+
from .provider import *
|
|
10
|
+
from ._inputs import *
|
|
11
|
+
from . import outputs
|
|
12
|
+
_utilities.register(
|
|
13
|
+
resource_modules="""
|
|
14
|
+
[]
|
|
15
|
+
""",
|
|
16
|
+
resource_packages="""
|
|
17
|
+
[
|
|
18
|
+
{
|
|
19
|
+
"pkg": "http",
|
|
20
|
+
"token": "pulumi:providers:http",
|
|
21
|
+
"fqn": "pulumi_http",
|
|
22
|
+
"class": "Provider"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
"""
|
|
26
|
+
)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import copy
|
|
6
|
+
import warnings
|
|
7
|
+
import pulumi
|
|
8
|
+
import pulumi.runtime
|
|
9
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
10
|
+
from . import _utilities
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
'GetHttpRetryArgs',
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
@pulumi.input_type
|
|
17
|
+
class GetHttpRetryArgs:
|
|
18
|
+
def __init__(__self__, *,
|
|
19
|
+
attempts: Optional[int] = None,
|
|
20
|
+
max_delay_ms: Optional[int] = None,
|
|
21
|
+
min_delay_ms: Optional[int] = None):
|
|
22
|
+
"""
|
|
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.
|
|
26
|
+
"""
|
|
27
|
+
if attempts is not None:
|
|
28
|
+
pulumi.set(__self__, "attempts", attempts)
|
|
29
|
+
if max_delay_ms is not None:
|
|
30
|
+
pulumi.set(__self__, "max_delay_ms", max_delay_ms)
|
|
31
|
+
if min_delay_ms is not None:
|
|
32
|
+
pulumi.set(__self__, "min_delay_ms", min_delay_ms)
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
@pulumi.getter
|
|
36
|
+
def attempts(self) -> Optional[int]:
|
|
37
|
+
"""
|
|
38
|
+
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
|
+
"""
|
|
40
|
+
return pulumi.get(self, "attempts")
|
|
41
|
+
|
|
42
|
+
@attempts.setter
|
|
43
|
+
def attempts(self, value: Optional[int]):
|
|
44
|
+
pulumi.set(self, "attempts", value)
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
@pulumi.getter(name="maxDelayMs")
|
|
48
|
+
def max_delay_ms(self) -> Optional[int]:
|
|
49
|
+
"""
|
|
50
|
+
The maximum delay between retry requests in milliseconds.
|
|
51
|
+
"""
|
|
52
|
+
return pulumi.get(self, "max_delay_ms")
|
|
53
|
+
|
|
54
|
+
@max_delay_ms.setter
|
|
55
|
+
def max_delay_ms(self, value: Optional[int]):
|
|
56
|
+
pulumi.set(self, "max_delay_ms", value)
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
@pulumi.getter(name="minDelayMs")
|
|
60
|
+
def min_delay_ms(self) -> Optional[int]:
|
|
61
|
+
"""
|
|
62
|
+
The minimum delay between retry requests in milliseconds.
|
|
63
|
+
"""
|
|
64
|
+
return pulumi.get(self, "min_delay_ms")
|
|
65
|
+
|
|
66
|
+
@min_delay_ms.setter
|
|
67
|
+
def min_delay_ms(self, value: Optional[int]):
|
|
68
|
+
pulumi.set(self, "min_delay_ms", value)
|
|
69
|
+
|
|
70
|
+
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
import importlib.util
|
|
7
|
+
import inspect
|
|
8
|
+
import json
|
|
9
|
+
import os
|
|
10
|
+
import pkg_resources
|
|
11
|
+
import sys
|
|
12
|
+
import typing
|
|
13
|
+
|
|
14
|
+
import pulumi
|
|
15
|
+
import pulumi.runtime
|
|
16
|
+
|
|
17
|
+
from semver import VersionInfo as SemverVersion
|
|
18
|
+
from parver import Version as PEP440Version
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def get_env(*args):
|
|
22
|
+
for v in args:
|
|
23
|
+
value = os.getenv(v)
|
|
24
|
+
if value is not None:
|
|
25
|
+
return value
|
|
26
|
+
return None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def get_env_bool(*args):
|
|
30
|
+
str = get_env(*args)
|
|
31
|
+
if str is not None:
|
|
32
|
+
# NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what
|
|
33
|
+
# Terraform uses internally when parsing boolean values.
|
|
34
|
+
if str in ["1", "t", "T", "true", "TRUE", "True"]:
|
|
35
|
+
return True
|
|
36
|
+
if str in ["0", "f", "F", "false", "FALSE", "False"]:
|
|
37
|
+
return False
|
|
38
|
+
return None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def get_env_int(*args):
|
|
42
|
+
str = get_env(*args)
|
|
43
|
+
if str is not None:
|
|
44
|
+
try:
|
|
45
|
+
return int(str)
|
|
46
|
+
except:
|
|
47
|
+
return None
|
|
48
|
+
return None
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def get_env_float(*args):
|
|
52
|
+
str = get_env(*args)
|
|
53
|
+
if str is not None:
|
|
54
|
+
try:
|
|
55
|
+
return float(str)
|
|
56
|
+
except:
|
|
57
|
+
return None
|
|
58
|
+
return None
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _get_semver_version():
|
|
62
|
+
# __name__ is set to the fully-qualified name of the current module, In our case, it will be
|
|
63
|
+
# <some module>._utilities. <some module> is the module we want to query the version for.
|
|
64
|
+
root_package, *rest = __name__.split('.')
|
|
65
|
+
|
|
66
|
+
# pkg_resources uses setuptools to inspect the set of installed packages. We use it here to ask
|
|
67
|
+
# for the currently installed version of the root package (i.e. us) and get its version.
|
|
68
|
+
|
|
69
|
+
# Unfortunately, PEP440 and semver differ slightly in incompatible ways. The Pulumi engine expects
|
|
70
|
+
# to receive a valid semver string when receiving requests from the language host, so it's our
|
|
71
|
+
# responsibility as the library to convert our own PEP440 version into a valid semver string.
|
|
72
|
+
|
|
73
|
+
pep440_version_string = pkg_resources.require(root_package)[0].version
|
|
74
|
+
pep440_version = PEP440Version.parse(pep440_version_string)
|
|
75
|
+
(major, minor, patch) = pep440_version.release
|
|
76
|
+
prerelease = None
|
|
77
|
+
if pep440_version.pre_tag == 'a':
|
|
78
|
+
prerelease = f"alpha.{pep440_version.pre}"
|
|
79
|
+
elif pep440_version.pre_tag == 'b':
|
|
80
|
+
prerelease = f"beta.{pep440_version.pre}"
|
|
81
|
+
elif pep440_version.pre_tag == 'rc':
|
|
82
|
+
prerelease = f"rc.{pep440_version.pre}"
|
|
83
|
+
elif pep440_version.dev is not None:
|
|
84
|
+
prerelease = f"dev.{pep440_version.dev}"
|
|
85
|
+
|
|
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
|
+
return SemverVersion(major=major, minor=minor, patch=patch, prerelease=prerelease)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
# Determine the version once and cache the value, which measurably improves program performance.
|
|
94
|
+
_version = _get_semver_version()
|
|
95
|
+
_version_str = str(_version)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def get_version():
|
|
99
|
+
return _version_str
|
|
100
|
+
|
|
101
|
+
def get_resource_opts_defaults() -> pulumi.ResourceOptions:
|
|
102
|
+
return pulumi.ResourceOptions(
|
|
103
|
+
version=get_version(),
|
|
104
|
+
plugin_download_url=get_plugin_download_url(),
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
def get_invoke_opts_defaults() -> pulumi.InvokeOptions:
|
|
108
|
+
return pulumi.InvokeOptions(
|
|
109
|
+
version=get_version(),
|
|
110
|
+
plugin_download_url=get_plugin_download_url(),
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
def get_resource_args_opts(resource_args_type, resource_options_type, *args, **kwargs):
|
|
114
|
+
"""
|
|
115
|
+
Return the resource args and options given the *args and **kwargs of a resource's
|
|
116
|
+
__init__ method.
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
resource_args, opts = None, None
|
|
120
|
+
|
|
121
|
+
# If the first item is the resource args type, save it and remove it from the args list.
|
|
122
|
+
if args and isinstance(args[0], resource_args_type):
|
|
123
|
+
resource_args, args = args[0], args[1:]
|
|
124
|
+
|
|
125
|
+
# Now look at the first item in the args list again.
|
|
126
|
+
# If the first item is the resource options class, save it.
|
|
127
|
+
if args and isinstance(args[0], resource_options_type):
|
|
128
|
+
opts = args[0]
|
|
129
|
+
|
|
130
|
+
# If resource_args is None, see if "args" is in kwargs, and, if so, if it's typed as the
|
|
131
|
+
# the resource args type.
|
|
132
|
+
if resource_args is None:
|
|
133
|
+
a = kwargs.get("args")
|
|
134
|
+
if isinstance(a, resource_args_type):
|
|
135
|
+
resource_args = a
|
|
136
|
+
|
|
137
|
+
# If opts is None, look it up in kwargs.
|
|
138
|
+
if opts is None:
|
|
139
|
+
opts = kwargs.get("opts")
|
|
140
|
+
|
|
141
|
+
return resource_args, opts
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
# Temporary: just use pulumi._utils.lazy_import once everyone upgrades.
|
|
145
|
+
def lazy_import(fullname):
|
|
146
|
+
|
|
147
|
+
import pulumi._utils as u
|
|
148
|
+
f = getattr(u, 'lazy_import', None)
|
|
149
|
+
if f is None:
|
|
150
|
+
f = _lazy_import_temp
|
|
151
|
+
|
|
152
|
+
return f(fullname)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
# Copied from pulumi._utils.lazy_import, see comments there.
|
|
156
|
+
def _lazy_import_temp(fullname):
|
|
157
|
+
m = sys.modules.get(fullname, None)
|
|
158
|
+
if m is not None:
|
|
159
|
+
return m
|
|
160
|
+
|
|
161
|
+
spec = importlib.util.find_spec(fullname)
|
|
162
|
+
|
|
163
|
+
m = sys.modules.get(fullname, None)
|
|
164
|
+
if m is not None:
|
|
165
|
+
return m
|
|
166
|
+
|
|
167
|
+
loader = importlib.util.LazyLoader(spec.loader)
|
|
168
|
+
spec.loader = loader
|
|
169
|
+
module = importlib.util.module_from_spec(spec)
|
|
170
|
+
|
|
171
|
+
m = sys.modules.get(fullname, None)
|
|
172
|
+
if m is not None:
|
|
173
|
+
return m
|
|
174
|
+
|
|
175
|
+
sys.modules[fullname] = module
|
|
176
|
+
loader.exec_module(module)
|
|
177
|
+
return module
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class Package(pulumi.runtime.ResourcePackage):
|
|
181
|
+
def __init__(self, pkg_info):
|
|
182
|
+
super().__init__()
|
|
183
|
+
self.pkg_info = pkg_info
|
|
184
|
+
|
|
185
|
+
def version(self):
|
|
186
|
+
return _version
|
|
187
|
+
|
|
188
|
+
def construct_provider(self, name: str, typ: str, urn: str) -> pulumi.ProviderResource:
|
|
189
|
+
if typ != self.pkg_info['token']:
|
|
190
|
+
raise Exception(f"unknown provider type {typ}")
|
|
191
|
+
Provider = getattr(lazy_import(self.pkg_info['fqn']), self.pkg_info['class'])
|
|
192
|
+
return Provider(name, pulumi.ResourceOptions(urn=urn))
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
class Module(pulumi.runtime.ResourceModule):
|
|
196
|
+
def __init__(self, mod_info):
|
|
197
|
+
super().__init__()
|
|
198
|
+
self.mod_info = mod_info
|
|
199
|
+
|
|
200
|
+
def version(self):
|
|
201
|
+
return _version
|
|
202
|
+
|
|
203
|
+
def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource:
|
|
204
|
+
class_name = self.mod_info['classes'].get(typ, None)
|
|
205
|
+
|
|
206
|
+
if class_name is None:
|
|
207
|
+
raise Exception(f"unknown resource type {typ}")
|
|
208
|
+
|
|
209
|
+
TheClass = getattr(lazy_import(self.mod_info['fqn']), class_name)
|
|
210
|
+
return TheClass(name, pulumi.ResourceOptions(urn=urn))
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
def register(resource_modules, resource_packages):
|
|
214
|
+
resource_modules = json.loads(resource_modules)
|
|
215
|
+
resource_packages = json.loads(resource_packages)
|
|
216
|
+
|
|
217
|
+
for pkg_info in resource_packages:
|
|
218
|
+
pulumi.runtime.register_resource_package(pkg_info['pkg'], Package(pkg_info))
|
|
219
|
+
|
|
220
|
+
for mod_info in resource_modules:
|
|
221
|
+
pulumi.runtime.register_resource_module(
|
|
222
|
+
mod_info['pkg'],
|
|
223
|
+
mod_info['mod'],
|
|
224
|
+
Module(mod_info))
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
_F = typing.TypeVar('_F', bound=typing.Callable[..., typing.Any])
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
def lift_output_func(func: typing.Any) -> typing.Callable[[_F], _F]:
|
|
231
|
+
"""Decorator internally used on {fn}_output lifted function versions
|
|
232
|
+
to implement them automatically from the un-lifted function."""
|
|
233
|
+
|
|
234
|
+
func_sig = inspect.signature(func)
|
|
235
|
+
|
|
236
|
+
def lifted_func(*args, opts=None, **kwargs):
|
|
237
|
+
bound_args = func_sig.bind(*args, **kwargs)
|
|
238
|
+
# Convert tuple to list, see pulumi/pulumi#8172
|
|
239
|
+
args_list = list(bound_args.args)
|
|
240
|
+
return pulumi.Output.from_input({
|
|
241
|
+
'args': args_list,
|
|
242
|
+
'kwargs': bound_args.kwargs
|
|
243
|
+
}).apply(lambda resolved_args: func(*resolved_args['args'],
|
|
244
|
+
opts=opts,
|
|
245
|
+
**resolved_args['kwargs']))
|
|
246
|
+
|
|
247
|
+
return (lambda _: lifted_func)
|
|
248
|
+
|
|
249
|
+
def get_plugin_download_url():
|
|
250
|
+
return None
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import copy
|
|
6
|
+
import warnings
|
|
7
|
+
import pulumi
|
|
8
|
+
import pulumi.runtime
|
|
9
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
10
|
+
from . import _utilities
|
|
11
|
+
from . import outputs
|
|
12
|
+
from ._inputs import *
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
'GetHttpResult',
|
|
16
|
+
'AwaitableGetHttpResult',
|
|
17
|
+
'get_http',
|
|
18
|
+
'get_http_output',
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
@pulumi.output_type
|
|
22
|
+
class GetHttpResult:
|
|
23
|
+
"""
|
|
24
|
+
A collection of values returned by getHttp.
|
|
25
|
+
"""
|
|
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):
|
|
27
|
+
if body and not isinstance(body, str):
|
|
28
|
+
raise TypeError("Expected argument 'body' to be a str")
|
|
29
|
+
if body is not None:
|
|
30
|
+
warnings.warn("""Use response_body instead""", DeprecationWarning)
|
|
31
|
+
pulumi.log.warn("""body is deprecated: Use response_body instead""")
|
|
32
|
+
|
|
33
|
+
pulumi.set(__self__, "body", body)
|
|
34
|
+
if ca_cert_pem and not isinstance(ca_cert_pem, str):
|
|
35
|
+
raise TypeError("Expected argument 'ca_cert_pem' to be a str")
|
|
36
|
+
pulumi.set(__self__, "ca_cert_pem", ca_cert_pem)
|
|
37
|
+
if id and not isinstance(id, str):
|
|
38
|
+
raise TypeError("Expected argument 'id' to be a str")
|
|
39
|
+
pulumi.set(__self__, "id", id)
|
|
40
|
+
if insecure and not isinstance(insecure, bool):
|
|
41
|
+
raise TypeError("Expected argument 'insecure' to be a bool")
|
|
42
|
+
pulumi.set(__self__, "insecure", insecure)
|
|
43
|
+
if method and not isinstance(method, str):
|
|
44
|
+
raise TypeError("Expected argument 'method' to be a str")
|
|
45
|
+
pulumi.set(__self__, "method", method)
|
|
46
|
+
if request_body and not isinstance(request_body, str):
|
|
47
|
+
raise TypeError("Expected argument 'request_body' to be a str")
|
|
48
|
+
pulumi.set(__self__, "request_body", request_body)
|
|
49
|
+
if request_headers and not isinstance(request_headers, dict):
|
|
50
|
+
raise TypeError("Expected argument 'request_headers' to be a dict")
|
|
51
|
+
pulumi.set(__self__, "request_headers", request_headers)
|
|
52
|
+
if request_timeout_ms and not isinstance(request_timeout_ms, int):
|
|
53
|
+
raise TypeError("Expected argument 'request_timeout_ms' to be a int")
|
|
54
|
+
pulumi.set(__self__, "request_timeout_ms", request_timeout_ms)
|
|
55
|
+
if response_body and not isinstance(response_body, str):
|
|
56
|
+
raise TypeError("Expected argument 'response_body' to be a str")
|
|
57
|
+
pulumi.set(__self__, "response_body", response_body)
|
|
58
|
+
if response_body_base64 and not isinstance(response_body_base64, str):
|
|
59
|
+
raise TypeError("Expected argument 'response_body_base64' to be a str")
|
|
60
|
+
pulumi.set(__self__, "response_body_base64", response_body_base64)
|
|
61
|
+
if response_headers and not isinstance(response_headers, dict):
|
|
62
|
+
raise TypeError("Expected argument 'response_headers' to be a dict")
|
|
63
|
+
pulumi.set(__self__, "response_headers", response_headers)
|
|
64
|
+
if retry and not isinstance(retry, dict):
|
|
65
|
+
raise TypeError("Expected argument 'retry' to be a dict")
|
|
66
|
+
pulumi.set(__self__, "retry", retry)
|
|
67
|
+
if status_code and not isinstance(status_code, int):
|
|
68
|
+
raise TypeError("Expected argument 'status_code' to be a int")
|
|
69
|
+
pulumi.set(__self__, "status_code", status_code)
|
|
70
|
+
if url and not isinstance(url, str):
|
|
71
|
+
raise TypeError("Expected argument 'url' to be a str")
|
|
72
|
+
pulumi.set(__self__, "url", url)
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
@pulumi.getter
|
|
76
|
+
def body(self) -> str:
|
|
77
|
+
"""
|
|
78
|
+
The response body returned as a string. **NOTE**: This is deprecated, use `response_body` instead.
|
|
79
|
+
"""
|
|
80
|
+
return pulumi.get(self, "body")
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
@pulumi.getter(name="caCertPem")
|
|
84
|
+
def ca_cert_pem(self) -> Optional[str]:
|
|
85
|
+
"""
|
|
86
|
+
Certificate data of the Certificate Authority (CA) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
|
|
87
|
+
"""
|
|
88
|
+
return pulumi.get(self, "ca_cert_pem")
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
@pulumi.getter
|
|
92
|
+
def id(self) -> str:
|
|
93
|
+
"""
|
|
94
|
+
The URL used for the request.
|
|
95
|
+
"""
|
|
96
|
+
return pulumi.get(self, "id")
|
|
97
|
+
|
|
98
|
+
@property
|
|
99
|
+
@pulumi.getter
|
|
100
|
+
def insecure(self) -> Optional[bool]:
|
|
101
|
+
"""
|
|
102
|
+
Disables verification of the server's certificate chain and hostname. Defaults to `false`
|
|
103
|
+
"""
|
|
104
|
+
return pulumi.get(self, "insecure")
|
|
105
|
+
|
|
106
|
+
@property
|
|
107
|
+
@pulumi.getter
|
|
108
|
+
def method(self) -> Optional[str]:
|
|
109
|
+
"""
|
|
110
|
+
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.
|
|
111
|
+
"""
|
|
112
|
+
return pulumi.get(self, "method")
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
@pulumi.getter(name="requestBody")
|
|
116
|
+
def request_body(self) -> Optional[str]:
|
|
117
|
+
"""
|
|
118
|
+
The request body as a string.
|
|
119
|
+
"""
|
|
120
|
+
return pulumi.get(self, "request_body")
|
|
121
|
+
|
|
122
|
+
@property
|
|
123
|
+
@pulumi.getter(name="requestHeaders")
|
|
124
|
+
def request_headers(self) -> Optional[Mapping[str, str]]:
|
|
125
|
+
"""
|
|
126
|
+
A map of request header field names and values.
|
|
127
|
+
"""
|
|
128
|
+
return pulumi.get(self, "request_headers")
|
|
129
|
+
|
|
130
|
+
@property
|
|
131
|
+
@pulumi.getter(name="requestTimeoutMs")
|
|
132
|
+
def request_timeout_ms(self) -> Optional[int]:
|
|
133
|
+
"""
|
|
134
|
+
The request timeout in milliseconds.
|
|
135
|
+
"""
|
|
136
|
+
return pulumi.get(self, "request_timeout_ms")
|
|
137
|
+
|
|
138
|
+
@property
|
|
139
|
+
@pulumi.getter(name="responseBody")
|
|
140
|
+
def response_body(self) -> str:
|
|
141
|
+
"""
|
|
142
|
+
The response body returned as a string.
|
|
143
|
+
"""
|
|
144
|
+
return pulumi.get(self, "response_body")
|
|
145
|
+
|
|
146
|
+
@property
|
|
147
|
+
@pulumi.getter(name="responseBodyBase64")
|
|
148
|
+
def response_body_base64(self) -> str:
|
|
149
|
+
"""
|
|
150
|
+
The response body encoded as base64 (standard) as defined in [RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648#section-4).
|
|
151
|
+
"""
|
|
152
|
+
return pulumi.get(self, "response_body_base64")
|
|
153
|
+
|
|
154
|
+
@property
|
|
155
|
+
@pulumi.getter(name="responseHeaders")
|
|
156
|
+
def response_headers(self) -> Mapping[str, str]:
|
|
157
|
+
"""
|
|
158
|
+
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).
|
|
159
|
+
"""
|
|
160
|
+
return pulumi.get(self, "response_headers")
|
|
161
|
+
|
|
162
|
+
@property
|
|
163
|
+
@pulumi.getter
|
|
164
|
+
def retry(self) -> Optional['outputs.GetHttpRetryResult']:
|
|
165
|
+
"""
|
|
166
|
+
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).
|
|
167
|
+
"""
|
|
168
|
+
return pulumi.get(self, "retry")
|
|
169
|
+
|
|
170
|
+
@property
|
|
171
|
+
@pulumi.getter(name="statusCode")
|
|
172
|
+
def status_code(self) -> int:
|
|
173
|
+
"""
|
|
174
|
+
The HTTP response status code.
|
|
175
|
+
"""
|
|
176
|
+
return pulumi.get(self, "status_code")
|
|
177
|
+
|
|
178
|
+
@property
|
|
179
|
+
@pulumi.getter
|
|
180
|
+
def url(self) -> str:
|
|
181
|
+
"""
|
|
182
|
+
The URL for the request. Supported schemes are `get_http` and `https`.
|
|
183
|
+
"""
|
|
184
|
+
return pulumi.get(self, "url")
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class AwaitableGetHttpResult(GetHttpResult):
|
|
188
|
+
# pylint: disable=using-constant-test
|
|
189
|
+
def __await__(self):
|
|
190
|
+
if False:
|
|
191
|
+
yield self
|
|
192
|
+
return GetHttpResult(
|
|
193
|
+
body=self.body,
|
|
194
|
+
ca_cert_pem=self.ca_cert_pem,
|
|
195
|
+
id=self.id,
|
|
196
|
+
insecure=self.insecure,
|
|
197
|
+
method=self.method,
|
|
198
|
+
request_body=self.request_body,
|
|
199
|
+
request_headers=self.request_headers,
|
|
200
|
+
request_timeout_ms=self.request_timeout_ms,
|
|
201
|
+
response_body=self.response_body,
|
|
202
|
+
response_body_base64=self.response_body_base64,
|
|
203
|
+
response_headers=self.response_headers,
|
|
204
|
+
retry=self.retry,
|
|
205
|
+
status_code=self.status_code,
|
|
206
|
+
url=self.url)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def get_http(ca_cert_pem: Optional[str] = None,
|
|
210
|
+
insecure: Optional[bool] = None,
|
|
211
|
+
method: Optional[str] = None,
|
|
212
|
+
request_body: Optional[str] = None,
|
|
213
|
+
request_headers: Optional[Mapping[str, str]] = None,
|
|
214
|
+
request_timeout_ms: Optional[int] = None,
|
|
215
|
+
retry: Optional[pulumi.InputType['GetHttpRetryArgs']] = None,
|
|
216
|
+
url: Optional[str] = None,
|
|
217
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetHttpResult:
|
|
218
|
+
"""
|
|
219
|
+
Use this data source to access information about an existing resource.
|
|
220
|
+
|
|
221
|
+
:param str ca_cert_pem: Certificate data of the Certificate Authority (CA) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
|
|
222
|
+
:param bool insecure: Disables verification of the server's certificate chain and hostname. Defaults to `false`
|
|
223
|
+
: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.
|
|
224
|
+
:param str request_body: The request body as a string.
|
|
225
|
+
:param Mapping[str, str] request_headers: A map of request header field names and values.
|
|
226
|
+
:param int request_timeout_ms: The request timeout in milliseconds.
|
|
227
|
+
: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).
|
|
228
|
+
:param str url: The URL for the request. Supported schemes are `get_http` and `https`.
|
|
229
|
+
"""
|
|
230
|
+
__args__ = dict()
|
|
231
|
+
__args__['caCertPem'] = ca_cert_pem
|
|
232
|
+
__args__['insecure'] = insecure
|
|
233
|
+
__args__['method'] = method
|
|
234
|
+
__args__['requestBody'] = request_body
|
|
235
|
+
__args__['requestHeaders'] = request_headers
|
|
236
|
+
__args__['requestTimeoutMs'] = request_timeout_ms
|
|
237
|
+
__args__['retry'] = retry
|
|
238
|
+
__args__['url'] = url
|
|
239
|
+
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
240
|
+
__ret__ = pulumi.runtime.invoke('http:index/getHttp:getHttp', __args__, opts=opts, typ=GetHttpResult).value
|
|
241
|
+
|
|
242
|
+
return AwaitableGetHttpResult(
|
|
243
|
+
body=__ret__.body,
|
|
244
|
+
ca_cert_pem=__ret__.ca_cert_pem,
|
|
245
|
+
id=__ret__.id,
|
|
246
|
+
insecure=__ret__.insecure,
|
|
247
|
+
method=__ret__.method,
|
|
248
|
+
request_body=__ret__.request_body,
|
|
249
|
+
request_headers=__ret__.request_headers,
|
|
250
|
+
request_timeout_ms=__ret__.request_timeout_ms,
|
|
251
|
+
response_body=__ret__.response_body,
|
|
252
|
+
response_body_base64=__ret__.response_body_base64,
|
|
253
|
+
response_headers=__ret__.response_headers,
|
|
254
|
+
retry=__ret__.retry,
|
|
255
|
+
status_code=__ret__.status_code,
|
|
256
|
+
url=__ret__.url)
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
@_utilities.lift_output_func(get_http)
|
|
260
|
+
def get_http_output(ca_cert_pem: Optional[pulumi.Input[Optional[str]]] = None,
|
|
261
|
+
insecure: Optional[pulumi.Input[Optional[bool]]] = None,
|
|
262
|
+
method: Optional[pulumi.Input[Optional[str]]] = None,
|
|
263
|
+
request_body: Optional[pulumi.Input[Optional[str]]] = None,
|
|
264
|
+
request_headers: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
|
|
265
|
+
request_timeout_ms: Optional[pulumi.Input[Optional[int]]] = None,
|
|
266
|
+
retry: Optional[pulumi.Input[Optional[pulumi.InputType['GetHttpRetryArgs']]]] = None,
|
|
267
|
+
url: Optional[pulumi.Input[str]] = None,
|
|
268
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetHttpResult]:
|
|
269
|
+
"""
|
|
270
|
+
Use this data source to access information about an existing resource.
|
|
271
|
+
|
|
272
|
+
:param str ca_cert_pem: Certificate data of the Certificate Authority (CA) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
|
|
273
|
+
:param bool insecure: Disables verification of the server's certificate chain and hostname. Defaults to `false`
|
|
274
|
+
: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.
|
|
275
|
+
:param str request_body: The request body as a string.
|
|
276
|
+
:param Mapping[str, str] request_headers: A map of request header field names and values.
|
|
277
|
+
:param int request_timeout_ms: The request timeout in milliseconds.
|
|
278
|
+
: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).
|
|
279
|
+
:param str url: The URL for the request. Supported schemes are `get_http` and `https`.
|
|
280
|
+
"""
|
|
281
|
+
...
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import copy
|
|
6
|
+
import warnings
|
|
7
|
+
import pulumi
|
|
8
|
+
import pulumi.runtime
|
|
9
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
10
|
+
from . import _utilities
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
'GetHttpRetryResult',
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
@pulumi.output_type
|
|
17
|
+
class GetHttpRetryResult(dict):
|
|
18
|
+
def __init__(__self__, *,
|
|
19
|
+
attempts: Optional[int] = None,
|
|
20
|
+
max_delay_ms: Optional[int] = None,
|
|
21
|
+
min_delay_ms: Optional[int] = None):
|
|
22
|
+
"""
|
|
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.
|
|
26
|
+
"""
|
|
27
|
+
if attempts is not None:
|
|
28
|
+
pulumi.set(__self__, "attempts", attempts)
|
|
29
|
+
if max_delay_ms is not None:
|
|
30
|
+
pulumi.set(__self__, "max_delay_ms", max_delay_ms)
|
|
31
|
+
if min_delay_ms is not None:
|
|
32
|
+
pulumi.set(__self__, "min_delay_ms", min_delay_ms)
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
@pulumi.getter
|
|
36
|
+
def attempts(self) -> Optional[int]:
|
|
37
|
+
"""
|
|
38
|
+
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
|
+
"""
|
|
40
|
+
return pulumi.get(self, "attempts")
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
@pulumi.getter(name="maxDelayMs")
|
|
44
|
+
def max_delay_ms(self) -> Optional[int]:
|
|
45
|
+
"""
|
|
46
|
+
The maximum delay between retry requests in milliseconds.
|
|
47
|
+
"""
|
|
48
|
+
return pulumi.get(self, "max_delay_ms")
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
@pulumi.getter(name="minDelayMs")
|
|
52
|
+
def min_delay_ms(self) -> Optional[int]:
|
|
53
|
+
"""
|
|
54
|
+
The minimum delay between retry requests in milliseconds.
|
|
55
|
+
"""
|
|
56
|
+
return pulumi.get(self, "min_delay_ms")
|
|
57
|
+
|
|
58
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import copy
|
|
6
|
+
import warnings
|
|
7
|
+
import pulumi
|
|
8
|
+
import pulumi.runtime
|
|
9
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
10
|
+
from . import _utilities
|
|
11
|
+
|
|
12
|
+
__all__ = ['ProviderArgs', 'Provider']
|
|
13
|
+
|
|
14
|
+
@pulumi.input_type
|
|
15
|
+
class ProviderArgs:
|
|
16
|
+
def __init__(__self__):
|
|
17
|
+
"""
|
|
18
|
+
The set of arguments for constructing a Provider resource.
|
|
19
|
+
"""
|
|
20
|
+
pass
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Provider(pulumi.ProviderResource):
|
|
24
|
+
@overload
|
|
25
|
+
def __init__(__self__,
|
|
26
|
+
resource_name: str,
|
|
27
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
28
|
+
__props__=None):
|
|
29
|
+
"""
|
|
30
|
+
The provider type for the http package. By default, resources use package-wide configuration
|
|
31
|
+
settings, however an explicit `Provider` instance may be created and passed during resource
|
|
32
|
+
construction to achieve fine-grained programmatic control over provider settings. See the
|
|
33
|
+
[documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
|
|
34
|
+
|
|
35
|
+
:param str resource_name: The name of the resource.
|
|
36
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
37
|
+
"""
|
|
38
|
+
...
|
|
39
|
+
@overload
|
|
40
|
+
def __init__(__self__,
|
|
41
|
+
resource_name: str,
|
|
42
|
+
args: Optional[ProviderArgs] = None,
|
|
43
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
44
|
+
"""
|
|
45
|
+
The provider type for the http package. By default, resources use package-wide configuration
|
|
46
|
+
settings, however an explicit `Provider` instance may be created and passed during resource
|
|
47
|
+
construction to achieve fine-grained programmatic control over provider settings. See the
|
|
48
|
+
[documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
|
|
49
|
+
|
|
50
|
+
:param str resource_name: The name of the resource.
|
|
51
|
+
:param ProviderArgs args: The arguments to use to populate this resource's properties.
|
|
52
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
53
|
+
"""
|
|
54
|
+
...
|
|
55
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
56
|
+
resource_args, opts = _utilities.get_resource_args_opts(ProviderArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
57
|
+
if resource_args is not None:
|
|
58
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
59
|
+
else:
|
|
60
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
61
|
+
|
|
62
|
+
def _internal_init(__self__,
|
|
63
|
+
resource_name: str,
|
|
64
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
65
|
+
__props__=None):
|
|
66
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
67
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
68
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
69
|
+
if opts.id is None:
|
|
70
|
+
if __props__ is not None:
|
|
71
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
72
|
+
__props__ = ProviderArgs.__new__(ProviderArgs)
|
|
73
|
+
|
|
74
|
+
super(Provider, __self__).__init__(
|
|
75
|
+
'http',
|
|
76
|
+
resource_name,
|
|
77
|
+
__props__,
|
|
78
|
+
opts)
|
|
79
|
+
|
|
File without changes
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pulumi-http
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A Pulumi package for creating and managing HTTP cloud resources.
|
|
5
|
+
Home-page: https://www.pulumi.com/
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Repository, https://github.com/pulumi/pulumi-http
|
|
8
|
+
Keywords: pulumi category/cloud
|
|
9
|
+
Platform: UNKNOWN
|
|
10
|
+
Requires-Python: >=3.7
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
[](https://github.com/pulumi/pulumi-http/actions)
|
|
14
|
+
[](https://www.npmjs.com/package/@pulumi/http)
|
|
15
|
+
[](https://pypi.org/project/pulumi_http)
|
|
16
|
+
[](https://www.nuget.org/packages/Pulumi.Http)
|
|
17
|
+
[](https://pkg.go.dev/github.com/pulumi/pulumi-http/sdk/go)
|
|
18
|
+
[](https://github.com/pulumi/pulumi-http/blob/master/LICENSE)
|
|
19
|
+
|
|
20
|
+
# HTTP Resource Provider
|
|
21
|
+
|
|
22
|
+
The HTTP resource provider for Pulumi lets you use HTTP resources in your cloud programs.
|
|
23
|
+
To use this package, please [install the Pulumi CLI first](https://www.pulumi.com/docs/install/).
|
|
24
|
+
|
|
25
|
+
## Installing
|
|
26
|
+
|
|
27
|
+
This package is available in many languages in the standard packaging formats.
|
|
28
|
+
|
|
29
|
+
### Node.js (Java/TypeScript)
|
|
30
|
+
|
|
31
|
+
To use from JavaScript or TypeScript in Node.js, install using either `npm`:
|
|
32
|
+
|
|
33
|
+
$ npm install @pulumi/http
|
|
34
|
+
|
|
35
|
+
or `yarn`:
|
|
36
|
+
|
|
37
|
+
$ yarn add @pulumi/http
|
|
38
|
+
|
|
39
|
+
### Python
|
|
40
|
+
|
|
41
|
+
To use from Python, install using `pip`:
|
|
42
|
+
|
|
43
|
+
$ pip install pulumi_http
|
|
44
|
+
|
|
45
|
+
### Go
|
|
46
|
+
|
|
47
|
+
To use from Go, use `go get` to grab the latest version of the library:
|
|
48
|
+
|
|
49
|
+
$ go get github.com/pulumi/pulumi-http/sdk
|
|
50
|
+
|
|
51
|
+
### .NET
|
|
52
|
+
|
|
53
|
+
To use from .NET, install using `dotnet add package`:
|
|
54
|
+
|
|
55
|
+
$ dotnet add package Pulumi.Http
|
|
56
|
+
|
|
57
|
+
<!-- If your provider has configuration, remove this comment and the comment tags below, updating the documentation. -->
|
|
58
|
+
<!--
|
|
59
|
+
|
|
60
|
+
## Configuration
|
|
61
|
+
|
|
62
|
+
The following Pulumi configuration can be used:
|
|
63
|
+
|
|
64
|
+
- `http:token` - (Required) The API token to use with HTTP. When not set, the provider will use the `HTTP_TOKEN` environment variable.
|
|
65
|
+
|
|
66
|
+
-->
|
|
67
|
+
|
|
68
|
+
<!-- If your provider has reference material available elsewhere, remove this comment and the comment tags below, updating the documentation. -->
|
|
69
|
+
<!--
|
|
70
|
+
|
|
71
|
+
## Reference
|
|
72
|
+
|
|
73
|
+
For further information, please visit [HTTP reference documentation](https://example.com/http).
|
|
74
|
+
|
|
75
|
+
-->
|
|
76
|
+
|
|
77
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
setup.py
|
|
3
|
+
pulumi_http/__init__.py
|
|
4
|
+
pulumi_http/_inputs.py
|
|
5
|
+
pulumi_http/_utilities.py
|
|
6
|
+
pulumi_http/get_http.py
|
|
7
|
+
pulumi_http/outputs.py
|
|
8
|
+
pulumi_http/provider.py
|
|
9
|
+
pulumi_http/pulumi-plugin.json
|
|
10
|
+
pulumi_http/py.typed
|
|
11
|
+
pulumi_http.egg-info/PKG-INFO
|
|
12
|
+
pulumi_http.egg-info/SOURCES.txt
|
|
13
|
+
pulumi_http.egg-info/dependency_links.txt
|
|
14
|
+
pulumi_http.egg-info/not-zip-safe
|
|
15
|
+
pulumi_http.egg-info/requires.txt
|
|
16
|
+
pulumi_http.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pulumi_http
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import errno
|
|
6
|
+
from setuptools import setup, find_packages
|
|
7
|
+
from setuptools.command.install import install
|
|
8
|
+
from subprocess import check_call
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
VERSION = "0.0.1"
|
|
12
|
+
PLUGIN_VERSION = "0.0.1"
|
|
13
|
+
|
|
14
|
+
class InstallPluginCommand(install):
|
|
15
|
+
def run(self):
|
|
16
|
+
install.run(self)
|
|
17
|
+
try:
|
|
18
|
+
check_call(['pulumi', 'plugin', 'install', 'resource', 'http', PLUGIN_VERSION])
|
|
19
|
+
except OSError as error:
|
|
20
|
+
if error.errno == errno.ENOENT:
|
|
21
|
+
print(f"""
|
|
22
|
+
There was an error installing the http resource provider plugin.
|
|
23
|
+
It looks like `pulumi` is not installed on your system.
|
|
24
|
+
Please visit https://pulumi.com/ to install the Pulumi CLI.
|
|
25
|
+
You may try manually installing the plugin by running
|
|
26
|
+
`pulumi plugin install resource http {PLUGIN_VERSION}`
|
|
27
|
+
""")
|
|
28
|
+
else:
|
|
29
|
+
raise
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def readme():
|
|
33
|
+
try:
|
|
34
|
+
with open('README.md', encoding='utf-8') as f:
|
|
35
|
+
return f.read()
|
|
36
|
+
except FileNotFoundError:
|
|
37
|
+
return "http Pulumi Package - Development Version"
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
setup(name='pulumi_http',
|
|
41
|
+
python_requires='>=3.7',
|
|
42
|
+
version=VERSION,
|
|
43
|
+
description="A Pulumi package for creating and managing HTTP cloud resources.",
|
|
44
|
+
long_description=readme(),
|
|
45
|
+
long_description_content_type='text/markdown',
|
|
46
|
+
cmdclass={
|
|
47
|
+
'install': InstallPluginCommand,
|
|
48
|
+
},
|
|
49
|
+
keywords='pulumi category/cloud',
|
|
50
|
+
url='https://www.pulumi.com/',
|
|
51
|
+
project_urls={
|
|
52
|
+
'Repository': 'https://github.com/pulumi/pulumi-http'
|
|
53
|
+
},
|
|
54
|
+
license='Apache-2.0',
|
|
55
|
+
packages=find_packages(),
|
|
56
|
+
package_data={
|
|
57
|
+
'pulumi_http': [
|
|
58
|
+
'py.typed',
|
|
59
|
+
'pulumi-plugin.json',
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
install_requires=[
|
|
63
|
+
'parver>=0.2.1',
|
|
64
|
+
'pulumi>=3.0.0,<4.0.0',
|
|
65
|
+
'semver>=2.8.1'
|
|
66
|
+
],
|
|
67
|
+
zip_safe=False)
|