@robhan-cdk-lib/aws_grafana 0.0.402 → 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.
@@ -43,7 +43,9 @@ export interface NetworkAccessControl {
43
43
  * configuration (passed an empty array) then no IP addresses are allowed to access the
44
44
  * workspace.
45
45
  *
46
- * Maximum of 5 prefix lists allowed.
46
+ * A maximum of 5 prefix lists is allowed (validated by CloudFormation at deploy time).
47
+ *
48
+ * @default - no prefix lists; combined with an empty `vpcEndpoints`, all traffic is denied
47
49
  */
48
50
  readonly prefixLists?: IPrefixList[];
49
51
  /**
@@ -52,7 +54,9 @@ export interface NetworkAccessControl {
52
54
  * is specified then only VPC endpoints specified here are allowed to access the workspace. If
53
55
  * you pass in an empty array of strings, then no VPCs are allowed to access the workspace.
54
56
  *
55
- * Maximum of 5 VPC endpoints allowed.
57
+ * A maximum of 5 VPC endpoints is allowed (validated by CloudFormation at deploy time).
58
+ *
59
+ * @default - no VPC endpoints; combined with an empty `prefixLists`, all traffic is denied
56
60
  */
57
61
  readonly vpcEndpoints?: IVpcEndpoint[];
58
62
  }
@@ -83,7 +87,11 @@ export declare enum PermissionTypes {
83
87
  */
84
88
  CUSTOMER_MANAGED = "CUSTOMER_MANAGED",
85
89
  /**
86
- * Service-managed permissions where AWS manages user access to Grafana.
90
+ * Service-managed permissions, where Amazon Managed Grafana creates and manages the IAM roles.
91
+ *
92
+ * Per the Amazon Managed Grafana API, this value is valid only for workspaces created through the
93
+ * console; workspaces created via the API, CLI, or CloudFormation (including this construct) must
94
+ * use `CUSTOMER_MANAGED`.
87
95
  */
88
96
  SERVICE_MANAGED = "SERVICE_MANAGED"
89
97
  }
@@ -97,40 +105,52 @@ export interface SamlAssertionAttributes {
97
105
  /**
98
106
  * The name of the attribute within the SAML assertion to use as the email names for SAML users.
99
107
  *
100
- * Must be between 1 and 256 characters long.
108
+ * Must be between 1 and 256 characters long (validated by CloudFormation at deploy time).
109
+ *
110
+ * @default - no email attribute mapping
101
111
  */
102
112
  readonly email?: string;
103
113
  /**
104
114
  * The name of the attribute within the SAML assertion to use as the user full "friendly" names
105
115
  * for user groups.
106
116
  *
107
- * Must be between 1 and 256 characters long.
117
+ * Must be between 1 and 256 characters long (validated by CloudFormation at deploy time).
118
+ *
119
+ * @default - no groups attribute mapping
108
120
  */
109
121
  readonly groups?: string;
110
122
  /**
111
123
  * The name of the attribute within the SAML assertion to use as the login names for SAML users.
112
124
  *
113
- * Must be between 1 and 256 characters long.
125
+ * Must be between 1 and 256 characters long (validated by CloudFormation at deploy time).
126
+ *
127
+ * @default - no login attribute mapping
114
128
  */
115
129
  readonly login?: string;
116
130
  /**
117
131
  * The name of the attribute within the SAML assertion to use as the user full "friendly" names
118
132
  * for SAML users.
119
133
  *
120
- * Must be between 1 and 256 characters long.
134
+ * Must be between 1 and 256 characters long (validated by CloudFormation at deploy time).
135
+ *
136
+ * @default - no name attribute mapping
121
137
  */
122
138
  readonly name?: string;
123
139
  /**
124
140
  * The name of the attribute within the SAML assertion to use as the user full "friendly" names
125
141
  * for the users' organizations.
126
142
  *
127
- * Must be between 1 and 256 characters long.
143
+ * Must be between 1 and 256 characters long (validated by CloudFormation at deploy time).
144
+ *
145
+ * @default - no org attribute mapping
128
146
  */
129
147
  readonly org?: string;
130
148
  /**
131
149
  * The name of the attribute within the SAML assertion to use as the user roles.
132
150
  *
133
- * Must be between 1 and 256 characters long.
151
+ * Must be between 1 and 256 characters long (validated by CloudFormation at deploy time).
152
+ *
153
+ * @default - no role attribute mapping
134
154
  */
135
155
  readonly role?: string;
136
156
  }
