@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
|
@@ -0,0 +1,141 @@
|
|
|
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 ApprovalDecision extends pulumi.CustomResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get an existing ApprovalDecision 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?: ApprovalDecisionState, opts?: pulumi.CustomResourceOptions): ApprovalDecision {
|
|
18
|
+
return new ApprovalDecision(name, <any>state, { ...opts, id: id });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
public static readonly __pulumiType = 'thoth:governance/approvalDecision:ApprovalDecision';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns true if the given object is an instance of ApprovalDecision. 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 ApprovalDecision {
|
|
29
|
+
if (obj === undefined || obj === null) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return obj['__pulumiType'] === ApprovalDecision.__pulumiType;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Approval ID to resolve.
|
|
37
|
+
*/
|
|
38
|
+
declare public readonly approvalId: pulumi.Output<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Decision value: approve or deny.
|
|
41
|
+
*/
|
|
42
|
+
declare public readonly decision: pulumi.Output<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Observed approval reason.
|
|
45
|
+
*/
|
|
46
|
+
declare public /*out*/ readonly reason: pulumi.Output<string>;
|
|
47
|
+
/**
|
|
48
|
+
* Resolver identity returned by GovAPI.
|
|
49
|
+
*/
|
|
50
|
+
declare public /*out*/ readonly resolvedBy: pulumi.Output<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Observed approval status from approvals list endpoint.
|
|
53
|
+
*/
|
|
54
|
+
declare public /*out*/ readonly status: pulumi.Output<string>;
|
|
55
|
+
/**
|
|
56
|
+
* Tenant ID from provider configuration.
|
|
57
|
+
*/
|
|
58
|
+
declare public /*out*/ readonly tenantId: pulumi.Output<string>;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Create a ApprovalDecision resource with the given unique name, arguments, and options.
|
|
62
|
+
*
|
|
63
|
+
* @param name The _unique_ name of the resource.
|
|
64
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
65
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
66
|
+
*/
|
|
67
|
+
constructor(name: string, args: ApprovalDecisionArgs, opts?: pulumi.CustomResourceOptions)
|
|
68
|
+
constructor(name: string, argsOrState?: ApprovalDecisionArgs | ApprovalDecisionState, opts?: pulumi.CustomResourceOptions) {
|
|
69
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
70
|
+
opts = opts || {};
|
|
71
|
+
if (opts.id) {
|
|
72
|
+
const state = argsOrState as ApprovalDecisionState | undefined;
|
|
73
|
+
resourceInputs["approvalId"] = state?.approvalId;
|
|
74
|
+
resourceInputs["decision"] = state?.decision;
|
|
75
|
+
resourceInputs["reason"] = state?.reason;
|
|
76
|
+
resourceInputs["resolvedBy"] = state?.resolvedBy;
|
|
77
|
+
resourceInputs["status"] = state?.status;
|
|
78
|
+
resourceInputs["tenantId"] = state?.tenantId;
|
|
79
|
+
} else {
|
|
80
|
+
const args = argsOrState as ApprovalDecisionArgs | undefined;
|
|
81
|
+
if (args?.approvalId === undefined && !opts.urn) {
|
|
82
|
+
throw new Error("Missing required property 'approvalId'");
|
|
83
|
+
}
|
|
84
|
+
if (args?.decision === undefined && !opts.urn) {
|
|
85
|
+
throw new Error("Missing required property 'decision'");
|
|
86
|
+
}
|
|
87
|
+
resourceInputs["approvalId"] = args?.approvalId;
|
|
88
|
+
resourceInputs["decision"] = args?.decision;
|
|
89
|
+
resourceInputs["reason"] = undefined /*out*/;
|
|
90
|
+
resourceInputs["resolvedBy"] = undefined /*out*/;
|
|
91
|
+
resourceInputs["status"] = undefined /*out*/;
|
|
92
|
+
resourceInputs["tenantId"] = undefined /*out*/;
|
|
93
|
+
}
|
|
94
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
95
|
+
super(ApprovalDecision.__pulumiType, name, resourceInputs, opts);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Input properties used for looking up and filtering ApprovalDecision resources.
|
|
101
|
+
*/
|
|
102
|
+
export interface ApprovalDecisionState {
|
|
103
|
+
/**
|
|
104
|
+
* Approval ID to resolve.
|
|
105
|
+
*/
|
|
106
|
+
approvalId?: pulumi.Input<string | undefined>;
|
|
107
|
+
/**
|
|
108
|
+
* Decision value: approve or deny.
|
|
109
|
+
*/
|
|
110
|
+
decision?: pulumi.Input<string | undefined>;
|
|
111
|
+
/**
|
|
112
|
+
* Observed approval reason.
|
|
113
|
+
*/
|
|
114
|
+
reason?: pulumi.Input<string | undefined>;
|
|
115
|
+
/**
|
|
116
|
+
* Resolver identity returned by GovAPI.
|
|
117
|
+
*/
|
|
118
|
+
resolvedBy?: pulumi.Input<string | undefined>;
|
|
119
|
+
/**
|
|
120
|
+
* Observed approval status from approvals list endpoint.
|
|
121
|
+
*/
|
|
122
|
+
status?: pulumi.Input<string | undefined>;
|
|
123
|
+
/**
|
|
124
|
+
* Tenant ID from provider configuration.
|
|
125
|
+
*/
|
|
126
|
+
tenantId?: pulumi.Input<string | undefined>;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The set of arguments for constructing a ApprovalDecision resource.
|
|
131
|
+
*/
|
|
132
|
+
export interface ApprovalDecisionArgs {
|
|
133
|
+
/**
|
|
134
|
+
* Approval ID to resolve.
|
|
135
|
+
*/
|
|
136
|
+
approvalId: pulumi.Input<string>;
|
|
137
|
+
/**
|
|
138
|
+
* Decision value: approve or deny.
|
|
139
|
+
*/
|
|
140
|
+
decision: pulumi.Input<string>;
|
|
141
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
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 getFeed(args?: GetFeedArgs, opts?: pulumi.InvokeOptions): Promise<GetFeedResult> {
|
|
8
|
+
args = args || {};
|
|
9
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
10
|
+
return pulumi.runtime.invoke("thoth:governance/getFeed:getFeed", {
|
|
11
|
+
"agentId": args.agentId,
|
|
12
|
+
"callerAgentId": args.callerAgentId,
|
|
13
|
+
"decision": args.decision,
|
|
14
|
+
"from": args.from,
|
|
15
|
+
"page": args.page,
|
|
16
|
+
"perPage": args.perPage,
|
|
17
|
+
"reasonCode": args.reasonCode,
|
|
18
|
+
"search": args.search,
|
|
19
|
+
"sortBy": args.sortBy,
|
|
20
|
+
"sortDir": args.sortDir,
|
|
21
|
+
"to": args.to,
|
|
22
|
+
"toolName": args.toolName,
|
|
23
|
+
}, opts);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A collection of arguments for invoking getFeed.
|
|
28
|
+
*/
|
|
29
|
+
export interface GetFeedArgs {
|
|
30
|
+
agentId?: string;
|
|
31
|
+
callerAgentId?: string;
|
|
32
|
+
decision?: string;
|
|
33
|
+
from?: string;
|
|
34
|
+
page?: number;
|
|
35
|
+
perPage?: number;
|
|
36
|
+
reasonCode?: string;
|
|
37
|
+
search?: string;
|
|
38
|
+
sortBy?: string;
|
|
39
|
+
sortDir?: string;
|
|
40
|
+
to?: string;
|
|
41
|
+
toolName?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A collection of values returned by getFeed.
|
|
46
|
+
*/
|
|
47
|
+
export interface GetFeedResult {
|
|
48
|
+
readonly agentId?: string;
|
|
49
|
+
readonly callerAgentId?: string;
|
|
50
|
+
readonly dataJson: string;
|
|
51
|
+
readonly decision?: string;
|
|
52
|
+
readonly from?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The provider-assigned unique ID for this managed resource.
|
|
55
|
+
*/
|
|
56
|
+
readonly id: string;
|
|
57
|
+
readonly page?: number;
|
|
58
|
+
readonly perPage?: number;
|
|
59
|
+
readonly reasonCode?: string;
|
|
60
|
+
readonly search?: string;
|
|
61
|
+
readonly sortBy?: string;
|
|
62
|
+
readonly sortDir?: string;
|
|
63
|
+
readonly to?: string;
|
|
64
|
+
readonly toolName?: string;
|
|
65
|
+
readonly total: number;
|
|
66
|
+
}
|
|
67
|
+
export function getFeedOutput(args?: GetFeedOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetFeedResult> {
|
|
68
|
+
args = args || {};
|
|
69
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
70
|
+
return pulumi.runtime.invokeOutput("thoth:governance/getFeed:getFeed", {
|
|
71
|
+
"agentId": args.agentId,
|
|
72
|
+
"callerAgentId": args.callerAgentId,
|
|
73
|
+
"decision": args.decision,
|
|
74
|
+
"from": args.from,
|
|
75
|
+
"page": args.page,
|
|
76
|
+
"perPage": args.perPage,
|
|
77
|
+
"reasonCode": args.reasonCode,
|
|
78
|
+
"search": args.search,
|
|
79
|
+
"sortBy": args.sortBy,
|
|
80
|
+
"sortDir": args.sortDir,
|
|
81
|
+
"to": args.to,
|
|
82
|
+
"toolName": args.toolName,
|
|
83
|
+
}, opts);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* A collection of arguments for invoking getFeed.
|
|
88
|
+
*/
|
|
89
|
+
export interface GetFeedOutputArgs {
|
|
90
|
+
agentId?: pulumi.Input<string | undefined>;
|
|
91
|
+
callerAgentId?: pulumi.Input<string | undefined>;
|
|
92
|
+
decision?: pulumi.Input<string | undefined>;
|
|
93
|
+
from?: pulumi.Input<string | undefined>;
|
|
94
|
+
page?: pulumi.Input<number | undefined>;
|
|
95
|
+
perPage?: pulumi.Input<number | undefined>;
|
|
96
|
+
reasonCode?: pulumi.Input<string | undefined>;
|
|
97
|
+
search?: pulumi.Input<string | undefined>;
|
|
98
|
+
sortBy?: pulumi.Input<string | undefined>;
|
|
99
|
+
sortDir?: pulumi.Input<string | undefined>;
|
|
100
|
+
to?: pulumi.Input<string | undefined>;
|
|
101
|
+
toolName?: pulumi.Input<string | undefined>;
|
|
102
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 getTenantSettings(opts?: pulumi.InvokeOptions): Promise<GetTenantSettingsResult> {
|
|
8
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
9
|
+
return pulumi.runtime.invoke("thoth:governance/getTenantSettings:getTenantSettings", {
|
|
10
|
+
}, opts);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A collection of values returned by getTenantSettings.
|
|
15
|
+
*/
|
|
16
|
+
export interface GetTenantSettingsResult {
|
|
17
|
+
readonly complianceProfile: string;
|
|
18
|
+
/**
|
|
19
|
+
* The provider-assigned unique ID for this managed resource.
|
|
20
|
+
*/
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly settingsJson: string;
|
|
23
|
+
readonly tenantId: string;
|
|
24
|
+
readonly toolRiskOverrides: {[key: string]: string};
|
|
25
|
+
readonly updatedAt: string;
|
|
26
|
+
readonly webhookEnabled: boolean;
|
|
27
|
+
readonly webhookUrl: string;
|
|
28
|
+
}
|
|
29
|
+
export function getTenantSettingsOutput(opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetTenantSettingsResult> {
|
|
30
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
31
|
+
return pulumi.runtime.invokeOutput("thoth:governance/getTenantSettings:getTenantSettings", {
|
|
32
|
+
}, opts);
|
|
33
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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 getTools(args?: GetToolsArgs, opts?: pulumi.InvokeOptions): Promise<GetToolsResult> {
|
|
8
|
+
args = args || {};
|
|
9
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
10
|
+
return pulumi.runtime.invoke("thoth:governance/getTools:getTools", {
|
|
11
|
+
"limit": args.limit,
|
|
12
|
+
"windowHours": args.windowHours,
|
|
13
|
+
}, opts);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A collection of arguments for invoking getTools.
|
|
18
|
+
*/
|
|
19
|
+
export interface GetToolsArgs {
|
|
20
|
+
limit?: number;
|
|
21
|
+
windowHours?: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A collection of values returned by getTools.
|
|
26
|
+
*/
|
|
27
|
+
export interface GetToolsResult {
|
|
28
|
+
readonly dataJson: string;
|
|
29
|
+
/**
|
|
30
|
+
* The provider-assigned unique ID for this managed resource.
|
|
31
|
+
*/
|
|
32
|
+
readonly id: string;
|
|
33
|
+
readonly limit?: number;
|
|
34
|
+
readonly total: number;
|
|
35
|
+
readonly windowHours?: number;
|
|
36
|
+
}
|
|
37
|
+
export function getToolsOutput(args?: GetToolsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetToolsResult> {
|
|
38
|
+
args = args || {};
|
|
39
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
40
|
+
return pulumi.runtime.invokeOutput("thoth:governance/getTools:getTools", {
|
|
41
|
+
"limit": args.limit,
|
|
42
|
+
"windowHours": args.windowHours,
|
|
43
|
+
}, opts);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A collection of arguments for invoking getTools.
|
|
48
|
+
*/
|
|
49
|
+
export interface GetToolsOutputArgs {
|
|
50
|
+
limit?: pulumi.Input<number | undefined>;
|
|
51
|
+
windowHours?: pulumi.Input<number | undefined>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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 { ApprovalDecisionArgs, ApprovalDecisionState } from "./approvalDecision";
|
|
9
|
+
export type ApprovalDecision = import("./approvalDecision").ApprovalDecision;
|
|
10
|
+
export const ApprovalDecision: typeof import("./approvalDecision").ApprovalDecision = null as any;
|
|
11
|
+
utilities.lazyLoad(exports, ["ApprovalDecision"], () => require("./approvalDecision"));
|
|
12
|
+
|
|
13
|
+
export { GetFeedArgs, GetFeedResult, GetFeedOutputArgs } from "./getFeed";
|
|
14
|
+
export const getFeed: typeof import("./getFeed").getFeed = null as any;
|
|
15
|
+
export const getFeedOutput: typeof import("./getFeed").getFeedOutput = null as any;
|
|
16
|
+
utilities.lazyLoad(exports, ["getFeed","getFeedOutput"], () => require("./getFeed"));
|
|
17
|
+
|
|
18
|
+
export { GetTenantSettingsResult } from "./getTenantSettings";
|
|
19
|
+
export const getTenantSettings: typeof import("./getTenantSettings").getTenantSettings = null as any;
|
|
20
|
+
export const getTenantSettingsOutput: typeof import("./getTenantSettings").getTenantSettingsOutput = null as any;
|
|
21
|
+
utilities.lazyLoad(exports, ["getTenantSettings","getTenantSettingsOutput"], () => require("./getTenantSettings"));
|
|
22
|
+
|
|
23
|
+
export { GetToolsArgs, GetToolsResult, GetToolsOutputArgs } from "./getTools";
|
|
24
|
+
export const getTools: typeof import("./getTools").getTools = null as any;
|
|
25
|
+
export const getToolsOutput: typeof import("./getTools").getToolsOutput = null as any;
|
|
26
|
+
utilities.lazyLoad(exports, ["getTools","getToolsOutput"], () => require("./getTools"));
|
|
27
|
+
|
|
28
|
+
export { PackAssignmentArgs, PackAssignmentState } from "./packAssignment";
|
|
29
|
+
export type PackAssignment = import("./packAssignment").PackAssignment;
|
|
30
|
+
export const PackAssignment: typeof import("./packAssignment").PackAssignment = null as any;
|
|
31
|
+
utilities.lazyLoad(exports, ["PackAssignment"], () => require("./packAssignment"));
|
|
32
|
+
|
|
33
|
+
export { PolicySyncArgs, PolicySyncState } from "./policySync";
|
|
34
|
+
export type PolicySync = import("./policySync").PolicySync;
|
|
35
|
+
export const PolicySync: typeof import("./policySync").PolicySync = null as any;
|
|
36
|
+
utilities.lazyLoad(exports, ["PolicySync"], () => require("./policySync"));
|
|
37
|
+
|
|
38
|
+
export { TenantSettingsArgs, TenantSettingsState } from "./tenantSettings";
|
|
39
|
+
export type TenantSettings = import("./tenantSettings").TenantSettings;
|
|
40
|
+
export const TenantSettings: typeof import("./tenantSettings").TenantSettings = null as any;
|
|
41
|
+
utilities.lazyLoad(exports, ["TenantSettings"], () => require("./tenantSettings"));
|
|
42
|
+
|
|
43
|
+
export { WebhookTestArgs, WebhookTestState } from "./webhookTest";
|
|
44
|
+
export type WebhookTest = import("./webhookTest").WebhookTest;
|
|
45
|
+
export const WebhookTest: typeof import("./webhookTest").WebhookTest = null as any;
|
|
46
|
+
utilities.lazyLoad(exports, ["WebhookTest"], () => require("./webhookTest"));
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
const _module = {
|
|
50
|
+
version: utilities.getVersion(),
|
|
51
|
+
construct: (name: string, type: string, urn: string): pulumi.Resource => {
|
|
52
|
+
switch (type) {
|
|
53
|
+
case "thoth:governance/approvalDecision:ApprovalDecision":
|
|
54
|
+
return new ApprovalDecision(name, <any>undefined, { urn })
|
|
55
|
+
case "thoth:governance/packAssignment:PackAssignment":
|
|
56
|
+
return new PackAssignment(name, <any>undefined, { urn })
|
|
57
|
+
case "thoth:governance/policySync:PolicySync":
|
|
58
|
+
return new PolicySync(name, <any>undefined, { urn })
|
|
59
|
+
case "thoth:governance/tenantSettings:TenantSettings":
|
|
60
|
+
return new TenantSettings(name, <any>undefined, { urn })
|
|
61
|
+
case "thoth:governance/webhookTest:WebhookTest":
|
|
62
|
+
return new WebhookTest(name, <any>undefined, { urn })
|
|
63
|
+
default:
|
|
64
|
+
throw new Error(`unknown resource type ${type}`);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
pulumi.runtime.registerResourceModule("thoth", "governance/approvalDecision", _module)
|
|
69
|
+
pulumi.runtime.registerResourceModule("thoth", "governance/packAssignment", _module)
|
|
70
|
+
pulumi.runtime.registerResourceModule("thoth", "governance/policySync", _module)
|
|
71
|
+
pulumi.runtime.registerResourceModule("thoth", "governance/tenantSettings", _module)
|
|
72
|
+
pulumi.runtime.registerResourceModule("thoth", "governance/webhookTest", _module)
|
|
@@ -0,0 +1,213 @@
|
|
|
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 PackAssignment extends pulumi.CustomResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get an existing PackAssignment 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?: PackAssignmentState, opts?: pulumi.CustomResourceOptions): PackAssignment {
|
|
18
|
+
return new PackAssignment(name, <any>state, { ...opts, id: id });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
public static readonly __pulumiType = 'thoth:governance/packAssignment:PackAssignment';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns true if the given object is an instance of PackAssignment. 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 PackAssignment {
|
|
29
|
+
if (obj === undefined || obj === null) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return obj['__pulumiType'] === PackAssignment.__pulumiType;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Target agent ID.
|
|
37
|
+
*/
|
|
38
|
+
declare public readonly agentId: pulumi.Output<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Apply timestamp.
|
|
41
|
+
*/
|
|
42
|
+
declare public /*out*/ readonly appliedAt: pulumi.Output<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Principal that applied the pack.
|
|
45
|
+
*/
|
|
46
|
+
declare public /*out*/ readonly appliedBy: pulumi.Output<string>;
|
|
47
|
+
/**
|
|
48
|
+
* Approval policy ID for pack application.
|
|
49
|
+
*/
|
|
50
|
+
declare public readonly approvalPolicyId: pulumi.Output<string | undefined>;
|
|
51
|
+
/**
|
|
52
|
+
* Environment: dev or prod.
|
|
53
|
+
*/
|
|
54
|
+
declare public readonly environment: pulumi.Output<string | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* Pack override JSON object.
|
|
57
|
+
*/
|
|
58
|
+
declare public readonly overridesJson: pulumi.Output<string | undefined>;
|
|
59
|
+
/**
|
|
60
|
+
* Compliance pack identifier.
|
|
61
|
+
*/
|
|
62
|
+
declare public readonly packId: pulumi.Output<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Regulation family for applied pack.
|
|
65
|
+
*/
|
|
66
|
+
declare public /*out*/ readonly regulation: pulumi.Output<string>;
|
|
67
|
+
/**
|
|
68
|
+
* Revoke timestamp when assignment is removed.
|
|
69
|
+
*/
|
|
70
|
+
declare public /*out*/ readonly revokedAt: pulumi.Output<string>;
|
|
71
|
+
/**
|
|
72
|
+
* Rule version applied by enforcer.
|
|
73
|
+
*/
|
|
74
|
+
declare public /*out*/ readonly ruleVersion: pulumi.Output<number>;
|
|
75
|
+
/**
|
|
76
|
+
* Current assignment status.
|
|
77
|
+
*/
|
|
78
|
+
declare public /*out*/ readonly status: pulumi.Output<string>;
|
|
79
|
+
/**
|
|
80
|
+
* Tenant ID from provider configuration.
|
|
81
|
+
*/
|
|
82
|
+
declare public /*out*/ readonly tenantId: pulumi.Output<string>;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Create a PackAssignment resource with the given unique name, arguments, and options.
|
|
86
|
+
*
|
|
87
|
+
* @param name The _unique_ name of the resource.
|
|
88
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
89
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
90
|
+
*/
|
|
91
|
+
constructor(name: string, args: PackAssignmentArgs, opts?: pulumi.CustomResourceOptions)
|
|
92
|
+
constructor(name: string, argsOrState?: PackAssignmentArgs | PackAssignmentState, opts?: pulumi.CustomResourceOptions) {
|
|
93
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
94
|
+
opts = opts || {};
|
|
95
|
+
if (opts.id) {
|
|
96
|
+
const state = argsOrState as PackAssignmentState | undefined;
|
|
97
|
+
resourceInputs["agentId"] = state?.agentId;
|
|
98
|
+
resourceInputs["appliedAt"] = state?.appliedAt;
|
|
99
|
+
resourceInputs["appliedBy"] = state?.appliedBy;
|
|
100
|
+
resourceInputs["approvalPolicyId"] = state?.approvalPolicyId;
|
|
101
|
+
resourceInputs["environment"] = state?.environment;
|
|
102
|
+
resourceInputs["overridesJson"] = state?.overridesJson;
|
|
103
|
+
resourceInputs["packId"] = state?.packId;
|
|
104
|
+
resourceInputs["regulation"] = state?.regulation;
|
|
105
|
+
resourceInputs["revokedAt"] = state?.revokedAt;
|
|
106
|
+
resourceInputs["ruleVersion"] = state?.ruleVersion;
|
|
107
|
+
resourceInputs["status"] = state?.status;
|
|
108
|
+
resourceInputs["tenantId"] = state?.tenantId;
|
|
109
|
+
} else {
|
|
110
|
+
const args = argsOrState as PackAssignmentArgs | undefined;
|
|
111
|
+
if (args?.agentId === undefined && !opts.urn) {
|
|
112
|
+
throw new Error("Missing required property 'agentId'");
|
|
113
|
+
}
|
|
114
|
+
if (args?.packId === undefined && !opts.urn) {
|
|
115
|
+
throw new Error("Missing required property 'packId'");
|
|
116
|
+
}
|
|
117
|
+
resourceInputs["agentId"] = args?.agentId;
|
|
118
|
+
resourceInputs["approvalPolicyId"] = args?.approvalPolicyId;
|
|
119
|
+
resourceInputs["environment"] = args?.environment;
|
|
120
|
+
resourceInputs["overridesJson"] = args?.overridesJson;
|
|
121
|
+
resourceInputs["packId"] = args?.packId;
|
|
122
|
+
resourceInputs["appliedAt"] = undefined /*out*/;
|
|
123
|
+
resourceInputs["appliedBy"] = undefined /*out*/;
|
|
124
|
+
resourceInputs["regulation"] = undefined /*out*/;
|
|
125
|
+
resourceInputs["revokedAt"] = undefined /*out*/;
|
|
126
|
+
resourceInputs["ruleVersion"] = undefined /*out*/;
|
|
127
|
+
resourceInputs["status"] = undefined /*out*/;
|
|
128
|
+
resourceInputs["tenantId"] = undefined /*out*/;
|
|
129
|
+
}
|
|
130
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
131
|
+
super(PackAssignment.__pulumiType, name, resourceInputs, opts);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Input properties used for looking up and filtering PackAssignment resources.
|
|
137
|
+
*/
|
|
138
|
+
export interface PackAssignmentState {
|
|
139
|
+
/**
|
|
140
|
+
* Target agent ID.
|
|
141
|
+
*/
|
|
142
|
+
agentId?: pulumi.Input<string | undefined>;
|
|
143
|
+
/**
|
|
144
|
+
* Apply timestamp.
|
|
145
|
+
*/
|
|
146
|
+
appliedAt?: pulumi.Input<string | undefined>;
|
|
147
|
+
/**
|
|
148
|
+
* Principal that applied the pack.
|
|
149
|
+
*/
|
|
150
|
+
appliedBy?: pulumi.Input<string | undefined>;
|
|
151
|
+
/**
|
|
152
|
+
* Approval policy ID for pack application.
|
|
153
|
+
*/
|
|
154
|
+
approvalPolicyId?: pulumi.Input<string | undefined>;
|
|
155
|
+
/**
|
|
156
|
+
* Environment: dev or prod.
|
|
157
|
+
*/
|
|
158
|
+
environment?: pulumi.Input<string | undefined>;
|
|
159
|
+
/**
|
|
160
|
+
* Pack override JSON object.
|
|
161
|
+
*/
|
|
162
|
+
overridesJson?: pulumi.Input<string | undefined>;
|
|
163
|
+
/**
|
|
164
|
+
* Compliance pack identifier.
|
|
165
|
+
*/
|
|
166
|
+
packId?: pulumi.Input<string | undefined>;
|
|
167
|
+
/**
|
|
168
|
+
* Regulation family for applied pack.
|
|
169
|
+
*/
|
|
170
|
+
regulation?: pulumi.Input<string | undefined>;
|
|
171
|
+
/**
|
|
172
|
+
* Revoke timestamp when assignment is removed.
|
|
173
|
+
*/
|
|
174
|
+
revokedAt?: pulumi.Input<string | undefined>;
|
|
175
|
+
/**
|
|
176
|
+
* Rule version applied by enforcer.
|
|
177
|
+
*/
|
|
178
|
+
ruleVersion?: pulumi.Input<number | undefined>;
|
|
179
|
+
/**
|
|
180
|
+
* Current assignment status.
|
|
181
|
+
*/
|
|
182
|
+
status?: pulumi.Input<string | undefined>;
|
|
183
|
+
/**
|
|
184
|
+
* Tenant ID from provider configuration.
|
|
185
|
+
*/
|
|
186
|
+
tenantId?: pulumi.Input<string | undefined>;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The set of arguments for constructing a PackAssignment resource.
|
|
191
|
+
*/
|
|
192
|
+
export interface PackAssignmentArgs {
|
|
193
|
+
/**
|
|
194
|
+
* Target agent ID.
|
|
195
|
+
*/
|
|
196
|
+
agentId: pulumi.Input<string>;
|
|
197
|
+
/**
|
|
198
|
+
* Approval policy ID for pack application.
|
|
199
|
+
*/
|
|
200
|
+
approvalPolicyId?: pulumi.Input<string | undefined>;
|
|
201
|
+
/**
|
|
202
|
+
* Environment: dev or prod.
|
|
203
|
+
*/
|
|
204
|
+
environment?: pulumi.Input<string | undefined>;
|
|
205
|
+
/**
|
|
206
|
+
* Pack override JSON object.
|
|
207
|
+
*/
|
|
208
|
+
overridesJson?: pulumi.Input<string | undefined>;
|
|
209
|
+
/**
|
|
210
|
+
* Compliance pack identifier.
|
|
211
|
+
*/
|
|
212
|
+
packId: pulumi.Input<string>;
|
|
213
|
+
}
|