@pulumi/http 0.1.3 → 0.1.4
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.
- package/getHttp.d.ts +231 -0
- package/getHttp.js +222 -0
- package/getHttp.js.map +1 -1
- package/package.json +2 -2
package/getHttp.d.ts
CHANGED
|
@@ -1,6 +1,117 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
import * as inputs from "./types/input";
|
|
3
3
|
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* The `http.getHttp` data source makes an HTTP GET request to the given URL and exports
|
|
6
|
+
* information about the response.
|
|
7
|
+
*
|
|
8
|
+
* The given URL may be either an `http.getHttp` or `https` URL. This resource
|
|
9
|
+
* will issue a warning if the result is not UTF-8 encoded.
|
|
10
|
+
*
|
|
11
|
+
* > **Important** Although `https` URLs can be used, there is currently no
|
|
12
|
+
* mechanism to authenticate the remote server except for general verification of
|
|
13
|
+
* the server certificate's chain of trust. Data retrieved from servers not under
|
|
14
|
+
* your control should be treated as untrustworthy.
|
|
15
|
+
*
|
|
16
|
+
* By default, there are no retries. Configuring the retry block will result in
|
|
17
|
+
* retries if an error is returned by the client (e.g., connection errors) or if
|
|
18
|
+
* a 5xx-range (except 501) status code is received. For further details see
|
|
19
|
+
* [go-retryablehttp](https://pkg.go.dev/github.com/hashicorp/go-retryablehttp).
|
|
20
|
+
*
|
|
21
|
+
* ## Example Usage
|
|
22
|
+
*
|
|
23
|
+
* ```typescript
|
|
24
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
25
|
+
* import * as http from "@pulumi/http";
|
|
26
|
+
*
|
|
27
|
+
* // The following example shows how to issue an HTTP GET request supplying
|
|
28
|
+
* // an optional request header.
|
|
29
|
+
* const example = http.getHttp({
|
|
30
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
31
|
+
* requestHeaders: {
|
|
32
|
+
* Accept: "application/json",
|
|
33
|
+
* },
|
|
34
|
+
* });
|
|
35
|
+
* // The following example shows how to issue an HTTP HEAD request.
|
|
36
|
+
* const exampleHead = http.getHttp({
|
|
37
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
38
|
+
* method: "HEAD",
|
|
39
|
+
* });
|
|
40
|
+
* // The following example shows how to issue an HTTP POST request
|
|
41
|
+
* // supplying an optional request body.
|
|
42
|
+
* const examplePost = http.getHttp({
|
|
43
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
44
|
+
* method: "POST",
|
|
45
|
+
* requestBody: "request body",
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* ## Usage with Postcondition
|
|
50
|
+
*
|
|
51
|
+
* Precondition and Postcondition
|
|
52
|
+
* checks are available with Terraform v1.2.0 and later.
|
|
53
|
+
*
|
|
54
|
+
* ```typescript
|
|
55
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
56
|
+
* import * as http from "@pulumi/http";
|
|
57
|
+
*
|
|
58
|
+
* const example = http.getHttp({
|
|
59
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
60
|
+
* requestHeaders: {
|
|
61
|
+
* Accept: "application/json",
|
|
62
|
+
* },
|
|
63
|
+
* });
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* ## Usage with Precondition
|
|
67
|
+
*
|
|
68
|
+
* Precondition and Postcondition
|
|
69
|
+
* checks are available with Terraform v1.2.0 and later.
|
|
70
|
+
*
|
|
71
|
+
* ```typescript
|
|
72
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
73
|
+
* import * as http from "@pulumi/http";
|
|
74
|
+
* import * as random from "@pulumi/random";
|
|
75
|
+
*
|
|
76
|
+
* const example = http.getHttp({
|
|
77
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
78
|
+
* requestHeaders: {
|
|
79
|
+
* Accept: "application/json",
|
|
80
|
+
* },
|
|
81
|
+
* });
|
|
82
|
+
* const exampleUuid = new random.index.Uuid("example", {});
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* ## Usage with Provisioner
|
|
86
|
+
*
|
|
87
|
+
* Failure Behaviour
|
|
88
|
+
* can be leveraged within a provisioner in order to raise an error and stop applying.
|
|
89
|
+
*
|
|
90
|
+
* ```typescript
|
|
91
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
92
|
+
* import * as _null from "@pulumi/null";
|
|
93
|
+
* import * as command from "@pulumi/command";
|
|
94
|
+
* import * as http from "@pulumi/http";
|
|
95
|
+
* import * as std from "@pulumi/std";
|
|
96
|
+
*
|
|
97
|
+
* const example = http.getHttp({
|
|
98
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
99
|
+
* requestHeaders: {
|
|
100
|
+
* Accept: "application/json",
|
|
101
|
+
* },
|
|
102
|
+
* });
|
|
103
|
+
* const exampleResource = new _null.index.Resource("example", {});
|
|
104
|
+
* const exampleResourceProvisioner0 = new command.local.Command("exampleResourceProvisioner0", {create: std.index.contains({
|
|
105
|
+
* input: [
|
|
106
|
+
* 201,
|
|
107
|
+
* 204,
|
|
108
|
+
* ],
|
|
109
|
+
* element: example.statusCode,
|
|
110
|
+
* }).result}, {
|
|
111
|
+
* dependsOn: [exampleResource],
|
|
112
|
+
* });
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
4
115
|
export declare function getHttp(args: GetHttpArgs, opts?: pulumi.InvokeOptions): Promise<GetHttpResult>;
|
|
5
116
|
/**
|
|
6
117
|
* A collection of arguments for invoking getHttp.
|
|
@@ -40,6 +151,9 @@ export interface GetHttpArgs {
|
|
|
40
151
|
* The request timeout in milliseconds.
|
|
41
152
|
*/
|
|
42
153
|
requestTimeoutMs?: number;
|
|
154
|
+
/**
|
|
155
|
+
* 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).
|
|
156
|
+
*/
|
|
43
157
|
retry?: inputs.GetHttpRetry;
|
|
44
158
|
/**
|
|
45
159
|
* The URL for the request. Supported schemes are `http.getHttp` and `https`.
|
|
@@ -108,6 +222,9 @@ export interface GetHttpResult {
|
|
|
108
222
|
readonly responseHeaders: {
|
|
109
223
|
[key: string]: string;
|
|
110
224
|
};
|
|
225
|
+
/**
|
|
226
|
+
* 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
|
+
*/
|
|
111
228
|
readonly retry?: outputs.GetHttpRetry;
|
|
112
229
|
/**
|
|
113
230
|
* The HTTP response status code.
|
|
@@ -118,6 +235,117 @@ export interface GetHttpResult {
|
|
|
118
235
|
*/
|
|
119
236
|
readonly url: string;
|
|
120
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* The `http.getHttp` data source makes an HTTP GET request to the given URL and exports
|
|
240
|
+
* information about the response.
|
|
241
|
+
*
|
|
242
|
+
* The given URL may be either an `http.getHttp` or `https` URL. This resource
|
|
243
|
+
* will issue a warning if the result is not UTF-8 encoded.
|
|
244
|
+
*
|
|
245
|
+
* > **Important** Although `https` URLs can be used, there is currently no
|
|
246
|
+
* mechanism to authenticate the remote server except for general verification of
|
|
247
|
+
* the server certificate's chain of trust. Data retrieved from servers not under
|
|
248
|
+
* your control should be treated as untrustworthy.
|
|
249
|
+
*
|
|
250
|
+
* By default, there are no retries. Configuring the retry block will result in
|
|
251
|
+
* retries if an error is returned by the client (e.g., connection errors) or if
|
|
252
|
+
* a 5xx-range (except 501) status code is received. For further details see
|
|
253
|
+
* [go-retryablehttp](https://pkg.go.dev/github.com/hashicorp/go-retryablehttp).
|
|
254
|
+
*
|
|
255
|
+
* ## Example Usage
|
|
256
|
+
*
|
|
257
|
+
* ```typescript
|
|
258
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
259
|
+
* import * as http from "@pulumi/http";
|
|
260
|
+
*
|
|
261
|
+
* // The following example shows how to issue an HTTP GET request supplying
|
|
262
|
+
* // an optional request header.
|
|
263
|
+
* const example = http.getHttp({
|
|
264
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
265
|
+
* requestHeaders: {
|
|
266
|
+
* Accept: "application/json",
|
|
267
|
+
* },
|
|
268
|
+
* });
|
|
269
|
+
* // The following example shows how to issue an HTTP HEAD request.
|
|
270
|
+
* const exampleHead = http.getHttp({
|
|
271
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
272
|
+
* method: "HEAD",
|
|
273
|
+
* });
|
|
274
|
+
* // The following example shows how to issue an HTTP POST request
|
|
275
|
+
* // supplying an optional request body.
|
|
276
|
+
* const examplePost = http.getHttp({
|
|
277
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
278
|
+
* method: "POST",
|
|
279
|
+
* requestBody: "request body",
|
|
280
|
+
* });
|
|
281
|
+
* ```
|
|
282
|
+
*
|
|
283
|
+
* ## Usage with Postcondition
|
|
284
|
+
*
|
|
285
|
+
* Precondition and Postcondition
|
|
286
|
+
* checks are available with Terraform v1.2.0 and later.
|
|
287
|
+
*
|
|
288
|
+
* ```typescript
|
|
289
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
290
|
+
* import * as http from "@pulumi/http";
|
|
291
|
+
*
|
|
292
|
+
* const example = http.getHttp({
|
|
293
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
294
|
+
* requestHeaders: {
|
|
295
|
+
* Accept: "application/json",
|
|
296
|
+
* },
|
|
297
|
+
* });
|
|
298
|
+
* ```
|
|
299
|
+
*
|
|
300
|
+
* ## Usage with Precondition
|
|
301
|
+
*
|
|
302
|
+
* Precondition and Postcondition
|
|
303
|
+
* checks are available with Terraform v1.2.0 and later.
|
|
304
|
+
*
|
|
305
|
+
* ```typescript
|
|
306
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
307
|
+
* import * as http from "@pulumi/http";
|
|
308
|
+
* import * as random from "@pulumi/random";
|
|
309
|
+
*
|
|
310
|
+
* const example = http.getHttp({
|
|
311
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
312
|
+
* requestHeaders: {
|
|
313
|
+
* Accept: "application/json",
|
|
314
|
+
* },
|
|
315
|
+
* });
|
|
316
|
+
* const exampleUuid = new random.index.Uuid("example", {});
|
|
317
|
+
* ```
|
|
318
|
+
*
|
|
319
|
+
* ## Usage with Provisioner
|
|
320
|
+
*
|
|
321
|
+
* Failure Behaviour
|
|
322
|
+
* can be leveraged within a provisioner in order to raise an error and stop applying.
|
|
323
|
+
*
|
|
324
|
+
* ```typescript
|
|
325
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
326
|
+
* import * as _null from "@pulumi/null";
|
|
327
|
+
* import * as command from "@pulumi/command";
|
|
328
|
+
* import * as http from "@pulumi/http";
|
|
329
|
+
* import * as std from "@pulumi/std";
|
|
330
|
+
*
|
|
331
|
+
* const example = http.getHttp({
|
|
332
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
333
|
+
* requestHeaders: {
|
|
334
|
+
* Accept: "application/json",
|
|
335
|
+
* },
|
|
336
|
+
* });
|
|
337
|
+
* const exampleResource = new _null.index.Resource("example", {});
|
|
338
|
+
* const exampleResourceProvisioner0 = new command.local.Command("exampleResourceProvisioner0", {create: std.index.contains({
|
|
339
|
+
* input: [
|
|
340
|
+
* 201,
|
|
341
|
+
* 204,
|
|
342
|
+
* ],
|
|
343
|
+
* element: example.statusCode,
|
|
344
|
+
* }).result}, {
|
|
345
|
+
* dependsOn: [exampleResource],
|
|
346
|
+
* });
|
|
347
|
+
* ```
|
|
348
|
+
*/
|
|
121
349
|
export declare function getHttpOutput(args: GetHttpOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetHttpResult>;
|
|
122
350
|
/**
|
|
123
351
|
* A collection of arguments for invoking getHttp.
|
|
@@ -157,6 +385,9 @@ export interface GetHttpOutputArgs {
|
|
|
157
385
|
* The request timeout in milliseconds.
|
|
158
386
|
*/
|
|
159
387
|
requestTimeoutMs?: pulumi.Input<number>;
|
|
388
|
+
/**
|
|
389
|
+
* 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).
|
|
390
|
+
*/
|
|
160
391
|
retry?: pulumi.Input<inputs.GetHttpRetryArgs>;
|
|
161
392
|
/**
|
|
162
393
|
* The URL for the request. Supported schemes are `http.getHttp` and `https`.
|
package/getHttp.js
CHANGED
|
@@ -5,6 +5,117 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.getHttpOutput = exports.getHttp = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* The `http.getHttp` data source makes an HTTP GET request to the given URL and exports
|
|
10
|
+
* information about the response.
|
|
11
|
+
*
|
|
12
|
+
* The given URL may be either an `http.getHttp` or `https` URL. This resource
|
|
13
|
+
* will issue a warning if the result is not UTF-8 encoded.
|
|
14
|
+
*
|
|
15
|
+
* > **Important** Although `https` URLs can be used, there is currently no
|
|
16
|
+
* mechanism to authenticate the remote server except for general verification of
|
|
17
|
+
* the server certificate's chain of trust. Data retrieved from servers not under
|
|
18
|
+
* your control should be treated as untrustworthy.
|
|
19
|
+
*
|
|
20
|
+
* By default, there are no retries. Configuring the retry block will result in
|
|
21
|
+
* retries if an error is returned by the client (e.g., connection errors) or if
|
|
22
|
+
* a 5xx-range (except 501) status code is received. For further details see
|
|
23
|
+
* [go-retryablehttp](https://pkg.go.dev/github.com/hashicorp/go-retryablehttp).
|
|
24
|
+
*
|
|
25
|
+
* ## Example Usage
|
|
26
|
+
*
|
|
27
|
+
* ```typescript
|
|
28
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
29
|
+
* import * as http from "@pulumi/http";
|
|
30
|
+
*
|
|
31
|
+
* // The following example shows how to issue an HTTP GET request supplying
|
|
32
|
+
* // an optional request header.
|
|
33
|
+
* const example = http.getHttp({
|
|
34
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
35
|
+
* requestHeaders: {
|
|
36
|
+
* Accept: "application/json",
|
|
37
|
+
* },
|
|
38
|
+
* });
|
|
39
|
+
* // The following example shows how to issue an HTTP HEAD request.
|
|
40
|
+
* const exampleHead = http.getHttp({
|
|
41
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
42
|
+
* method: "HEAD",
|
|
43
|
+
* });
|
|
44
|
+
* // The following example shows how to issue an HTTP POST request
|
|
45
|
+
* // supplying an optional request body.
|
|
46
|
+
* const examplePost = http.getHttp({
|
|
47
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
48
|
+
* method: "POST",
|
|
49
|
+
* requestBody: "request body",
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* ## Usage with Postcondition
|
|
54
|
+
*
|
|
55
|
+
* Precondition and Postcondition
|
|
56
|
+
* checks are available with Terraform v1.2.0 and later.
|
|
57
|
+
*
|
|
58
|
+
* ```typescript
|
|
59
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
60
|
+
* import * as http from "@pulumi/http";
|
|
61
|
+
*
|
|
62
|
+
* const example = http.getHttp({
|
|
63
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
64
|
+
* requestHeaders: {
|
|
65
|
+
* Accept: "application/json",
|
|
66
|
+
* },
|
|
67
|
+
* });
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* ## Usage with Precondition
|
|
71
|
+
*
|
|
72
|
+
* Precondition and Postcondition
|
|
73
|
+
* checks are available with Terraform v1.2.0 and later.
|
|
74
|
+
*
|
|
75
|
+
* ```typescript
|
|
76
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
77
|
+
* import * as http from "@pulumi/http";
|
|
78
|
+
* import * as random from "@pulumi/random";
|
|
79
|
+
*
|
|
80
|
+
* const example = http.getHttp({
|
|
81
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
82
|
+
* requestHeaders: {
|
|
83
|
+
* Accept: "application/json",
|
|
84
|
+
* },
|
|
85
|
+
* });
|
|
86
|
+
* const exampleUuid = new random.index.Uuid("example", {});
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* ## Usage with Provisioner
|
|
90
|
+
*
|
|
91
|
+
* Failure Behaviour
|
|
92
|
+
* can be leveraged within a provisioner in order to raise an error and stop applying.
|
|
93
|
+
*
|
|
94
|
+
* ```typescript
|
|
95
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
96
|
+
* import * as _null from "@pulumi/null";
|
|
97
|
+
* import * as command from "@pulumi/command";
|
|
98
|
+
* import * as http from "@pulumi/http";
|
|
99
|
+
* import * as std from "@pulumi/std";
|
|
100
|
+
*
|
|
101
|
+
* const example = http.getHttp({
|
|
102
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
103
|
+
* requestHeaders: {
|
|
104
|
+
* Accept: "application/json",
|
|
105
|
+
* },
|
|
106
|
+
* });
|
|
107
|
+
* const exampleResource = new _null.index.Resource("example", {});
|
|
108
|
+
* const exampleResourceProvisioner0 = new command.local.Command("exampleResourceProvisioner0", {create: std.index.contains({
|
|
109
|
+
* input: [
|
|
110
|
+
* 201,
|
|
111
|
+
* 204,
|
|
112
|
+
* ],
|
|
113
|
+
* element: example.statusCode,
|
|
114
|
+
* }).result}, {
|
|
115
|
+
* dependsOn: [exampleResource],
|
|
116
|
+
* });
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
8
119
|
function getHttp(args, opts) {
|
|
9
120
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
10
121
|
return pulumi.runtime.invoke("http:index/getHttp:getHttp", {
|
|
@@ -21,6 +132,117 @@ function getHttp(args, opts) {
|
|
|
21
132
|
}, opts);
|
|
22
133
|
}
|
|
23
134
|
exports.getHttp = getHttp;
|
|
135
|
+
/**
|
|
136
|
+
* The `http.getHttp` data source makes an HTTP GET request to the given URL and exports
|
|
137
|
+
* information about the response.
|
|
138
|
+
*
|
|
139
|
+
* The given URL may be either an `http.getHttp` or `https` URL. This resource
|
|
140
|
+
* will issue a warning if the result is not UTF-8 encoded.
|
|
141
|
+
*
|
|
142
|
+
* > **Important** Although `https` URLs can be used, there is currently no
|
|
143
|
+
* mechanism to authenticate the remote server except for general verification of
|
|
144
|
+
* the server certificate's chain of trust. Data retrieved from servers not under
|
|
145
|
+
* your control should be treated as untrustworthy.
|
|
146
|
+
*
|
|
147
|
+
* By default, there are no retries. Configuring the retry block will result in
|
|
148
|
+
* retries if an error is returned by the client (e.g., connection errors) or if
|
|
149
|
+
* a 5xx-range (except 501) status code is received. For further details see
|
|
150
|
+
* [go-retryablehttp](https://pkg.go.dev/github.com/hashicorp/go-retryablehttp).
|
|
151
|
+
*
|
|
152
|
+
* ## Example Usage
|
|
153
|
+
*
|
|
154
|
+
* ```typescript
|
|
155
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
156
|
+
* import * as http from "@pulumi/http";
|
|
157
|
+
*
|
|
158
|
+
* // The following example shows how to issue an HTTP GET request supplying
|
|
159
|
+
* // an optional request header.
|
|
160
|
+
* const example = http.getHttp({
|
|
161
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
162
|
+
* requestHeaders: {
|
|
163
|
+
* Accept: "application/json",
|
|
164
|
+
* },
|
|
165
|
+
* });
|
|
166
|
+
* // The following example shows how to issue an HTTP HEAD request.
|
|
167
|
+
* const exampleHead = http.getHttp({
|
|
168
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
169
|
+
* method: "HEAD",
|
|
170
|
+
* });
|
|
171
|
+
* // The following example shows how to issue an HTTP POST request
|
|
172
|
+
* // supplying an optional request body.
|
|
173
|
+
* const examplePost = http.getHttp({
|
|
174
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
175
|
+
* method: "POST",
|
|
176
|
+
* requestBody: "request body",
|
|
177
|
+
* });
|
|
178
|
+
* ```
|
|
179
|
+
*
|
|
180
|
+
* ## Usage with Postcondition
|
|
181
|
+
*
|
|
182
|
+
* Precondition and Postcondition
|
|
183
|
+
* checks are available with Terraform v1.2.0 and later.
|
|
184
|
+
*
|
|
185
|
+
* ```typescript
|
|
186
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
187
|
+
* import * as http from "@pulumi/http";
|
|
188
|
+
*
|
|
189
|
+
* const example = http.getHttp({
|
|
190
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
191
|
+
* requestHeaders: {
|
|
192
|
+
* Accept: "application/json",
|
|
193
|
+
* },
|
|
194
|
+
* });
|
|
195
|
+
* ```
|
|
196
|
+
*
|
|
197
|
+
* ## Usage with Precondition
|
|
198
|
+
*
|
|
199
|
+
* Precondition and Postcondition
|
|
200
|
+
* checks are available with Terraform v1.2.0 and later.
|
|
201
|
+
*
|
|
202
|
+
* ```typescript
|
|
203
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
204
|
+
* import * as http from "@pulumi/http";
|
|
205
|
+
* import * as random from "@pulumi/random";
|
|
206
|
+
*
|
|
207
|
+
* const example = http.getHttp({
|
|
208
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
209
|
+
* requestHeaders: {
|
|
210
|
+
* Accept: "application/json",
|
|
211
|
+
* },
|
|
212
|
+
* });
|
|
213
|
+
* const exampleUuid = new random.index.Uuid("example", {});
|
|
214
|
+
* ```
|
|
215
|
+
*
|
|
216
|
+
* ## Usage with Provisioner
|
|
217
|
+
*
|
|
218
|
+
* Failure Behaviour
|
|
219
|
+
* can be leveraged within a provisioner in order to raise an error and stop applying.
|
|
220
|
+
*
|
|
221
|
+
* ```typescript
|
|
222
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
223
|
+
* import * as _null from "@pulumi/null";
|
|
224
|
+
* import * as command from "@pulumi/command";
|
|
225
|
+
* import * as http from "@pulumi/http";
|
|
226
|
+
* import * as std from "@pulumi/std";
|
|
227
|
+
*
|
|
228
|
+
* const example = http.getHttp({
|
|
229
|
+
* url: "https://checkpoint-api.hashicorp.com/v1/check/terraform",
|
|
230
|
+
* requestHeaders: {
|
|
231
|
+
* Accept: "application/json",
|
|
232
|
+
* },
|
|
233
|
+
* });
|
|
234
|
+
* const exampleResource = new _null.index.Resource("example", {});
|
|
235
|
+
* const exampleResourceProvisioner0 = new command.local.Command("exampleResourceProvisioner0", {create: std.index.contains({
|
|
236
|
+
* input: [
|
|
237
|
+
* 201,
|
|
238
|
+
* 204,
|
|
239
|
+
* ],
|
|
240
|
+
* element: example.statusCode,
|
|
241
|
+
* }).result}, {
|
|
242
|
+
* dependsOn: [exampleResource],
|
|
243
|
+
* });
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
24
246
|
function getHttpOutput(args, opts) {
|
|
25
247
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
26
248
|
return pulumi.runtime.invokeOutput("http:index/getHttp:getHttp", {
|
package/getHttp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHttp.js","sourceRoot":"","sources":["../getHttp.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC,SAAgB,OAAO,CAAC,IAAiB,EAAE,IAA2B;IAClE,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,4BAA4B,EAAE;QACvD,WAAW,EAAE,IAAI,CAAC,SAAS;QAC3B,eAAe,EAAE,IAAI,CAAC,aAAa;QACnC,cAAc,EAAE,IAAI,CAAC,YAAY;QACjC,UAAU,EAAE,IAAI,CAAC,QAAQ;QACzB,QAAQ,EAAE,IAAI,CAAC,MAAM;QACrB,aAAa,EAAE,IAAI,CAAC,WAAW;QAC/B,gBAAgB,EAAE,IAAI,CAAC,cAAc;QACrC,kBAAkB,EAAE,IAAI,CAAC,gBAAgB;QACzC,OAAO,EAAE,IAAI,CAAC,KAAK;QACnB,KAAK,EAAE,IAAI,CAAC,GAAG;KAClB,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAdD,0BAcC;
|
|
1
|
+
{"version":3,"file":"getHttp.js","sourceRoot":"","sources":["../getHttp.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8GG;AACH,SAAgB,OAAO,CAAC,IAAiB,EAAE,IAA2B;IAClE,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,4BAA4B,EAAE;QACvD,WAAW,EAAE,IAAI,CAAC,SAAS;QAC3B,eAAe,EAAE,IAAI,CAAC,aAAa;QACnC,cAAc,EAAE,IAAI,CAAC,YAAY;QACjC,UAAU,EAAE,IAAI,CAAC,QAAQ;QACzB,QAAQ,EAAE,IAAI,CAAC,MAAM;QACrB,aAAa,EAAE,IAAI,CAAC,WAAW;QAC/B,gBAAgB,EAAE,IAAI,CAAC,cAAc;QACrC,kBAAkB,EAAE,IAAI,CAAC,gBAAgB;QACzC,OAAO,EAAE,IAAI,CAAC,KAAK;QACnB,KAAK,EAAE,IAAI,CAAC,GAAG;KAClB,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAdD,0BAcC;AAuHD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8GG;AACH,SAAgB,aAAa,CAAC,IAAuB,EAAE,IAAiC;IACpF,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,4BAA4B,EAAE;QAC7D,WAAW,EAAE,IAAI,CAAC,SAAS;QAC3B,eAAe,EAAE,IAAI,CAAC,aAAa;QACnC,cAAc,EAAE,IAAI,CAAC,YAAY;QACjC,UAAU,EAAE,IAAI,CAAC,QAAQ;QACzB,QAAQ,EAAE,IAAI,CAAC,MAAM;QACrB,aAAa,EAAE,IAAI,CAAC,WAAW;QAC/B,gBAAgB,EAAE,IAAI,CAAC,cAAc;QACrC,kBAAkB,EAAE,IAAI,CAAC,gBAAgB;QACzC,OAAO,EAAE,IAAI,CAAC,KAAK;QACnB,KAAK,EAAE,IAAI,CAAC,GAAG;KAClB,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAdD,sCAcC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulumi/http",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "A Pulumi package for creating and managing HTTP cloud resources.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pulumi",
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"pulumi": {
|
|
23
23
|
"resource": true,
|
|
24
24
|
"name": "http",
|
|
25
|
-
"version": "0.1.
|
|
25
|
+
"version": "0.1.4"
|
|
26
26
|
}
|
|
27
27
|
}
|