@@ -142,11 +162,16 @@ export interface SamlIdpMetadata {
142
162
  /**
143
163
  * The URL of the location containing the IdP metadata.
144
164
  *
145
- * Must be a string with length between 1 and 2048 characters.
165
+ * Must be a string with length between 1 and 2048 characters (validated by CloudFormation at
166
+ * deploy time).
167
+ *
168
+ * @default - no metadata URL; supply `xml` instead
146
169
  */
147
170
  readonly url?: string;
148
171
  /**
149
172
  * The full IdP metadata, in XML format.
173
+ *
174
+ * @default - no inline metadata; supply `url` instead
150
175
  */
151
176
  readonly xml?: string;
152
177
  }
@@ -158,13 +183,17 @@ export interface SamlRoleValues {
158
183
  /**
159
184
  * A list of groups from the SAML assertion attribute to grant the Grafana Admin role to.
160
185
  *
161
- * Maximum of 256 elements.
186
+ * A maximum of 256 elements is allowed (validated by CloudFormation at deploy time).
187
+ *
188
+ * @default - no groups are granted the Admin role
162
189
  */
163
190
  readonly admin?: string[];
164
191
  /**
165
192
  * A list of groups from the SAML assertion attribute to grant the Grafana Editor role to.
166
193
  *
167
- * Maximum of 256 elements.
194
+ * A maximum of 256 elements is allowed (validated by CloudFormation at deploy time).
195
+ *
196
+ * @default - no groups are granted the Editor role
168
197
  */
169
198
  readonly editor?: string[];
170
199
  }
@@ -178,14 +207,18 @@ export interface SamlConfiguration {
178
207
  * Lists which organizations defined in the SAML assertion are allowed to use the Amazon Managed
179
208
  * Grafana workspace. If this is empty, all organizations in the assertion attribute have access.
180
209
  *
181
- * Must have between 1 and 256 elements.
210
+ * Must have between 1 and 256 elements (validated by CloudFormation at deploy time).
211
+ *
212
+ * @default - all organizations in the assertion attribute have access
182
213
  */
183
214
  readonly allowedOrganizations?: string[];
184
215
  /**
185
216
  * A structure that defines which attributes in the SAML assertion are to be used to define
186
217
  * information about the users authenticated by that IdP to use the workspace.
218
+ *
219
+ * @default - no assertion attribute mapping
187
220
  */
188
- readonly assertionAtrributes?: SamlAssertionAttributes;
221
+ readonly assertionAttributes?: SamlAssertionAttributes;
189
222
  /**
190
223
  * A structure containing the identity provider (IdP) metadata used to integrate the identity
191
224
  * provider with this workspace.
@@ -196,12 +229,16 @@ export interface SamlConfiguration {
196
229
  /**
197
230
  * How long a sign-on session by a SAML user is valid, before the user has to sign on again.
198
231
  *
199
- * Must be a positive number.
232
+ * Must be a positive number (validated by CloudFormation at deploy time).
233
+ *
234
+ * @default - the service default session validity applies
200
235
  */
201
236
  readonly loginValidityDuration?: number;
202
237
  /**
203
238
  * A structure containing arrays that map group names in the SAML assertion to the Grafana Admin
204
239
  * and Editor roles in the workspace.
240
+ *
241
+ * @default - no role mapping
205
242
  */
206
243
  readonly roleValues?: SamlRoleValues;
207
244
  }
