pulumi-taba 0.0.0-stage → 0.3.17
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/README.md +55 -2
- package/config/index.d.ts +2 -0
- package/config/index.d.ts.map +1 -0
- package/config/index.js +21 -0
- package/config/index.js.map +1 -0
- package/config/vars.d.ts +29 -0
- package/config/vars.d.ts.map +1 -0
- package/config/vars.js +72 -0
- package/config/vars.js.map +1 -0
- package/distributor.d.ts +136 -0
- package/distributor.d.ts.map +1 -0
- package/distributor.js +125 -0
- package/distributor.js.map +1 -0
- package/getToken.d.ts +83 -0
- package/getToken.d.ts.map +1 -0
- package/getToken.js +77 -0
- package/getToken.js.map +1 -0
- package/getTokens.d.ts +72 -0
- package/getTokens.d.ts.map +1 -0
- package/getTokens.js +79 -0
- package/getTokens.js.map +1 -0
- package/getTopic.d.ts +135 -0
- package/getTopic.d.ts.map +1 -0
- package/getTopic.js +83 -0
- package/getTopic.js.map +1 -0
- package/getTopics.d.ts +122 -0
- package/getTopics.d.ts.map +1 -0
- package/getTopics.js +93 -0
- package/getTopics.js.map +1 -0
- package/index.d.ts +26 -0
- package/index.d.ts.map +1 -0
- package/index.js +86 -0
- package/index.js.map +1 -0
- package/package.json +29 -5
- package/provider.d.ts +94 -0
- package/provider.d.ts.map +1 -0
- package/provider.js +84 -0
- package/provider.js.map +1 -0
- package/queue.d.ts +264 -0
- package/queue.d.ts.map +1 -0
- package/queue.js +166 -0
- package/queue.js.map +1 -0
- package/token.d.ts +157 -0
- package/token.d.ts.map +1 -0
- package/token.js +138 -0
- package/token.js.map +1 -0
- package/types/index.d.ts +4 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +34 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +2 -0
- package/types/input.d.ts.map +1 -0
- package/types/input.js +5 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +99 -0
- package/types/output.d.ts.map +1 -0
- package/types/output.js +5 -0
- package/types/output.js.map +1 -0
- package/utilities.d.ts +5 -0
- package/utilities.d.ts.map +1 -0
- package/utilities.js +114 -0
- package/utilities.js.map +1 -0
package/README.md
CHANGED
|
@@ -1,3 +1,56 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Pulumi provider for Taba
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Manages the queues, distributors and access tokens of a [Taba](https://github.com/rafaelpontani/taba) cluster as code, through its client API: `preview`, drift detection with `refresh`, `import`, a guard against removing a queue that still holds messages, and an optional `createOrUpdate` that takes over what already exists. Available for **TypeScript/JavaScript, Python, .NET and Go**. It is the [Terraform and OpenTofu provider](https://github.com/rafaelpontani/taba/blob/main/doc/en-US/40-terraform.md) bridged to Pulumi, so both behave the same way.
|
|
4
|
+
|
|
5
|
+
> Other languages: [Português (Brasil)](https://github.com/rafaelpontani/taba/blob/main/doc/pt-BR/41-pulumi.md) · [all languages](https://github.com/rafaelpontani/taba/blob/main/doc/README.md)
|
|
6
|
+
|
|
7
|
+
The full guide (installation by language, configuration, every resource, `createOrUpdate` and its risks, tokens, replacement, tests, publication): [41-pulumi.md](https://github.com/rafaelpontani/taba/blob/main/doc/en-US/41-pulumi.md).
|
|
8
|
+
|
|
9
|
+
| Language | Package | Install |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| TypeScript / JavaScript | [`pulumi-taba`](https://www.npmjs.com/package/pulumi-taba) | `npm install pulumi-taba` |
|
|
12
|
+
| Python | [`pulumi-taba`](https://pypi.org/project/pulumi-taba/) | `pip install pulumi-taba` |
|
|
13
|
+
| .NET | [`Taba.Pulumi`](https://www.nuget.org/packages/Taba.Pulumi) | `dotnet add package Taba.Pulumi` |
|
|
14
|
+
| Go | `github.com/rafaelpontani/pulumi-taba/sdk/go/taba` | `go get github.com/rafaelpontani/pulumi-taba/sdk` |
|
|
15
|
+
|
|
16
|
+
The Pulumi CLI also needs the **plugin** of the provider, which is not in those packages. It is installed from the GitHub Release of the mirror repository (use the version of the package, which is the version of Taba):
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pulumi plugin install resource taba 0.3.9 --server github://api.github.com/rafaelpontani/pulumi-taba
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The provider reads the address and the token of the cluster from the stack configuration (or from `TABA_URL` and `TABA_TOKEN`):
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pulumi config set taba:endpoint https://taba.example.com:8080
|
|
26
|
+
pulumi config set --secret taba:token "$ROOT_TOKEN"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
A queue, a distributor that copies each publication to the queues starting with `orders` or `billing`, and a token that publishes and consumes only the topics whose name starts with `orders`:
|
|
30
|
+
|
|
31
|
+
**TypeScript**
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import * as taba from "pulumi-taba";
|
|
35
|
+
|
|
36
|
+
const orders = new taba.Queue("orders", { name: "orders", ttl: 86400, maxDeliveries: 5 });
|
|
37
|
+
|
|
38
|
+
const events = new taba.Distributor("events", { name: "events", prefixes: ["orders", "billing"] });
|
|
39
|
+
|
|
40
|
+
const token = new taba.Token("orders-app", {
|
|
41
|
+
name: "orders-app",
|
|
42
|
+
permissions: ["publish", "consume"],
|
|
43
|
+
topicPrefixes: [orders.name],
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export const secret = token.secret; // a Pulumi secret
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- **Resources:** `Queue`, `Distributor`, `Token`. **Functions:** `getTopic`, `getTopics`, `getToken`, `getTokens`.
|
|
50
|
+
- **`name` is required** in the three resources: nothing generates it (no autonaming), because the name of a queue is a contract with the applications and is how `createOrUpdate` finds what exists.
|
|
51
|
+
- **The provider version is the Taba version** and targets the node of the same version.
|
|
52
|
+
- **The token secret** is in the Pulumi state, as a secret: keep the state in a backend that encrypts it. The property is called `secret` in every language (a C# class cannot have a property with its own name).
|
|
53
|
+
- **A queue with messages is not removed** (nor replaced) unless `forceDestroy: true` was applied first.
|
|
54
|
+
- **`createOrUpdate` is off by default**: turn it on (provider or resource, or `TABA_CREATE_OR_UPDATE=true`) only for programs meant to take over what was created by hand, by `taba-cli` or by an application.
|
|
55
|
+
|
|
56
|
+
License: [Apache-2.0](https://github.com/rafaelpontani/taba/blob/main/connectors/LICENSE).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
|
package/config/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
// Export members:
|
|
20
|
+
__exportStar(require("./vars"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;AAEjF,kBAAkB;AAClB,yCAAuB"}
|
package/config/vars.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path of a PEM file with a private certificate authority. Conflicts with `caCertPem`.
|
|
3
|
+
*/
|
|
4
|
+
export declare const caCertFile: string | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* PEM of a private certificate authority that signs the API certificate. Conflicts with `caCertFile`. Default: the `TABA_CA_CERT` environment variable (a PEM or a file path).
|
|
7
|
+
*/
|
|
8
|
+
export declare const caCertPem: string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Default of the `createOrUpdate` attribute of every resource: when creating a queue, distributor or token that already exists in the cluster, take it over (and bring it to the declared configuration) instead of failing. Off by default, because it takes over in silence what may belong to another configuration. Default: the `TABA_CREATE_OR_UPDATE` environment variable (`true` or `false`), or `false`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const createOrUpdate: boolean | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* URL of the client API (the cluster load balancer), such as `https://taba.example.com:8080`. Default: the `TABA_URL` environment variable.
|
|
15
|
+
*/
|
|
16
|
+
export declare const endpoint: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Timeout of each call, as a Go duration (`30s`, `1m`). Default: `30s`.
|
|
19
|
+
*/
|
|
20
|
+
export declare const requestTimeout: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Total wait, as a Go duration (`3m`, `90s`), between the attempts of a call that gets `429` or `503`: each one waits for the `Retry-After` (5 s from a node of the cluster) or 1, 2, 4… up to 64 seconds, and no attempt is made whose wait would pass this total. A node that crashed answers for the definitions it owns until the others vote it out (about a minute). It also bounds the creations of a token that get `503 cluster.quorum-unavailable`, each one after revoking what the previous one may have created. `0s`: no new attempt. Default: `3m`.
|
|
23
|
+
*/
|
|
24
|
+
export declare const retryMaxWait: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Access token (`Authorization: Bearer`). Queues and distributors need `create` and `manage` within their prefixes; tokens need the root token (or an `admin` one for tokens that are not `admin`). Default: the `TABA_TOKEN` environment variable. Without it, the calls go without authentication.
|
|
27
|
+
*/
|
|
28
|
+
export declare const token: string | undefined;
|
|
29
|
+
//# sourceMappingURL=vars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vars.d.ts","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;AAQpD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;AAQnD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,cAAc,EAAE,OAAO,GAAG,SAAS,CAAC;AAQzD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;AAQlD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;AAQxD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;AAQtD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC"}
|
package/config/vars.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
29
|
+
const __config = new pulumi.Config("taba");
|
|
30
|
+
Object.defineProperty(exports, "caCertFile", {
|
|
31
|
+
get() {
|
|
32
|
+
return __config.get("caCertFile");
|
|
33
|
+
},
|
|
34
|
+
enumerable: true,
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "caCertPem", {
|
|
37
|
+
get() {
|
|
38
|
+
return __config.get("caCertPem");
|
|
39
|
+
},
|
|
40
|
+
enumerable: true,
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "createOrUpdate", {
|
|
43
|
+
get() {
|
|
44
|
+
return __config.getObject("createOrUpdate");
|
|
45
|
+
},
|
|
46
|
+
enumerable: true,
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "endpoint", {
|
|
49
|
+
get() {
|
|
50
|
+
return __config.get("endpoint");
|
|
51
|
+
},
|
|
52
|
+
enumerable: true,
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "requestTimeout", {
|
|
55
|
+
get() {
|
|
56
|
+
return __config.get("requestTimeout");
|
|
57
|
+
},
|
|
58
|
+
enumerable: true,
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "retryMaxWait", {
|
|
61
|
+
get() {
|
|
62
|
+
return __config.get("retryMaxWait");
|
|
63
|
+
},
|
|
64
|
+
enumerable: true,
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "token", {
|
|
67
|
+
get() {
|
|
68
|
+
return __config.get("token");
|
|
69
|
+
},
|
|
70
|
+
enumerable: true,
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=vars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAIzC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAM3C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE;IACzC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE;IACxC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACrC,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,gBAAgB,EAAE;IAC7C,GAAG;QACC,OAAO,QAAQ,CAAC,SAAS,CAAU,gBAAgB,CAAC,CAAC;IACzD,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE;IACvC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,gBAAgB,EAAE;IAC7C,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC1C,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE;IAC3C,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACxC,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE;IACpC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC"}
|
package/distributor.d.ts
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* A distributor: each publication to it is copied to every queue whose name starts with one of the `prefixes`. It holds no messages.
|
|
4
|
+
*
|
|
5
|
+
* ## Example Usage
|
|
6
|
+
*
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
9
|
+
* import * as taba from "pulumi-taba";
|
|
10
|
+
*
|
|
11
|
+
* // Each publication to "order-events" is copied to every queue whose name starts with "orders-" or "audit-".
|
|
12
|
+
* const orderEvents = new taba.Distributor("order_events", {
|
|
13
|
+
* name: "order-events",
|
|
14
|
+
* prefixes: [
|
|
15
|
+
* "orders-",
|
|
16
|
+
* "audit-",
|
|
17
|
+
* ],
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* ## Import
|
|
22
|
+
*
|
|
23
|
+
* The `pulumi import` command can be used, for example:
|
|
24
|
+
*
|
|
25
|
+
* A distributor is imported by its name.
|
|
26
|
+
*
|
|
27
|
+
* ```sh
|
|
28
|
+
* $ pulumi import taba:index/distributor:Distributor order_events order-events
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare class Distributor extends pulumi.CustomResource {
|
|
32
|
+
/**
|
|
33
|
+
* Get an existing Distributor resource's state with the given name, ID, and optional extra
|
|
34
|
+
* properties used to qualify the lookup.
|
|
35
|
+
*
|
|
36
|
+
* @param name The _unique_ name of the resulting resource.
|
|
37
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
38
|
+
* @param state Any extra arguments used during the lookup.
|
|
39
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
40
|
+
*/
|
|
41
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DistributorState, opts?: pulumi.CustomResourceOptions): Distributor;
|
|
42
|
+
/**
|
|
43
|
+
* Check whether an existing Distributor resource with the given ID exists.
|
|
44
|
+
*
|
|
45
|
+
* @param id The _unique_ provider ID of the resource to check.
|
|
46
|
+
* @param state Any extra arguments used during the lookup.
|
|
47
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
48
|
+
*/
|
|
49
|
+
static exists(id: pulumi.Input<string>, state?: DistributorState, opts?: pulumi.CustomResourceOptions): pulumi.Output<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Returns true if the given object is an instance of Distributor. This is designed to work even
|
|
52
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
53
|
+
*/
|
|
54
|
+
static isInstance(obj: any): obj is Distributor;
|
|
55
|
+
/**
|
|
56
|
+
* When creating, take over a topic with this name that already exists instead of failing: it gets the declared `prefixes` and `tags`. A queue with this name is recreated as a distributor only if it holds no message; otherwise nothing changes and the creation fails. Not set: the provider `createOrUpdate` (default `false`). It is only used when the resource is created; afterwards the resource belongs to this state like any other, and a `destroy` removes it.
|
|
57
|
+
*/
|
|
58
|
+
readonly createOrUpdate: pulumi.Output<boolean | undefined>;
|
|
59
|
+
/**
|
|
60
|
+
* Creation date (RFC 3339).
|
|
61
|
+
*/
|
|
62
|
+
readonly createdAt: pulumi.Output<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Name: 1 to 100 characters `A-Za-z0-9_-`, case-sensitive, not ending in `-dead-letter`. Changing it replaces the distributor.
|
|
65
|
+
*/
|
|
66
|
+
readonly name: pulumi.Output<string>;
|
|
67
|
+
/**
|
|
68
|
+
* Name prefixes of the queues each publication is copied to (1 to 20, of 1 to 100 characters `A-Za-z0-9_-`). A change applies to the publications after it.
|
|
69
|
+
*/
|
|
70
|
+
readonly prefixes: pulumi.Output<string[]>;
|
|
71
|
+
/**
|
|
72
|
+
* Telemetry tags (up to 20; key of 1 to 64 and value of 0 to 128 characters `A-Za-z0-9_-.:`). They do not affect behaviour. Default: none.
|
|
73
|
+
*/
|
|
74
|
+
readonly tags: pulumi.Output<{
|
|
75
|
+
[key: string]: string;
|
|
76
|
+
}>;
|
|
77
|
+
/**
|
|
78
|
+
* Create a Distributor resource with the given unique name, arguments, and options.
|
|
79
|
+
*
|
|
80
|
+
* @param name The _unique_ name of the resource.
|
|
81
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
82
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
83
|
+
*/
|
|
84
|
+
constructor(name: string, args: DistributorArgs, opts?: pulumi.CustomResourceOptions);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Input properties used for looking up and filtering Distributor resources.
|
|
88
|
+
*/
|
|
89
|
+
export interface DistributorState {
|
|
90
|
+
/**
|
|
91
|
+
* When creating, take over a topic with this name that already exists instead of failing: it gets the declared `prefixes` and `tags`. A queue with this name is recreated as a distributor only if it holds no message; otherwise nothing changes and the creation fails. Not set: the provider `createOrUpdate` (default `false`). It is only used when the resource is created; afterwards the resource belongs to this state like any other, and a `destroy` removes it.
|
|
92
|
+
*/
|
|
93
|
+
createOrUpdate?: pulumi.Input<boolean | undefined>;
|
|
94
|
+
/**
|
|
95
|
+
* Creation date (RFC 3339).
|
|
96
|
+
*/
|
|
97
|
+
createdAt?: pulumi.Input<string | undefined>;
|
|
98
|
+
/**
|
|
99
|
+
* Name: 1 to 100 characters `A-Za-z0-9_-`, case-sensitive, not ending in `-dead-letter`. Changing it replaces the distributor.
|
|
100
|
+
*/
|
|
101
|
+
name?: pulumi.Input<string | undefined>;
|
|
102
|
+
/**
|
|
103
|
+
* Name prefixes of the queues each publication is copied to (1 to 20, of 1 to 100 characters `A-Za-z0-9_-`). A change applies to the publications after it.
|
|
104
|
+
*/
|
|
105
|
+
prefixes?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
106
|
+
/**
|
|
107
|
+
* Telemetry tags (up to 20; key of 1 to 64 and value of 0 to 128 characters `A-Za-z0-9_-.:`). They do not affect behaviour. Default: none.
|
|
108
|
+
*/
|
|
109
|
+
tags?: pulumi.Input<{
|
|
110
|
+
[key: string]: pulumi.Input<string>;
|
|
111
|
+
} | undefined>;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The set of arguments for constructing a Distributor resource.
|
|
115
|
+
*/
|
|
116
|
+
export interface DistributorArgs {
|
|
117
|
+
/**
|
|
118
|
+
* When creating, take over a topic with this name that already exists instead of failing: it gets the declared `prefixes` and `tags`. A queue with this name is recreated as a distributor only if it holds no message; otherwise nothing changes and the creation fails. Not set: the provider `createOrUpdate` (default `false`). It is only used when the resource is created; afterwards the resource belongs to this state like any other, and a `destroy` removes it.
|
|
119
|
+
*/
|
|
120
|
+
createOrUpdate?: pulumi.Input<boolean | undefined>;
|
|
121
|
+
/**
|
|
122
|
+
* Name: 1 to 100 characters `A-Za-z0-9_-`, case-sensitive, not ending in `-dead-letter`. Changing it replaces the distributor.
|
|
123
|
+
*/
|
|
124
|
+
name: pulumi.Input<string>;
|
|
125
|
+
/**
|
|
126
|
+
* Name prefixes of the queues each publication is copied to (1 to 20, of 1 to 100 characters `A-Za-z0-9_-`). A change applies to the publications after it.
|
|
127
|
+
*/
|
|
128
|
+
prefixes: pulumi.Input<pulumi.Input<string>[]>;
|
|
129
|
+
/**
|
|
130
|
+
* Telemetry tags (up to 20; key of 1 to 64 and value of 0 to 128 characters `A-Za-z0-9_-.:`). They do not affect behaviour. Default: none.
|
|
131
|
+
*/
|
|
132
|
+
tags?: pulumi.Input<{
|
|
133
|
+
[key: string]: pulumi.Input<string>;
|
|
134
|
+
} | undefined>;
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=distributor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"distributor.d.ts","sourceRoot":"","sources":["../distributor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,WAAY,SAAQ,MAAM,CAAC,cAAc;IAClD;;;;;;;;OAQG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,WAAW;IAIxI;;;;;;OAMG;WACW,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;IAOrI;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,WAAW;IAOtD;;OAEG;IACH,SAAwB,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAC3E;;OAEG;IACH,SAAgC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjE;;OAEG;IACH,SAAwB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpD;;OAEG;IACH,SAAwB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1D;;OAEG;IACH,SAAwB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAC,CAAC;IAErE;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB;CA4BvF;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACnD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;IAC5D;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;KAAC,GAAG,SAAS,CAAC,CAAC;CAC1E;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC/C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;KAAC,GAAG,SAAS,CAAC,CAAC;CAC1E"}
|
package/distributor.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Distributor = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* A distributor: each publication to it is copied to every queue whose name starts with one of the `prefixes`. It holds no messages.
|
|
33
|
+
*
|
|
34
|
+
* ## Example Usage
|
|
35
|
+
*
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
38
|
+
* import * as taba from "pulumi-taba";
|
|
39
|
+
*
|
|
40
|
+
* // Each publication to "order-events" is copied to every queue whose name starts with "orders-" or "audit-".
|
|
41
|
+
* const orderEvents = new taba.Distributor("order_events", {
|
|
42
|
+
* name: "order-events",
|
|
43
|
+
* prefixes: [
|
|
44
|
+
* "orders-",
|
|
45
|
+
* "audit-",
|
|
46
|
+
* ],
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* ## Import
|
|
51
|
+
*
|
|
52
|
+
* The `pulumi import` command can be used, for example:
|
|
53
|
+
*
|
|
54
|
+
* A distributor is imported by its name.
|
|
55
|
+
*
|
|
56
|
+
* ```sh
|
|
57
|
+
* $ pulumi import taba:index/distributor:Distributor order_events order-events
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
class Distributor extends pulumi.CustomResource {
|
|
61
|
+
/**
|
|
62
|
+
* Get an existing Distributor resource's state with the given name, ID, and optional extra
|
|
63
|
+
* properties used to qualify the lookup.
|
|
64
|
+
*
|
|
65
|
+
* @param name The _unique_ name of the resulting resource.
|
|
66
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
67
|
+
* @param state Any extra arguments used during the lookup.
|
|
68
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
69
|
+
*/
|
|
70
|
+
static get(name, id, state, opts) {
|
|
71
|
+
return new Distributor(name, state, { ...opts, id: id });
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Check whether an existing Distributor resource with the given ID exists.
|
|
75
|
+
*
|
|
76
|
+
* @param id The _unique_ provider ID of the resource to check.
|
|
77
|
+
* @param state Any extra arguments used during the lookup.
|
|
78
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
79
|
+
*/
|
|
80
|
+
static exists(id, state, opts) {
|
|
81
|
+
return pulumi.runtime.existsResource("taba:index/distributor:Distributor", id, state || {}, { ...opts }, undefined);
|
|
82
|
+
}
|
|
83
|
+
/** @internal */
|
|
84
|
+
static __pulumiType = 'taba:index/distributor:Distributor';
|
|
85
|
+
/**
|
|
86
|
+
* Returns true if the given object is an instance of Distributor. This is designed to work even
|
|
87
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
88
|
+
*/
|
|
89
|
+
static isInstance(obj) {
|
|
90
|
+
if (obj === undefined || obj === null) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
return obj['__pulumiType'] === Distributor.__pulumiType;
|
|
94
|
+
}
|
|
95
|
+
constructor(name, argsOrState, opts) {
|
|
96
|
+
let resourceInputs = {};
|
|
97
|
+
opts = opts || {};
|
|
98
|
+
if (opts.id) {
|
|
99
|
+
const state = argsOrState;
|
|
100
|
+
resourceInputs["createOrUpdate"] = state?.createOrUpdate;
|
|
101
|
+
resourceInputs["createdAt"] = state?.createdAt;
|
|
102
|
+
resourceInputs["name"] = state?.name;
|
|
103
|
+
resourceInputs["prefixes"] = state?.prefixes;
|
|
104
|
+
resourceInputs["tags"] = state?.tags;
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
const args = argsOrState;
|
|
108
|
+
if (args?.name === undefined && !opts.urn) {
|
|
109
|
+
throw new Error("Missing required property 'name'");
|
|
110
|
+
}
|
|
111
|
+
if (args?.prefixes === undefined && !opts.urn) {
|
|
112
|
+
throw new Error("Missing required property 'prefixes'");
|
|
113
|
+
}
|
|
114
|
+
resourceInputs["createOrUpdate"] = args?.createOrUpdate;
|
|
115
|
+
resourceInputs["name"] = args?.name;
|
|
116
|
+
resourceInputs["prefixes"] = args?.prefixes;
|
|
117
|
+
resourceInputs["tags"] = args?.tags;
|
|
118
|
+
resourceInputs["createdAt"] = undefined /*out*/;
|
|
119
|
+
}
|
|
120
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
121
|
+
super(Distributor.__pulumiType, name, resourceInputs, opts);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.Distributor = Distributor;
|
|
125
|
+
//# sourceMappingURL=distributor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"distributor.js","sourceRoot":"","sources":["../distributor.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,uDAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAa,WAAY,SAAQ,MAAM,CAAC,cAAc;IAClD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAwB,EAAE,IAAmC;QACtH,OAAO,IAAI,WAAW,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAAC,EAAwB,EAAE,KAAwB,EAAE,IAAmC;QACxG,OAAO,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,oCAAoC,EAAE,EAAE,EAAO,KAAK,IAAI,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,CAAC,CAAC;IAC7H,CAAC;IAED,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,oCAAoC,CAAC;IAE3E;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,WAAW,CAAC,YAAY,CAAC;IAC5D,CAAC;IA+BD,YAAY,IAAY,EAAE,WAAgD,EAAE,IAAmC;QAC3G,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA2C,CAAC;YAC1D,cAAc,CAAC,gBAAgB,CAAC,GAAG,KAAK,EAAE,cAAc,CAAC;YACzD,cAAc,CAAC,WAAW,CAAC,GAAG,KAAK,EAAE,SAAS,CAAC;YAC/C,cAAc,CAAC,MAAM,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC;YACrC,cAAc,CAAC,UAAU,CAAC,GAAG,KAAK,EAAE,QAAQ,CAAC;YAC7C,cAAc,CAAC,MAAM,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC;SACxC;aAAM;YACH,MAAM,IAAI,GAAG,WAA0C,CAAC;YACxD,IAAI,IAAI,EAAE,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACvC,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;aACvD;YACD,IAAI,IAAI,EAAE,QAAQ,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC3C,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;aAC3D;YACD,cAAc,CAAC,gBAAgB,CAAC,GAAG,IAAI,EAAE,cAAc,CAAC;YACxD,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;YACpC,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC;YAC5C,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;YACpC,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACnD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;;AA9FL,kCA+FC"}
|
package/getToken.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* Reads one token by id, without the secret (the server only shows it at the creation). Needs authentication on and the root token or an `admin` token.
|
|
4
|
+
*
|
|
5
|
+
* ## Example Usage
|
|
6
|
+
*
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
9
|
+
* import * as taba from "pulumi-taba";
|
|
10
|
+
*
|
|
11
|
+
* // Reads a token by id, without the secret.
|
|
12
|
+
* const ci = taba.getToken({
|
|
13
|
+
* id: "01JC8X3V5Q2W7E9R4T6Y8U0I1O",
|
|
14
|
+
* });
|
|
15
|
+
* export const ciExpiresAt = ci.then(ci => ci.expiresAt);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function getToken(args: GetTokenArgs, opts?: pulumi.InvokeOptions): Promise<GetTokenResult>;
|
|
19
|
+
/**
|
|
20
|
+
* A collection of arguments for invoking getToken.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetTokenArgs {
|
|
23
|
+
/**
|
|
24
|
+
* Identifier of the token.
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A collection of values returned by getToken.
|
|
30
|
+
*/
|
|
31
|
+
export interface GetTokenResult {
|
|
32
|
+
/**
|
|
33
|
+
* Creation date (RFC 3339).
|
|
34
|
+
*/
|
|
35
|
+
readonly createdAt: string;
|
|
36
|
+
/**
|
|
37
|
+
* Deadline (RFC 3339), or null when the token does not expire.
|
|
38
|
+
*/
|
|
39
|
+
readonly expiresAt: string;
|
|
40
|
+
/**
|
|
41
|
+
* Identifier of the token.
|
|
42
|
+
*/
|
|
43
|
+
readonly id: string;
|
|
44
|
+
/**
|
|
45
|
+
* Name (not unique).
|
|
46
|
+
*/
|
|
47
|
+
readonly name: string;
|
|
48
|
+
/**
|
|
49
|
+
* Permissions.
|
|
50
|
+
*/
|
|
51
|
+
readonly permissions: string[];
|
|
52
|
+
/**
|
|
53
|
+
* Prefixes the token is limited to (empty: every topic).
|
|
54
|
+
*/
|
|
55
|
+
readonly topicPrefixes: string[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Reads one token by id, without the secret (the server only shows it at the creation). Needs authentication on and the root token or an `admin` token.
|
|
59
|
+
*
|
|
60
|
+
* ## Example Usage
|
|
61
|
+
*
|
|
62
|
+
* ```typescript
|
|
63
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
64
|
+
* import * as taba from "pulumi-taba";
|
|
65
|
+
*
|
|
66
|
+
* // Reads a token by id, without the secret.
|
|
67
|
+
* const ci = taba.getToken({
|
|
68
|
+
* id: "01JC8X3V5Q2W7E9R4T6Y8U0I1O",
|
|
69
|
+
* });
|
|
70
|
+
* export const ciExpiresAt = ci.then(ci => ci.expiresAt);
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare function getTokenOutput(args: GetTokenOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetTokenResult>;
|
|
74
|
+
/**
|
|
75
|
+
* A collection of arguments for invoking getToken.
|
|
76
|
+
*/
|
|
77
|
+
export interface GetTokenOutputArgs {
|
|
78
|
+
/**
|
|
79
|
+
* Identifier of the token.
|
|
80
|
+
*/
|
|
81
|
+
id: pulumi.Input<string>;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=getToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getToken.d.ts","sourceRoot":"","sources":["../getToken.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAKjG;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAC/B;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,CAAC;CACpC;AACD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,kBAAkB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAKzH;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CAC5B"}
|
package/getToken.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.getTokenOutput = exports.getToken = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* Reads one token by id, without the secret (the server only shows it at the creation). Needs authentication on and the root token or an `admin` token.
|
|
33
|
+
*
|
|
34
|
+
* ## Example Usage
|
|
35
|
+
*
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
38
|
+
* import * as taba from "pulumi-taba";
|
|
39
|
+
*
|
|
40
|
+
* // Reads a token by id, without the secret.
|
|
41
|
+
* const ci = taba.getToken({
|
|
42
|
+
* id: "01JC8X3V5Q2W7E9R4T6Y8U0I1O",
|
|
43
|
+
* });
|
|
44
|
+
* export const ciExpiresAt = ci.then(ci => ci.expiresAt);
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
function getToken(args, opts) {
|
|
48
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
49
|
+
return pulumi.runtime.invoke("taba:index/getToken:getToken", {
|
|
50
|
+
"id": args.id,
|
|
51
|
+
}, opts);
|
|
52
|
+
}
|
|
53
|
+
exports.getToken = getToken;
|
|
54
|
+
/**
|
|
55
|
+
* Reads one token by id, without the secret (the server only shows it at the creation). Needs authentication on and the root token or an `admin` token.
|
|
56
|
+
*
|
|
57
|
+
* ## Example Usage
|
|
58
|
+
*
|
|
59
|
+
* ```typescript
|
|
60
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
61
|
+
* import * as taba from "pulumi-taba";
|
|
62
|
+
*
|
|
63
|
+
* // Reads a token by id, without the secret.
|
|
64
|
+
* const ci = taba.getToken({
|
|
65
|
+
* id: "01JC8X3V5Q2W7E9R4T6Y8U0I1O",
|
|
66
|
+
* });
|
|
67
|
+
* export const ciExpiresAt = ci.then(ci => ci.expiresAt);
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
function getTokenOutput(args, opts) {
|
|
71
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
72
|
+
return pulumi.runtime.invokeOutput("taba:index/getToken:getToken", {
|
|
73
|
+
"id": args.id,
|
|
74
|
+
}, opts);
|
|
75
|
+
}
|
|
76
|
+
exports.getTokenOutput = getTokenOutput;
|
|
77
|
+
//# sourceMappingURL=getToken.js.map
|
package/getToken.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getToken.js","sourceRoot":"","sources":["../getToken.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,uDAAyC;AAEzC;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,QAAQ,CAAC,IAAkB,EAAE,IAA2B;IACpE,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,8BAA8B,EAAE;QACzD,IAAI,EAAE,IAAI,CAAC,EAAE;KAChB,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AALD,4BAKC;AAyCD;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,cAAc,CAAC,IAAwB,EAAE,IAAiC;IACtF,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,8BAA8B,EAAE;QAC/D,IAAI,EAAE,IAAI,CAAC,EAAE;KAChB,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AALD,wCAKC"}
|