@atensec/pulumi-thoth 0.1.0
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/.gitattributes +1 -0
- package/Pulumi.yaml +3 -0
- package/README.md +4 -0
- package/access/apiKey.ts +239 -0
- package/access/getApiKeyMetrics.ts +31 -0
- package/access/index.ts +30 -0
- package/browser/enrollment.ts +218 -0
- package/browser/index.ts +41 -0
- package/browser/policy.ts +256 -0
- package/browser/provider.ts +186 -0
- package/config/index.ts +5 -0
- package/config/vars.ts +119 -0
- package/governance/approvalDecision.ts +141 -0
- package/governance/getFeed.ts +102 -0
- package/governance/getTenantSettings.ts +33 -0
- package/governance/getTools.ts +52 -0
- package/governance/index.ts +72 -0
- package/governance/packAssignment.ts +213 -0
- package/governance/policySync.ts +233 -0
- package/governance/tenantSettings.ts +579 -0
- package/governance/webhookTest.ts +131 -0
- package/index.ts +34 -0
- package/mdm/getSyncJob.ts +53 -0
- package/mdm/index.ts +38 -0
- package/mdm/provider.ts +218 -0
- package/mdm/sync.ts +230 -0
- package/package.json +29 -0
- package/provider.ts +144 -0
- package/tsconfig.json +48 -0
- package/utilities.ts +96 -0
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* linguist-generated
|
package/Pulumi.yaml
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
> This provider is a derived work of the [Terraform Provider](https://github.com/atensecurity/terraform-provider-thoth)
|
|
2
|
+
> distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,
|
|
3
|
+
> first check the [`pulumi-thoth` repo](https://github.com/atensecurity/pulumi-thoth/issues); however, if that doesn't turn up anything,
|
|
4
|
+
> please consult the source [`terraform-provider-thoth` repo](https://github.com/atensecurity/terraform-provider-thoth/issues).
|
package/access/apiKey.ts
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as utilities from "../utilities";
|
|
6
|
+
|
|
7
|
+
export class ApiKey extends pulumi.CustomResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get an existing ApiKey resource's state with the given name, ID, and optional extra
|
|
10
|
+
* properties used to qualify the lookup.
|
|
11
|
+
*
|
|
12
|
+
* @param name The _unique_ name of the resulting resource.
|
|
13
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
14
|
+
* @param state Any extra arguments used during the lookup.
|
|
15
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
16
|
+
*/
|
|
17
|
+
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ApiKeyState, opts?: pulumi.CustomResourceOptions): ApiKey {
|
|
18
|
+
return new ApiKey(name, <any>state, { ...opts, id: id });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
public static readonly __pulumiType = 'thoth:access/apiKey:ApiKey';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns true if the given object is an instance of ApiKey. This is designed to work even
|
|
26
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
27
|
+
*/
|
|
28
|
+
public static isInstance(obj: any): obj is ApiKey {
|
|
29
|
+
if (obj === undefined || obj === null) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return obj['__pulumiType'] === ApiKey.__pulumiType;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Whether key is currently active and not expired/revoked.
|
|
37
|
+
*/
|
|
38
|
+
declare public /*out*/ readonly active: pulumi.Output<boolean>;
|
|
39
|
+
/**
|
|
40
|
+
* One-time plaintext API key (returned only on create).
|
|
41
|
+
*/
|
|
42
|
+
declare public /*out*/ readonly apiKey: pulumi.Output<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Creation timestamp.
|
|
45
|
+
*/
|
|
46
|
+
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
|
|
47
|
+
/**
|
|
48
|
+
* Expiry timestamp.
|
|
49
|
+
*/
|
|
50
|
+
declare public /*out*/ readonly expiresAt: pulumi.Output<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Audit reason for just-in-time issuance.
|
|
53
|
+
*/
|
|
54
|
+
declare public readonly jitReason: pulumi.Output<string | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* GovAPI key identifier.
|
|
57
|
+
*/
|
|
58
|
+
declare public /*out*/ readonly keyId: pulumi.Output<string>;
|
|
59
|
+
/**
|
|
60
|
+
* Last authorization timestamp.
|
|
61
|
+
*/
|
|
62
|
+
declare public /*out*/ readonly lastUsedAt: pulumi.Output<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Display name for the API key.
|
|
65
|
+
*/
|
|
66
|
+
declare public readonly name: pulumi.Output<string | undefined>;
|
|
67
|
+
/**
|
|
68
|
+
* Allowed permissions: read, write, execute.
|
|
69
|
+
*/
|
|
70
|
+
declare public readonly permissions: pulumi.Output<string[]>;
|
|
71
|
+
/**
|
|
72
|
+
* Key prefix for operator identification.
|
|
73
|
+
*/
|
|
74
|
+
declare public /*out*/ readonly prefix: pulumi.Output<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Scope level: organization, fleet, endpoint, agent.
|
|
77
|
+
*/
|
|
78
|
+
declare public readonly scopeLevel: pulumi.Output<string>;
|
|
79
|
+
/**
|
|
80
|
+
* Target ID for scope level (not required for organization).
|
|
81
|
+
*/
|
|
82
|
+
declare public readonly scopeTargetId: pulumi.Output<string | undefined>;
|
|
83
|
+
/**
|
|
84
|
+
* Tenant ID from provider configuration.
|
|
85
|
+
*/
|
|
86
|
+
declare public /*out*/ readonly tenantId: pulumi.Output<string>;
|
|
87
|
+
/**
|
|
88
|
+
* TTL in seconds for key expiry.
|
|
89
|
+
*/
|
|
90
|
+
declare public readonly ttlSeconds: pulumi.Output<number | undefined>;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Create a ApiKey resource with the given unique name, arguments, and options.
|
|
94
|
+
*
|
|
95
|
+
* @param name The _unique_ name of the resource.
|
|
96
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
97
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
98
|
+
*/
|
|
99
|
+
constructor(name: string, args: ApiKeyArgs, opts?: pulumi.CustomResourceOptions)
|
|
100
|
+
constructor(name: string, argsOrState?: ApiKeyArgs | ApiKeyState, opts?: pulumi.CustomResourceOptions) {
|
|
101
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
102
|
+
opts = opts || {};
|
|
103
|
+
if (opts.id) {
|
|
104
|
+
const state = argsOrState as ApiKeyState | undefined;
|
|
105
|
+
resourceInputs["active"] = state?.active;
|
|
106
|
+
resourceInputs["apiKey"] = state?.apiKey;
|
|
107
|
+
resourceInputs["createdAt"] = state?.createdAt;
|
|
108
|
+
resourceInputs["expiresAt"] = state?.expiresAt;
|
|
109
|
+
resourceInputs["jitReason"] = state?.jitReason;
|
|
110
|
+
resourceInputs["keyId"] = state?.keyId;
|
|
111
|
+
resourceInputs["lastUsedAt"] = state?.lastUsedAt;
|
|
112
|
+
resourceInputs["name"] = state?.name;
|
|
113
|
+
resourceInputs["permissions"] = state?.permissions;
|
|
114
|
+
resourceInputs["prefix"] = state?.prefix;
|
|
115
|
+
resourceInputs["scopeLevel"] = state?.scopeLevel;
|
|
116
|
+
resourceInputs["scopeTargetId"] = state?.scopeTargetId;
|
|
117
|
+
resourceInputs["tenantId"] = state?.tenantId;
|
|
118
|
+
resourceInputs["ttlSeconds"] = state?.ttlSeconds;
|
|
119
|
+
} else {
|
|
120
|
+
const args = argsOrState as ApiKeyArgs | undefined;
|
|
121
|
+
if (args?.permissions === undefined && !opts.urn) {
|
|
122
|
+
throw new Error("Missing required property 'permissions'");
|
|
123
|
+
}
|
|
124
|
+
if (args?.scopeLevel === undefined && !opts.urn) {
|
|
125
|
+
throw new Error("Missing required property 'scopeLevel'");
|
|
126
|
+
}
|
|
127
|
+
resourceInputs["jitReason"] = args?.jitReason;
|
|
128
|
+
resourceInputs["name"] = args?.name;
|
|
129
|
+
resourceInputs["permissions"] = args?.permissions;
|
|
130
|
+
resourceInputs["scopeLevel"] = args?.scopeLevel;
|
|
131
|
+
resourceInputs["scopeTargetId"] = args?.scopeTargetId;
|
|
132
|
+
resourceInputs["ttlSeconds"] = args?.ttlSeconds;
|
|
133
|
+
resourceInputs["active"] = undefined /*out*/;
|
|
134
|
+
resourceInputs["apiKey"] = undefined /*out*/;
|
|
135
|
+
resourceInputs["createdAt"] = undefined /*out*/;
|
|
136
|
+
resourceInputs["expiresAt"] = undefined /*out*/;
|
|
137
|
+
resourceInputs["keyId"] = undefined /*out*/;
|
|
138
|
+
resourceInputs["lastUsedAt"] = undefined /*out*/;
|
|
139
|
+
resourceInputs["prefix"] = undefined /*out*/;
|
|
140
|
+
resourceInputs["tenantId"] = undefined /*out*/;
|
|
141
|
+
}
|
|
142
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
143
|
+
const secretOpts = { additionalSecretOutputs: ["apiKey"] };
|
|
144
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
145
|
+
super(ApiKey.__pulumiType, name, resourceInputs, opts);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Input properties used for looking up and filtering ApiKey resources.
|
|
151
|
+
*/
|
|
152
|
+
export interface ApiKeyState {
|
|
153
|
+
/**
|
|
154
|
+
* Whether key is currently active and not expired/revoked.
|
|
155
|
+
*/
|
|
156
|
+
active?: pulumi.Input<boolean | undefined>;
|
|
157
|
+
/**
|
|
158
|
+
* One-time plaintext API key (returned only on create).
|
|
159
|
+
*/
|
|
160
|
+
apiKey?: pulumi.Input<string | undefined>;
|
|
161
|
+
/**
|
|
162
|
+
* Creation timestamp.
|
|
163
|
+
*/
|
|
164
|
+
createdAt?: pulumi.Input<string | undefined>;
|
|
165
|
+
/**
|
|
166
|
+
* Expiry timestamp.
|
|
167
|
+
*/
|
|
168
|
+
expiresAt?: pulumi.Input<string | undefined>;
|
|
169
|
+
/**
|
|
170
|
+
* Audit reason for just-in-time issuance.
|
|
171
|
+
*/
|
|
172
|
+
jitReason?: pulumi.Input<string | undefined>;
|
|
173
|
+
/**
|
|
174
|
+
* GovAPI key identifier.
|
|
175
|
+
*/
|
|
176
|
+
keyId?: pulumi.Input<string | undefined>;
|
|
177
|
+
/**
|
|
178
|
+
* Last authorization timestamp.
|
|
179
|
+
*/
|
|
180
|
+
lastUsedAt?: pulumi.Input<string | undefined>;
|
|
181
|
+
/**
|
|
182
|
+
* Display name for the API key.
|
|
183
|
+
*/
|
|
184
|
+
name?: pulumi.Input<string | undefined>;
|
|
185
|
+
/**
|
|
186
|
+
* Allowed permissions: read, write, execute.
|
|
187
|
+
*/
|
|
188
|
+
permissions?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
189
|
+
/**
|
|
190
|
+
* Key prefix for operator identification.
|
|
191
|
+
*/
|
|
192
|
+
prefix?: pulumi.Input<string | undefined>;
|
|
193
|
+
/**
|
|
194
|
+
* Scope level: organization, fleet, endpoint, agent.
|
|
195
|
+
*/
|
|
196
|
+
scopeLevel?: pulumi.Input<string | undefined>;
|
|
197
|
+
/**
|
|
198
|
+
* Target ID for scope level (not required for organization).
|
|
199
|
+
*/
|
|
200
|
+
scopeTargetId?: pulumi.Input<string | undefined>;
|
|
201
|
+
/**
|
|
202
|
+
* Tenant ID from provider configuration.
|
|
203
|
+
*/
|
|
204
|
+
tenantId?: pulumi.Input<string | undefined>;
|
|
205
|
+
/**
|
|
206
|
+
* TTL in seconds for key expiry.
|
|
207
|
+
*/
|
|
208
|
+
ttlSeconds?: pulumi.Input<number | undefined>;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The set of arguments for constructing a ApiKey resource.
|
|
213
|
+
*/
|
|
214
|
+
export interface ApiKeyArgs {
|
|
215
|
+
/**
|
|
216
|
+
* Audit reason for just-in-time issuance.
|
|
217
|
+
*/
|
|
218
|
+
jitReason?: pulumi.Input<string | undefined>;
|
|
219
|
+
/**
|
|
220
|
+
* Display name for the API key.
|
|
221
|
+
*/
|
|
222
|
+
name?: pulumi.Input<string | undefined>;
|
|
223
|
+
/**
|
|
224
|
+
* Allowed permissions: read, write, execute.
|
|
225
|
+
*/
|
|
226
|
+
permissions: pulumi.Input<pulumi.Input<string>[]>;
|
|
227
|
+
/**
|
|
228
|
+
* Scope level: organization, fleet, endpoint, agent.
|
|
229
|
+
*/
|
|
230
|
+
scopeLevel: pulumi.Input<string>;
|
|
231
|
+
/**
|
|
232
|
+
* Target ID for scope level (not required for organization).
|
|
233
|
+
*/
|
|
234
|
+
scopeTargetId?: pulumi.Input<string | undefined>;
|
|
235
|
+
/**
|
|
236
|
+
* TTL in seconds for key expiry.
|
|
237
|
+
*/
|
|
238
|
+
ttlSeconds?: pulumi.Input<number | undefined>;
|
|
239
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as utilities from "../utilities";
|
|
6
|
+
|
|
7
|
+
export function getApiKeyMetrics(opts?: pulumi.InvokeOptions): Promise<GetApiKeyMetricsResult> {
|
|
8
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
9
|
+
return pulumi.runtime.invoke("thoth:access/getApiKeyMetrics:getApiKeyMetrics", {
|
|
10
|
+
}, opts);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A collection of values returned by getApiKeyMetrics.
|
|
15
|
+
*/
|
|
16
|
+
export interface GetApiKeyMetricsResult {
|
|
17
|
+
readonly activeSdkKeys: number;
|
|
18
|
+
readonly avgLatencyMs: number;
|
|
19
|
+
/**
|
|
20
|
+
* The provider-assigned unique ID for this managed resource.
|
|
21
|
+
*/
|
|
22
|
+
readonly id: string;
|
|
23
|
+
readonly keyUsage24h: number;
|
|
24
|
+
readonly metricsJson: string;
|
|
25
|
+
readonly redTeamTests: number;
|
|
26
|
+
}
|
|
27
|
+
export function getApiKeyMetricsOutput(opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetApiKeyMetricsResult> {
|
|
28
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
29
|
+
return pulumi.runtime.invokeOutput("thoth:access/getApiKeyMetrics:getApiKeyMetrics", {
|
|
30
|
+
}, opts);
|
|
31
|
+
}
|
package/access/index.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as utilities from "../utilities";
|
|
6
|
+
|
|
7
|
+
// Export members:
|
|
8
|
+
export { ApiKeyArgs, ApiKeyState } from "./apiKey";
|
|
9
|
+
export type ApiKey = import("./apiKey").ApiKey;
|
|
10
|
+
export const ApiKey: typeof import("./apiKey").ApiKey = null as any;
|
|
11
|
+
utilities.lazyLoad(exports, ["ApiKey"], () => require("./apiKey"));
|
|
12
|
+
|
|
13
|
+
export { GetApiKeyMetricsResult } from "./getApiKeyMetrics";
|
|
14
|
+
export const getApiKeyMetrics: typeof import("./getApiKeyMetrics").getApiKeyMetrics = null as any;
|
|
15
|
+
export const getApiKeyMetricsOutput: typeof import("./getApiKeyMetrics").getApiKeyMetricsOutput = null as any;
|
|
16
|
+
utilities.lazyLoad(exports, ["getApiKeyMetrics","getApiKeyMetricsOutput"], () => require("./getApiKeyMetrics"));
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
const _module = {
|
|
20
|
+
version: utilities.getVersion(),
|
|
21
|
+
construct: (name: string, type: string, urn: string): pulumi.Resource => {
|
|
22
|
+
switch (type) {
|
|
23
|
+
case "thoth:access/apiKey:ApiKey":
|
|
24
|
+
return new ApiKey(name, <any>undefined, { urn })
|
|
25
|
+
default:
|
|
26
|
+
throw new Error(`unknown resource type ${type}`);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
pulumi.runtime.registerResourceModule("thoth", "access/apiKey", _module)
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as utilities from "../utilities";
|
|
6
|
+
|
|
7
|
+
export class Enrollment extends pulumi.CustomResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get an existing Enrollment resource's state with the given name, ID, and optional extra
|
|
10
|
+
* properties used to qualify the lookup.
|
|
11
|
+
*
|
|
12
|
+
* @param name The _unique_ name of the resulting resource.
|
|
13
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
14
|
+
* @param state Any extra arguments used during the lookup.
|
|
15
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
16
|
+
*/
|
|
17
|
+
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: EnrollmentState, opts?: pulumi.CustomResourceOptions): Enrollment {
|
|
18
|
+
return new Enrollment(name, <any>state, { ...opts, id: id });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
public static readonly __pulumiType = 'thoth:browser/enrollment:Enrollment';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns true if the given object is an instance of Enrollment. This is designed to work even
|
|
26
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
27
|
+
*/
|
|
28
|
+
public static isInstance(obj: any): obj is Enrollment {
|
|
29
|
+
if (obj === undefined || obj === null) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return obj['__pulumiType'] === Enrollment.__pulumiType;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Browser profile identifier.
|
|
37
|
+
*/
|
|
38
|
+
declare public readonly browserProfile: pulumi.Output<string | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Creation timestamp.
|
|
41
|
+
*/
|
|
42
|
+
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Device identifier for enrollment.
|
|
45
|
+
*/
|
|
46
|
+
declare public readonly deviceId: pulumi.Output<string>;
|
|
47
|
+
/**
|
|
48
|
+
* Enrollment ID; generated by GovAPI if omitted.
|
|
49
|
+
*/
|
|
50
|
+
declare public readonly enrollmentId: pulumi.Output<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Last-seen timestamp (RFC3339).
|
|
53
|
+
*/
|
|
54
|
+
declare public readonly lastSeenAt: pulumi.Output<string | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* Metadata JSON object.
|
|
57
|
+
*/
|
|
58
|
+
declare public readonly metadataJson: pulumi.Output<string | undefined>;
|
|
59
|
+
/**
|
|
60
|
+
* Browser provider slug.
|
|
61
|
+
*/
|
|
62
|
+
declare public readonly providerName: pulumi.Output<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Enrollment status (active, pending, disabled).
|
|
65
|
+
*/
|
|
66
|
+
declare public readonly status: pulumi.Output<string | undefined>;
|
|
67
|
+
/**
|
|
68
|
+
* Tenant ID from provider configuration.
|
|
69
|
+
*/
|
|
70
|
+
declare public /*out*/ readonly tenantId: pulumi.Output<string>;
|
|
71
|
+
/**
|
|
72
|
+
* Update timestamp.
|
|
73
|
+
*/
|
|
74
|
+
declare public /*out*/ readonly updatedAt: pulumi.Output<string>;
|
|
75
|
+
/**
|
|
76
|
+
* User identifier for enrollment.
|
|
77
|
+
*/
|
|
78
|
+
declare public readonly userId: pulumi.Output<string>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Create a Enrollment resource with the given unique name, arguments, and options.
|
|
82
|
+
*
|
|
83
|
+
* @param name The _unique_ name of the resource.
|
|
84
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
85
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
86
|
+
*/
|
|
87
|
+
constructor(name: string, args: EnrollmentArgs, opts?: pulumi.CustomResourceOptions)
|
|
88
|
+
constructor(name: string, argsOrState?: EnrollmentArgs | EnrollmentState, opts?: pulumi.CustomResourceOptions) {
|
|
89
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
90
|
+
opts = opts || {};
|
|
91
|
+
if (opts.id) {
|
|
92
|
+
const state = argsOrState as EnrollmentState | undefined;
|
|
93
|
+
resourceInputs["browserProfile"] = state?.browserProfile;
|
|
94
|
+
resourceInputs["createdAt"] = state?.createdAt;
|
|
95
|
+
resourceInputs["deviceId"] = state?.deviceId;
|
|
96
|
+
resourceInputs["enrollmentId"] = state?.enrollmentId;
|
|
97
|
+
resourceInputs["lastSeenAt"] = state?.lastSeenAt;
|
|
98
|
+
resourceInputs["metadataJson"] = state?.metadataJson;
|
|
99
|
+
resourceInputs["providerName"] = state?.providerName;
|
|
100
|
+
resourceInputs["status"] = state?.status;
|
|
101
|
+
resourceInputs["tenantId"] = state?.tenantId;
|
|
102
|
+
resourceInputs["updatedAt"] = state?.updatedAt;
|
|
103
|
+
resourceInputs["userId"] = state?.userId;
|
|
104
|
+
} else {
|
|
105
|
+
const args = argsOrState as EnrollmentArgs | undefined;
|
|
106
|
+
if (args?.deviceId === undefined && !opts.urn) {
|
|
107
|
+
throw new Error("Missing required property 'deviceId'");
|
|
108
|
+
}
|
|
109
|
+
if (args?.providerName === undefined && !opts.urn) {
|
|
110
|
+
throw new Error("Missing required property 'providerName'");
|
|
111
|
+
}
|
|
112
|
+
if (args?.userId === undefined && !opts.urn) {
|
|
113
|
+
throw new Error("Missing required property 'userId'");
|
|
114
|
+
}
|
|
115
|
+
resourceInputs["browserProfile"] = args?.browserProfile;
|
|
116
|
+
resourceInputs["deviceId"] = args?.deviceId;
|
|
117
|
+
resourceInputs["enrollmentId"] = args?.enrollmentId;
|
|
118
|
+
resourceInputs["lastSeenAt"] = args?.lastSeenAt;
|
|
119
|
+
resourceInputs["metadataJson"] = args?.metadataJson;
|
|
120
|
+
resourceInputs["providerName"] = args?.providerName;
|
|
121
|
+
resourceInputs["status"] = args?.status;
|
|
122
|
+
resourceInputs["userId"] = args?.userId;
|
|
123
|
+
resourceInputs["createdAt"] = undefined /*out*/;
|
|
124
|
+
resourceInputs["tenantId"] = undefined /*out*/;
|
|
125
|
+
resourceInputs["updatedAt"] = undefined /*out*/;
|
|
126
|
+
}
|
|
127
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
128
|
+
super(Enrollment.__pulumiType, name, resourceInputs, opts);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Input properties used for looking up and filtering Enrollment resources.
|
|
134
|
+
*/
|
|
135
|
+
export interface EnrollmentState {
|
|
136
|
+
/**
|
|
137
|
+
* Browser profile identifier.
|
|
138
|
+
*/
|
|
139
|
+
browserProfile?: pulumi.Input<string | undefined>;
|
|
140
|
+
/**
|
|
141
|
+
* Creation timestamp.
|
|
142
|
+
*/
|
|
143
|
+
createdAt?: pulumi.Input<string | undefined>;
|
|
144
|
+
/**
|
|
145
|
+
* Device identifier for enrollment.
|
|
146
|
+
*/
|
|
147
|
+
deviceId?: pulumi.Input<string | undefined>;
|
|
148
|
+
/**
|
|
149
|
+
* Enrollment ID; generated by GovAPI if omitted.
|
|
150
|
+
*/
|
|
151
|
+
enrollmentId?: pulumi.Input<string | undefined>;
|
|
152
|
+
/**
|
|
153
|
+
* Last-seen timestamp (RFC3339).
|
|
154
|
+
*/
|
|
155
|
+
lastSeenAt?: pulumi.Input<string | undefined>;
|
|
156
|
+
/**
|
|
157
|
+
* Metadata JSON object.
|
|
158
|
+
*/
|
|
159
|
+
metadataJson?: pulumi.Input<string | undefined>;
|
|
160
|
+
/**
|
|
161
|
+
* Browser provider slug.
|
|
162
|
+
*/
|
|
163
|
+
providerName?: pulumi.Input<string | undefined>;
|
|
164
|
+
/**
|
|
165
|
+
* Enrollment status (active, pending, disabled).
|
|
166
|
+
*/
|
|
167
|
+
status?: pulumi.Input<string | undefined>;
|
|
168
|
+
/**
|
|
169
|
+
* Tenant ID from provider configuration.
|
|
170
|
+
*/
|
|
171
|
+
tenantId?: pulumi.Input<string | undefined>;
|
|
172
|
+
/**
|
|
173
|
+
* Update timestamp.
|
|
174
|
+
*/
|
|
175
|
+
updatedAt?: pulumi.Input<string | undefined>;
|
|
176
|
+
/**
|
|
177
|
+
* User identifier for enrollment.
|
|
178
|
+
*/
|
|
179
|
+
userId?: pulumi.Input<string | undefined>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The set of arguments for constructing a Enrollment resource.
|
|
184
|
+
*/
|
|
185
|
+
export interface EnrollmentArgs {
|
|
186
|
+
/**
|
|
187
|
+
* Browser profile identifier.
|
|
188
|
+
*/
|
|
189
|
+
browserProfile?: pulumi.Input<string | undefined>;
|
|
190
|
+
/**
|
|
191
|
+
* Device identifier for enrollment.
|
|
192
|
+
*/
|
|
193
|
+
deviceId: pulumi.Input<string>;
|
|
194
|
+
/**
|
|
195
|
+
* Enrollment ID; generated by GovAPI if omitted.
|
|
196
|
+
*/
|
|
197
|
+
enrollmentId?: pulumi.Input<string | undefined>;
|
|
198
|
+
/**
|
|
199
|
+
* Last-seen timestamp (RFC3339).
|
|
200
|
+
*/
|
|
201
|
+
lastSeenAt?: pulumi.Input<string | undefined>;
|
|
202
|
+
/**
|
|
203
|
+
* Metadata JSON object.
|
|
204
|
+
*/
|
|
205
|
+
metadataJson?: pulumi.Input<string | undefined>;
|
|
206
|
+
/**
|
|
207
|
+
* Browser provider slug.
|
|
208
|
+
*/
|
|
209
|
+
providerName: pulumi.Input<string>;
|
|
210
|
+
/**
|
|
211
|
+
* Enrollment status (active, pending, disabled).
|
|
212
|
+
*/
|
|
213
|
+
status?: pulumi.Input<string | undefined>;
|
|
214
|
+
/**
|
|
215
|
+
* User identifier for enrollment.
|
|
216
|
+
*/
|
|
217
|
+
userId: pulumi.Input<string>;
|
|
218
|
+
}
|
package/browser/index.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as utilities from "../utilities";
|
|
6
|
+
|
|
7
|
+
// Export members:
|
|
8
|
+
export { EnrollmentArgs, EnrollmentState } from "./enrollment";
|
|
9
|
+
export type Enrollment = import("./enrollment").Enrollment;
|
|
10
|
+
export const Enrollment: typeof import("./enrollment").Enrollment = null as any;
|
|
11
|
+
utilities.lazyLoad(exports, ["Enrollment"], () => require("./enrollment"));
|
|
12
|
+
|
|
13
|
+
export { PolicyArgs, PolicyState } from "./policy";
|
|
14
|
+
export type Policy = import("./policy").Policy;
|
|
15
|
+
export const Policy: typeof import("./policy").Policy = null as any;
|
|
16
|
+
utilities.lazyLoad(exports, ["Policy"], () => require("./policy"));
|
|
17
|
+
|
|
18
|
+
export { ProviderArgs, ProviderState } from "./provider";
|
|
19
|
+
export type Provider = import("./provider").Provider;
|
|
20
|
+
export const Provider: typeof import("./provider").Provider = null as any;
|
|
21
|
+
utilities.lazyLoad(exports, ["Provider"], () => require("./provider"));
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
const _module = {
|
|
25
|
+
version: utilities.getVersion(),
|
|
26
|
+
construct: (name: string, type: string, urn: string): pulumi.Resource => {
|
|
27
|
+
switch (type) {
|
|
28
|
+
case "thoth:browser/enrollment:Enrollment":
|
|
29
|
+
return new Enrollment(name, <any>undefined, { urn })
|
|
30
|
+
case "thoth:browser/policy:Policy":
|
|
31
|
+
return new Policy(name, <any>undefined, { urn })
|
|
32
|
+
case "thoth:browser/provider:Provider":
|
|
33
|
+
return new Provider(name, <any>undefined, { urn })
|
|
34
|
+
default:
|
|
35
|
+
throw new Error(`unknown resource type ${type}`);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
pulumi.runtime.registerResourceModule("thoth", "browser/enrollment", _module)
|
|
40
|
+
pulumi.runtime.registerResourceModule("thoth", "browser/policy", _module)
|
|
41
|
+
pulumi.runtime.registerResourceModule("thoth", "browser/provider", _module)
|