@robhan-cdk-lib/aws_grafana 0.0.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/.jsii +5505 -0
- package/API.md +1340 -0
- package/LICENSE +19 -0
- package/README.md +47 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +12 -0
- package/lib/workspace.d.ts +624 -0
- package/lib/workspace.js +694 -0
- package/package.json +128 -0
|
@@ -0,0 +1,624 @@
|
|
|
1
|
+
import { IPrefixList, ISecurityGroup, ISubnet, IVpcEndpoint } from 'aws-cdk-lib/aws-ec2';
|
|
2
|
+
import { IRole } from 'aws-cdk-lib/aws-iam';
|
|
3
|
+
import { Construct } from 'constructs';
|
|
4
|
+
/**
|
|
5
|
+
* Specifies whether the workspace can access AWS resources in this AWS account only, or whether it
|
|
6
|
+
* can also access AWS resources in other accounts in the same organization. If this is
|
|
7
|
+
* ORGANIZATION, the OrganizationalUnits parameter specifies which organizational units the
|
|
8
|
+
* workspace can access.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum AccountAccessType {
|
|
11
|
+
/**
|
|
12
|
+
* Access is limited to the current AWS account only.
|
|
13
|
+
*/
|
|
14
|
+
CURRENT_ACCOUNT = "CURRENT_ACCOUNT",
|
|
15
|
+
/**
|
|
16
|
+
* Access is extended to the entire AWS organization.
|
|
17
|
+
*/
|
|
18
|
+
ORGANIZATION = "ORGANIZATION"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to authenticate
|
|
22
|
+
* users for using the Grafana console within a workspace.
|
|
23
|
+
*
|
|
24
|
+
* @see https://docs.aws.amazon.com/grafana/latest/APIReference/API_CreateWorkspace.html
|
|
25
|
+
*/
|
|
26
|
+
export declare enum AuthenticationProviders {
|
|
27
|
+
/**
|
|
28
|
+
* AWS Single Sign-On authentication provider.
|
|
29
|
+
*/
|
|
30
|
+
AWS_SSO = "AWS_SSO",
|
|
31
|
+
/**
|
|
32
|
+
* Security Assertion Markup Language (SAML) authentication provider.
|
|
33
|
+
*/
|
|
34
|
+
SAML = "SAML"
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The configuration settings for network access to your workspace.
|
|
38
|
+
*/
|
|
39
|
+
export interface NetworkAccessControl {
|
|
40
|
+
/**
|
|
41
|
+
* An array of prefix list IDs. A prefix list is a list of CIDR ranges of IP addresses. The IP
|
|
42
|
+
* addresses specified are allowed to access your workspace. If the list is not included in the
|
|
43
|
+
* configuration (passed an empty array) then no IP addresses are allowed to access the
|
|
44
|
+
* workspace.
|
|
45
|
+
*
|
|
46
|
+
* Maximum of 5 prefix lists allowed.
|
|
47
|
+
*/
|
|
48
|
+
readonly prefixLists?: IPrefixList[];
|
|
49
|
+
/**
|
|
50
|
+
* An array of Amazon VPC endpoint IDs for the workspace. You can create VPC endpoints to your
|
|
51
|
+
* Amazon Managed Grafana workspace for access from within a VPC. If a NetworkAccessConfiguration
|
|
52
|
+
* is specified then only VPC endpoints specified here are allowed to access the workspace. If
|
|
53
|
+
* you pass in an empty array of strings, then no VPCs are allowed to access the workspace.
|
|
54
|
+
*
|
|
55
|
+
* Maximum of 5 VPC endpoints allowed.
|
|
56
|
+
*/
|
|
57
|
+
readonly vpcEndpoints?: IVpcEndpoint[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The AWS notification channels that Amazon Managed Grafana can automatically create IAM roles and
|
|
61
|
+
* permissions for, to allow Amazon Managed Grafana to use these channels.
|
|
62
|
+
*/
|
|
63
|
+
export declare enum NotificationDestinations {
|
|
64
|
+
/**
|
|
65
|
+
* Amazon Simple Notification Service (SNS) as notification destination.
|
|
66
|
+
*/
|
|
67
|
+
SNS = "SNS"
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* If this is SERVICE_MANAGED, and the workplace was created through the Amazon Managed Grafana
|
|
71
|
+
* console, then Amazon Managed Grafana automatically creates the IAM roles and provisions the
|
|
72
|
+
* permissions that the workspace needs to use AWS data sources and notification channels.
|
|
73
|
+
*
|
|
74
|
+
* If this is CUSTOMER_MANAGED, you must manage those roles and permissions yourself.
|
|
75
|
+
|
|
76
|
+
* If you are working with a workspace in a member account of an organization and that account is
|
|
77
|
+
* not a delegated administrator account, and you want the workspace to access data sources in
|
|
78
|
+
* other AWS accounts in the organization, this parameter must be set to CUSTOMER_MANAGED.
|
|
79
|
+
*/
|
|
80
|
+
export declare enum PermissionTypes {
|
|
81
|
+
/**
|
|
82
|
+
* Customer-managed permissions where you manage user access to Grafana.
|
|
83
|
+
*/
|
|
84
|
+
CUSTOMER_MANAGED = "CUSTOMER_MANAGED",
|
|
85
|
+
/**
|
|
86
|
+
* Service-managed permissions where AWS manages user access to Grafana.
|
|
87
|
+
*/
|
|
88
|
+
SERVICE_MANAGED = "SERVICE_MANAGED"
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* A structure that defines which attributes in the IdP assertion are to be used to define
|
|
92
|
+
* information about the users authenticated by the IdP to use the workspace.
|
|
93
|
+
*
|
|
94
|
+
* Each attribute must be a string with length between 1 and 256 characters.
|
|
95
|
+
*/
|
|
96
|
+
export interface SamlAssertionAttributes {
|
|
97
|
+
/**
|
|
98
|
+
* The name of the attribute within the SAML assertion to use as the email names for SAML users.
|
|
99
|
+
*
|
|
100
|
+
* Must be between 1 and 256 characters long.
|
|
101
|
+
*/
|
|
102
|
+
readonly email: string;
|
|
103
|
+
/**
|
|
104
|
+
* The name of the attribute within the SAML assertion to use as the user full "friendly" names
|
|
105
|
+
* for user groups.
|
|
106
|
+
*
|
|
107
|
+
* Must be between 1 and 256 characters long.
|
|
108
|
+
*/
|
|
109
|
+
readonly groups: string;
|
|
110
|
+
/**
|
|
111
|
+
* The name of the attribute within the SAML assertion to use as the login names for SAML users.
|
|
112
|
+
*
|
|
113
|
+
* Must be between 1 and 256 characters long.
|
|
114
|
+
*/
|
|
115
|
+
readonly login: string;
|
|
116
|
+
/**
|
|
117
|
+
* The name of the attribute within the SAML assertion to use as the user full "friendly" names
|
|
118
|
+
* for SAML users.
|
|
119
|
+
*
|
|
120
|
+
* Must be between 1 and 256 characters long.
|
|
121
|
+
*/
|
|
122
|
+
readonly name: string;
|
|
123
|
+
/**
|
|
124
|
+
* The name of the attribute within the SAML assertion to use as the user full "friendly" names
|
|
125
|
+
* for the users' organizations.
|
|
126
|
+
*
|
|
127
|
+
* Must be between 1 and 256 characters long.
|
|
128
|
+
*/
|
|
129
|
+
readonly org: string;
|
|
130
|
+
/**
|
|
131
|
+
* The name of the attribute within the SAML assertion to use as the user roles.
|
|
132
|
+
*
|
|
133
|
+
* Must be between 1 and 256 characters long.
|
|
134
|
+
*/
|
|
135
|
+
readonly role: string;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* A structure containing the identity provider (IdP) metadata used to integrate the identity
|
|
139
|
+
* provider with this workspace.
|
|
140
|
+
*/
|
|
141
|
+
export interface SamlIdpMetadata {
|
|
142
|
+
/**
|
|
143
|
+
* The URL of the location containing the IdP metadata.
|
|
144
|
+
*
|
|
145
|
+
* Must be a string with length between 1 and 2048 characters.
|
|
146
|
+
*/
|
|
147
|
+
readonly url?: string;
|
|
148
|
+
/**
|
|
149
|
+
* The full IdP metadata, in XML format.
|
|
150
|
+
*/
|
|
151
|
+
readonly xml?: string;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* A structure containing arrays that map group names in the SAML assertion to the Grafana Admin
|
|
155
|
+
* and Editor roles in the workspace.
|
|
156
|
+
*/
|
|
157
|
+
export interface SamlRoleValues {
|
|
158
|
+
/**
|
|
159
|
+
* A list of groups from the SAML assertion attribute to grant the Grafana Admin role to.
|
|
160
|
+
*
|
|
161
|
+
* Maximum of 256 elements.
|
|
162
|
+
*/
|
|
163
|
+
readonly admin?: string[];
|
|
164
|
+
/**
|
|
165
|
+
* A list of groups from the SAML assertion attribute to grant the Grafana Editor role to.
|
|
166
|
+
*
|
|
167
|
+
* Maximum of 256 elements.
|
|
168
|
+
*/
|
|
169
|
+
readonly editor?: string[];
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace
|
|
173
|
+
* user information and define which groups in the assertion attribute are to have the Admin and
|
|
174
|
+
* Editor roles in the workspace.
|
|
175
|
+
*/
|
|
176
|
+
export interface SamlConfiguration {
|
|
177
|
+
/**
|
|
178
|
+
* Lists which organizations defined in the SAML assertion are allowed to use the Amazon Managed
|
|
179
|
+
* Grafana workspace. If this is empty, all organizations in the assertion attribute have access.
|
|
180
|
+
*
|
|
181
|
+
* Must have between 1 and 256 elements.
|
|
182
|
+
*/
|
|
183
|
+
readonly allowedOrganizations?: string[];
|
|
184
|
+
/**
|
|
185
|
+
* A structure that defines which attributes in the SAML assertion are to be used to define
|
|
186
|
+
* information about the users authenticated by that IdP to use the workspace.
|
|
187
|
+
*/
|
|
188
|
+
readonly assertionAtrributes?: SamlAssertionAttributes;
|
|
189
|
+
/**
|
|
190
|
+
* A structure containing the identity provider (IdP) metadata used to integrate the identity
|
|
191
|
+
* provider with this workspace.
|
|
192
|
+
*
|
|
193
|
+
* Required field for SAML configuration.
|
|
194
|
+
*/
|
|
195
|
+
readonly idpMetadata: SamlIdpMetadata;
|
|
196
|
+
/**
|
|
197
|
+
* How long a sign-on session by a SAML user is valid, before the user has to sign on again.
|
|
198
|
+
*
|
|
199
|
+
* Must be a positive number.
|
|
200
|
+
*/
|
|
201
|
+
readonly loginValidityDuration?: number;
|
|
202
|
+
/**
|
|
203
|
+
* A structure containing arrays that map group names in the SAML assertion to the Grafana Admin
|
|
204
|
+
* and Editor roles in the workspace.
|
|
205
|
+
*/
|
|
206
|
+
readonly roleValues?: SamlRoleValues;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The configuration settings for an Amazon VPC that contains data sources for your Grafana
|
|
210
|
+
* workspace to connect to.
|
|
211
|
+
*/
|
|
212
|
+
export interface VpcConfiguration {
|
|
213
|
+
/**
|
|
214
|
+
* The list of Amazon EC2 security groups attached to the Amazon VPC for your Grafana
|
|
215
|
+
* workspace to connect. Duplicates not allowed.
|
|
216
|
+
*
|
|
217
|
+
* Array Members: Minimum number of 1 items. Maximum number of 5 items.
|
|
218
|
+
*
|
|
219
|
+
* Required for VPC configuration.
|
|
220
|
+
*/
|
|
221
|
+
readonly securityGroups: ISecurityGroup[];
|
|
222
|
+
/**
|
|
223
|
+
* The list of Amazon EC2 subnets created in the Amazon VPC for your Grafana workspace to
|
|
224
|
+
* connect. Duplicates not allowed.
|
|
225
|
+
*
|
|
226
|
+
* Array Members: Minimum number of 2 items. Maximum number of 6 items.
|
|
227
|
+
*
|
|
228
|
+
* Required for VPC configuration.
|
|
229
|
+
*/
|
|
230
|
+
readonly subnets: ISubnet[];
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Properties for creating an Amazon Managed Grafana workspace.
|
|
234
|
+
*/
|
|
235
|
+
export interface WorkspaceProps {
|
|
236
|
+
/**
|
|
237
|
+
* Type of account access for the workspace.
|
|
238
|
+
* Required field.
|
|
239
|
+
*/
|
|
240
|
+
readonly accountAccessType: AccountAccessType;
|
|
241
|
+
/**
|
|
242
|
+
* Authentication providers to enable for the workspace.
|
|
243
|
+
* Required field.
|
|
244
|
+
*/
|
|
245
|
+
readonly authenticationProviders: AuthenticationProviders[];
|
|
246
|
+
/**
|
|
247
|
+
* Client token for idempotent workspace creation.
|
|
248
|
+
* Must be 1-64 characters long and contain only printable ASCII characters.
|
|
249
|
+
*/
|
|
250
|
+
readonly clientToken?: string;
|
|
251
|
+
/**
|
|
252
|
+
* List of data sources to enable for the workspace.
|
|
253
|
+
*/
|
|
254
|
+
readonly dataSources?: string[];
|
|
255
|
+
/**
|
|
256
|
+
* Description of the workspace.
|
|
257
|
+
* Maximum length of 2048 characters.
|
|
258
|
+
*/
|
|
259
|
+
readonly description?: string;
|
|
260
|
+
/**
|
|
261
|
+
* Grafana version for the workspace.
|
|
262
|
+
* Must be 1-255 characters long.
|
|
263
|
+
*/
|
|
264
|
+
readonly grafanaVersion?: string;
|
|
265
|
+
/**
|
|
266
|
+
* Name of the workspace.
|
|
267
|
+
* Must be 1-255 characters long and contain only alphanumeric characters, hyphens, dots, underscores, and tildes.
|
|
268
|
+
*/
|
|
269
|
+
readonly name?: string;
|
|
270
|
+
/**
|
|
271
|
+
* Network access control configuration for the workspace.
|
|
272
|
+
*/
|
|
273
|
+
readonly networkAccessControl?: NetworkAccessControl;
|
|
274
|
+
/**
|
|
275
|
+
* Notification destinations to enable for the workspace.
|
|
276
|
+
*/
|
|
277
|
+
readonly notificationDestinations?: NotificationDestinations[];
|
|
278
|
+
/**
|
|
279
|
+
* List of organizational units to include in the workspace.
|
|
280
|
+
*/
|
|
281
|
+
readonly organizationalUnits?: string[];
|
|
282
|
+
/**
|
|
283
|
+
* Name of the IAM role to use for the organization.
|
|
284
|
+
* Maximum length of 2048 characters.
|
|
285
|
+
*/
|
|
286
|
+
readonly organizationRoleName?: string;
|
|
287
|
+
/**
|
|
288
|
+
* Permission type for the workspace.
|
|
289
|
+
* Required field.
|
|
290
|
+
*/
|
|
291
|
+
readonly permissionType: PermissionTypes;
|
|
292
|
+
/**
|
|
293
|
+
* Whether to enable the Grafana plugin admin page.
|
|
294
|
+
* Default: false
|
|
295
|
+
*/
|
|
296
|
+
readonly pluginAdminEnabled?: boolean;
|
|
297
|
+
/**
|
|
298
|
+
* IAM role to use for the workspace.
|
|
299
|
+
*/
|
|
300
|
+
readonly role?: IRole;
|
|
301
|
+
/**
|
|
302
|
+
* SAML configuration for the workspace.
|
|
303
|
+
*/
|
|
304
|
+
readonly samlConfiguration?: SamlConfiguration;
|
|
305
|
+
/**
|
|
306
|
+
* Name of the CloudFormation stack set to use.
|
|
307
|
+
*/
|
|
308
|
+
readonly stackSetName?: string;
|
|
309
|
+
/**
|
|
310
|
+
* VPC configuration for the workspace.
|
|
311
|
+
*/
|
|
312
|
+
readonly vpcConfiguration?: VpcConfiguration;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Status of SAML configuration for a Grafana workspace.
|
|
316
|
+
*/
|
|
317
|
+
export declare enum SamlConfigurationStatuses {
|
|
318
|
+
/**
|
|
319
|
+
* SAML is configured for the workspace.
|
|
320
|
+
*/
|
|
321
|
+
CONFIGURED = "CONFIGURED",
|
|
322
|
+
/**
|
|
323
|
+
* SAML is not configured for the workspace.
|
|
324
|
+
*/
|
|
325
|
+
NOT_CONFIGURED = "NOT_CONFIGURED"
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Status of a Grafana workspace.
|
|
329
|
+
*/
|
|
330
|
+
export declare enum Status {
|
|
331
|
+
/**
|
|
332
|
+
* Workspace is active and ready to use.
|
|
333
|
+
*/
|
|
334
|
+
ACTIVE = "ACTIVE",
|
|
335
|
+
/**
|
|
336
|
+
* Workspace is being created.
|
|
337
|
+
*/
|
|
338
|
+
CREATING = "CREATING",
|
|
339
|
+
/**
|
|
340
|
+
* Workspace is being deleted.
|
|
341
|
+
*/
|
|
342
|
+
DELETING = "DELETING",
|
|
343
|
+
/**
|
|
344
|
+
* Workspace operation has failed.
|
|
345
|
+
*/
|
|
346
|
+
FAILED = "FAILED",
|
|
347
|
+
/**
|
|
348
|
+
* Workspace is being updated.
|
|
349
|
+
*/
|
|
350
|
+
UPDATING = "UPDATING",
|
|
351
|
+
/**
|
|
352
|
+
* Workspace is being upgraded.
|
|
353
|
+
*/
|
|
354
|
+
UPGRADING = "UPGRADING",
|
|
355
|
+
/**
|
|
356
|
+
* Workspace deletion has failed.
|
|
357
|
+
*/
|
|
358
|
+
DELETION_FAILED = "DELETION_FAILED",
|
|
359
|
+
/**
|
|
360
|
+
* Workspace creation has failed.
|
|
361
|
+
*/
|
|
362
|
+
CREATION_FAILED = "CREATION_FAILED",
|
|
363
|
+
/**
|
|
364
|
+
* Workspace update has failed.
|
|
365
|
+
*/
|
|
366
|
+
UPDATE_FAILED = "UPDATE_FAILED",
|
|
367
|
+
/**
|
|
368
|
+
* Workspace upgrade has failed.
|
|
369
|
+
*/
|
|
370
|
+
UPGRADE_FAILED = "UPGRADE_FAILED",
|
|
371
|
+
/**
|
|
372
|
+
* License removal has failed.
|
|
373
|
+
*/
|
|
374
|
+
LICENSE_REMOVAL_FAILED = "LICENSE_REMOVAL_FAILED"
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Represents an Amazon Managed Grafana workspace.
|
|
378
|
+
*
|
|
379
|
+
* This class provides a high-level abstraction for creating and managing
|
|
380
|
+
* Amazon Managed Grafana workspaces using AWS CDK.
|
|
381
|
+
*/
|
|
382
|
+
export declare class Workspace extends Construct {
|
|
383
|
+
/**
|
|
384
|
+
* Validates the clientToken property.
|
|
385
|
+
*
|
|
386
|
+
* @param token - The client token to validate
|
|
387
|
+
* @returns An array of error messages if validation fails, or an empty array if valid
|
|
388
|
+
*
|
|
389
|
+
* Validation rules:
|
|
390
|
+
* - Must be a string
|
|
391
|
+
* - Must be between 1 and 64 characters long
|
|
392
|
+
* - Must contain only printable ASCII characters
|
|
393
|
+
*/
|
|
394
|
+
private static validateClientToken;
|
|
395
|
+
/**
|
|
396
|
+
* Validates the description property.
|
|
397
|
+
*
|
|
398
|
+
* @param description - The description to validate
|
|
399
|
+
* @returns An array of error messages if validation fails, or an empty array if valid
|
|
400
|
+
*
|
|
401
|
+
* Validation rules:
|
|
402
|
+
* - Must be a string
|
|
403
|
+
* - Maximum length of 2048 characters
|
|
404
|
+
*/
|
|
405
|
+
private static validateDescription;
|
|
406
|
+
/**
|
|
407
|
+
* Validates the grafanaVersion property.
|
|
408
|
+
*
|
|
409
|
+
* @param version - The Grafana version to validate
|
|
410
|
+
* @returns An array of error messages if validation fails, or an empty array if valid
|
|
411
|
+
*
|
|
412
|
+
* Validation rules:
|
|
413
|
+
* - Must be a string
|
|
414
|
+
* - Must be between 1 and 255 characters long
|
|
415
|
+
*/
|
|
416
|
+
private static validateGrafanaVersion;
|
|
417
|
+
/**
|
|
418
|
+
* Validates the name property.
|
|
419
|
+
*
|
|
420
|
+
* @param name - The workspace name to validate
|
|
421
|
+
* @returns An array of error messages if validation fails, or an empty array if valid
|
|
422
|
+
*
|
|
423
|
+
* Validation rules:
|
|
424
|
+
* - Must be a string
|
|
425
|
+
* - Must be between 1 and 255 characters long
|
|
426
|
+
* - Can only contain alphanumeric characters, hyphens, dots, underscores, and tildes
|
|
427
|
+
*/
|
|
428
|
+
private static validateName;
|
|
429
|
+
/**
|
|
430
|
+
* Validates the networkAccessControl property.
|
|
431
|
+
*
|
|
432
|
+
* @param nac - The network access control configuration to validate
|
|
433
|
+
* @returns An array of error messages if validation fails, or an empty array if valid
|
|
434
|
+
*
|
|
435
|
+
* Validation rules:
|
|
436
|
+
* - Must be an object
|
|
437
|
+
* - prefixLists (if present) must be an array with at most 5 items
|
|
438
|
+
* - vpcEndpoints (if present) must be an array with at most 5 items
|
|
439
|
+
*/
|
|
440
|
+
private static validateNetworkAccessControl;
|
|
441
|
+
/**
|
|
442
|
+
* Validates the organizationRoleName property.
|
|
443
|
+
*
|
|
444
|
+
* @param roleName - The organization role name to validate
|
|
445
|
+
* @returns An array of error messages if validation fails, or an empty array if valid
|
|
446
|
+
*
|
|
447
|
+
* Validation rules:
|
|
448
|
+
* - Must be a string
|
|
449
|
+
* - Must be between 1 and 2048 characters long
|
|
450
|
+
*/
|
|
451
|
+
private static validateOrganizationRoleName;
|
|
452
|
+
/**
|
|
453
|
+
* Validates the SAML assertion attributes.
|
|
454
|
+
*
|
|
455
|
+
* @param obj - The SAML assertion attributes to validate
|
|
456
|
+
* @returns An array of error messages if validation fails, or an empty array if valid
|
|
457
|
+
*
|
|
458
|
+
* Validation rules:
|
|
459
|
+
* - Must be an object
|
|
460
|
+
* - Each attribute must be a string
|
|
461
|
+
* - Each attribute must be between 1 and 256 characters long
|
|
462
|
+
* - Valid attribute keys are: 'email', 'groups', 'login', 'name', 'org', 'role'
|
|
463
|
+
*/
|
|
464
|
+
private static validateSamlAssertionAttributes;
|
|
465
|
+
/**
|
|
466
|
+
* Validates the SAML IdP metadata.
|
|
467
|
+
*
|
|
468
|
+
* @param obj - The SAML IdP metadata to validate
|
|
469
|
+
* @returns An array of error messages if validation fails, or an empty array if valid
|
|
470
|
+
*
|
|
471
|
+
* Validation rules:
|
|
472
|
+
* - Must be an object
|
|
473
|
+
* - url (if present) must be a string between 1 and 2048 characters long
|
|
474
|
+
* - xml (if present) must be a string
|
|
475
|
+
*/
|
|
476
|
+
private static validateSamlIdpMetadata;
|
|
477
|
+
/**
|
|
478
|
+
* Validates the SAML configuration.
|
|
479
|
+
*
|
|
480
|
+
* @param config - The SAML configuration to validate
|
|
481
|
+
* @returns An array of error messages if validation fails, or an empty array if valid
|
|
482
|
+
*
|
|
483
|
+
* Validation rules:
|
|
484
|
+
* - Must be an object
|
|
485
|
+
* - idpMetadata is required and must be valid
|
|
486
|
+
* - assertionAtrributes (if present) must be valid
|
|
487
|
+
* - allowedOrganizations (if present) must be an array of strings with 1-256 elements
|
|
488
|
+
* - loginValidityDuration (if present) must be a positive number
|
|
489
|
+
* - roleValues (if present) must be an object with valid admin and editor arrays
|
|
490
|
+
*/
|
|
491
|
+
private static validateSamlConfiguration;
|
|
492
|
+
/**
|
|
493
|
+
* Validates the vpcConfiguration property.
|
|
494
|
+
*
|
|
495
|
+
* @param config - The VPC configuration to validate
|
|
496
|
+
* @returns An array of error messages if validation fails, or an empty array if valid
|
|
497
|
+
*
|
|
498
|
+
* Validation rules:
|
|
499
|
+
* - Must be an object
|
|
500
|
+
* - securityGroups is required and must be an array with 1-5 items
|
|
501
|
+
* - subnets is required and must be an array with 2-6 items
|
|
502
|
+
*/
|
|
503
|
+
private static validateVpcConfiguration;
|
|
504
|
+
/**
|
|
505
|
+
* Validates all workspace properties.
|
|
506
|
+
*
|
|
507
|
+
* @param props - The workspace properties to validate
|
|
508
|
+
* @returns An array of error messages if validation fails, or an empty array if valid
|
|
509
|
+
*
|
|
510
|
+
* This method aggregates validation results from all individual property validators.
|
|
511
|
+
* It throws an error if props is not an object.
|
|
512
|
+
*/
|
|
513
|
+
private static validateProps;
|
|
514
|
+
/**
|
|
515
|
+
* The type of account access for the workspace.
|
|
516
|
+
*/
|
|
517
|
+
readonly accountAccessType: AccountAccessType;
|
|
518
|
+
/**
|
|
519
|
+
* Authentication providers enabled for the workspace.
|
|
520
|
+
*/
|
|
521
|
+
readonly authenticationProviders: AuthenticationProviders[];
|
|
522
|
+
/**
|
|
523
|
+
* Client token used for idempotent workspace creation.
|
|
524
|
+
*/
|
|
525
|
+
readonly clientToken?: string;
|
|
526
|
+
/**
|
|
527
|
+
* Data sources enabled for the workspace.
|
|
528
|
+
*/
|
|
529
|
+
readonly dataSources?: string[];
|
|
530
|
+
/**
|
|
531
|
+
* Description of the workspace.
|
|
532
|
+
*/
|
|
533
|
+
readonly description?: string;
|
|
534
|
+
/**
|
|
535
|
+
* Name of the workspace.
|
|
536
|
+
*/
|
|
537
|
+
readonly name?: string;
|
|
538
|
+
/**
|
|
539
|
+
* Network access control configuration for the workspace.
|
|
540
|
+
*/
|
|
541
|
+
readonly networkAccessControl?: NetworkAccessControl;
|
|
542
|
+
/**
|
|
543
|
+
* Notification destinations enabled for the workspace.
|
|
544
|
+
*/
|
|
545
|
+
readonly notificationDestinations?: NotificationDestinations[];
|
|
546
|
+
/**
|
|
547
|
+
* Organizational units included in the workspace.
|
|
548
|
+
*/
|
|
549
|
+
readonly organizationalUnits?: string[];
|
|
550
|
+
/**
|
|
551
|
+
* Name of the IAM role used for the organization.
|
|
552
|
+
*/
|
|
553
|
+
readonly organizationRoleName?: string;
|
|
554
|
+
/**
|
|
555
|
+
* Permission type for the workspace.
|
|
556
|
+
*/
|
|
557
|
+
readonly permissionType: PermissionTypes;
|
|
558
|
+
/**
|
|
559
|
+
* Whether the Grafana plugin admin page is enabled.
|
|
560
|
+
*/
|
|
561
|
+
readonly pluginAdminEnabled?: boolean;
|
|
562
|
+
/**
|
|
563
|
+
* IAM role used for the workspace.
|
|
564
|
+
*/
|
|
565
|
+
readonly role?: IRole;
|
|
566
|
+
/**
|
|
567
|
+
* SAML configuration for the workspace.
|
|
568
|
+
*/
|
|
569
|
+
readonly samlConfiguration?: SamlConfiguration;
|
|
570
|
+
/**
|
|
571
|
+
* Name of the CloudFormation stack set used.
|
|
572
|
+
*/
|
|
573
|
+
readonly stackSetName?: string;
|
|
574
|
+
/**
|
|
575
|
+
* VPC configuration for the workspace.
|
|
576
|
+
*/
|
|
577
|
+
readonly vpcConfiguration?: VpcConfiguration;
|
|
578
|
+
/**
|
|
579
|
+
* The underlying CloudFormation resource.
|
|
580
|
+
*/
|
|
581
|
+
private readonly workspace;
|
|
582
|
+
/**
|
|
583
|
+
* Timestamp when the workspace was created.
|
|
584
|
+
*/
|
|
585
|
+
readonly creationTimestamp: string;
|
|
586
|
+
/**
|
|
587
|
+
* Endpoint URL for the Grafana workspace.
|
|
588
|
+
*/
|
|
589
|
+
readonly endpoint: string;
|
|
590
|
+
/**
|
|
591
|
+
* Grafana version running in the workspace.
|
|
592
|
+
*/
|
|
593
|
+
readonly grafanaVersion: string;
|
|
594
|
+
/**
|
|
595
|
+
* Unique identifier for the workspace.
|
|
596
|
+
*/
|
|
597
|
+
readonly id: string;
|
|
598
|
+
/**
|
|
599
|
+
* Timestamp when the workspace was last modified.
|
|
600
|
+
*/
|
|
601
|
+
readonly modificationTimestamp: string;
|
|
602
|
+
/**
|
|
603
|
+
* Status of SAML configuration for the workspace.
|
|
604
|
+
*/
|
|
605
|
+
readonly samlConfigurationStatus: SamlConfigurationStatuses;
|
|
606
|
+
/**
|
|
607
|
+
* SSO client ID for the workspace.
|
|
608
|
+
*/
|
|
609
|
+
readonly ssoClientId: string;
|
|
610
|
+
/**
|
|
611
|
+
* Current status of the workspace.
|
|
612
|
+
*/
|
|
613
|
+
readonly status: Status;
|
|
614
|
+
/**
|
|
615
|
+
* Creates a new Amazon Managed Grafana workspace.
|
|
616
|
+
*
|
|
617
|
+
* @param scope - The scope in which to define this construct
|
|
618
|
+
* @param id - The scoped construct ID
|
|
619
|
+
* @param props - Configuration properties for the workspace
|
|
620
|
+
*
|
|
621
|
+
* @throws Error if any of the provided properties fail validation
|
|
622
|
+
*/
|
|
623
|
+
constructor(scope: Construct, id: string, props: WorkspaceProps);
|
|
624
|
+
}
|