@atensec/pulumi-thoth 0.1.3 → 0.1.5

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.
Files changed (48) hide show
  1. package/access/{apiKey.ts → agentApiKey.ts} +29 -33
  2. package/access/endpointApiKey.ts +235 -0
  3. package/access/fleetApiKey.ts +235 -0
  4. package/access/getApiKeyAuthorization.ts +72 -0
  5. package/access/getApiKeys.ts +57 -0
  6. package/access/index.ts +33 -7
  7. package/billing/getCreditBank.ts +56 -0
  8. package/billing/getEstimate.ts +93 -0
  9. package/billing/getInvoices.ts +49 -0
  10. package/billing/getMonthlyCost.ts +38 -0
  11. package/billing/getPricing.ts +37 -0
  12. package/billing/getReport.ts +49 -0
  13. package/billing/getReports.ts +29 -0
  14. package/billing/index.ts +60 -0
  15. package/billing/overageCap.ts +174 -0
  16. package/browser/getEnrollments.ts +52 -0
  17. package/browser/getPolicies.ts +47 -0
  18. package/browser/getProviders.ts +28 -0
  19. package/browser/index.ts +15 -0
  20. package/config/vars.ts +3 -3
  21. package/fleet/fleet.ts +292 -0
  22. package/fleet/getEndpointStats.ts +36 -0
  23. package/fleet/getEndpoints.ts +52 -0
  24. package/fleet/getFleet.ts +48 -0
  25. package/fleet/getFleets.ts +57 -0
  26. package/fleet/index.ts +45 -0
  27. package/governance/getApprovals.ts +57 -0
  28. package/governance/getCostReport.ts +51 -0
  29. package/governance/getDay7Report.ts +46 -0
  30. package/governance/getEvidenceBundle.ts +47 -0
  31. package/governance/getEvidenceChain.ts +53 -0
  32. package/governance/getEvidenceVerify.ts +50 -0
  33. package/governance/getPacks.ts +28 -0
  34. package/governance/getReportsOverview.ts +46 -0
  35. package/governance/getRuntimeStatus.ts +46 -0
  36. package/governance/{tenantSettings.ts → governanceSettings.ts} +18 -244
  37. package/governance/index.ts +76 -7
  38. package/governance/packAssignment.ts +56 -0
  39. package/governance/packAssignmentBulk.ts +56 -0
  40. package/governance/pamSettings.ts +187 -0
  41. package/governance/siemSettings.ts +159 -0
  42. package/governance/webhookSettings.ts +145 -0
  43. package/index.ts +4 -0
  44. package/mdm/getProviders.ts +28 -0
  45. package/mdm/index.ts +5 -0
  46. package/package.json +1 -1
  47. package/provider.ts +9 -12
  48. package/tsconfig.json +37 -2
@@ -4,9 +4,9 @@
4
4
  import * as pulumi from "@pulumi/pulumi";
5
5
  import * as utilities from "../utilities";
6
6
 