@@ -214,7 +251,8 @@ export interface VpcConfiguration {
214
251
  * The list of Amazon EC2 security groups attached to the Amazon VPC for your Grafana
215
252
  * workspace to connect. Duplicates not allowed.
216
253
  *
217
- * Array Members: Minimum number of 1 items. Maximum number of 5 items.
254
+ * Array members: minimum of 1 item, maximum of 5 items (validated by CloudFormation at deploy
255
+ * time).
218
256
  *
219
257
  * Required for VPC configuration.
220
258
  */
@@ -223,7 +261,8 @@ export interface VpcConfiguration {
223
261
  * The list of Amazon EC2 subnets created in the Amazon VPC for your Grafana workspace to
224
262
  * connect. Duplicates not allowed.
225
263
  *
226
- * Array Members: Minimum number of 2 items. Maximum number of 6 items.
264
+ * Array members: minimum of 2 items, maximum of 6 items (validated by CloudFormation at deploy
265
+ * time).
227
266
  *
228
267
  * Required for VPC configuration.
229
268
  */
@@ -300,15 +339,21 @@ export interface IWorkspace extends IResource {
300
339
  * it can also access AWS resources in other accounts in the same organization. If this is
301
340
  * ORGANIZATION, the OrganizationalUnits parameter specifies which organizational units the
302
341
  * workspace can access.
342
+ *
343
+ * @default - not available on workspaces imported from an ARN via `Workspace.fromWorkspaceArn`
303
344
  */
304
- readonly accountAccessType: AccountAccessType;
345
+ readonly accountAccessType?: AccountAccessType;
305
346
  /**
306
347
  * Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to
307
348
  * authenticate users for using the Grafana console within a workspace.
349
+ *
350
+ * @default - not available on workspaces imported from an ARN via `Workspace.fromWorkspaceArn`
308
351
  */
309
- readonly authenticationProviders: AuthenticationProviders[];
352
+ readonly authenticationProviders?: AuthenticationProviders[];
310
353
  /**
311
354
  * A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
355
+ *
356
+ * @default - not available on imported workspaces
312
357
  */
313
358
  readonly clientToken?: string;
314
359
  /**
@@ -316,33 +361,48 @@ export interface IWorkspace extends IResource {
316
361
  * created to allow Amazon Managed Grafana to read data from these sources.
317
362
  *
318
363
  * This list is only used when the workspace was created through the AWS console, and the
319
- * permissionType is SERVICE_MANAGED.
364
+ * permissionType is SERVICE_MANAGED. The Amazon Managed Grafana API marks this parameter as for
365
+ * internal use only and recommends against setting it.
366
+ *
367
+ * @default - no data sources
320
368
  */
321
369
  readonly dataSources?: string[];
322
370
  /**
323
371
  * The user-defined description of the workspace.
372
+ *
373
+ * @default - no description
324
374
  */
325
375
  readonly description?: string;
326
376
  /**
327
377
  * The name of the workspace.
378
+ *
379
+ * @default - a name is generated by CloudFormation
328
380
  */
329
381
  readonly name?: string;
330
382
  /**
331
383
  * The configuration settings for network access to your workspace.
384
+ *
385
+ * @default - no network access control, the workspace is open to all traffic
332
386
  */
333
387
  readonly networkAccessControl?: NetworkAccessControl;
334
388
  /**
335
389
  * The AWS notification channels that Amazon Managed Grafana can automatically create IAM roles
336
390
  * and permissions for, to allow Amazon Managed Grafana to use these channels.
391
+ *
392
+ * @default - no notification destinations
337
393
  */
338
394
  readonly notificationDestinations?: NotificationDestinations[];
339
395
  /**
340
396
  * Specifies the organizational units that this workspace is allowed to use data sources from, if
341
397
  * this workspace is in an account that is part of an organization.
398
+ *
399
+ * @default - no organizational units
342
400
  */
343
401
  readonly organizationalUnits?: string[];
344
402
  /**
345
403
  * The name of the IAM role that is used to access resources through Organizations.
404
+ *
405
+ * @default - no organization role name
346
406
  */
347
407
  readonly organizationRoleName?: string;
348
408
  /**
@@ -355,36 +415,98 @@ export interface IWorkspace extends IResource {
355
415
  * If you are working with a workspace in a member account of an organization and that account is
356
416
  * not a delegated administrator account, and you want the workspace to access data sources in
357
417
  * other AWS accounts in the organization, this parameter must be set to CUSTOMER_MANAGED.
418
+ *
419
+ * @default - not available on workspaces imported from an ARN via `Workspace.fromWorkspaceArn`
358
420
  */
359
- readonly permissionType: PermissionTypes;
421
+ readonly permissionType?: PermissionTypes;
360
422
  /**
361
423
  * Whether plugin administration is enabled in the workspace. Setting to true allows workspace
362
424
  * admins to install, uninstall, and update plugins from within the Grafana workspace.
363
425
  *
364
426
  * This option is only valid for workspaces that support Grafana version 9 or newer.
427
+ *
428
+ * @default - false
365
429
  */
366
430
  readonly pluginAdminEnabled?: boolean;
367
431
  /**
368
432
  * The IAM role that grants permissions to the AWS resources that the workspace will view data
369
433
  * from.
434
+ *
435
+ * @default - no role is attached
370
436
  */
371
437
  readonly role?: IRole;
372
438
  /**
373
439
  * If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace
374
440
  * user information and define which groups in the assertion attribute are to have the Admin and
375
441
  * Editor roles in the workspace.
442
+ *
443
+ * @default - no SAML configuration
376
444
  */
377
445
  readonly samlConfiguration?: SamlConfiguration;
378
446
  /**
379
447
  * The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for
380
448
  * this workspace.
449
+ *
450
+ * @default - no stack set name
381
451
  */
382
452
  readonly stackSetName?: string;
383
453
  /**
384
454
  * The configuration settings for an Amazon VPC that contains data sources for your Grafana
385
455
  * workspace to connect to.
456
+ *
457
+ * @default - no VPC connection
386
458
  */
387
459
  readonly vpcConfiguration?: VpcConfiguration;
460
+ /**
461
+ * The date that the workspace was created.
462
+ *
463
+ * @default - not available on imported workspaces
464
+ * @attribute
465
+ */
466
+ readonly creationTimestamp?: string;
467
+ /**
468
+ * The URL that users can use to access the Grafana console in the workspace.
469
+ *
470
+ * @default - not available on imported workspaces
471
+ * @attribute
472
+ */
473
+ readonly endpoint?: string;
474
+ /**
475
+ * Specifies the version of Grafana supported by this workspace.
476
+ *
477
+ * @default - not available on imported workspaces
478
+ * @attribute
479
+ */
480
+ readonly grafanaVersion?: string;
481
+ /**
482
+ * The most recent date that the workspace was modified.
483
+ *
484
+ * @default - not available on imported workspaces
485
+ * @attribute
486
+ */
487
+ readonly modificationTimestamp?: string;
488
+ /**
489
+ * Specifies whether the workspace's SAML configuration is complete.
490
+ *
491
+ * @default - not available on imported workspaces
492
+ * @attribute
493
+ */
494
+ readonly samlConfigurationStatus?: string;
495
+ /**
496
+ * The ID of the IAM Identity Center-managed application that is created by Amazon Managed
497
+ * Grafana.
498
+ *
499
+ * @default - not available on imported workspaces
500
+ * @attribute
501
+ */
502
+ readonly ssoClientId?: string;
503
+ /**
504
+ * The current status of the workspace.
505
+ *
506
+ * @default - not available on imported workspaces
507
+ * @attribute
508
+ */
509
+ readonly status?: string;
388
510
  /**
389
511
  * The unique ID of this workspace.
390
512
  * @attribute
@@ -399,77 +521,159 @@ export interface IWorkspace extends IResource {
399
521
  export declare abstract class WorkspaceBase extends Resource implements IWorkspace {
400
522
  /**
401
523
  * The account access type for the workspace.
524
+ *
525
+ * @default - not available on workspaces imported from an ARN via `Workspace.fromWorkspaceArn`
402
526
  */
403
- abstract readonly accountAccessType: AccountAccessType;
527
+ abstract readonly accountAccessType?: AccountAccessType;
404
528
  /**
405
529
  * The authentication providers for the workspace.
530
+ *
531
+ * @default - not available on workspaces imported from an ARN via `Workspace.fromWorkspaceArn`
406
532
  */
407
- abstract readonly authenticationProviders: AuthenticationProviders[];
533
+ abstract readonly authenticationProviders?: AuthenticationProviders[];
408
534
  /**
409
535
  * The client token for the workspace.
536
+ *
537
+ * @default - not available on imported workspaces
410
538
  */
411
539
  abstract readonly clientToken?: string;
412
540
  /**
413
541
  * The data sources of this workspace
542
+ *
543
+ * @default - no data sources
414
544
  */
415
545
  abstract readonly dataSources?: string[];
416
546
  /**
417
547
  * The description of this workspace
548
+ *
549
+ * @default - no description
418
550
  */
419
551
  abstract readonly description?: string;
420
552
  /**
421
553
  * The name of this workspace
554
+ *
555
+ * @default - a name is generated by CloudFormation
422
556
  */
423
557
  abstract readonly name?: string;
424
558
  /**
425
559
  * The configuration settings for network access to your workspace.
560
+ *
561
+ * @default - no network access control, the workspace is open to all traffic
426
562
  */
427
563
  abstract readonly networkAccessControl?: NetworkAccessControl;
428
564
  /**
429
565
  * The notification destinations for the workspace.
566
+ *
567
+ * @default - no notification destinations
430
568
  */
431
569
  abstract readonly notificationDestinations?: NotificationDestinations[];
432
570
  /**
433
571
  * Specifies the organizational units that this workspace is allowed to use data sources from, if
434
572
  * this workspace is in an account that is part of an organization.
573
+ *
574
+ * @default - no organizational units
435
575
  */
436
576
  abstract readonly organizationalUnits?: string[];
437
577
  /**
438
578
  * The name of the IAM role that is used to access resources through Organizations.
579
+ *
580
+ * @default - no organization role name
439
581
  */
440
582
  abstract readonly organizationRoleName?: string;
441
583
  /**
442
584
  * The permission type for the workspace.
585
+ *
586
+ * @default - not available on workspaces imported from an ARN via `Workspace.fromWorkspaceArn`
443
587
  */
444
- abstract readonly permissionType: PermissionTypes;
588
+ abstract readonly permissionType?: PermissionTypes;
445
589
  /**
446
590
  * Whether plugin administration is enabled in the workspace. Setting to true allows workspace
447
591
  * admins to install, uninstall, and update plugins from within the Grafana workspace.
448
592
  *
449
593
  * This option is only valid for workspaces that support Grafana version 9 or newer.
594
+ *
595
+ * @default - false
450
596
  */
451
597
  abstract readonly pluginAdminEnabled?: boolean;
452
598
  /**
453
599
  * The IAM role that grants permissions to the AWS resources that the workspace will view data
454
600
  * from.
601
+ *
602
+ * @default - no role is attached
455
603
  */
456
604
  abstract readonly role?: IRole;
457
605
  /**
458
606
  * If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace
459
607
  * user information and define which groups in the assertion attribute are to have the Admin and
460
608
  * Editor roles in the workspace.
609
+ *
610
+ * @default - no SAML configuration
461
611
  */
462
612
  abstract readonly samlConfiguration?: SamlConfiguration;
463
613
  /**
464
614
  * The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for
465
615
  * this workspace.
616
+ *
617
+ * @default - no stack set name
466
618
  */
467
619
  abstract readonly stackSetName?: string;
468
620
  /**
469
621
  * The configuration settings for an Amazon VPC that contains data sources for your Grafana
470
622
  * workspace to connect to.
623
+ *
624
+ * @default - no VPC connection
471
625
  */
472
626
  abstract readonly vpcConfiguration?: VpcConfiguration;
627
+ /**
628
+ * The date that the workspace was created.
629
+ *
630
+ * @default - not available on imported workspaces
631
+ * @attribute
632
+ */
633
+ abstract readonly creationTimestamp?: string;
634
+ /**
635
+ * The URL that users can use to access the Grafana console in the workspace.
636
+ *
637
+ * @default - not available on imported workspaces
638
+ * @attribute
639
+ */
640
+ abstract readonly endpoint?: string;
641
+ /**
642
+ * Specifies the version of Grafana supported by this workspace.
643
+ *
644
+ * @default - not available on imported workspaces
645
+ * @attribute
646
+ */
647
+ abstract readonly grafanaVersion?: string;
648
+ /**
649
+ * The most recent date that the workspace was modified.
650
+ *
651
+ * @default - not available on imported workspaces
652
+ * @attribute
653
+ */
654
+ abstract readonly modificationTimestamp?: string;
655
+ /**
656
+ * Specifies whether the workspace's SAML configuration is complete.
657
+ *
658
+ * @default - not available on imported workspaces
659
+ * @attribute
660
+ */
661
+ abstract readonly samlConfigurationStatus?: string;
662
+ /**
663
+ * The ID of the IAM Identity Center-managed application that is created by Amazon Managed
664
+ * Grafana.
665
+ *
666
+ * @default - not available on imported workspaces
667
+ * @attribute
668
+ */
669
+ abstract readonly ssoClientId?: string;
670
+ /**
671
+ * The current status of the workspace.
672
+ *
673
+ * @default - not available on imported workspaces
674
+ * @attribute
675
+ */
676
+ abstract readonly status?: string;
473
677
  /**
474
678
  * The unique ID of this workspace.
475
679
  */