@atensec/pulumi-thoth 0.1.4 → 0.1.6
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/billing/getCreditBank.ts +56 -0
- package/billing/getEstimate.ts +93 -0
- package/billing/getMonthlyCost.ts +11 -0
- package/billing/getPricing.ts +10 -0
- package/billing/index.ts +29 -0
- package/billing/overageCap.ts +174 -0
- package/governance/getEffectivePolicyBundles.ts +52 -0
- package/governance/getPackRuleVersions.ts +46 -0
- package/governance/getPackRules.ts +49 -0
- package/governance/getPolicyBundles.ts +62 -0
- package/governance/getTenantSettings.ts +1 -0
- package/governance/governanceSettings.ts +14 -0
- package/governance/index.ts +28 -0
- package/governance/packAssignment.ts +56 -0
- package/governance/packAssignmentBulk.ts +56 -0
- package/governance/policyBundle.ts +299 -0
- package/package.json +1 -1
- package/tsconfig.json +8 -0
|
@@ -0,0 +1,299 @@
|
|
|
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 PolicyBundle extends pulumi.CustomResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get an existing PolicyBundle 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?: PolicyBundleState, opts?: pulumi.CustomResourceOptions): PolicyBundle {
|
|
18
|
+
return new PolicyBundle(name, <any>state, { ...opts, id: id });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
public static readonly __pulumiType = 'thoth:governance/policyBundle:PolicyBundle';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns true if the given object is an instance of PolicyBundle. 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 PolicyBundle {
|
|
29
|
+
if (obj === undefined || obj === null) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return obj['__pulumiType'] === PolicyBundle.__pulumiType;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Assignment targets (for example: all, agent:security-analyst-agent, coding-agent). Defaults to all.
|
|
37
|
+
*/
|
|
38
|
+
declare public readonly assignments: pulumi.Output<string[] | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Creation timestamp.
|
|
41
|
+
*/
|
|
42
|
+
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Creator identity.
|
|
45
|
+
*/
|
|
46
|
+
declare public /*out*/ readonly createdBy: pulumi.Output<string>;
|
|
47
|
+
/**
|
|
48
|
+
* Optional policy bundle description.
|
|
49
|
+
*/
|
|
50
|
+
declare public readonly description: pulumi.Output<string | undefined>;
|
|
51
|
+
/**
|
|
52
|
+
* Customer-facing policy mode: enforce or observe. Defaults to enforce.
|
|
53
|
+
*/
|
|
54
|
+
declare public readonly enforcementMode: pulumi.Output<string | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* Optional expected SHA-256 hash (hex or sha256:<hex>) to enforce policy integrity.
|
|
57
|
+
*/
|
|
58
|
+
declare public readonly expectedHash: pulumi.Output<string | undefined>;
|
|
59
|
+
/**
|
|
60
|
+
* Policy framework: OPA or CEDAR.
|
|
61
|
+
*/
|
|
62
|
+
declare public readonly framework: pulumi.Output<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Stable bundle name. Updates create a new version for the same name.
|
|
65
|
+
*/
|
|
66
|
+
declare public readonly name: pulumi.Output<string>;
|
|
67
|
+
/**
|
|
68
|
+
* SHA-256 hash of policy content.
|
|
69
|
+
*/
|
|
70
|
+
declare public /*out*/ readonly policyHash: pulumi.Output<string>;
|
|
71
|
+
/**
|
|
72
|
+
* Raw Rego/Cedar policy payload. Set this or source_uri/s3_uri.
|
|
73
|
+
*/
|
|
74
|
+
declare public readonly rawPolicy: pulumi.Output<string | undefined>;
|
|
75
|
+
/**
|
|
76
|
+
* Resolved immutable source version (S3 version ID or file revision hint).
|
|
77
|
+
*/
|
|
78
|
+
declare public /*out*/ readonly resolvedVersion: pulumi.Output<string>;
|
|
79
|
+
/**
|
|
80
|
+
* Legacy S3 source URI (for example: s3://bucket/path/policy.rego). Set this or raw_policy. Prefer source_uri.
|
|
81
|
+
*/
|
|
82
|
+
declare public readonly s3Uri: pulumi.Output<string | undefined>;
|
|
83
|
+
/**
|
|
84
|
+
* Optional S3 object version ID to pin deterministic policy enforcement.
|
|
85
|
+
*/
|
|
86
|
+
declare public readonly s3VersionId: pulumi.Output<string | undefined>;
|
|
87
|
+
/**
|
|
88
|
+
* Unified policy source URI (file:// or s3://). Set this or raw_policy.
|
|
89
|
+
*/
|
|
90
|
+
declare public readonly sourceUri: pulumi.Output<string | undefined>;
|
|
91
|
+
/**
|
|
92
|
+
* Bundle lifecycle status: active, staged, paused, or disabled (alias of paused).
|
|
93
|
+
*/
|
|
94
|
+
declare public readonly status: pulumi.Output<string | undefined>;
|
|
95
|
+
/**
|
|
96
|
+
* Tenant ID from provider configuration.
|
|
97
|
+
*/
|
|
98
|
+
declare public /*out*/ readonly tenantId: pulumi.Output<string>;
|
|
99
|
+
/**
|
|
100
|
+
* Last update timestamp.
|
|
101
|
+
*/
|
|
102
|
+
declare public /*out*/ readonly updatedAt: pulumi.Output<string>;
|
|
103
|
+
/**
|
|
104
|
+
* Monotonic policy bundle version.
|
|
105
|
+
*/
|
|
106
|
+
declare public /*out*/ readonly version: pulumi.Output<number>;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Create a PolicyBundle resource with the given unique name, arguments, and options.
|
|
110
|
+
*
|
|
111
|
+
* @param name The _unique_ name of the resource.
|
|
112
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
113
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
114
|
+
*/
|
|
115
|
+
constructor(name: string, args: PolicyBundleArgs, opts?: pulumi.CustomResourceOptions)
|
|
116
|
+
constructor(name: string, argsOrState?: PolicyBundleArgs | PolicyBundleState, opts?: pulumi.CustomResourceOptions) {
|
|
117
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
118
|
+
opts = opts || {};
|
|
119
|
+
if (opts.id) {
|
|
120
|
+
const state = argsOrState as PolicyBundleState | undefined;
|
|
121
|
+
resourceInputs["assignments"] = state?.assignments;
|
|
122
|
+
resourceInputs["createdAt"] = state?.createdAt;
|
|
123
|
+
resourceInputs["createdBy"] = state?.createdBy;
|
|
124
|
+
resourceInputs["description"] = state?.description;
|
|
125
|
+
resourceInputs["enforcementMode"] = state?.enforcementMode;
|
|
126
|
+
resourceInputs["expectedHash"] = state?.expectedHash;
|
|
127
|
+
resourceInputs["framework"] = state?.framework;
|
|
128
|
+
resourceInputs["name"] = state?.name;
|
|
129
|
+
resourceInputs["policyHash"] = state?.policyHash;
|
|
130
|
+
resourceInputs["rawPolicy"] = state?.rawPolicy;
|
|
131
|
+
resourceInputs["resolvedVersion"] = state?.resolvedVersion;
|
|
132
|
+
resourceInputs["s3Uri"] = state?.s3Uri;
|
|
133
|
+
resourceInputs["s3VersionId"] = state?.s3VersionId;
|
|
134
|
+
resourceInputs["sourceUri"] = state?.sourceUri;
|
|
135
|
+
resourceInputs["status"] = state?.status;
|
|
136
|
+
resourceInputs["tenantId"] = state?.tenantId;
|
|
137
|
+
resourceInputs["updatedAt"] = state?.updatedAt;
|
|
138
|
+
resourceInputs["version"] = state?.version;
|
|
139
|
+
} else {
|
|
140
|
+
const args = argsOrState as PolicyBundleArgs | undefined;
|
|
141
|
+
if (args?.framework === undefined && !opts.urn) {
|
|
142
|
+
throw new Error("Missing required property 'framework'");
|
|
143
|
+
}
|
|
144
|
+
if (args?.name === undefined && !opts.urn) {
|
|
145
|
+
throw new Error("Missing required property 'name'");
|
|
146
|
+
}
|
|
147
|
+
resourceInputs["assignments"] = args?.assignments;
|
|
148
|
+
resourceInputs["description"] = args?.description;
|
|
149
|
+
resourceInputs["enforcementMode"] = args?.enforcementMode;
|
|
150
|
+
resourceInputs["expectedHash"] = args?.expectedHash;
|
|
151
|
+
resourceInputs["framework"] = args?.framework;
|
|
152
|
+
resourceInputs["name"] = args?.name;
|
|
153
|
+
resourceInputs["rawPolicy"] = args?.rawPolicy ? pulumi.secret(args.rawPolicy) : undefined;
|
|
154
|
+
resourceInputs["s3Uri"] = args?.s3Uri;
|
|
155
|
+
resourceInputs["s3VersionId"] = args?.s3VersionId;
|
|
156
|
+
resourceInputs["sourceUri"] = args?.sourceUri;
|
|
157
|
+
resourceInputs["status"] = args?.status;
|
|
158
|
+
resourceInputs["createdAt"] = undefined /*out*/;
|
|
159
|
+
resourceInputs["createdBy"] = undefined /*out*/;
|
|
160
|
+
resourceInputs["policyHash"] = undefined /*out*/;
|
|
161
|
+
resourceInputs["resolvedVersion"] = undefined /*out*/;
|
|
162
|
+
resourceInputs["tenantId"] = undefined /*out*/;
|
|
163
|
+
resourceInputs["updatedAt"] = undefined /*out*/;
|
|
164
|
+
resourceInputs["version"] = undefined /*out*/;
|
|
165
|
+
}
|
|
166
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
167
|
+
const secretOpts = { additionalSecretOutputs: ["rawPolicy"] };
|
|
168
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
169
|
+
super(PolicyBundle.__pulumiType, name, resourceInputs, opts);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Input properties used for looking up and filtering PolicyBundle resources.
|
|
175
|
+
*/
|
|
176
|
+
export interface PolicyBundleState {
|
|
177
|
+
/**
|
|
178
|
+
* Assignment targets (for example: all, agent:security-analyst-agent, coding-agent). Defaults to all.
|
|
179
|
+
*/
|
|
180
|
+
assignments?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
181
|
+
/**
|
|
182
|
+
* Creation timestamp.
|
|
183
|
+
*/
|
|
184
|
+
createdAt?: pulumi.Input<string | undefined>;
|
|
185
|
+
/**
|
|
186
|
+
* Creator identity.
|
|
187
|
+
*/
|
|
188
|
+
createdBy?: pulumi.Input<string | undefined>;
|
|
189
|
+
/**
|
|
190
|
+
* Optional policy bundle description.
|
|
191
|
+
*/
|
|
192
|
+
description?: pulumi.Input<string | undefined>;
|
|
193
|
+
/**
|
|
194
|
+
* Customer-facing policy mode: enforce or observe. Defaults to enforce.
|
|
195
|
+
*/
|
|
196
|
+
enforcementMode?: pulumi.Input<string | undefined>;
|
|
197
|
+
/**
|
|
198
|
+
* Optional expected SHA-256 hash (hex or sha256:<hex>) to enforce policy integrity.
|
|
199
|
+
*/
|
|
200
|
+
expectedHash?: pulumi.Input<string | undefined>;
|
|
201
|
+
/**
|
|
202
|
+
* Policy framework: OPA or CEDAR.
|
|
203
|
+
*/
|
|
204
|
+
framework?: pulumi.Input<string | undefined>;
|
|
205
|
+
/**
|
|
206
|
+
* Stable bundle name. Updates create a new version for the same name.
|
|
207
|
+
*/
|
|
208
|
+
name?: pulumi.Input<string | undefined>;
|
|
209
|
+
/**
|
|
210
|
+
* SHA-256 hash of policy content.
|
|
211
|
+
*/
|
|
212
|
+
policyHash?: pulumi.Input<string | undefined>;
|
|
213
|
+
/**
|
|
214
|
+
* Raw Rego/Cedar policy payload. Set this or source_uri/s3_uri.
|
|
215
|
+
*/
|
|
216
|
+
rawPolicy?: pulumi.Input<string | undefined>;
|
|
217
|
+
/**
|
|
218
|
+
* Resolved immutable source version (S3 version ID or file revision hint).
|
|
219
|
+
*/
|
|
220
|
+
resolvedVersion?: pulumi.Input<string | undefined>;
|
|
221
|
+
/**
|
|
222
|
+
* Legacy S3 source URI (for example: s3://bucket/path/policy.rego). Set this or raw_policy. Prefer source_uri.
|
|
223
|
+
*/
|
|
224
|
+
s3Uri?: pulumi.Input<string | undefined>;
|
|
225
|
+
/**
|
|
226
|
+
* Optional S3 object version ID to pin deterministic policy enforcement.
|
|
227
|
+
*/
|
|
228
|
+
s3VersionId?: pulumi.Input<string | undefined>;
|
|
229
|
+
/**
|
|
230
|
+
* Unified policy source URI (file:// or s3://). Set this or raw_policy.
|
|
231
|
+
*/
|
|
232
|
+
sourceUri?: pulumi.Input<string | undefined>;
|
|
233
|
+
/**
|
|
234
|
+
* Bundle lifecycle status: active, staged, paused, or disabled (alias of paused).
|
|
235
|
+
*/
|
|
236
|
+
status?: pulumi.Input<string | undefined>;
|
|
237
|
+
/**
|
|
238
|
+
* Tenant ID from provider configuration.
|
|
239
|
+
*/
|
|
240
|
+
tenantId?: pulumi.Input<string | undefined>;
|
|
241
|
+
/**
|
|
242
|
+
* Last update timestamp.
|
|
243
|
+
*/
|
|
244
|
+
updatedAt?: pulumi.Input<string | undefined>;
|
|
245
|
+
/**
|
|
246
|
+
* Monotonic policy bundle version.
|
|
247
|
+
*/
|
|
248
|
+
version?: pulumi.Input<number | undefined>;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* The set of arguments for constructing a PolicyBundle resource.
|
|
253
|
+
*/
|
|
254
|
+
export interface PolicyBundleArgs {
|
|
255
|
+
/**
|
|
256
|
+
* Assignment targets (for example: all, agent:security-analyst-agent, coding-agent). Defaults to all.
|
|
257
|
+
*/
|
|
258
|
+
assignments?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
259
|
+
/**
|
|
260
|
+
* Optional policy bundle description.
|
|
261
|
+
*/
|
|
262
|
+
description?: pulumi.Input<string | undefined>;
|
|
263
|
+
/**
|
|
264
|
+
* Customer-facing policy mode: enforce or observe. Defaults to enforce.
|
|
265
|
+
*/
|
|
266
|
+
enforcementMode?: pulumi.Input<string | undefined>;
|
|
267
|
+
/**
|
|
268
|
+
* Optional expected SHA-256 hash (hex or sha256:<hex>) to enforce policy integrity.
|
|
269
|
+
*/
|
|
270
|
+
expectedHash?: pulumi.Input<string | undefined>;
|
|
271
|
+
/**
|
|
272
|
+
* Policy framework: OPA or CEDAR.
|
|
273
|
+
*/
|
|
274
|
+
framework: pulumi.Input<string>;
|
|
275
|
+
/**
|
|
276
|
+
* Stable bundle name. Updates create a new version for the same name.
|
|
277
|
+
*/
|
|
278
|
+
name: pulumi.Input<string>;
|
|
279
|
+
/**
|
|
280
|
+
* Raw Rego/Cedar policy payload. Set this or source_uri/s3_uri.
|
|
281
|
+
*/
|
|
282
|
+
rawPolicy?: pulumi.Input<string | undefined>;
|
|
283
|
+
/**
|
|
284
|
+
* Legacy S3 source URI (for example: s3://bucket/path/policy.rego). Set this or raw_policy. Prefer source_uri.
|
|
285
|
+
*/
|
|
286
|
+
s3Uri?: pulumi.Input<string | undefined>;
|
|
287
|
+
/**
|
|
288
|
+
* Optional S3 object version ID to pin deterministic policy enforcement.
|
|
289
|
+
*/
|
|
290
|
+
s3VersionId?: pulumi.Input<string | undefined>;
|
|
291
|
+
/**
|
|
292
|
+
* Unified policy source URI (file:// or s3://). Set this or raw_policy.
|
|
293
|
+
*/
|
|
294
|
+
sourceUri?: pulumi.Input<string | undefined>;
|
|
295
|
+
/**
|
|
296
|
+
* Bundle lifecycle status: active, staged, paused, or disabled (alias of paused).
|
|
297
|
+
*/
|
|
298
|
+
status?: pulumi.Input<string | undefined>;
|
|
299
|
+
}
|
package/package.json
CHANGED
package/tsconfig.json
CHANGED
|
@@ -26,12 +26,15 @@
|
|
|
26
26
|
"access/getApiKeyMetrics.ts",
|
|
27
27
|
"access/getApiKeys.ts",
|
|
28
28
|
"access/index.ts",
|
|
29
|
+
"billing/getCreditBank.ts",
|
|
30
|
+
"billing/getEstimate.ts",
|
|
29
31
|
"billing/getInvoices.ts",
|
|
30
32
|
"billing/getMonthlyCost.ts",
|
|
31
33
|
"billing/getPricing.ts",
|
|
32
34
|
"billing/getReport.ts",
|
|
33
35
|
"billing/getReports.ts",
|
|
34
36
|
"billing/index.ts",
|
|
37
|
+
"billing/overageCap.ts",
|
|
35
38
|
"browser/enrollment.ts",
|
|
36
39
|
"browser/getEnrollments.ts",
|
|
37
40
|
"browser/getPolicies.ts",
|
|
@@ -53,12 +56,16 @@
|
|
|
53
56
|
"governance/getApprovals.ts",
|
|
54
57
|
"governance/getCostReport.ts",
|
|
55
58
|
"governance/getDay7Report.ts",
|
|
59
|
+
"governance/getEffectivePolicyBundles.ts",
|
|
56
60
|
"governance/getEvidenceBundle.ts",
|
|
57
61
|
"governance/getEvidenceChain.ts",
|
|
58
62
|
"governance/getEvidenceSlos.ts",
|
|
59
63
|
"governance/getEvidenceVerify.ts",
|
|
60
64
|
"governance/getFeed.ts",
|
|
65
|
+
"governance/getPackRuleVersions.ts",
|
|
66
|
+
"governance/getPackRules.ts",
|
|
61
67
|
"governance/getPacks.ts",
|
|
68
|
+
"governance/getPolicyBundles.ts",
|
|
62
69
|
"governance/getReportsOverview.ts",
|
|
63
70
|
"governance/getRuntimeStatus.ts",
|
|
64
71
|
"governance/getTenantSettings.ts",
|
|
@@ -68,6 +75,7 @@
|
|
|
68
75
|
"governance/packAssignment.ts",
|
|
69
76
|
"governance/packAssignmentBulk.ts",
|
|
70
77
|
"governance/pamSettings.ts",
|
|
78
|
+
"governance/policyBundle.ts",
|
|
71
79
|
"governance/policySync.ts",
|
|
72
80
|
"governance/siemSettings.ts",
|
|
73
81
|
"governance/webhookSettings.ts",
|