7
- export class ApiKey extends pulumi.CustomResource {
7
+ export class AgentApiKey extends pulumi.CustomResource {
8
8
  /**
9
- * Get an existing ApiKey resource's state with the given name, ID, and optional extra
9
+ * Get an existing AgentApiKey resource's state with the given name, ID, and optional extra
10
10
  * properties used to qualify the lookup.
11
11
  *
12
12
  * @param name The _unique_ name of the resulting resource.
@@ -14,22 +14,22 @@ export class ApiKey extends pulumi.CustomResource {
14
14
  * @param state Any extra arguments used during the lookup.
15
15
  * @param opts Optional settings to control the behavior of the CustomResource.
16
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 });
17
+ public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AgentApiKeyState, opts?: pulumi.CustomResourceOptions): AgentApiKey {
18
+ return new AgentApiKey(name, <any>state, { ...opts, id: id });
19
19
  }
20
20
 
21
21
  /** @internal */
22
- public static readonly __pulumiType = 'thoth:access/apiKey:ApiKey';
22
+ public static readonly __pulumiType = 'thoth:access/agentApiKey:AgentApiKey';
23
23
 
24
24
  /**
25
- * Returns true if the given object is an instance of ApiKey. This is designed to work even
25
+ * Returns true if the given object is an instance of AgentApiKey. This is designed to work even
26
26
  * when multiple copies of the Pulumi SDK have been loaded into the same process.
27
27
  */
28
- public static isInstance(obj: any): obj is ApiKey {
28
+ public static isInstance(obj: any): obj is AgentApiKey {
29
29
  if (obj === undefined || obj === null) {
30
30
  return false;
31
31
  }
32
- return obj['__pulumiType'] === ApiKey.__pulumiType;
32
+ return obj['__pulumiType'] === AgentApiKey.__pulumiType;
33
33
  }
34
34
 
35
35
  /**
@@ -73,13 +73,13 @@ export class ApiKey extends pulumi.CustomResource {
73
73
  */
74
74
  declare public /*out*/ readonly prefix: pulumi.Output<string>;
75
75
  /**
76
- * Scope level: organization, fleet, endpoint, agent.
76
+ * Fixed scope for this resource type.
77
77
  */
78
- declare public readonly scopeLevel: pulumi.Output<string>;
78
+ declare public /*out*/ readonly scopeLevel: pulumi.Output<string>;
79
79
  /**
80
- * Target ID for scope level (not required for organization).
80
+ * Agent ID targeted by this API key scope.
81
81
  */
82
- declare public readonly scopeTargetId: pulumi.Output<string | undefined>;
82
+ declare public readonly scopeTargetId: pulumi.Output<string>;
83
83
  /**
84
84
  * Tenant ID from provider configuration.
85
85
  */
@@ -90,18 +90,18 @@ export class ApiKey extends pulumi.CustomResource {
90
90
  declare public readonly ttlSeconds: pulumi.Output<number | undefined>;
91
91
 
92
92
  /**
93
- * Create a ApiKey resource with the given unique name, arguments, and options.
93
+ * Create a AgentApiKey resource with the given unique name, arguments, and options.
94
94
  *
95
95
  * @param name The _unique_ name of the resource.
96
96
  * @param args The arguments to use to populate this resource's properties.
97
97
  * @param opts A bag of options that control this resource's behavior.
98
98
  */
99
- constructor(name: string, args: ApiKeyArgs, opts?: pulumi.CustomResourceOptions)
100
- constructor(name: string, argsOrState?: ApiKeyArgs | ApiKeyState, opts?: pulumi.CustomResourceOptions) {
99
+ constructor(name: string, args: AgentApiKeyArgs, opts?: pulumi.CustomResourceOptions)
100
+ constructor(name: string, argsOrState?: AgentApiKeyArgs | AgentApiKeyState, opts?: pulumi.CustomResourceOptions) {
101
101
  let resourceInputs: pulumi.Inputs = {};
102
102
  opts = opts || {};
103
103
  if (opts.id) {
104
- const state = argsOrState as ApiKeyState | undefined;
104
+ const state = argsOrState as AgentApiKeyState | undefined;
105
105
  resourceInputs["active"] = state?.active;
106
106
  resourceInputs["apiKey"] = state?.apiKey;
107
107
  resourceInputs["createdAt"] = state?.createdAt;
@@ -117,17 +117,16 @@ export class ApiKey extends pulumi.CustomResource {
117
117
  resourceInputs["tenantId"] = state?.tenantId;
118
118
  resourceInputs["ttlSeconds"] = state?.ttlSeconds;
119
119
  } else {
120
- const args = argsOrState as ApiKeyArgs | undefined;
120
+ const args = argsOrState as AgentApiKeyArgs | undefined;
121
121
  if (args?.permissions === undefined && !opts.urn) {
122
122
  throw new Error("Missing required property 'permissions'");
123
123
  }
124
- if (args?.scopeLevel === undefined && !opts.urn) {
125
- throw new Error("Missing required property 'scopeLevel'");
124
+ if (args?.scopeTargetId === undefined && !opts.urn) {
125
+ throw new Error("Missing required property 'scopeTargetId'");
126
126
  }
127
127
  resourceInputs["jitReason"] = args?.jitReason;
128
128
  resourceInputs["name"] = args?.name;
129
129
  resourceInputs["permissions"] = args?.permissions;
130
- resourceInputs["scopeLevel"] = args?.scopeLevel;
131
130
  resourceInputs["scopeTargetId"] = args?.scopeTargetId;
132
131
  resourceInputs["ttlSeconds"] = args?.ttlSeconds;
133
132
  resourceInputs["active"] = undefined /*out*/;
@@ -137,19 +136,20 @@ export class ApiKey extends pulumi.CustomResource {
137
136
  resourceInputs["keyId"] = undefined /*out*/;
138
137
  resourceInputs["lastUsedAt"] = undefined /*out*/;
139
138
  resourceInputs["prefix"] = undefined /*out*/;
139
+ resourceInputs["scopeLevel"] = undefined /*out*/;
140
140
  resourceInputs["tenantId"] = undefined /*out*/;
141
141
  }
142
142
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
143
143
  const secretOpts = { additionalSecretOutputs: ["apiKey"] };
144
144
  opts = pulumi.mergeOptions(opts, secretOpts);
145
- super(ApiKey.__pulumiType, name, resourceInputs, opts);
145
+ super(AgentApiKey.__pulumiType, name, resourceInputs, opts);
146
146
  }
147
147
  }
148
148
 
149
149
  /**
150
- * Input properties used for looking up and filtering ApiKey resources.
150
+ * Input properties used for looking up and filtering AgentApiKey resources.
151
151
  */
152
- export interface ApiKeyState {
152
+ export interface AgentApiKeyState {
153
153
  /**
154
154
  * Whether key is currently active and not expired/revoked.
155
155
  */
@@ -191,11 +191,11 @@ export interface ApiKeyState {
191
191
  */
192
192
  prefix?: pulumi.Input<string | undefined>;
193
193
  /**
194
- * Scope level: organization, fleet, endpoint, agent.
194
+ * Fixed scope for this resource type.
195
195
  */
196
196
  scopeLevel?: pulumi.Input<string | undefined>;
197
197
  /**
198
- * Target ID for scope level (not required for organization).
198
+ * Agent ID targeted by this API key scope.
199
199
  */
200
200
  scopeTargetId?: pulumi.Input<string | undefined>;
201
201
  /**
@@ -209,9 +209,9 @@ export interface ApiKeyState {
209
209
  }
210
210
 
211
211
  /**
212
- * The set of arguments for constructing a ApiKey resource.
212
+ * The set of arguments for constructing a AgentApiKey resource.
213
213
  */
214
- export interface ApiKeyArgs {
214
+ export interface AgentApiKeyArgs {
215
215
  /**
216
216
  * Audit reason for just-in-time issuance.
217
217
  */
@@ -225,13 +225,9 @@ export interface ApiKeyArgs {
225
225
  */
226
226
  permissions: pulumi.Input<pulumi.Input<string>[]>;
227
227
  /**
228
- * Scope level: organization, fleet, endpoint, agent.
228
+ * Agent ID targeted by this API key scope.
229
229
  */
230
- scopeLevel: pulumi.Input<string>;
231
- /**
232
- * Target ID for scope level (not required for organization).
233
- */
234
- scopeTargetId?: pulumi.Input<string | undefined>;
230
+ scopeTargetId: pulumi.Input<string>;
235
231
  /**
236
232
  * TTL in seconds for key expiry.
237
233
  */
@@ -0,0 +1,235 @@
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 EndpointApiKey extends pulumi.CustomResource {
8
+ /**
9
+ * Get an existing EndpointApiKey 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?: EndpointApiKeyState, opts?: pulumi.CustomResourceOptions): EndpointApiKey {
18
+ return new EndpointApiKey(name, <any>state, { ...opts, id: id });
19
+ }
20
+
21
+ /** @internal */
22
+ public static readonly __pulumiType = 'thoth:access/endpointApiKey:EndpointApiKey';
23
+
24
+ /**
25
+ * Returns true if the given object is an instance of EndpointApiKey. 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 EndpointApiKey {
29
+ if (obj === undefined || obj === null) {
30
+ return false;
31
+ }
32
+ return obj['__pulumiType'] === EndpointApiKey.__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
+ * Fixed scope for this resource type.
77
+ */
78
+ declare public /*out*/ readonly scopeLevel: pulumi.Output<string>;
79
+ /**
80
+ * Endpoint ID targeted by this API key scope.
81
+ */
82
+ declare public readonly scopeTargetId: pulumi.Output<string>;
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 EndpointApiKey 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: EndpointApiKeyArgs, opts?: pulumi.CustomResourceOptions)
100
+ constructor(name: string, argsOrState?: EndpointApiKeyArgs | EndpointApiKeyState, opts?: pulumi.CustomResourceOptions) {
101
+ let resourceInputs: pulumi.Inputs = {};
102
+ opts = opts || {};
103
+ if (opts.id) {
104
+ const state = argsOrState as EndpointApiKeyState | 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 EndpointApiKeyArgs | undefined;
121
+ if (args?.permissions === undefined && !opts.urn) {
122
+ throw new Error("Missing required property 'permissions'");
123
+ }
124
+ if (args?.scopeTargetId === undefined && !opts.urn) {
125
+ throw new Error("Missing required property 'scopeTargetId'");
126
+ }
127
+ resourceInputs["jitReason"] = args?.jitReason;
128
+ resourceInputs["name"] = args?.name;
129
+ resourceInputs["permissions"] = args?.permissions;
130
+ resourceInputs["scopeTargetId"] = args?.scopeTargetId;
131
+ resourceInputs["ttlSeconds"] = args?.ttlSeconds;
132
+ resourceInputs["active"] = undefined /*out*/;
133
+ resourceInputs["apiKey"] = undefined /*out*/;
134
+ resourceInputs["createdAt"] = undefined /*out*/;
135
+ resourceInputs["expiresAt"] = undefined /*out*/;
136
+ resourceInputs["keyId"] = undefined /*out*/;
137
+ resourceInputs["lastUsedAt"] = undefined /*out*/;
138
+ resourceInputs["prefix"] = undefined /*out*/;
139
+ resourceInputs["scopeLevel"] = 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(EndpointApiKey.__pulumiType, name, resourceInputs, opts);
146
+ }
147
+ }
148
+
149
+ /**
150
+ * Input properties used for looking up and filtering EndpointApiKey resources.
151
+ */
152
+ export interface EndpointApiKeyState {
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
+ * Fixed scope for this resource type.
195
+ */
196
+ scopeLevel?: pulumi.Input<string | undefined>;
197
+ /**
198
+ * Endpoint ID targeted by this API key scope.
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 EndpointApiKey resource.
213
+ */
214
+ export interface EndpointApiKeyArgs {
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
+ * Endpoint ID targeted by this API key scope.
229
+ */
230
+ scopeTargetId: pulumi.Input<string>;
231
+ /**
232
+ * TTL in seconds for key expiry.
233
+ */
234
+ ttlSeconds?: pulumi.Input<number | undefined>;
235
+ }
@@ -0,0 +1,235 @@
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 FleetApiKey extends pulumi.CustomResource {
8
+ /**
9
+ * Get an existing FleetApiKey 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?: FleetApiKeyState, opts?: pulumi.CustomResourceOptions): FleetApiKey {
18
+ return new FleetApiKey(name, <any>state, { ...opts, id: id });
19
+ }
20
+
21
+ /** @internal */
22
+ public static readonly __pulumiType = 'thoth:access/fleetApiKey:FleetApiKey';
23
+
24
+ /**
25
+ * Returns true if the given object is an instance of FleetApiKey. 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 FleetApiKey {
29
+ if (obj === undefined || obj === null) {
30
+ return false;
31
+ }
32
+ return obj['__pulumiType'] === FleetApiKey.__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
+ * Fixed scope for this resource type.
77
+ */
78
+ declare public /*out*/ readonly scopeLevel: pulumi.Output<string>;
79
+ /**
80
+ * Fleet ID targeted by this API key scope.
81
+ */
82
+ declare public readonly scopeTargetId: pulumi.Output<string>;
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 FleetApiKey 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: FleetApiKeyArgs, opts?: pulumi.CustomResourceOptions)
100
+ constructor(name: string, argsOrState?: FleetApiKeyArgs | FleetApiKeyState, opts?: pulumi.CustomResourceOptions) {
101
+ let resourceInputs: pulumi.Inputs = {};
102
+ opts = opts || {};
103
+ if (opts.id) {
104
+ const state = argsOrState as FleetApiKeyState | 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 FleetApiKeyArgs | undefined;
121
+ if (args?.permissions === undefined && !opts.urn) {
122
+ throw new Error("Missing required property 'permissions'");
123
+ }
124
+ if (args?.scopeTargetId === undefined && !opts.urn) {
125
+ throw new Error("Missing required property 'scopeTargetId'");
126
+ }
127
+ resourceInputs["jitReason"] = args?.jitReason;
128
+ resourceInputs["name"] = args?.name;
129
+ resourceInputs["permissions"] = args?.permissions;
130
+ resourceInputs["scopeTargetId"] = args?.scopeTargetId;
131
+ resourceInputs["ttlSeconds"] = args?.ttlSeconds;
132
+ resourceInputs["active"] = undefined /*out*/;
133
+ resourceInputs["apiKey"] = undefined /*out*/;
134
+ resourceInputs["createdAt"] = undefined /*out*/;
135
+ resourceInputs["expiresAt"] = undefined /*out*/;
136
+ resourceInputs["keyId"] = undefined /*out*/;
137
+ resourceInputs["lastUsedAt"] = undefined /*out*/;
138
+ resourceInputs["prefix"] = undefined /*out*/;
139
+ resourceInputs["scopeLevel"] = 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(FleetApiKey.__pulumiType, name, resourceInputs, opts);
146
+ }
147
+ }
148
+
149
+ /**
150
+ * Input properties used for looking up and filtering FleetApiKey resources.
151
+ */
152
+ export interface FleetApiKeyState {
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
+ * Fixed scope for this resource type.
195
+ */
196
+ scopeLevel?: pulumi.Input<string | undefined>;
197
+ /**
198
+ * Fleet ID targeted by this API key scope.
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 FleetApiKey resource.
213
+ */
214
+ export interface FleetApiKeyArgs {
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
+ * Fleet ID targeted by this API key scope.
229
+ */
230
+ scopeTargetId: pulumi.Input<string>;
231
+ /**
232
+ * TTL in seconds for key expiry.
233
+ */
234
+ ttlSeconds?: pulumi.Input<number | undefined>;
235
+ }