robhan-cdk-lib.aws-grafana 0.0.233__py3-none-any.whl

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.
@@ -0,0 +1,2398 @@
1
+ r'''
2
+ # @robhan-cdk-lib/aws_grafana
3
+
4
+ AWS Cloud Development Kit (CDK) constructs for Amazon Managed Grafana.
5
+
6
+ In [aws-cdk-lib.aws_grafana](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_grafana-readme.html), there currently only exist L1 constructs for Amazon Managed Grafana.
7
+
8
+ While helpful, they miss convenience like:
9
+
10
+ * advanced parameter checking (min/max number values, string lengths, array lengths...) before CloudFormation deployment
11
+ * proper parameter typing, e.g. enum values instead of strings
12
+ * simply referencing other constructs instead of e.g. ARN strings
13
+
14
+ Those features are implemented here.
15
+
16
+ The CDK maintainers explain that [publishing your own package](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md#publishing-your-own-package) is "by far the strongest signal you can give to the CDK team that a feature should be included within the core aws-cdk packages".
17
+
18
+ This project aims to develop aws_grafana constructs to a maturity that can potentially be accepted to the CDK core.
19
+
20
+ It is not supported by AWS and is not endorsed by them. Please file issues in the [GitHub repository](https://github.com/robert-hanuschke/cdk-aws_grafana/issues) if you find any.
21
+
22
+ ## Example use
23
+
24
+ ```python
25
+ import * as cdk from "aws-cdk-lib";
26
+ import { Construct } from "constructs";
27
+ import {
28
+ AccountAccessType,
29
+ AuthenticationProviders,
30
+ PermissionTypes,
31
+ Workspace,
32
+ } from "@robhan-cdk-lib/aws_grafana";
33
+ import { Role, ServicePrincipal } from "aws-cdk-lib/aws-iam";
34
+
35
+ export class AwsGrafanaCdkStack extends cdk.Stack {
36
+ constructor(scope: Construct, id: string, props?: cdk.StackProps) {
37
+ super(scope, id, props);
38
+
39
+ const grafanaRole = new Role(this, "GrafanaWorkspaceRole", {
40
+ assumedBy: new ServicePrincipal("grafana.amazonaws.com"),
41
+ description: "Role for Amazon Managed Grafana Workspace",
42
+ });
43
+
44
+ const workspace = new Workspace(this, "Workspace", {
45
+ accountAccessType: AccountAccessType.CURRENT_ACCOUNT,
46
+ authenticationProviders: [AuthenticationProviders.AWS_SSO],
47
+ permissionType: PermissionTypes.SERVICE_MANAGED,
48
+ role: grafanaRole,
49
+ });
50
+ }
51
+ }
52
+ ```
53
+
54
+ ## License
55
+
56
+ MIT
57
+ '''
58
+ from pkgutil import extend_path
59
+ __path__ = extend_path(__path__, __name__)
60
+
61
+ import abc
62
+ import builtins
63
+ import datetime
64
+ import enum
65
+ import typing
66
+
67
+ import jsii
68
+ import publication
69
+ import typing_extensions
70
+
71
+ import typeguard
72
+ from importlib.metadata import version as _metadata_package_version
73
+ TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
74
+
75
+ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
76
+ if TYPEGUARD_MAJOR_VERSION <= 2:
77
+ return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
78
+ else:
79
+ if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
80
+ pass
81
+ else:
82
+ if TYPEGUARD_MAJOR_VERSION == 3:
83
+ typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
84
+ typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
85
+ else:
86
+ typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
87
+
88
+ from ._jsii import *
89
+
90
+ import aws_cdk as _aws_cdk_ceddda9d
91
+ import aws_cdk.aws_ec2 as _aws_cdk_aws_ec2_ceddda9d
92
+ import aws_cdk.aws_iam as _aws_cdk_aws_iam_ceddda9d
93
+ import constructs as _constructs_77d1e7e8
94
+
95
+
96
+ @jsii.enum(jsii_type="@robhan-cdk-lib/aws_grafana.AccountAccessType")
97
+ class AccountAccessType(enum.Enum):
98
+ '''Specifies whether the workspace can access AWS resources in this AWS account only, or whether it can also access AWS resources in other accounts in the same organization.
99
+
100
+ If this is
101
+ ORGANIZATION, the OrganizationalUnits parameter specifies which organizational units the
102
+ workspace can access.
103
+ '''
104
+
105
+ CURRENT_ACCOUNT = "CURRENT_ACCOUNT"
106
+ '''Access is limited to the current AWS account only.'''
107
+ ORGANIZATION = "ORGANIZATION"
108
+ '''Access is extended to the entire AWS organization.'''
109
+
110
+
111
+ @jsii.enum(jsii_type="@robhan-cdk-lib/aws_grafana.AuthenticationProviders")
112
+ class AuthenticationProviders(enum.Enum):
113
+ '''Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace.
114
+
115
+ :see: https://docs.aws.amazon.com/grafana/latest/APIReference/API_CreateWorkspace.html
116
+ '''
117
+
118
+ AWS_SSO = "AWS_SSO"
119
+ '''AWS Single Sign-On authentication provider.'''
120
+ SAML = "SAML"
121
+ '''Security Assertion Markup Language (SAML) authentication provider.'''
122
+
123
+
124
+ @jsii.interface(jsii_type="@robhan-cdk-lib/aws_grafana.IWorkspace")
125
+ class IWorkspace(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
126
+ '''Represents an Amazon Managed Service for Grafana workspace.'''
127
+
128
+ @builtins.property
129
+ @jsii.member(jsii_name="accountAccessType")
130
+ def account_access_type(self) -> "AccountAccessType":
131
+ '''Specifies whether the workspace can access AWS resources in this AWS account only, or whether it can also access AWS resources in other accounts in the same organization.
132
+
133
+ If this is
134
+ ORGANIZATION, the OrganizationalUnits parameter specifies which organizational units the
135
+ workspace can access.
136
+ '''
137
+ ...
138
+
139
+ @builtins.property
140
+ @jsii.member(jsii_name="authenticationProviders")
141
+ def authentication_providers(self) -> typing.List["AuthenticationProviders"]:
142
+ '''Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace.'''
143
+ ...
144
+
145
+ @builtins.property
146
+ @jsii.member(jsii_name="permissionType")
147
+ def permission_type(self) -> "PermissionTypes":
148
+ '''If this is SERVICE_MANAGED, and the workplace was created through the Amazon Managed Grafana console, then Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use AWS data sources and notification channels.
149
+
150
+ If this is CUSTOMER_MANAGED, you must manage those roles and permissions yourself.
151
+
152
+ If you are working with a workspace in a member account of an organization and that account is
153
+ not a delegated administrator account, and you want the workspace to access data sources in
154
+ other AWS accounts in the organization, this parameter must be set to CUSTOMER_MANAGED.
155
+ '''
156
+ ...
157
+
158
+ @builtins.property
159
+ @jsii.member(jsii_name="workspaceArn")
160
+ def workspace_arn(self) -> builtins.str:
161
+ '''The ARN of this workspace.
162
+
163
+ :attribute: true
164
+ '''
165
+ ...
166
+
167
+ @builtins.property
168
+ @jsii.member(jsii_name="workspaceId")
169
+ def workspace_id(self) -> builtins.str:
170
+ '''The unique ID of this workspace.
171
+
172
+ :attribute: true
173
+ '''
174
+ ...
175
+
176
+ @builtins.property
177
+ @jsii.member(jsii_name="clientToken")
178
+ def client_token(self) -> typing.Optional[builtins.str]:
179
+ '''A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.'''
180
+ ...
181
+
182
+ @builtins.property
183
+ @jsii.member(jsii_name="dataSources")
184
+ def data_sources(self) -> typing.Optional[typing.List[builtins.str]]:
185
+ '''Specifies the AWS data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.
186
+
187
+ This list is only used when the workspace was created through the AWS console, and the
188
+ permissionType is SERVICE_MANAGED.
189
+ '''
190
+ ...
191
+
192
+ @builtins.property
193
+ @jsii.member(jsii_name="description")
194
+ def description(self) -> typing.Optional[builtins.str]:
195
+ '''The user-defined description of the workspace.'''
196
+ ...
197
+
198
+ @builtins.property
199
+ @jsii.member(jsii_name="name")
200
+ def name(self) -> typing.Optional[builtins.str]:
201
+ '''The name of the workspace.'''
202
+ ...
203
+
204
+ @builtins.property
205
+ @jsii.member(jsii_name="networkAccessControl")
206
+ def network_access_control(self) -> typing.Optional["NetworkAccessControl"]:
207
+ '''The configuration settings for network access to your workspace.'''
208
+ ...
209
+
210
+ @builtins.property
211
+ @jsii.member(jsii_name="notificationDestinations")
212
+ def notification_destinations(
213
+ self,
214
+ ) -> typing.Optional[typing.List["NotificationDestinations"]]:
215
+ '''The AWS notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.'''
216
+ ...
217
+
218
+ @builtins.property
219
+ @jsii.member(jsii_name="organizationalUnits")
220
+ def organizational_units(self) -> typing.Optional[typing.List[builtins.str]]:
221
+ '''Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.'''
222
+ ...
223
+
224
+ @builtins.property
225
+ @jsii.member(jsii_name="organizationRoleName")
226
+ def organization_role_name(self) -> typing.Optional[builtins.str]:
227
+ '''The name of the IAM role that is used to access resources through Organizations.'''
228
+ ...
229
+
230
+ @builtins.property
231
+ @jsii.member(jsii_name="pluginAdminEnabled")
232
+ def plugin_admin_enabled(self) -> typing.Optional[builtins.bool]:
233
+ '''Whether plugin administration is enabled in the workspace.
234
+
235
+ Setting to true allows workspace
236
+ admins to install, uninstall, and update plugins from within the Grafana workspace.
237
+
238
+ This option is only valid for workspaces that support Grafana version 9 or newer.
239
+ '''
240
+ ...
241
+
242
+ @builtins.property
243
+ @jsii.member(jsii_name="role")
244
+ def role(self) -> typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"]:
245
+ '''The IAM role that grants permissions to the AWS resources that the workspace will view data from.'''
246
+ ...
247
+
248
+ @builtins.property
249
+ @jsii.member(jsii_name="samlConfiguration")
250
+ def saml_configuration(self) -> typing.Optional["SamlConfiguration"]:
251
+ '''If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.'''
252
+ ...
253
+
254
+ @builtins.property
255
+ @jsii.member(jsii_name="stackSetName")
256
+ def stack_set_name(self) -> typing.Optional[builtins.str]:
257
+ '''The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.'''
258
+ ...
259
+
260
+ @builtins.property
261
+ @jsii.member(jsii_name="vpcConfiguration")
262
+ def vpc_configuration(self) -> typing.Optional["VpcConfiguration"]:
263
+ '''The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.'''
264
+ ...
265
+
266
+
267
+ class _IWorkspaceProxy(
268
+ jsii.proxy_for(_aws_cdk_ceddda9d.IResource), # type: ignore[misc]
269
+ ):
270
+ '''Represents an Amazon Managed Service for Grafana workspace.'''
271
+
272
+ __jsii_type__: typing.ClassVar[str] = "@robhan-cdk-lib/aws_grafana.IWorkspace"
273
+
274
+ @builtins.property
275
+ @jsii.member(jsii_name="accountAccessType")
276
+ def account_access_type(self) -> "AccountAccessType":
277
+ '''Specifies whether the workspace can access AWS resources in this AWS account only, or whether it can also access AWS resources in other accounts in the same organization.
278
+
279
+ If this is
280
+ ORGANIZATION, the OrganizationalUnits parameter specifies which organizational units the
281
+ workspace can access.
282
+ '''
283
+ return typing.cast("AccountAccessType", jsii.get(self, "accountAccessType"))
284
+
285
+ @builtins.property
286
+ @jsii.member(jsii_name="authenticationProviders")
287
+ def authentication_providers(self) -> typing.List["AuthenticationProviders"]:
288
+ '''Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace.'''
289
+ return typing.cast(typing.List["AuthenticationProviders"], jsii.get(self, "authenticationProviders"))
290
+
291
+ @builtins.property
292
+ @jsii.member(jsii_name="permissionType")
293
+ def permission_type(self) -> "PermissionTypes":
294
+ '''If this is SERVICE_MANAGED, and the workplace was created through the Amazon Managed Grafana console, then Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use AWS data sources and notification channels.
295
+
296
+ If this is CUSTOMER_MANAGED, you must manage those roles and permissions yourself.
297
+
298
+ If you are working with a workspace in a member account of an organization and that account is
299
+ not a delegated administrator account, and you want the workspace to access data sources in
300
+ other AWS accounts in the organization, this parameter must be set to CUSTOMER_MANAGED.
301
+ '''
302
+ return typing.cast("PermissionTypes", jsii.get(self, "permissionType"))
303
+
304
+ @builtins.property
305
+ @jsii.member(jsii_name="workspaceArn")
306
+ def workspace_arn(self) -> builtins.str:
307
+ '''The ARN of this workspace.
308
+
309
+ :attribute: true
310
+ '''
311
+ return typing.cast(builtins.str, jsii.get(self, "workspaceArn"))
312
+
313
+ @builtins.property
314
+ @jsii.member(jsii_name="workspaceId")
315
+ def workspace_id(self) -> builtins.str:
316
+ '''The unique ID of this workspace.
317
+
318
+ :attribute: true
319
+ '''
320
+ return typing.cast(builtins.str, jsii.get(self, "workspaceId"))
321
+
322
+ @builtins.property
323
+ @jsii.member(jsii_name="clientToken")
324
+ def client_token(self) -> typing.Optional[builtins.str]:
325
+ '''A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.'''
326
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "clientToken"))
327
+
328
+ @builtins.property
329
+ @jsii.member(jsii_name="dataSources")
330
+ def data_sources(self) -> typing.Optional[typing.List[builtins.str]]:
331
+ '''Specifies the AWS data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.
332
+
333
+ This list is only used when the workspace was created through the AWS console, and the
334
+ permissionType is SERVICE_MANAGED.
335
+ '''
336
+ return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "dataSources"))
337
+
338
+ @builtins.property
339
+ @jsii.member(jsii_name="description")
340
+ def description(self) -> typing.Optional[builtins.str]:
341
+ '''The user-defined description of the workspace.'''
342
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "description"))
343
+
344
+ @builtins.property
345
+ @jsii.member(jsii_name="name")
346
+ def name(self) -> typing.Optional[builtins.str]:
347
+ '''The name of the workspace.'''
348
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "name"))
349
+
350
+ @builtins.property
351
+ @jsii.member(jsii_name="networkAccessControl")
352
+ def network_access_control(self) -> typing.Optional["NetworkAccessControl"]:
353
+ '''The configuration settings for network access to your workspace.'''
354
+ return typing.cast(typing.Optional["NetworkAccessControl"], jsii.get(self, "networkAccessControl"))
355
+
356
+ @builtins.property
357
+ @jsii.member(jsii_name="notificationDestinations")
358
+ def notification_destinations(
359
+ self,
360
+ ) -> typing.Optional[typing.List["NotificationDestinations"]]:
361
+ '''The AWS notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.'''
362
+ return typing.cast(typing.Optional[typing.List["NotificationDestinations"]], jsii.get(self, "notificationDestinations"))
363
+
364
+ @builtins.property
365
+ @jsii.member(jsii_name="organizationalUnits")
366
+ def organizational_units(self) -> typing.Optional[typing.List[builtins.str]]:
367
+ '''Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.'''
368
+ return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "organizationalUnits"))
369
+
370
+ @builtins.property
371
+ @jsii.member(jsii_name="organizationRoleName")
372
+ def organization_role_name(self) -> typing.Optional[builtins.str]:
373
+ '''The name of the IAM role that is used to access resources through Organizations.'''
374
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "organizationRoleName"))
375
+
376
+ @builtins.property
377
+ @jsii.member(jsii_name="pluginAdminEnabled")
378
+ def plugin_admin_enabled(self) -> typing.Optional[builtins.bool]:
379
+ '''Whether plugin administration is enabled in the workspace.
380
+
381
+ Setting to true allows workspace
382
+ admins to install, uninstall, and update plugins from within the Grafana workspace.
383
+
384
+ This option is only valid for workspaces that support Grafana version 9 or newer.
385
+ '''
386
+ return typing.cast(typing.Optional[builtins.bool], jsii.get(self, "pluginAdminEnabled"))
387
+
388
+ @builtins.property
389
+ @jsii.member(jsii_name="role")
390
+ def role(self) -> typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"]:
391
+ '''The IAM role that grants permissions to the AWS resources that the workspace will view data from.'''
392
+ return typing.cast(typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"], jsii.get(self, "role"))
393
+
394
+ @builtins.property
395
+ @jsii.member(jsii_name="samlConfiguration")
396
+ def saml_configuration(self) -> typing.Optional["SamlConfiguration"]:
397
+ '''If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.'''
398
+ return typing.cast(typing.Optional["SamlConfiguration"], jsii.get(self, "samlConfiguration"))
399
+
400
+ @builtins.property
401
+ @jsii.member(jsii_name="stackSetName")
402
+ def stack_set_name(self) -> typing.Optional[builtins.str]:
403
+ '''The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.'''
404
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "stackSetName"))
405
+
406
+ @builtins.property
407
+ @jsii.member(jsii_name="vpcConfiguration")
408
+ def vpc_configuration(self) -> typing.Optional["VpcConfiguration"]:
409
+ '''The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.'''
410
+ return typing.cast(typing.Optional["VpcConfiguration"], jsii.get(self, "vpcConfiguration"))
411
+
412
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
413
+ typing.cast(typing.Any, IWorkspace).__jsii_proxy_class__ = lambda : _IWorkspaceProxy
414
+
415
+
416
+ @jsii.data_type(
417
+ jsii_type="@robhan-cdk-lib/aws_grafana.NetworkAccessControl",
418
+ jsii_struct_bases=[],
419
+ name_mapping={"prefix_lists": "prefixLists", "vpc_endpoints": "vpcEndpoints"},
420
+ )
421
+ class NetworkAccessControl:
422
+ def __init__(
423
+ self,
424
+ *,
425
+ prefix_lists: typing.Optional[typing.Sequence["_aws_cdk_aws_ec2_ceddda9d.IPrefixList"]] = None,
426
+ vpc_endpoints: typing.Optional[typing.Sequence["_aws_cdk_aws_ec2_ceddda9d.IVpcEndpoint"]] = None,
427
+ ) -> None:
428
+ '''The configuration settings for network access to your workspace.
429
+
430
+ :param prefix_lists: An array of prefix list IDs. A prefix list is a list of CIDR ranges of IP addresses. The IP addresses specified are allowed to access your workspace. If the list is not included in the configuration (passed an empty array) then no IP addresses are allowed to access the workspace. Maximum of 5 prefix lists allowed.
431
+ :param vpc_endpoints: An array of Amazon VPC endpoint IDs for the workspace. You can create VPC endpoints to your Amazon Managed Grafana workspace for access from within a VPC. If a NetworkAccessConfiguration is specified then only VPC endpoints specified here are allowed to access the workspace. If you pass in an empty array of strings, then no VPCs are allowed to access the workspace. Maximum of 5 VPC endpoints allowed.
432
+ '''
433
+ if __debug__:
434
+ type_hints = typing.get_type_hints(_typecheckingstub__1b57abbd6d5412b27ea5caabeb6d58c1a772f5dd9e53d0ba1d0295296567cbb8)
435
+ check_type(argname="argument prefix_lists", value=prefix_lists, expected_type=type_hints["prefix_lists"])
436
+ check_type(argname="argument vpc_endpoints", value=vpc_endpoints, expected_type=type_hints["vpc_endpoints"])
437
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
438
+ if prefix_lists is not None:
439
+ self._values["prefix_lists"] = prefix_lists
440
+ if vpc_endpoints is not None:
441
+ self._values["vpc_endpoints"] = vpc_endpoints
442
+
443
+ @builtins.property
444
+ def prefix_lists(
445
+ self,
446
+ ) -> typing.Optional[typing.List["_aws_cdk_aws_ec2_ceddda9d.IPrefixList"]]:
447
+ '''An array of prefix list IDs.
448
+
449
+ A prefix list is a list of CIDR ranges of IP addresses. The IP
450
+ addresses specified are allowed to access your workspace. If the list is not included in the
451
+ configuration (passed an empty array) then no IP addresses are allowed to access the
452
+ workspace.
453
+
454
+ Maximum of 5 prefix lists allowed.
455
+ '''
456
+ result = self._values.get("prefix_lists")
457
+ return typing.cast(typing.Optional[typing.List["_aws_cdk_aws_ec2_ceddda9d.IPrefixList"]], result)
458
+
459
+ @builtins.property
460
+ def vpc_endpoints(
461
+ self,
462
+ ) -> typing.Optional[typing.List["_aws_cdk_aws_ec2_ceddda9d.IVpcEndpoint"]]:
463
+ '''An array of Amazon VPC endpoint IDs for the workspace.
464
+
465
+ You can create VPC endpoints to your
466
+ Amazon Managed Grafana workspace for access from within a VPC. If a NetworkAccessConfiguration
467
+ is specified then only VPC endpoints specified here are allowed to access the workspace. If
468
+ you pass in an empty array of strings, then no VPCs are allowed to access the workspace.
469
+
470
+ Maximum of 5 VPC endpoints allowed.
471
+ '''
472
+ result = self._values.get("vpc_endpoints")
473
+ return typing.cast(typing.Optional[typing.List["_aws_cdk_aws_ec2_ceddda9d.IVpcEndpoint"]], result)
474
+
475
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
476
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
477
+
478
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
479
+ return not (rhs == self)
480
+
481
+ def __repr__(self) -> str:
482
+ return "NetworkAccessControl(%s)" % ", ".join(
483
+ k + "=" + repr(v) for k, v in self._values.items()
484
+ )
485
+
486
+
487
+ @jsii.enum(jsii_type="@robhan-cdk-lib/aws_grafana.NotificationDestinations")
488
+ class NotificationDestinations(enum.Enum):
489
+ '''The AWS notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.'''
490
+
491
+ SNS = "SNS"
492
+ '''Amazon Simple Notification Service (SNS) as notification destination.'''
493
+
494
+
495
+ @jsii.enum(jsii_type="@robhan-cdk-lib/aws_grafana.PermissionTypes")
496
+ class PermissionTypes(enum.Enum):
497
+ '''If this is SERVICE_MANAGED, and the workplace was created through the Amazon Managed Grafana console, then Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use AWS data sources and notification channels.
498
+
499
+ If this is CUSTOMER_MANAGED, you must manage those roles and permissions yourself.
500
+
501
+ If you are working with a workspace in a member account of an organization and that account is
502
+ not a delegated administrator account, and you want the workspace to access data sources in
503
+ other AWS accounts in the organization, this parameter must be set to CUSTOMER_MANAGED.
504
+ '''
505
+
506
+ CUSTOMER_MANAGED = "CUSTOMER_MANAGED"
507
+ '''Customer-managed permissions where you manage user access to Grafana.'''
508
+ SERVICE_MANAGED = "SERVICE_MANAGED"
509
+ '''Service-managed permissions where AWS manages user access to Grafana.'''
510
+
511
+
512
+ @jsii.data_type(
513
+ jsii_type="@robhan-cdk-lib/aws_grafana.SamlAssertionAttributes",
514
+ jsii_struct_bases=[],
515
+ name_mapping={
516
+ "email": "email",
517
+ "groups": "groups",
518
+ "login": "login",
519
+ "name": "name",
520
+ "org": "org",
521
+ "role": "role",
522
+ },
523
+ )
524
+ class SamlAssertionAttributes:
525
+ def __init__(
526
+ self,
527
+ *,
528
+ email: typing.Optional[builtins.str] = None,
529
+ groups: typing.Optional[builtins.str] = None,
530
+ login: typing.Optional[builtins.str] = None,
531
+ name: typing.Optional[builtins.str] = None,
532
+ org: typing.Optional[builtins.str] = None,
533
+ role: typing.Optional[builtins.str] = None,
534
+ ) -> None:
535
+ '''A structure that defines which attributes in the IdP assertion are to be used to define information about the users authenticated by the IdP to use the workspace.
536
+
537
+ Each attribute must be a string with length between 1 and 256 characters.
538
+
539
+ :param email: The name of the attribute within the SAML assertion to use as the email names for SAML users. Must be between 1 and 256 characters long.
540
+ :param groups: The name of the attribute within the SAML assertion to use as the user full "friendly" names for user groups. Must be between 1 and 256 characters long.
541
+ :param login: The name of the attribute within the SAML assertion to use as the login names for SAML users. Must be between 1 and 256 characters long.
542
+ :param name: The name of the attribute within the SAML assertion to use as the user full "friendly" names for SAML users. Must be between 1 and 256 characters long.
543
+ :param org: The name of the attribute within the SAML assertion to use as the user full "friendly" names for the users' organizations. Must be between 1 and 256 characters long.
544
+ :param role: The name of the attribute within the SAML assertion to use as the user roles. Must be between 1 and 256 characters long.
545
+ '''
546
+ if __debug__:
547
+ type_hints = typing.get_type_hints(_typecheckingstub__f6b87a6ceb131220a990409e721206d988891f136b4ef9fd7de25db4bea7624d)
548
+ check_type(argname="argument email", value=email, expected_type=type_hints["email"])
549
+ check_type(argname="argument groups", value=groups, expected_type=type_hints["groups"])
550
+ check_type(argname="argument login", value=login, expected_type=type_hints["login"])
551
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
552
+ check_type(argname="argument org", value=org, expected_type=type_hints["org"])
553
+ check_type(argname="argument role", value=role, expected_type=type_hints["role"])
554
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
555
+ if email is not None:
556
+ self._values["email"] = email
557
+ if groups is not None:
558
+ self._values["groups"] = groups
559
+ if login is not None:
560
+ self._values["login"] = login
561
+ if name is not None:
562
+ self._values["name"] = name
563
+ if org is not None:
564
+ self._values["org"] = org
565
+ if role is not None:
566
+ self._values["role"] = role
567
+
568
+ @builtins.property
569
+ def email(self) -> typing.Optional[builtins.str]:
570
+ '''The name of the attribute within the SAML assertion to use as the email names for SAML users.
571
+
572
+ Must be between 1 and 256 characters long.
573
+ '''
574
+ result = self._values.get("email")
575
+ return typing.cast(typing.Optional[builtins.str], result)
576
+
577
+ @builtins.property
578
+ def groups(self) -> typing.Optional[builtins.str]:
579
+ '''The name of the attribute within the SAML assertion to use as the user full "friendly" names for user groups.
580
+
581
+ Must be between 1 and 256 characters long.
582
+ '''
583
+ result = self._values.get("groups")
584
+ return typing.cast(typing.Optional[builtins.str], result)
585
+
586
+ @builtins.property
587
+ def login(self) -> typing.Optional[builtins.str]:
588
+ '''The name of the attribute within the SAML assertion to use as the login names for SAML users.
589
+
590
+ Must be between 1 and 256 characters long.
591
+ '''
592
+ result = self._values.get("login")
593
+ return typing.cast(typing.Optional[builtins.str], result)
594
+
595
+ @builtins.property
596
+ def name(self) -> typing.Optional[builtins.str]:
597
+ '''The name of the attribute within the SAML assertion to use as the user full "friendly" names for SAML users.
598
+
599
+ Must be between 1 and 256 characters long.
600
+ '''
601
+ result = self._values.get("name")
602
+ return typing.cast(typing.Optional[builtins.str], result)
603
+
604
+ @builtins.property
605
+ def org(self) -> typing.Optional[builtins.str]:
606
+ '''The name of the attribute within the SAML assertion to use as the user full "friendly" names for the users' organizations.
607
+
608
+ Must be between 1 and 256 characters long.
609
+ '''
610
+ result = self._values.get("org")
611
+ return typing.cast(typing.Optional[builtins.str], result)
612
+
613
+ @builtins.property
614
+ def role(self) -> typing.Optional[builtins.str]:
615
+ '''The name of the attribute within the SAML assertion to use as the user roles.
616
+
617
+ Must be between 1 and 256 characters long.
618
+ '''
619
+ result = self._values.get("role")
620
+ return typing.cast(typing.Optional[builtins.str], result)
621
+
622
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
623
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
624
+
625
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
626
+ return not (rhs == self)
627
+
628
+ def __repr__(self) -> str:
629
+ return "SamlAssertionAttributes(%s)" % ", ".join(
630
+ k + "=" + repr(v) for k, v in self._values.items()
631
+ )
632
+
633
+
634
+ @jsii.data_type(
635
+ jsii_type="@robhan-cdk-lib/aws_grafana.SamlConfiguration",
636
+ jsii_struct_bases=[],
637
+ name_mapping={
638
+ "idp_metadata": "idpMetadata",
639
+ "allowed_organizations": "allowedOrganizations",
640
+ "assertion_atrributes": "assertionAtrributes",
641
+ "login_validity_duration": "loginValidityDuration",
642
+ "role_values": "roleValues",
643
+ },
644
+ )
645
+ class SamlConfiguration:
646
+ def __init__(
647
+ self,
648
+ *,
649
+ idp_metadata: typing.Union["SamlIdpMetadata", typing.Dict[builtins.str, typing.Any]],
650
+ allowed_organizations: typing.Optional[typing.Sequence[builtins.str]] = None,
651
+ assertion_atrributes: typing.Optional[typing.Union["SamlAssertionAttributes", typing.Dict[builtins.str, typing.Any]]] = None,
652
+ login_validity_duration: typing.Optional[jsii.Number] = None,
653
+ role_values: typing.Optional[typing.Union["SamlRoleValues", typing.Dict[builtins.str, typing.Any]]] = None,
654
+ ) -> None:
655
+ '''If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.
656
+
657
+ :param idp_metadata: A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace. Required field for SAML configuration.
658
+ :param allowed_organizations: Lists which organizations defined in the SAML assertion are allowed to use the Amazon Managed Grafana workspace. If this is empty, all organizations in the assertion attribute have access. Must have between 1 and 256 elements.
659
+ :param assertion_atrributes: A structure that defines which attributes in the SAML assertion are to be used to define information about the users authenticated by that IdP to use the workspace.
660
+ :param login_validity_duration: How long a sign-on session by a SAML user is valid, before the user has to sign on again. Must be a positive number.
661
+ :param role_values: A structure containing arrays that map group names in the SAML assertion to the Grafana Admin and Editor roles in the workspace.
662
+ '''
663
+ if isinstance(idp_metadata, dict):
664
+ idp_metadata = SamlIdpMetadata(**idp_metadata)
665
+ if isinstance(assertion_atrributes, dict):
666
+ assertion_atrributes = SamlAssertionAttributes(**assertion_atrributes)
667
+ if isinstance(role_values, dict):
668
+ role_values = SamlRoleValues(**role_values)
669
+ if __debug__:
670
+ type_hints = typing.get_type_hints(_typecheckingstub__94e3d50853b0fff8b07aef213a42805e2945150053d7d713d52a23ad79a71a21)
671
+ check_type(argname="argument idp_metadata", value=idp_metadata, expected_type=type_hints["idp_metadata"])
672
+ check_type(argname="argument allowed_organizations", value=allowed_organizations, expected_type=type_hints["allowed_organizations"])
673
+ check_type(argname="argument assertion_atrributes", value=assertion_atrributes, expected_type=type_hints["assertion_atrributes"])
674
+ check_type(argname="argument login_validity_duration", value=login_validity_duration, expected_type=type_hints["login_validity_duration"])
675
+ check_type(argname="argument role_values", value=role_values, expected_type=type_hints["role_values"])
676
+ self._values: typing.Dict[builtins.str, typing.Any] = {
677
+ "idp_metadata": idp_metadata,
678
+ }
679
+ if allowed_organizations is not None:
680
+ self._values["allowed_organizations"] = allowed_organizations
681
+ if assertion_atrributes is not None:
682
+ self._values["assertion_atrributes"] = assertion_atrributes
683
+ if login_validity_duration is not None:
684
+ self._values["login_validity_duration"] = login_validity_duration
685
+ if role_values is not None:
686
+ self._values["role_values"] = role_values
687
+
688
+ @builtins.property
689
+ def idp_metadata(self) -> "SamlIdpMetadata":
690
+ '''A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace.
691
+
692
+ Required field for SAML configuration.
693
+ '''
694
+ result = self._values.get("idp_metadata")
695
+ assert result is not None, "Required property 'idp_metadata' is missing"
696
+ return typing.cast("SamlIdpMetadata", result)
697
+
698
+ @builtins.property
699
+ def allowed_organizations(self) -> typing.Optional[typing.List[builtins.str]]:
700
+ '''Lists which organizations defined in the SAML assertion are allowed to use the Amazon Managed Grafana workspace.
701
+
702
+ If this is empty, all organizations in the assertion attribute have access.
703
+
704
+ Must have between 1 and 256 elements.
705
+ '''
706
+ result = self._values.get("allowed_organizations")
707
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
708
+
709
+ @builtins.property
710
+ def assertion_atrributes(self) -> typing.Optional["SamlAssertionAttributes"]:
711
+ '''A structure that defines which attributes in the SAML assertion are to be used to define information about the users authenticated by that IdP to use the workspace.'''
712
+ result = self._values.get("assertion_atrributes")
713
+ return typing.cast(typing.Optional["SamlAssertionAttributes"], result)
714
+
715
+ @builtins.property
716
+ def login_validity_duration(self) -> typing.Optional[jsii.Number]:
717
+ '''How long a sign-on session by a SAML user is valid, before the user has to sign on again.
718
+
719
+ Must be a positive number.
720
+ '''
721
+ result = self._values.get("login_validity_duration")
722
+ return typing.cast(typing.Optional[jsii.Number], result)
723
+
724
+ @builtins.property
725
+ def role_values(self) -> typing.Optional["SamlRoleValues"]:
726
+ '''A structure containing arrays that map group names in the SAML assertion to the Grafana Admin and Editor roles in the workspace.'''
727
+ result = self._values.get("role_values")
728
+ return typing.cast(typing.Optional["SamlRoleValues"], result)
729
+
730
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
731
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
732
+
733
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
734
+ return not (rhs == self)
735
+
736
+ def __repr__(self) -> str:
737
+ return "SamlConfiguration(%s)" % ", ".join(
738
+ k + "=" + repr(v) for k, v in self._values.items()
739
+ )
740
+
741
+
742
+ @jsii.enum(jsii_type="@robhan-cdk-lib/aws_grafana.SamlConfigurationStatuses")
743
+ class SamlConfigurationStatuses(enum.Enum):
744
+ '''Status of SAML configuration for a Grafana workspace.'''
745
+
746
+ CONFIGURED = "CONFIGURED"
747
+ '''SAML is configured for the workspace.'''
748
+ NOT_CONFIGURED = "NOT_CONFIGURED"
749
+ '''SAML is not configured for the workspace.'''
750
+
751
+
752
+ @jsii.data_type(
753
+ jsii_type="@robhan-cdk-lib/aws_grafana.SamlIdpMetadata",
754
+ jsii_struct_bases=[],
755
+ name_mapping={"url": "url", "xml": "xml"},
756
+ )
757
+ class SamlIdpMetadata:
758
+ def __init__(
759
+ self,
760
+ *,
761
+ url: typing.Optional[builtins.str] = None,
762
+ xml: typing.Optional[builtins.str] = None,
763
+ ) -> None:
764
+ '''A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace.
765
+
766
+ :param url: The URL of the location containing the IdP metadata. Must be a string with length between 1 and 2048 characters.
767
+ :param xml: The full IdP metadata, in XML format.
768
+ '''
769
+ if __debug__:
770
+ type_hints = typing.get_type_hints(_typecheckingstub__39c75c23ab5e000de459956f9472e74b38296a7f5017220c3d3353acf47ebeb1)
771
+ check_type(argname="argument url", value=url, expected_type=type_hints["url"])
772
+ check_type(argname="argument xml", value=xml, expected_type=type_hints["xml"])
773
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
774
+ if url is not None:
775
+ self._values["url"] = url
776
+ if xml is not None:
777
+ self._values["xml"] = xml
778
+
779
+ @builtins.property
780
+ def url(self) -> typing.Optional[builtins.str]:
781
+ '''The URL of the location containing the IdP metadata.
782
+
783
+ Must be a string with length between 1 and 2048 characters.
784
+ '''
785
+ result = self._values.get("url")
786
+ return typing.cast(typing.Optional[builtins.str], result)
787
+
788
+ @builtins.property
789
+ def xml(self) -> typing.Optional[builtins.str]:
790
+ '''The full IdP metadata, in XML format.'''
791
+ result = self._values.get("xml")
792
+ return typing.cast(typing.Optional[builtins.str], result)
793
+
794
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
795
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
796
+
797
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
798
+ return not (rhs == self)
799
+
800
+ def __repr__(self) -> str:
801
+ return "SamlIdpMetadata(%s)" % ", ".join(
802
+ k + "=" + repr(v) for k, v in self._values.items()
803
+ )
804
+
805
+
806
+ @jsii.data_type(
807
+ jsii_type="@robhan-cdk-lib/aws_grafana.SamlRoleValues",
808
+ jsii_struct_bases=[],
809
+ name_mapping={"admin": "admin", "editor": "editor"},
810
+ )
811
+ class SamlRoleValues:
812
+ def __init__(
813
+ self,
814
+ *,
815
+ admin: typing.Optional[typing.Sequence[builtins.str]] = None,
816
+ editor: typing.Optional[typing.Sequence[builtins.str]] = None,
817
+ ) -> None:
818
+ '''A structure containing arrays that map group names in the SAML assertion to the Grafana Admin and Editor roles in the workspace.
819
+
820
+ :param admin: A list of groups from the SAML assertion attribute to grant the Grafana Admin role to. Maximum of 256 elements.
821
+ :param editor: A list of groups from the SAML assertion attribute to grant the Grafana Editor role to. Maximum of 256 elements.
822
+ '''
823
+ if __debug__:
824
+ type_hints = typing.get_type_hints(_typecheckingstub__ef1c910c03fee4fe40765505578b098a7dc7c4001c0dbce28b9c817cd1ceeb97)
825
+ check_type(argname="argument admin", value=admin, expected_type=type_hints["admin"])
826
+ check_type(argname="argument editor", value=editor, expected_type=type_hints["editor"])
827
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
828
+ if admin is not None:
829
+ self._values["admin"] = admin
830
+ if editor is not None:
831
+ self._values["editor"] = editor
832
+
833
+ @builtins.property
834
+ def admin(self) -> typing.Optional[typing.List[builtins.str]]:
835
+ '''A list of groups from the SAML assertion attribute to grant the Grafana Admin role to.
836
+
837
+ Maximum of 256 elements.
838
+ '''
839
+ result = self._values.get("admin")
840
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
841
+
842
+ @builtins.property
843
+ def editor(self) -> typing.Optional[typing.List[builtins.str]]:
844
+ '''A list of groups from the SAML assertion attribute to grant the Grafana Editor role to.
845
+
846
+ Maximum of 256 elements.
847
+ '''
848
+ result = self._values.get("editor")
849
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
850
+
851
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
852
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
853
+
854
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
855
+ return not (rhs == self)
856
+
857
+ def __repr__(self) -> str:
858
+ return "SamlRoleValues(%s)" % ", ".join(
859
+ k + "=" + repr(v) for k, v in self._values.items()
860
+ )
861
+
862
+
863
+ @jsii.enum(jsii_type="@robhan-cdk-lib/aws_grafana.Status")
864
+ class Status(enum.Enum):
865
+ '''Status of a Grafana workspace.'''
866
+
867
+ ACTIVE = "ACTIVE"
868
+ '''Workspace is active and ready to use.'''
869
+ CREATING = "CREATING"
870
+ '''Workspace is being created.'''
871
+ DELETING = "DELETING"
872
+ '''Workspace is being deleted.'''
873
+ FAILED = "FAILED"
874
+ '''Workspace operation has failed.'''
875
+ UPDATING = "UPDATING"
876
+ '''Workspace is being updated.'''
877
+ UPGRADING = "UPGRADING"
878
+ '''Workspace is being upgraded.'''
879
+ DELETION_FAILED = "DELETION_FAILED"
880
+ '''Workspace deletion has failed.'''
881
+ CREATION_FAILED = "CREATION_FAILED"
882
+ '''Workspace creation has failed.'''
883
+ UPDATE_FAILED = "UPDATE_FAILED"
884
+ '''Workspace update has failed.'''
885
+ UPGRADE_FAILED = "UPGRADE_FAILED"
886
+ '''Workspace upgrade has failed.'''
887
+ LICENSE_REMOVAL_FAILED = "LICENSE_REMOVAL_FAILED"
888
+ '''License removal has failed.'''
889
+
890
+
891
+ @jsii.data_type(
892
+ jsii_type="@robhan-cdk-lib/aws_grafana.VpcConfiguration",
893
+ jsii_struct_bases=[],
894
+ name_mapping={"security_groups": "securityGroups", "subnets": "subnets"},
895
+ )
896
+ class VpcConfiguration:
897
+ def __init__(
898
+ self,
899
+ *,
900
+ security_groups: typing.Sequence["_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup"],
901
+ subnets: typing.Sequence["_aws_cdk_aws_ec2_ceddda9d.ISubnet"],
902
+ ) -> None:
903
+ '''The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.
904
+
905
+ :param security_groups: The list of Amazon EC2 security groups attached to the Amazon VPC for your Grafana workspace to connect. Duplicates not allowed. Array Members: Minimum number of 1 items. Maximum number of 5 items. Required for VPC configuration.
906
+ :param subnets: The list of Amazon EC2 subnets created in the Amazon VPC for your Grafana workspace to connect. Duplicates not allowed. Array Members: Minimum number of 2 items. Maximum number of 6 items. Required for VPC configuration.
907
+ '''
908
+ if __debug__:
909
+ type_hints = typing.get_type_hints(_typecheckingstub__587300abdd3ca28460b0e172422b96189b41d352cc212cc6461caee2653c197d)
910
+ check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
911
+ check_type(argname="argument subnets", value=subnets, expected_type=type_hints["subnets"])
912
+ self._values: typing.Dict[builtins.str, typing.Any] = {
913
+ "security_groups": security_groups,
914
+ "subnets": subnets,
915
+ }
916
+
917
+ @builtins.property
918
+ def security_groups(
919
+ self,
920
+ ) -> typing.List["_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup"]:
921
+ '''The list of Amazon EC2 security groups attached to the Amazon VPC for your Grafana workspace to connect.
922
+
923
+ Duplicates not allowed.
924
+
925
+ Array Members: Minimum number of 1 items. Maximum number of 5 items.
926
+
927
+ Required for VPC configuration.
928
+ '''
929
+ result = self._values.get("security_groups")
930
+ assert result is not None, "Required property 'security_groups' is missing"
931
+ return typing.cast(typing.List["_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup"], result)
932
+
933
+ @builtins.property
934
+ def subnets(self) -> typing.List["_aws_cdk_aws_ec2_ceddda9d.ISubnet"]:
935
+ '''The list of Amazon EC2 subnets created in the Amazon VPC for your Grafana workspace to connect. Duplicates not allowed.
936
+
937
+ Array Members: Minimum number of 2 items. Maximum number of 6 items.
938
+
939
+ Required for VPC configuration.
940
+ '''
941
+ result = self._values.get("subnets")
942
+ assert result is not None, "Required property 'subnets' is missing"
943
+ return typing.cast(typing.List["_aws_cdk_aws_ec2_ceddda9d.ISubnet"], result)
944
+
945
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
946
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
947
+
948
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
949
+ return not (rhs == self)
950
+
951
+ def __repr__(self) -> str:
952
+ return "VpcConfiguration(%s)" % ", ".join(
953
+ k + "=" + repr(v) for k, v in self._values.items()
954
+ )
955
+
956
+
957
+ @jsii.data_type(
958
+ jsii_type="@robhan-cdk-lib/aws_grafana.WorkspaceAttributes",
959
+ jsii_struct_bases=[],
960
+ name_mapping={
961
+ "account_access_type": "accountAccessType",
962
+ "authentication_providers": "authenticationProviders",
963
+ "permission_type": "permissionType",
964
+ "workspace_arn": "workspaceArn",
965
+ "client_token": "clientToken",
966
+ "data_sources": "dataSources",
967
+ "description": "description",
968
+ "name": "name",
969
+ "network_access_control": "networkAccessControl",
970
+ "notification_destinations": "notificationDestinations",
971
+ "organizational_units": "organizationalUnits",
972
+ "organization_role_name": "organizationRoleName",
973
+ "plugin_admin_enabled": "pluginAdminEnabled",
974
+ "role": "role",
975
+ "saml_configuration": "samlConfiguration",
976
+ "stack_set_name": "stackSetName",
977
+ "vpc_configuration": "vpcConfiguration",
978
+ },
979
+ )
980
+ class WorkspaceAttributes:
981
+ def __init__(
982
+ self,
983
+ *,
984
+ account_access_type: "AccountAccessType",
985
+ authentication_providers: typing.Sequence["AuthenticationProviders"],
986
+ permission_type: "PermissionTypes",
987
+ workspace_arn: builtins.str,
988
+ client_token: typing.Optional[builtins.str] = None,
989
+ data_sources: typing.Optional[typing.Sequence[builtins.str]] = None,
990
+ description: typing.Optional[builtins.str] = None,
991
+ name: typing.Optional[builtins.str] = None,
992
+ network_access_control: typing.Optional[typing.Union["NetworkAccessControl", typing.Dict[builtins.str, typing.Any]]] = None,
993
+ notification_destinations: typing.Optional[typing.Sequence["NotificationDestinations"]] = None,
994
+ organizational_units: typing.Optional[typing.Sequence[builtins.str]] = None,
995
+ organization_role_name: typing.Optional[builtins.str] = None,
996
+ plugin_admin_enabled: typing.Optional[builtins.bool] = None,
997
+ role: typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"] = None,
998
+ saml_configuration: typing.Optional[typing.Union["SamlConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
999
+ stack_set_name: typing.Optional[builtins.str] = None,
1000
+ vpc_configuration: typing.Optional[typing.Union["VpcConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1001
+ ) -> None:
1002
+ '''
1003
+ :param account_access_type: Specifies whether the workspace can access AWS resources in this AWS account only, or whether it can also access AWS resources in other accounts in the same organization. If this is ORGANIZATION, the OrganizationalUnits parameter specifies which organizational units the workspace can access. Required field.
1004
+ :param authentication_providers: Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace. Required field.
1005
+ :param permission_type: If this is SERVICE_MANAGED, and the workplace was created through the Amazon Managed Grafana console, then Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use AWS data sources and notification channels. If this is CUSTOMER_MANAGED, you must manage those roles and permissions yourself. If you are working with a workspace in a member account of an organization and that account is not a delegated administrator account, and you want the workspace to access data sources in other AWS accounts in the organization, this parameter must be set to CUSTOMER_MANAGED. Required field.
1006
+ :param workspace_arn: The arn of this workspace.
1007
+ :param client_token: A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. Must be 1-64 characters long and contain only printable ASCII characters.
1008
+ :param data_sources: Specifies the AWS data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources. This list is only used when the workspace was created through the AWS console, and the permissionType is SERVICE_MANAGED.
1009
+ :param description: The user-defined description of the workspace. Maximum length of 2048 characters.
1010
+ :param name: The name of the workspace. Must be 1-255 characters long and contain only alphanumeric characters, hyphens, dots, underscores, and tildes.
1011
+ :param network_access_control: The configuration settings for network access to your workspace.
1012
+ :param notification_destinations: The AWS notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.
1013
+ :param organizational_units: Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.
1014
+ :param organization_role_name: Name of the IAM role to use for the organization. Maximum length of 2048 characters.
1015
+ :param plugin_admin_enabled: Whether plugin administration is enabled in the workspace. Setting to true allows workspace admins to install, uninstall, and update plugins from within the Grafana workspace. This option is only valid for workspaces that support Grafana version 9 or newer. Default: false
1016
+ :param role: The IAM role that grants permissions to the AWS resources that the workspace will view data from.
1017
+ :param saml_configuration: If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.
1018
+ :param stack_set_name: The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.
1019
+ :param vpc_configuration: The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.
1020
+ '''
1021
+ if isinstance(network_access_control, dict):
1022
+ network_access_control = NetworkAccessControl(**network_access_control)
1023
+ if isinstance(saml_configuration, dict):
1024
+ saml_configuration = SamlConfiguration(**saml_configuration)
1025
+ if isinstance(vpc_configuration, dict):
1026
+ vpc_configuration = VpcConfiguration(**vpc_configuration)
1027
+ if __debug__:
1028
+ type_hints = typing.get_type_hints(_typecheckingstub__c7b2f7e0bca3214d1d530a9824b09f4187fa0fc3d9bc0a9db3801c372ca6867d)
1029
+ check_type(argname="argument account_access_type", value=account_access_type, expected_type=type_hints["account_access_type"])
1030
+ check_type(argname="argument authentication_providers", value=authentication_providers, expected_type=type_hints["authentication_providers"])
1031
+ check_type(argname="argument permission_type", value=permission_type, expected_type=type_hints["permission_type"])
1032
+ check_type(argname="argument workspace_arn", value=workspace_arn, expected_type=type_hints["workspace_arn"])
1033
+ check_type(argname="argument client_token", value=client_token, expected_type=type_hints["client_token"])
1034
+ check_type(argname="argument data_sources", value=data_sources, expected_type=type_hints["data_sources"])
1035
+ check_type(argname="argument description", value=description, expected_type=type_hints["description"])
1036
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
1037
+ check_type(argname="argument network_access_control", value=network_access_control, expected_type=type_hints["network_access_control"])
1038
+ check_type(argname="argument notification_destinations", value=notification_destinations, expected_type=type_hints["notification_destinations"])
1039
+ check_type(argname="argument organizational_units", value=organizational_units, expected_type=type_hints["organizational_units"])
1040
+ check_type(argname="argument organization_role_name", value=organization_role_name, expected_type=type_hints["organization_role_name"])
1041
+ check_type(argname="argument plugin_admin_enabled", value=plugin_admin_enabled, expected_type=type_hints["plugin_admin_enabled"])
1042
+ check_type(argname="argument role", value=role, expected_type=type_hints["role"])
1043
+ check_type(argname="argument saml_configuration", value=saml_configuration, expected_type=type_hints["saml_configuration"])
1044
+ check_type(argname="argument stack_set_name", value=stack_set_name, expected_type=type_hints["stack_set_name"])
1045
+ check_type(argname="argument vpc_configuration", value=vpc_configuration, expected_type=type_hints["vpc_configuration"])
1046
+ self._values: typing.Dict[builtins.str, typing.Any] = {
1047
+ "account_access_type": account_access_type,
1048
+ "authentication_providers": authentication_providers,
1049
+ "permission_type": permission_type,
1050
+ "workspace_arn": workspace_arn,
1051
+ }
1052
+ if client_token is not None:
1053
+ self._values["client_token"] = client_token
1054
+ if data_sources is not None:
1055
+ self._values["data_sources"] = data_sources
1056
+ if description is not None:
1057
+ self._values["description"] = description
1058
+ if name is not None:
1059
+ self._values["name"] = name
1060
+ if network_access_control is not None:
1061
+ self._values["network_access_control"] = network_access_control
1062
+ if notification_destinations is not None:
1063
+ self._values["notification_destinations"] = notification_destinations
1064
+ if organizational_units is not None:
1065
+ self._values["organizational_units"] = organizational_units
1066
+ if organization_role_name is not None:
1067
+ self._values["organization_role_name"] = organization_role_name
1068
+ if plugin_admin_enabled is not None:
1069
+ self._values["plugin_admin_enabled"] = plugin_admin_enabled
1070
+ if role is not None:
1071
+ self._values["role"] = role
1072
+ if saml_configuration is not None:
1073
+ self._values["saml_configuration"] = saml_configuration
1074
+ if stack_set_name is not None:
1075
+ self._values["stack_set_name"] = stack_set_name
1076
+ if vpc_configuration is not None:
1077
+ self._values["vpc_configuration"] = vpc_configuration
1078
+
1079
+ @builtins.property
1080
+ def account_access_type(self) -> "AccountAccessType":
1081
+ '''Specifies whether the workspace can access AWS resources in this AWS account only, or whether it can also access AWS resources in other accounts in the same organization.
1082
+
1083
+ If this is
1084
+ ORGANIZATION, the OrganizationalUnits parameter specifies which organizational units the
1085
+ workspace can access.
1086
+
1087
+ Required field.
1088
+ '''
1089
+ result = self._values.get("account_access_type")
1090
+ assert result is not None, "Required property 'account_access_type' is missing"
1091
+ return typing.cast("AccountAccessType", result)
1092
+
1093
+ @builtins.property
1094
+ def authentication_providers(self) -> typing.List["AuthenticationProviders"]:
1095
+ '''Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace.
1096
+
1097
+ Required field.
1098
+ '''
1099
+ result = self._values.get("authentication_providers")
1100
+ assert result is not None, "Required property 'authentication_providers' is missing"
1101
+ return typing.cast(typing.List["AuthenticationProviders"], result)
1102
+
1103
+ @builtins.property
1104
+ def permission_type(self) -> "PermissionTypes":
1105
+ '''If this is SERVICE_MANAGED, and the workplace was created through the Amazon Managed Grafana console, then Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use AWS data sources and notification channels.
1106
+
1107
+ If this is CUSTOMER_MANAGED, you must manage those roles and permissions yourself.
1108
+
1109
+ If you are working with a workspace in a member account of an organization and that account is
1110
+ not a delegated administrator account, and you want the workspace to access data sources in
1111
+ other AWS accounts in the organization, this parameter must be set to CUSTOMER_MANAGED.
1112
+
1113
+ Required field.
1114
+ '''
1115
+ result = self._values.get("permission_type")
1116
+ assert result is not None, "Required property 'permission_type' is missing"
1117
+ return typing.cast("PermissionTypes", result)
1118
+
1119
+ @builtins.property
1120
+ def workspace_arn(self) -> builtins.str:
1121
+ '''The arn of this workspace.'''
1122
+ result = self._values.get("workspace_arn")
1123
+ assert result is not None, "Required property 'workspace_arn' is missing"
1124
+ return typing.cast(builtins.str, result)
1125
+
1126
+ @builtins.property
1127
+ def client_token(self) -> typing.Optional[builtins.str]:
1128
+ '''A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
1129
+
1130
+ Must be 1-64 characters long and contain only printable ASCII characters.
1131
+ '''
1132
+ result = self._values.get("client_token")
1133
+ return typing.cast(typing.Optional[builtins.str], result)
1134
+
1135
+ @builtins.property
1136
+ def data_sources(self) -> typing.Optional[typing.List[builtins.str]]:
1137
+ '''Specifies the AWS data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.
1138
+
1139
+ This list is only used when the workspace was created through the AWS console, and the
1140
+ permissionType is SERVICE_MANAGED.
1141
+ '''
1142
+ result = self._values.get("data_sources")
1143
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
1144
+
1145
+ @builtins.property
1146
+ def description(self) -> typing.Optional[builtins.str]:
1147
+ '''The user-defined description of the workspace.
1148
+
1149
+ Maximum length of 2048 characters.
1150
+ '''
1151
+ result = self._values.get("description")
1152
+ return typing.cast(typing.Optional[builtins.str], result)
1153
+
1154
+ @builtins.property
1155
+ def name(self) -> typing.Optional[builtins.str]:
1156
+ '''The name of the workspace.
1157
+
1158
+ Must be 1-255 characters long and contain only alphanumeric characters, hyphens, dots,
1159
+ underscores, and tildes.
1160
+ '''
1161
+ result = self._values.get("name")
1162
+ return typing.cast(typing.Optional[builtins.str], result)
1163
+
1164
+ @builtins.property
1165
+ def network_access_control(self) -> typing.Optional["NetworkAccessControl"]:
1166
+ '''The configuration settings for network access to your workspace.'''
1167
+ result = self._values.get("network_access_control")
1168
+ return typing.cast(typing.Optional["NetworkAccessControl"], result)
1169
+
1170
+ @builtins.property
1171
+ def notification_destinations(
1172
+ self,
1173
+ ) -> typing.Optional[typing.List["NotificationDestinations"]]:
1174
+ '''The AWS notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.'''
1175
+ result = self._values.get("notification_destinations")
1176
+ return typing.cast(typing.Optional[typing.List["NotificationDestinations"]], result)
1177
+
1178
+ @builtins.property
1179
+ def organizational_units(self) -> typing.Optional[typing.List[builtins.str]]:
1180
+ '''Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.'''
1181
+ result = self._values.get("organizational_units")
1182
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
1183
+
1184
+ @builtins.property
1185
+ def organization_role_name(self) -> typing.Optional[builtins.str]:
1186
+ '''Name of the IAM role to use for the organization.
1187
+
1188
+ Maximum length of 2048 characters.
1189
+ '''
1190
+ result = self._values.get("organization_role_name")
1191
+ return typing.cast(typing.Optional[builtins.str], result)
1192
+
1193
+ @builtins.property
1194
+ def plugin_admin_enabled(self) -> typing.Optional[builtins.bool]:
1195
+ '''Whether plugin administration is enabled in the workspace.
1196
+
1197
+ Setting to true allows workspace
1198
+ admins to install, uninstall, and update plugins from within the Grafana workspace.
1199
+
1200
+ This option is only valid for workspaces that support Grafana version 9 or newer.
1201
+
1202
+ Default: false
1203
+ '''
1204
+ result = self._values.get("plugin_admin_enabled")
1205
+ return typing.cast(typing.Optional[builtins.bool], result)
1206
+
1207
+ @builtins.property
1208
+ def role(self) -> typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"]:
1209
+ '''The IAM role that grants permissions to the AWS resources that the workspace will view data from.'''
1210
+ result = self._values.get("role")
1211
+ return typing.cast(typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"], result)
1212
+
1213
+ @builtins.property
1214
+ def saml_configuration(self) -> typing.Optional["SamlConfiguration"]:
1215
+ '''If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.'''
1216
+ result = self._values.get("saml_configuration")
1217
+ return typing.cast(typing.Optional["SamlConfiguration"], result)
1218
+
1219
+ @builtins.property
1220
+ def stack_set_name(self) -> typing.Optional[builtins.str]:
1221
+ '''The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.'''
1222
+ result = self._values.get("stack_set_name")
1223
+ return typing.cast(typing.Optional[builtins.str], result)
1224
+
1225
+ @builtins.property
1226
+ def vpc_configuration(self) -> typing.Optional["VpcConfiguration"]:
1227
+ '''The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.'''
1228
+ result = self._values.get("vpc_configuration")
1229
+ return typing.cast(typing.Optional["VpcConfiguration"], result)
1230
+
1231
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1232
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1233
+
1234
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1235
+ return not (rhs == self)
1236
+
1237
+ def __repr__(self) -> str:
1238
+ return "WorkspaceAttributes(%s)" % ", ".join(
1239
+ k + "=" + repr(v) for k, v in self._values.items()
1240
+ )
1241
+
1242
+
1243
+ @jsii.implements(IWorkspace)
1244
+ class WorkspaceBase(
1245
+ _aws_cdk_ceddda9d.Resource,
1246
+ metaclass=jsii.JSIIAbstractClass,
1247
+ jsii_type="@robhan-cdk-lib/aws_grafana.WorkspaceBase",
1248
+ ):
1249
+ def __init__(
1250
+ self,
1251
+ scope: "_constructs_77d1e7e8.Construct",
1252
+ id: builtins.str,
1253
+ *,
1254
+ account: typing.Optional[builtins.str] = None,
1255
+ environment_from_arn: typing.Optional[builtins.str] = None,
1256
+ physical_name: typing.Optional[builtins.str] = None,
1257
+ region: typing.Optional[builtins.str] = None,
1258
+ ) -> None:
1259
+ '''
1260
+ :param scope: -
1261
+ :param id: -
1262
+ :param account: The AWS account ID this resource belongs to. Default: - the resource is in the same account as the stack it belongs to
1263
+ :param environment_from_arn: ARN to deduce region and account from. The ARN is parsed and the account and region are taken from the ARN. This should be used for imported resources. Cannot be supplied together with either ``account`` or ``region``. Default: - take environment from ``account``, ``region`` parameters, or use Stack environment.
1264
+ :param physical_name: The value passed in by users to the physical name prop of the resource. - ``undefined`` implies that a physical name will be allocated by CloudFormation during deployment. - a concrete value implies a specific physical name - ``PhysicalName.GENERATE_IF_NEEDED`` is a marker that indicates that a physical will only be generated by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation. Default: - The physical name will be allocated by CloudFormation at deployment time
1265
+ :param region: The AWS region this resource belongs to. Default: - the resource is in the same region as the stack it belongs to
1266
+ '''
1267
+ if __debug__:
1268
+ type_hints = typing.get_type_hints(_typecheckingstub__245faeb95108a919895d5be8305f00bb27663481697705f156a940170d368cd9)
1269
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
1270
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
1271
+ props = _aws_cdk_ceddda9d.ResourceProps(
1272
+ account=account,
1273
+ environment_from_arn=environment_from_arn,
1274
+ physical_name=physical_name,
1275
+ region=region,
1276
+ )
1277
+
1278
+ jsii.create(self.__class__, self, [scope, id, props])
1279
+
1280
+ @jsii.member(jsii_name="getWorkspaceArn")
1281
+ def _get_workspace_arn(self, workspace_id: builtins.str) -> builtins.str:
1282
+ '''
1283
+ :param workspace_id: -
1284
+ '''
1285
+ if __debug__:
1286
+ type_hints = typing.get_type_hints(_typecheckingstub__a276f8424bdc34ea475b2154afcc166ec7c942b054911427f1337d0e31dba971)
1287
+ check_type(argname="argument workspace_id", value=workspace_id, expected_type=type_hints["workspace_id"])
1288
+ return typing.cast(builtins.str, jsii.invoke(self, "getWorkspaceArn", [workspace_id]))
1289
+
1290
+ @jsii.member(jsii_name="getWorkspaceId")
1291
+ def _get_workspace_id(self, workspace_arn: builtins.str) -> builtins.str:
1292
+ '''
1293
+ :param workspace_arn: -
1294
+ '''
1295
+ if __debug__:
1296
+ type_hints = typing.get_type_hints(_typecheckingstub__e82b32e64bf2f45936f97dd7e9c4f587db6f6dc8f86a630542d208da05807e97)
1297
+ check_type(argname="argument workspace_arn", value=workspace_arn, expected_type=type_hints["workspace_arn"])
1298
+ return typing.cast(builtins.str, jsii.invoke(self, "getWorkspaceId", [workspace_arn]))
1299
+
1300
+ @builtins.property
1301
+ @jsii.member(jsii_name="accountAccessType")
1302
+ @abc.abstractmethod
1303
+ def account_access_type(self) -> "AccountAccessType":
1304
+ '''The account access type for the workspace.'''
1305
+ ...
1306
+
1307
+ @builtins.property
1308
+ @jsii.member(jsii_name="authenticationProviders")
1309
+ @abc.abstractmethod
1310
+ def authentication_providers(self) -> typing.List["AuthenticationProviders"]:
1311
+ '''The authentication providers for the workspace.'''
1312
+ ...
1313
+
1314
+ @builtins.property
1315
+ @jsii.member(jsii_name="permissionType")
1316
+ @abc.abstractmethod
1317
+ def permission_type(self) -> "PermissionTypes":
1318
+ '''The permission type for the workspace.'''
1319
+ ...
1320
+
1321
+ @builtins.property
1322
+ @jsii.member(jsii_name="workspaceArn")
1323
+ @abc.abstractmethod
1324
+ def workspace_arn(self) -> builtins.str:
1325
+ '''The ARN of this workspace.'''
1326
+ ...
1327
+
1328
+ @builtins.property
1329
+ @jsii.member(jsii_name="workspaceId")
1330
+ @abc.abstractmethod
1331
+ def workspace_id(self) -> builtins.str:
1332
+ '''The unique ID of this workspace.'''
1333
+ ...
1334
+
1335
+ @builtins.property
1336
+ @jsii.member(jsii_name="clientToken")
1337
+ @abc.abstractmethod
1338
+ def client_token(self) -> typing.Optional[builtins.str]:
1339
+ '''The client token for the workspace.'''
1340
+ ...
1341
+
1342
+ @builtins.property
1343
+ @jsii.member(jsii_name="dataSources")
1344
+ @abc.abstractmethod
1345
+ def data_sources(self) -> typing.Optional[typing.List[builtins.str]]:
1346
+ '''The data sources of this workspace.'''
1347
+ ...
1348
+
1349
+ @builtins.property
1350
+ @jsii.member(jsii_name="description")
1351
+ @abc.abstractmethod
1352
+ def description(self) -> typing.Optional[builtins.str]:
1353
+ '''The description of this workspace.'''
1354
+ ...
1355
+
1356
+ @builtins.property
1357
+ @jsii.member(jsii_name="name")
1358
+ @abc.abstractmethod
1359
+ def name(self) -> typing.Optional[builtins.str]:
1360
+ '''The name of this workspace.'''
1361
+ ...
1362
+
1363
+ @builtins.property
1364
+ @jsii.member(jsii_name="networkAccessControl")
1365
+ @abc.abstractmethod
1366
+ def network_access_control(self) -> typing.Optional["NetworkAccessControl"]:
1367
+ '''The configuration settings for network access to your workspace.'''
1368
+ ...
1369
+
1370
+ @builtins.property
1371
+ @jsii.member(jsii_name="notificationDestinations")
1372
+ @abc.abstractmethod
1373
+ def notification_destinations(
1374
+ self,
1375
+ ) -> typing.Optional[typing.List["NotificationDestinations"]]:
1376
+ '''The notification destinations for the workspace.'''
1377
+ ...
1378
+
1379
+ @builtins.property
1380
+ @jsii.member(jsii_name="organizationalUnits")
1381
+ @abc.abstractmethod
1382
+ def organizational_units(self) -> typing.Optional[typing.List[builtins.str]]:
1383
+ '''Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.'''
1384
+ ...
1385
+
1386
+ @builtins.property
1387
+ @jsii.member(jsii_name="organizationRoleName")
1388
+ @abc.abstractmethod
1389
+ def organization_role_name(self) -> typing.Optional[builtins.str]:
1390
+ '''The name of the IAM role that is used to access resources through Organizations.'''
1391
+ ...
1392
+
1393
+ @builtins.property
1394
+ @jsii.member(jsii_name="pluginAdminEnabled")
1395
+ @abc.abstractmethod
1396
+ def plugin_admin_enabled(self) -> typing.Optional[builtins.bool]:
1397
+ '''Whether plugin administration is enabled in the workspace.
1398
+
1399
+ Setting to true allows workspace
1400
+ admins to install, uninstall, and update plugins from within the Grafana workspace.
1401
+
1402
+ This option is only valid for workspaces that support Grafana version 9 or newer.
1403
+ '''
1404
+ ...
1405
+
1406
+ @builtins.property
1407
+ @jsii.member(jsii_name="role")
1408
+ @abc.abstractmethod
1409
+ def role(self) -> typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"]:
1410
+ '''The IAM role that grants permissions to the AWS resources that the workspace will view data from.'''
1411
+ ...
1412
+
1413
+ @builtins.property
1414
+ @jsii.member(jsii_name="samlConfiguration")
1415
+ @abc.abstractmethod
1416
+ def saml_configuration(self) -> typing.Optional["SamlConfiguration"]:
1417
+ '''If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.'''
1418
+ ...
1419
+
1420
+ @builtins.property
1421
+ @jsii.member(jsii_name="stackSetName")
1422
+ @abc.abstractmethod
1423
+ def stack_set_name(self) -> typing.Optional[builtins.str]:
1424
+ '''The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.'''
1425
+ ...
1426
+
1427
+ @builtins.property
1428
+ @jsii.member(jsii_name="vpcConfiguration")
1429
+ @abc.abstractmethod
1430
+ def vpc_configuration(self) -> typing.Optional["VpcConfiguration"]:
1431
+ '''The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.'''
1432
+ ...
1433
+
1434
+
1435
+ class _WorkspaceBaseProxy(
1436
+ WorkspaceBase,
1437
+ jsii.proxy_for(_aws_cdk_ceddda9d.Resource), # type: ignore[misc]
1438
+ ):
1439
+ @builtins.property
1440
+ @jsii.member(jsii_name="accountAccessType")
1441
+ def account_access_type(self) -> "AccountAccessType":
1442
+ '''The account access type for the workspace.'''
1443
+ return typing.cast("AccountAccessType", jsii.get(self, "accountAccessType"))
1444
+
1445
+ @builtins.property
1446
+ @jsii.member(jsii_name="authenticationProviders")
1447
+ def authentication_providers(self) -> typing.List["AuthenticationProviders"]:
1448
+ '''The authentication providers for the workspace.'''
1449
+ return typing.cast(typing.List["AuthenticationProviders"], jsii.get(self, "authenticationProviders"))
1450
+
1451
+ @builtins.property
1452
+ @jsii.member(jsii_name="permissionType")
1453
+ def permission_type(self) -> "PermissionTypes":
1454
+ '''The permission type for the workspace.'''
1455
+ return typing.cast("PermissionTypes", jsii.get(self, "permissionType"))
1456
+
1457
+ @builtins.property
1458
+ @jsii.member(jsii_name="workspaceArn")
1459
+ def workspace_arn(self) -> builtins.str:
1460
+ '''The ARN of this workspace.'''
1461
+ return typing.cast(builtins.str, jsii.get(self, "workspaceArn"))
1462
+
1463
+ @builtins.property
1464
+ @jsii.member(jsii_name="workspaceId")
1465
+ def workspace_id(self) -> builtins.str:
1466
+ '''The unique ID of this workspace.'''
1467
+ return typing.cast(builtins.str, jsii.get(self, "workspaceId"))
1468
+
1469
+ @builtins.property
1470
+ @jsii.member(jsii_name="clientToken")
1471
+ def client_token(self) -> typing.Optional[builtins.str]:
1472
+ '''The client token for the workspace.'''
1473
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "clientToken"))
1474
+
1475
+ @builtins.property
1476
+ @jsii.member(jsii_name="dataSources")
1477
+ def data_sources(self) -> typing.Optional[typing.List[builtins.str]]:
1478
+ '''The data sources of this workspace.'''
1479
+ return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "dataSources"))
1480
+
1481
+ @builtins.property
1482
+ @jsii.member(jsii_name="description")
1483
+ def description(self) -> typing.Optional[builtins.str]:
1484
+ '''The description of this workspace.'''
1485
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "description"))
1486
+
1487
+ @builtins.property
1488
+ @jsii.member(jsii_name="name")
1489
+ def name(self) -> typing.Optional[builtins.str]:
1490
+ '''The name of this workspace.'''
1491
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "name"))
1492
+
1493
+ @builtins.property
1494
+ @jsii.member(jsii_name="networkAccessControl")
1495
+ def network_access_control(self) -> typing.Optional["NetworkAccessControl"]:
1496
+ '''The configuration settings for network access to your workspace.'''
1497
+ return typing.cast(typing.Optional["NetworkAccessControl"], jsii.get(self, "networkAccessControl"))
1498
+
1499
+ @builtins.property
1500
+ @jsii.member(jsii_name="notificationDestinations")
1501
+ def notification_destinations(
1502
+ self,
1503
+ ) -> typing.Optional[typing.List["NotificationDestinations"]]:
1504
+ '''The notification destinations for the workspace.'''
1505
+ return typing.cast(typing.Optional[typing.List["NotificationDestinations"]], jsii.get(self, "notificationDestinations"))
1506
+
1507
+ @builtins.property
1508
+ @jsii.member(jsii_name="organizationalUnits")
1509
+ def organizational_units(self) -> typing.Optional[typing.List[builtins.str]]:
1510
+ '''Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.'''
1511
+ return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "organizationalUnits"))
1512
+
1513
+ @builtins.property
1514
+ @jsii.member(jsii_name="organizationRoleName")
1515
+ def organization_role_name(self) -> typing.Optional[builtins.str]:
1516
+ '''The name of the IAM role that is used to access resources through Organizations.'''
1517
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "organizationRoleName"))
1518
+
1519
+ @builtins.property
1520
+ @jsii.member(jsii_name="pluginAdminEnabled")
1521
+ def plugin_admin_enabled(self) -> typing.Optional[builtins.bool]:
1522
+ '''Whether plugin administration is enabled in the workspace.
1523
+
1524
+ Setting to true allows workspace
1525
+ admins to install, uninstall, and update plugins from within the Grafana workspace.
1526
+
1527
+ This option is only valid for workspaces that support Grafana version 9 or newer.
1528
+ '''
1529
+ return typing.cast(typing.Optional[builtins.bool], jsii.get(self, "pluginAdminEnabled"))
1530
+
1531
+ @builtins.property
1532
+ @jsii.member(jsii_name="role")
1533
+ def role(self) -> typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"]:
1534
+ '''The IAM role that grants permissions to the AWS resources that the workspace will view data from.'''
1535
+ return typing.cast(typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"], jsii.get(self, "role"))
1536
+
1537
+ @builtins.property
1538
+ @jsii.member(jsii_name="samlConfiguration")
1539
+ def saml_configuration(self) -> typing.Optional["SamlConfiguration"]:
1540
+ '''If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.'''
1541
+ return typing.cast(typing.Optional["SamlConfiguration"], jsii.get(self, "samlConfiguration"))
1542
+
1543
+ @builtins.property
1544
+ @jsii.member(jsii_name="stackSetName")
1545
+ def stack_set_name(self) -> typing.Optional[builtins.str]:
1546
+ '''The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.'''
1547
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "stackSetName"))
1548
+
1549
+ @builtins.property
1550
+ @jsii.member(jsii_name="vpcConfiguration")
1551
+ def vpc_configuration(self) -> typing.Optional["VpcConfiguration"]:
1552
+ '''The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.'''
1553
+ return typing.cast(typing.Optional["VpcConfiguration"], jsii.get(self, "vpcConfiguration"))
1554
+
1555
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
1556
+ typing.cast(typing.Any, WorkspaceBase).__jsii_proxy_class__ = lambda : _WorkspaceBaseProxy
1557
+
1558
+
1559
+ @jsii.data_type(
1560
+ jsii_type="@robhan-cdk-lib/aws_grafana.WorkspaceProps",
1561
+ jsii_struct_bases=[],
1562
+ name_mapping={
1563
+ "account_access_type": "accountAccessType",
1564
+ "authentication_providers": "authenticationProviders",
1565
+ "permission_type": "permissionType",
1566
+ "client_token": "clientToken",
1567
+ "data_sources": "dataSources",
1568
+ "description": "description",
1569
+ "grafana_version": "grafanaVersion",
1570
+ "name": "name",
1571
+ "network_access_control": "networkAccessControl",
1572
+ "notification_destinations": "notificationDestinations",
1573
+ "organizational_units": "organizationalUnits",
1574
+ "organization_role_name": "organizationRoleName",
1575
+ "plugin_admin_enabled": "pluginAdminEnabled",
1576
+ "role": "role",
1577
+ "saml_configuration": "samlConfiguration",
1578
+ "stack_set_name": "stackSetName",
1579
+ "vpc_configuration": "vpcConfiguration",
1580
+ },
1581
+ )
1582
+ class WorkspaceProps:
1583
+ def __init__(
1584
+ self,
1585
+ *,
1586
+ account_access_type: "AccountAccessType",
1587
+ authentication_providers: typing.Sequence["AuthenticationProviders"],
1588
+ permission_type: "PermissionTypes",
1589
+ client_token: typing.Optional[builtins.str] = None,
1590
+ data_sources: typing.Optional[typing.Sequence[builtins.str]] = None,
1591
+ description: typing.Optional[builtins.str] = None,
1592
+ grafana_version: typing.Optional[builtins.str] = None,
1593
+ name: typing.Optional[builtins.str] = None,
1594
+ network_access_control: typing.Optional[typing.Union["NetworkAccessControl", typing.Dict[builtins.str, typing.Any]]] = None,
1595
+ notification_destinations: typing.Optional[typing.Sequence["NotificationDestinations"]] = None,
1596
+ organizational_units: typing.Optional[typing.Sequence[builtins.str]] = None,
1597
+ organization_role_name: typing.Optional[builtins.str] = None,
1598
+ plugin_admin_enabled: typing.Optional[builtins.bool] = None,
1599
+ role: typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"] = None,
1600
+ saml_configuration: typing.Optional[typing.Union["SamlConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1601
+ stack_set_name: typing.Optional[builtins.str] = None,
1602
+ vpc_configuration: typing.Optional[typing.Union["VpcConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1603
+ ) -> None:
1604
+ '''Properties for creating an Amazon Managed Grafana workspace.
1605
+
1606
+ :param account_access_type: Specifies whether the workspace can access AWS resources in this AWS account only, or whether it can also access AWS resources in other accounts in the same organization. If this is ORGANIZATION, the OrganizationalUnits parameter specifies which organizational units the workspace can access. Required field.
1607
+ :param authentication_providers: Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace. Required field.
1608
+ :param permission_type: If this is SERVICE_MANAGED, and the workplace was created through the Amazon Managed Grafana console, then Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use AWS data sources and notification channels. If this is CUSTOMER_MANAGED, you must manage those roles and permissions yourself. If you are working with a workspace in a member account of an organization and that account is not a delegated administrator account, and you want the workspace to access data sources in other AWS accounts in the organization, this parameter must be set to CUSTOMER_MANAGED. Required field.
1609
+ :param client_token: A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. Must be 1-64 characters long and contain only printable ASCII characters.
1610
+ :param data_sources: Specifies the AWS data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources. This list is only used when the workspace was created through the AWS console, and the permissionType is SERVICE_MANAGED.
1611
+ :param description: The user-defined description of the workspace. Maximum length of 2048 characters.
1612
+ :param grafana_version: Specifies the version of Grafana to support in the workspace. Defaults to the latest version on create (for example, 9.4), or the current version of the workspace on update. Can only be used to upgrade (for example, from 8.4 to 9.4), not downgrade (for example, from 9.4 to 8.4). Must be 1-255 characters long.
1613
+ :param name: The name of the workspace. Must be 1-255 characters long and contain only alphanumeric characters, hyphens, dots, underscores, and tildes.
1614
+ :param network_access_control: The configuration settings for network access to your workspace.
1615
+ :param notification_destinations: The AWS notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.
1616
+ :param organizational_units: Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.
1617
+ :param organization_role_name: Name of the IAM role to use for the organization. Maximum length of 2048 characters.
1618
+ :param plugin_admin_enabled: Whether plugin administration is enabled in the workspace. Setting to true allows workspace admins to install, uninstall, and update plugins from within the Grafana workspace. This option is only valid for workspaces that support Grafana version 9 or newer. Default: false
1619
+ :param role: The IAM role that grants permissions to the AWS resources that the workspace will view data from.
1620
+ :param saml_configuration: If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.
1621
+ :param stack_set_name: The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.
1622
+ :param vpc_configuration: The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.
1623
+ '''
1624
+ if isinstance(network_access_control, dict):
1625
+ network_access_control = NetworkAccessControl(**network_access_control)
1626
+ if isinstance(saml_configuration, dict):
1627
+ saml_configuration = SamlConfiguration(**saml_configuration)
1628
+ if isinstance(vpc_configuration, dict):
1629
+ vpc_configuration = VpcConfiguration(**vpc_configuration)
1630
+ if __debug__:
1631
+ type_hints = typing.get_type_hints(_typecheckingstub__a19e08d1da95762003a1adc6b6920b31ab0030dc3f030331c79c2bfcebcfdcf2)
1632
+ check_type(argname="argument account_access_type", value=account_access_type, expected_type=type_hints["account_access_type"])
1633
+ check_type(argname="argument authentication_providers", value=authentication_providers, expected_type=type_hints["authentication_providers"])
1634
+ check_type(argname="argument permission_type", value=permission_type, expected_type=type_hints["permission_type"])
1635
+ check_type(argname="argument client_token", value=client_token, expected_type=type_hints["client_token"])
1636
+ check_type(argname="argument data_sources", value=data_sources, expected_type=type_hints["data_sources"])
1637
+ check_type(argname="argument description", value=description, expected_type=type_hints["description"])
1638
+ check_type(argname="argument grafana_version", value=grafana_version, expected_type=type_hints["grafana_version"])
1639
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
1640
+ check_type(argname="argument network_access_control", value=network_access_control, expected_type=type_hints["network_access_control"])
1641
+ check_type(argname="argument notification_destinations", value=notification_destinations, expected_type=type_hints["notification_destinations"])
1642
+ check_type(argname="argument organizational_units", value=organizational_units, expected_type=type_hints["organizational_units"])
1643
+ check_type(argname="argument organization_role_name", value=organization_role_name, expected_type=type_hints["organization_role_name"])
1644
+ check_type(argname="argument plugin_admin_enabled", value=plugin_admin_enabled, expected_type=type_hints["plugin_admin_enabled"])
1645
+ check_type(argname="argument role", value=role, expected_type=type_hints["role"])
1646
+ check_type(argname="argument saml_configuration", value=saml_configuration, expected_type=type_hints["saml_configuration"])
1647
+ check_type(argname="argument stack_set_name", value=stack_set_name, expected_type=type_hints["stack_set_name"])
1648
+ check_type(argname="argument vpc_configuration", value=vpc_configuration, expected_type=type_hints["vpc_configuration"])
1649
+ self._values: typing.Dict[builtins.str, typing.Any] = {
1650
+ "account_access_type": account_access_type,
1651
+ "authentication_providers": authentication_providers,
1652
+ "permission_type": permission_type,
1653
+ }
1654
+ if client_token is not None:
1655
+ self._values["client_token"] = client_token
1656
+ if data_sources is not None:
1657
+ self._values["data_sources"] = data_sources
1658
+ if description is not None:
1659
+ self._values["description"] = description
1660
+ if grafana_version is not None:
1661
+ self._values["grafana_version"] = grafana_version
1662
+ if name is not None:
1663
+ self._values["name"] = name
1664
+ if network_access_control is not None:
1665
+ self._values["network_access_control"] = network_access_control
1666
+ if notification_destinations is not None:
1667
+ self._values["notification_destinations"] = notification_destinations
1668
+ if organizational_units is not None:
1669
+ self._values["organizational_units"] = organizational_units
1670
+ if organization_role_name is not None:
1671
+ self._values["organization_role_name"] = organization_role_name
1672
+ if plugin_admin_enabled is not None:
1673
+ self._values["plugin_admin_enabled"] = plugin_admin_enabled
1674
+ if role is not None:
1675
+ self._values["role"] = role
1676
+ if saml_configuration is not None:
1677
+ self._values["saml_configuration"] = saml_configuration
1678
+ if stack_set_name is not None:
1679
+ self._values["stack_set_name"] = stack_set_name
1680
+ if vpc_configuration is not None:
1681
+ self._values["vpc_configuration"] = vpc_configuration
1682
+
1683
+ @builtins.property
1684
+ def account_access_type(self) -> "AccountAccessType":
1685
+ '''Specifies whether the workspace can access AWS resources in this AWS account only, or whether it can also access AWS resources in other accounts in the same organization.
1686
+
1687
+ If this is
1688
+ ORGANIZATION, the OrganizationalUnits parameter specifies which organizational units the
1689
+ workspace can access.
1690
+
1691
+ Required field.
1692
+ '''
1693
+ result = self._values.get("account_access_type")
1694
+ assert result is not None, "Required property 'account_access_type' is missing"
1695
+ return typing.cast("AccountAccessType", result)
1696
+
1697
+ @builtins.property
1698
+ def authentication_providers(self) -> typing.List["AuthenticationProviders"]:
1699
+ '''Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace.
1700
+
1701
+ Required field.
1702
+ '''
1703
+ result = self._values.get("authentication_providers")
1704
+ assert result is not None, "Required property 'authentication_providers' is missing"
1705
+ return typing.cast(typing.List["AuthenticationProviders"], result)
1706
+
1707
+ @builtins.property
1708
+ def permission_type(self) -> "PermissionTypes":
1709
+ '''If this is SERVICE_MANAGED, and the workplace was created through the Amazon Managed Grafana console, then Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use AWS data sources and notification channels.
1710
+
1711
+ If this is CUSTOMER_MANAGED, you must manage those roles and permissions yourself.
1712
+
1713
+ If you are working with a workspace in a member account of an organization and that account is
1714
+ not a delegated administrator account, and you want the workspace to access data sources in
1715
+ other AWS accounts in the organization, this parameter must be set to CUSTOMER_MANAGED.
1716
+
1717
+ Required field.
1718
+ '''
1719
+ result = self._values.get("permission_type")
1720
+ assert result is not None, "Required property 'permission_type' is missing"
1721
+ return typing.cast("PermissionTypes", result)
1722
+
1723
+ @builtins.property
1724
+ def client_token(self) -> typing.Optional[builtins.str]:
1725
+ '''A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
1726
+
1727
+ Must be 1-64 characters long and contain only printable ASCII characters.
1728
+ '''
1729
+ result = self._values.get("client_token")
1730
+ return typing.cast(typing.Optional[builtins.str], result)
1731
+
1732
+ @builtins.property
1733
+ def data_sources(self) -> typing.Optional[typing.List[builtins.str]]:
1734
+ '''Specifies the AWS data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.
1735
+
1736
+ This list is only used when the workspace was created through the AWS console, and the
1737
+ permissionType is SERVICE_MANAGED.
1738
+ '''
1739
+ result = self._values.get("data_sources")
1740
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
1741
+
1742
+ @builtins.property
1743
+ def description(self) -> typing.Optional[builtins.str]:
1744
+ '''The user-defined description of the workspace.
1745
+
1746
+ Maximum length of 2048 characters.
1747
+ '''
1748
+ result = self._values.get("description")
1749
+ return typing.cast(typing.Optional[builtins.str], result)
1750
+
1751
+ @builtins.property
1752
+ def grafana_version(self) -> typing.Optional[builtins.str]:
1753
+ '''Specifies the version of Grafana to support in the workspace.
1754
+
1755
+ Defaults to the latest version
1756
+ on create (for example, 9.4), or the current version of the workspace on update.
1757
+ Can only be used to upgrade (for example, from 8.4 to 9.4), not downgrade (for example, from
1758
+ 9.4 to 8.4).
1759
+
1760
+ Must be 1-255 characters long.
1761
+ '''
1762
+ result = self._values.get("grafana_version")
1763
+ return typing.cast(typing.Optional[builtins.str], result)
1764
+
1765
+ @builtins.property
1766
+ def name(self) -> typing.Optional[builtins.str]:
1767
+ '''The name of the workspace.
1768
+
1769
+ Must be 1-255 characters long and contain only alphanumeric characters, hyphens, dots,
1770
+ underscores, and tildes.
1771
+ '''
1772
+ result = self._values.get("name")
1773
+ return typing.cast(typing.Optional[builtins.str], result)
1774
+
1775
+ @builtins.property
1776
+ def network_access_control(self) -> typing.Optional["NetworkAccessControl"]:
1777
+ '''The configuration settings for network access to your workspace.'''
1778
+ result = self._values.get("network_access_control")
1779
+ return typing.cast(typing.Optional["NetworkAccessControl"], result)
1780
+
1781
+ @builtins.property
1782
+ def notification_destinations(
1783
+ self,
1784
+ ) -> typing.Optional[typing.List["NotificationDestinations"]]:
1785
+ '''The AWS notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.'''
1786
+ result = self._values.get("notification_destinations")
1787
+ return typing.cast(typing.Optional[typing.List["NotificationDestinations"]], result)
1788
+
1789
+ @builtins.property
1790
+ def organizational_units(self) -> typing.Optional[typing.List[builtins.str]]:
1791
+ '''Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.'''
1792
+ result = self._values.get("organizational_units")
1793
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
1794
+
1795
+ @builtins.property
1796
+ def organization_role_name(self) -> typing.Optional[builtins.str]:
1797
+ '''Name of the IAM role to use for the organization.
1798
+
1799
+ Maximum length of 2048 characters.
1800
+ '''
1801
+ result = self._values.get("organization_role_name")
1802
+ return typing.cast(typing.Optional[builtins.str], result)
1803
+
1804
+ @builtins.property
1805
+ def plugin_admin_enabled(self) -> typing.Optional[builtins.bool]:
1806
+ '''Whether plugin administration is enabled in the workspace.
1807
+
1808
+ Setting to true allows workspace
1809
+ admins to install, uninstall, and update plugins from within the Grafana workspace.
1810
+
1811
+ This option is only valid for workspaces that support Grafana version 9 or newer.
1812
+
1813
+ Default: false
1814
+ '''
1815
+ result = self._values.get("plugin_admin_enabled")
1816
+ return typing.cast(typing.Optional[builtins.bool], result)
1817
+
1818
+ @builtins.property
1819
+ def role(self) -> typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"]:
1820
+ '''The IAM role that grants permissions to the AWS resources that the workspace will view data from.'''
1821
+ result = self._values.get("role")
1822
+ return typing.cast(typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"], result)
1823
+
1824
+ @builtins.property
1825
+ def saml_configuration(self) -> typing.Optional["SamlConfiguration"]:
1826
+ '''If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.'''
1827
+ result = self._values.get("saml_configuration")
1828
+ return typing.cast(typing.Optional["SamlConfiguration"], result)
1829
+
1830
+ @builtins.property
1831
+ def stack_set_name(self) -> typing.Optional[builtins.str]:
1832
+ '''The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.'''
1833
+ result = self._values.get("stack_set_name")
1834
+ return typing.cast(typing.Optional[builtins.str], result)
1835
+
1836
+ @builtins.property
1837
+ def vpc_configuration(self) -> typing.Optional["VpcConfiguration"]:
1838
+ '''The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.'''
1839
+ result = self._values.get("vpc_configuration")
1840
+ return typing.cast(typing.Optional["VpcConfiguration"], result)
1841
+
1842
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1843
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1844
+
1845
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1846
+ return not (rhs == self)
1847
+
1848
+ def __repr__(self) -> str:
1849
+ return "WorkspaceProps(%s)" % ", ".join(
1850
+ k + "=" + repr(v) for k, v in self._values.items()
1851
+ )
1852
+
1853
+
1854
+ class Workspace(
1855
+ WorkspaceBase,
1856
+ metaclass=jsii.JSIIMeta,
1857
+ jsii_type="@robhan-cdk-lib/aws_grafana.Workspace",
1858
+ ):
1859
+ '''Specifies a workspace.
1860
+
1861
+ In a workspace, you can create Grafana dashboards and visualizations to
1862
+ analyze your metrics, logs, and traces. You don't have to build, package, or deploy any hardware
1863
+ to run the Grafana server.
1864
+ '''
1865
+
1866
+ def __init__(
1867
+ self,
1868
+ scope: "_constructs_77d1e7e8.Construct",
1869
+ id: builtins.str,
1870
+ *,
1871
+ account_access_type: "AccountAccessType",
1872
+ authentication_providers: typing.Sequence["AuthenticationProviders"],
1873
+ permission_type: "PermissionTypes",
1874
+ client_token: typing.Optional[builtins.str] = None,
1875
+ data_sources: typing.Optional[typing.Sequence[builtins.str]] = None,
1876
+ description: typing.Optional[builtins.str] = None,
1877
+ grafana_version: typing.Optional[builtins.str] = None,
1878
+ name: typing.Optional[builtins.str] = None,
1879
+ network_access_control: typing.Optional[typing.Union["NetworkAccessControl", typing.Dict[builtins.str, typing.Any]]] = None,
1880
+ notification_destinations: typing.Optional[typing.Sequence["NotificationDestinations"]] = None,
1881
+ organizational_units: typing.Optional[typing.Sequence[builtins.str]] = None,
1882
+ organization_role_name: typing.Optional[builtins.str] = None,
1883
+ plugin_admin_enabled: typing.Optional[builtins.bool] = None,
1884
+ role: typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"] = None,
1885
+ saml_configuration: typing.Optional[typing.Union["SamlConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1886
+ stack_set_name: typing.Optional[builtins.str] = None,
1887
+ vpc_configuration: typing.Optional[typing.Union["VpcConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1888
+ ) -> None:
1889
+ '''
1890
+ :param scope: -
1891
+ :param id: -
1892
+ :param account_access_type: Specifies whether the workspace can access AWS resources in this AWS account only, or whether it can also access AWS resources in other accounts in the same organization. If this is ORGANIZATION, the OrganizationalUnits parameter specifies which organizational units the workspace can access. Required field.
1893
+ :param authentication_providers: Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace. Required field.
1894
+ :param permission_type: If this is SERVICE_MANAGED, and the workplace was created through the Amazon Managed Grafana console, then Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use AWS data sources and notification channels. If this is CUSTOMER_MANAGED, you must manage those roles and permissions yourself. If you are working with a workspace in a member account of an organization and that account is not a delegated administrator account, and you want the workspace to access data sources in other AWS accounts in the organization, this parameter must be set to CUSTOMER_MANAGED. Required field.
1895
+ :param client_token: A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. Must be 1-64 characters long and contain only printable ASCII characters.
1896
+ :param data_sources: Specifies the AWS data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources. This list is only used when the workspace was created through the AWS console, and the permissionType is SERVICE_MANAGED.
1897
+ :param description: The user-defined description of the workspace. Maximum length of 2048 characters.
1898
+ :param grafana_version: Specifies the version of Grafana to support in the workspace. Defaults to the latest version on create (for example, 9.4), or the current version of the workspace on update. Can only be used to upgrade (for example, from 8.4 to 9.4), not downgrade (for example, from 9.4 to 8.4). Must be 1-255 characters long.
1899
+ :param name: The name of the workspace. Must be 1-255 characters long and contain only alphanumeric characters, hyphens, dots, underscores, and tildes.
1900
+ :param network_access_control: The configuration settings for network access to your workspace.
1901
+ :param notification_destinations: The AWS notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.
1902
+ :param organizational_units: Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.
1903
+ :param organization_role_name: Name of the IAM role to use for the organization. Maximum length of 2048 characters.
1904
+ :param plugin_admin_enabled: Whether plugin administration is enabled in the workspace. Setting to true allows workspace admins to install, uninstall, and update plugins from within the Grafana workspace. This option is only valid for workspaces that support Grafana version 9 or newer. Default: false
1905
+ :param role: The IAM role that grants permissions to the AWS resources that the workspace will view data from.
1906
+ :param saml_configuration: If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.
1907
+ :param stack_set_name: The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.
1908
+ :param vpc_configuration: The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.
1909
+ '''
1910
+ if __debug__:
1911
+ type_hints = typing.get_type_hints(_typecheckingstub__2b689f4d81575ce56f0717294fb20c042f4f3a61a02b0d137e099a528d65a115)
1912
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
1913
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
1914
+ props = WorkspaceProps(
1915
+ account_access_type=account_access_type,
1916
+ authentication_providers=authentication_providers,
1917
+ permission_type=permission_type,
1918
+ client_token=client_token,
1919
+ data_sources=data_sources,
1920
+ description=description,
1921
+ grafana_version=grafana_version,
1922
+ name=name,
1923
+ network_access_control=network_access_control,
1924
+ notification_destinations=notification_destinations,
1925
+ organizational_units=organizational_units,
1926
+ organization_role_name=organization_role_name,
1927
+ plugin_admin_enabled=plugin_admin_enabled,
1928
+ role=role,
1929
+ saml_configuration=saml_configuration,
1930
+ stack_set_name=stack_set_name,
1931
+ vpc_configuration=vpc_configuration,
1932
+ )
1933
+
1934
+ jsii.create(self.__class__, self, [scope, id, props])
1935
+
1936
+ @jsii.member(jsii_name="fromWorkspaceAttributes")
1937
+ @builtins.classmethod
1938
+ def from_workspace_attributes(
1939
+ cls,
1940
+ scope: "_constructs_77d1e7e8.Construct",
1941
+ id: builtins.str,
1942
+ *,
1943
+ account_access_type: "AccountAccessType",
1944
+ authentication_providers: typing.Sequence["AuthenticationProviders"],
1945
+ permission_type: "PermissionTypes",
1946
+ workspace_arn: builtins.str,
1947
+ client_token: typing.Optional[builtins.str] = None,
1948
+ data_sources: typing.Optional[typing.Sequence[builtins.str]] = None,
1949
+ description: typing.Optional[builtins.str] = None,
1950
+ name: typing.Optional[builtins.str] = None,
1951
+ network_access_control: typing.Optional[typing.Union["NetworkAccessControl", typing.Dict[builtins.str, typing.Any]]] = None,
1952
+ notification_destinations: typing.Optional[typing.Sequence["NotificationDestinations"]] = None,
1953
+ organizational_units: typing.Optional[typing.Sequence[builtins.str]] = None,
1954
+ organization_role_name: typing.Optional[builtins.str] = None,
1955
+ plugin_admin_enabled: typing.Optional[builtins.bool] = None,
1956
+ role: typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"] = None,
1957
+ saml_configuration: typing.Optional[typing.Union["SamlConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1958
+ stack_set_name: typing.Optional[builtins.str] = None,
1959
+ vpc_configuration: typing.Optional[typing.Union["VpcConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1960
+ ) -> "IWorkspace":
1961
+ '''
1962
+ :param scope: -
1963
+ :param id: -
1964
+ :param account_access_type: Specifies whether the workspace can access AWS resources in this AWS account only, or whether it can also access AWS resources in other accounts in the same organization. If this is ORGANIZATION, the OrganizationalUnits parameter specifies which organizational units the workspace can access. Required field.
1965
+ :param authentication_providers: Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace. Required field.
1966
+ :param permission_type: If this is SERVICE_MANAGED, and the workplace was created through the Amazon Managed Grafana console, then Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use AWS data sources and notification channels. If this is CUSTOMER_MANAGED, you must manage those roles and permissions yourself. If you are working with a workspace in a member account of an organization and that account is not a delegated administrator account, and you want the workspace to access data sources in other AWS accounts in the organization, this parameter must be set to CUSTOMER_MANAGED. Required field.
1967
+ :param workspace_arn: The arn of this workspace.
1968
+ :param client_token: A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. Must be 1-64 characters long and contain only printable ASCII characters.
1969
+ :param data_sources: Specifies the AWS data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources. This list is only used when the workspace was created through the AWS console, and the permissionType is SERVICE_MANAGED.
1970
+ :param description: The user-defined description of the workspace. Maximum length of 2048 characters.
1971
+ :param name: The name of the workspace. Must be 1-255 characters long and contain only alphanumeric characters, hyphens, dots, underscores, and tildes.
1972
+ :param network_access_control: The configuration settings for network access to your workspace.
1973
+ :param notification_destinations: The AWS notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.
1974
+ :param organizational_units: Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.
1975
+ :param organization_role_name: Name of the IAM role to use for the organization. Maximum length of 2048 characters.
1976
+ :param plugin_admin_enabled: Whether plugin administration is enabled in the workspace. Setting to true allows workspace admins to install, uninstall, and update plugins from within the Grafana workspace. This option is only valid for workspaces that support Grafana version 9 or newer. Default: false
1977
+ :param role: The IAM role that grants permissions to the AWS resources that the workspace will view data from.
1978
+ :param saml_configuration: If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.
1979
+ :param stack_set_name: The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.
1980
+ :param vpc_configuration: The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.
1981
+ '''
1982
+ if __debug__:
1983
+ type_hints = typing.get_type_hints(_typecheckingstub__3998e8138348ba3fd0198ea857bd0357c9ffc4806dd420f1974b384d9116186f)
1984
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
1985
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
1986
+ attrs = WorkspaceAttributes(
1987
+ account_access_type=account_access_type,
1988
+ authentication_providers=authentication_providers,
1989
+ permission_type=permission_type,
1990
+ workspace_arn=workspace_arn,
1991
+ client_token=client_token,
1992
+ data_sources=data_sources,
1993
+ description=description,
1994
+ name=name,
1995
+ network_access_control=network_access_control,
1996
+ notification_destinations=notification_destinations,
1997
+ organizational_units=organizational_units,
1998
+ organization_role_name=organization_role_name,
1999
+ plugin_admin_enabled=plugin_admin_enabled,
2000
+ role=role,
2001
+ saml_configuration=saml_configuration,
2002
+ stack_set_name=stack_set_name,
2003
+ vpc_configuration=vpc_configuration,
2004
+ )
2005
+
2006
+ return typing.cast("IWorkspace", jsii.sinvoke(cls, "fromWorkspaceAttributes", [scope, id, attrs]))
2007
+
2008
+ @jsii.member(jsii_name="isWorkspace")
2009
+ @builtins.classmethod
2010
+ def is_workspace(cls, x: typing.Any) -> builtins.bool:
2011
+ '''
2012
+ :param x: -
2013
+ '''
2014
+ if __debug__:
2015
+ type_hints = typing.get_type_hints(_typecheckingstub__8766b8935a0812af5a2370796de3e9ea5301499bca4f246f4d41b667fa063728)
2016
+ check_type(argname="argument x", value=x, expected_type=type_hints["x"])
2017
+ return typing.cast(builtins.bool, jsii.sinvoke(cls, "isWorkspace", [x]))
2018
+
2019
+ @builtins.property
2020
+ @jsii.member(jsii_name="accountAccessType")
2021
+ def account_access_type(self) -> "AccountAccessType":
2022
+ '''Specifies whether the workspace can access AWS resources in this AWS account only, or whether it can also access AWS resources in other accounts in the same organization.
2023
+
2024
+ If this is
2025
+ ORGANIZATION, the OrganizationalUnits parameter specifies which organizational units the
2026
+ workspace can access.
2027
+ '''
2028
+ return typing.cast("AccountAccessType", jsii.get(self, "accountAccessType"))
2029
+
2030
+ @builtins.property
2031
+ @jsii.member(jsii_name="authenticationProviders")
2032
+ def authentication_providers(self) -> typing.List["AuthenticationProviders"]:
2033
+ '''Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace.'''
2034
+ return typing.cast(typing.List["AuthenticationProviders"], jsii.get(self, "authenticationProviders"))
2035
+
2036
+ @builtins.property
2037
+ @jsii.member(jsii_name="creationTimestamp")
2038
+ def creation_timestamp(self) -> builtins.str:
2039
+ '''The date that the workspace was created.'''
2040
+ return typing.cast(builtins.str, jsii.get(self, "creationTimestamp"))
2041
+
2042
+ @builtins.property
2043
+ @jsii.member(jsii_name="endpoint")
2044
+ def endpoint(self) -> builtins.str:
2045
+ '''The URL that users can use to access the Grafana console in the workspace.'''
2046
+ return typing.cast(builtins.str, jsii.get(self, "endpoint"))
2047
+
2048
+ @builtins.property
2049
+ @jsii.member(jsii_name="grafanaVersion")
2050
+ def grafana_version(self) -> builtins.str:
2051
+ '''Specifies the version of Grafana supported by this workspace.'''
2052
+ return typing.cast(builtins.str, jsii.get(self, "grafanaVersion"))
2053
+
2054
+ @builtins.property
2055
+ @jsii.member(jsii_name="modificationTimestamp")
2056
+ def modification_timestamp(self) -> builtins.str:
2057
+ '''The most recent date that the workspace was modified.'''
2058
+ return typing.cast(builtins.str, jsii.get(self, "modificationTimestamp"))
2059
+
2060
+ @builtins.property
2061
+ @jsii.member(jsii_name="permissionType")
2062
+ def permission_type(self) -> "PermissionTypes":
2063
+ '''If this is SERVICE_MANAGED, and the workplace was created through the Amazon Managed Grafana console, then Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use AWS data sources and notification channels.
2064
+
2065
+ If this is CUSTOMER_MANAGED, you must manage those roles and permissions yourself.
2066
+
2067
+ If you are working with a workspace in a member account of an organization and that account is
2068
+ not a delegated administrator account, and you want the workspace to access data sources in
2069
+ other AWS accounts in the organization, this parameter must be set to CUSTOMER_MANAGED.
2070
+ '''
2071
+ return typing.cast("PermissionTypes", jsii.get(self, "permissionType"))
2072
+
2073
+ @builtins.property
2074
+ @jsii.member(jsii_name="samlConfigurationStatus")
2075
+ def saml_configuration_status(self) -> "SamlConfigurationStatuses":
2076
+ '''Specifies whether the workspace's SAML configuration is complete.'''
2077
+ return typing.cast("SamlConfigurationStatuses", jsii.get(self, "samlConfigurationStatus"))
2078
+
2079
+ @builtins.property
2080
+ @jsii.member(jsii_name="ssoClientId")
2081
+ def sso_client_id(self) -> builtins.str:
2082
+ '''The ID of the IAM Identity Center-managed application that is created by Amazon Managed Grafana.'''
2083
+ return typing.cast(builtins.str, jsii.get(self, "ssoClientId"))
2084
+
2085
+ @builtins.property
2086
+ @jsii.member(jsii_name="status")
2087
+ def status(self) -> "Status":
2088
+ '''The current status of the workspace.'''
2089
+ return typing.cast("Status", jsii.get(self, "status"))
2090
+
2091
+ @builtins.property
2092
+ @jsii.member(jsii_name="workspaceArn")
2093
+ def workspace_arn(self) -> builtins.str:
2094
+ '''The arn of this workspace.'''
2095
+ return typing.cast(builtins.str, jsii.get(self, "workspaceArn"))
2096
+
2097
+ @builtins.property
2098
+ @jsii.member(jsii_name="workspaceId")
2099
+ def workspace_id(self) -> builtins.str:
2100
+ '''The unique ID of this workspace.'''
2101
+ return typing.cast(builtins.str, jsii.get(self, "workspaceId"))
2102
+
2103
+ @builtins.property
2104
+ @jsii.member(jsii_name="clientToken")
2105
+ def client_token(self) -> typing.Optional[builtins.str]:
2106
+ '''A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.'''
2107
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "clientToken"))
2108
+
2109
+ @builtins.property
2110
+ @jsii.member(jsii_name="dataSources")
2111
+ def data_sources(self) -> typing.Optional[typing.List[builtins.str]]:
2112
+ '''Specifies the AWS data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.
2113
+
2114
+ This list is only used when the workspace was created through the AWS console, and the
2115
+ permissionType is SERVICE_MANAGED.
2116
+ '''
2117
+ return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "dataSources"))
2118
+
2119
+ @builtins.property
2120
+ @jsii.member(jsii_name="description")
2121
+ def description(self) -> typing.Optional[builtins.str]:
2122
+ '''The user-defined description of the workspace.'''
2123
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "description"))
2124
+
2125
+ @builtins.property
2126
+ @jsii.member(jsii_name="name")
2127
+ def name(self) -> typing.Optional[builtins.str]:
2128
+ '''The name of the workspace.'''
2129
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "name"))
2130
+
2131
+ @builtins.property
2132
+ @jsii.member(jsii_name="networkAccessControl")
2133
+ def network_access_control(self) -> typing.Optional["NetworkAccessControl"]:
2134
+ '''The configuration settings for network access to your workspace.'''
2135
+ return typing.cast(typing.Optional["NetworkAccessControl"], jsii.get(self, "networkAccessControl"))
2136
+
2137
+ @builtins.property
2138
+ @jsii.member(jsii_name="notificationDestinations")
2139
+ def notification_destinations(
2140
+ self,
2141
+ ) -> typing.Optional[typing.List["NotificationDestinations"]]:
2142
+ '''The AWS notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.'''
2143
+ return typing.cast(typing.Optional[typing.List["NotificationDestinations"]], jsii.get(self, "notificationDestinations"))
2144
+
2145
+ @builtins.property
2146
+ @jsii.member(jsii_name="organizationalUnits")
2147
+ def organizational_units(self) -> typing.Optional[typing.List[builtins.str]]:
2148
+ '''Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.'''
2149
+ return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "organizationalUnits"))
2150
+
2151
+ @builtins.property
2152
+ @jsii.member(jsii_name="organizationRoleName")
2153
+ def organization_role_name(self) -> typing.Optional[builtins.str]:
2154
+ '''The name of the IAM role that is used to access resources through Organizations.'''
2155
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "organizationRoleName"))
2156
+
2157
+ @builtins.property
2158
+ @jsii.member(jsii_name="pluginAdminEnabled")
2159
+ def plugin_admin_enabled(self) -> typing.Optional[builtins.bool]:
2160
+ '''Whether plugin administration is enabled in the workspace.
2161
+
2162
+ Setting to true allows workspace
2163
+ admins to install, uninstall, and update plugins from within the Grafana workspace.
2164
+
2165
+ This option is only valid for workspaces that support Grafana version 9 or newer.
2166
+ '''
2167
+ return typing.cast(typing.Optional[builtins.bool], jsii.get(self, "pluginAdminEnabled"))
2168
+
2169
+ @builtins.property
2170
+ @jsii.member(jsii_name="role")
2171
+ def role(self) -> typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"]:
2172
+ '''The IAM role that grants permissions to the AWS resources that the workspace will view data from.'''
2173
+ return typing.cast(typing.Optional["_aws_cdk_aws_iam_ceddda9d.IRole"], jsii.get(self, "role"))
2174
+
2175
+ @builtins.property
2176
+ @jsii.member(jsii_name="samlConfiguration")
2177
+ def saml_configuration(self) -> typing.Optional["SamlConfiguration"]:
2178
+ '''If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.'''
2179
+ return typing.cast(typing.Optional["SamlConfiguration"], jsii.get(self, "samlConfiguration"))
2180
+
2181
+ @builtins.property
2182
+ @jsii.member(jsii_name="stackSetName")
2183
+ def stack_set_name(self) -> typing.Optional[builtins.str]:
2184
+ '''The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.'''
2185
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "stackSetName"))
2186
+
2187
+ @builtins.property
2188
+ @jsii.member(jsii_name="vpcConfiguration")
2189
+ def vpc_configuration(self) -> typing.Optional["VpcConfiguration"]:
2190
+ '''The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.'''
2191
+ return typing.cast(typing.Optional["VpcConfiguration"], jsii.get(self, "vpcConfiguration"))
2192
+
2193
+
2194
+ __all__ = [
2195
+ "AccountAccessType",
2196
+ "AuthenticationProviders",
2197
+ "IWorkspace",
2198
+ "NetworkAccessControl",
2199
+ "NotificationDestinations",
2200
+ "PermissionTypes",
2201
+ "SamlAssertionAttributes",
2202
+ "SamlConfiguration",
2203
+ "SamlConfigurationStatuses",
2204
+ "SamlIdpMetadata",
2205
+ "SamlRoleValues",
2206
+ "Status",
2207
+ "VpcConfiguration",
2208
+ "Workspace",
2209
+ "WorkspaceAttributes",
2210
+ "WorkspaceBase",
2211
+ "WorkspaceProps",
2212
+ ]
2213
+
2214
+ publication.publish()
2215
+
2216
+ def _typecheckingstub__1b57abbd6d5412b27ea5caabeb6d58c1a772f5dd9e53d0ba1d0295296567cbb8(
2217
+ *,
2218
+ prefix_lists: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.IPrefixList]] = None,
2219
+ vpc_endpoints: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.IVpcEndpoint]] = None,
2220
+ ) -> None:
2221
+ """Type checking stubs"""
2222
+ pass
2223
+
2224
+ def _typecheckingstub__f6b87a6ceb131220a990409e721206d988891f136b4ef9fd7de25db4bea7624d(
2225
+ *,
2226
+ email: typing.Optional[builtins.str] = None,
2227
+ groups: typing.Optional[builtins.str] = None,
2228
+ login: typing.Optional[builtins.str] = None,
2229
+ name: typing.Optional[builtins.str] = None,
2230
+ org: typing.Optional[builtins.str] = None,
2231
+ role: typing.Optional[builtins.str] = None,
2232
+ ) -> None:
2233
+ """Type checking stubs"""
2234
+ pass
2235
+
2236
+ def _typecheckingstub__94e3d50853b0fff8b07aef213a42805e2945150053d7d713d52a23ad79a71a21(
2237
+ *,
2238
+ idp_metadata: typing.Union[SamlIdpMetadata, typing.Dict[builtins.str, typing.Any]],
2239
+ allowed_organizations: typing.Optional[typing.Sequence[builtins.str]] = None,
2240
+ assertion_atrributes: typing.Optional[typing.Union[SamlAssertionAttributes, typing.Dict[builtins.str, typing.Any]]] = None,
2241
+ login_validity_duration: typing.Optional[jsii.Number] = None,
2242
+ role_values: typing.Optional[typing.Union[SamlRoleValues, typing.Dict[builtins.str, typing.Any]]] = None,
2243
+ ) -> None:
2244
+ """Type checking stubs"""
2245
+ pass
2246
+
2247
+ def _typecheckingstub__39c75c23ab5e000de459956f9472e74b38296a7f5017220c3d3353acf47ebeb1(
2248
+ *,
2249
+ url: typing.Optional[builtins.str] = None,
2250
+ xml: typing.Optional[builtins.str] = None,
2251
+ ) -> None:
2252
+ """Type checking stubs"""
2253
+ pass
2254
+
2255
+ def _typecheckingstub__ef1c910c03fee4fe40765505578b098a7dc7c4001c0dbce28b9c817cd1ceeb97(
2256
+ *,
2257
+ admin: typing.Optional[typing.Sequence[builtins.str]] = None,
2258
+ editor: typing.Optional[typing.Sequence[builtins.str]] = None,
2259
+ ) -> None:
2260
+ """Type checking stubs"""
2261
+ pass
2262
+
2263
+ def _typecheckingstub__587300abdd3ca28460b0e172422b96189b41d352cc212cc6461caee2653c197d(
2264
+ *,
2265
+ security_groups: typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup],
2266
+ subnets: typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISubnet],
2267
+ ) -> None:
2268
+ """Type checking stubs"""
2269
+ pass
2270
+
2271
+ def _typecheckingstub__c7b2f7e0bca3214d1d530a9824b09f4187fa0fc3d9bc0a9db3801c372ca6867d(
2272
+ *,
2273
+ account_access_type: AccountAccessType,
2274
+ authentication_providers: typing.Sequence[AuthenticationProviders],
2275
+ permission_type: PermissionTypes,
2276
+ workspace_arn: builtins.str,
2277
+ client_token: typing.Optional[builtins.str] = None,
2278
+ data_sources: typing.Optional[typing.Sequence[builtins.str]] = None,
2279
+ description: typing.Optional[builtins.str] = None,
2280
+ name: typing.Optional[builtins.str] = None,
2281
+ network_access_control: typing.Optional[typing.Union[NetworkAccessControl, typing.Dict[builtins.str, typing.Any]]] = None,
2282
+ notification_destinations: typing.Optional[typing.Sequence[NotificationDestinations]] = None,
2283
+ organizational_units: typing.Optional[typing.Sequence[builtins.str]] = None,
2284
+ organization_role_name: typing.Optional[builtins.str] = None,
2285
+ plugin_admin_enabled: typing.Optional[builtins.bool] = None,
2286
+ role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
2287
+ saml_configuration: typing.Optional[typing.Union[SamlConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2288
+ stack_set_name: typing.Optional[builtins.str] = None,
2289
+ vpc_configuration: typing.Optional[typing.Union[VpcConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2290
+ ) -> None:
2291
+ """Type checking stubs"""
2292
+ pass
2293
+
2294
+ def _typecheckingstub__245faeb95108a919895d5be8305f00bb27663481697705f156a940170d368cd9(
2295
+ scope: _constructs_77d1e7e8.Construct,
2296
+ id: builtins.str,
2297
+ *,
2298
+ account: typing.Optional[builtins.str] = None,
2299
+ environment_from_arn: typing.Optional[builtins.str] = None,
2300
+ physical_name: typing.Optional[builtins.str] = None,
2301
+ region: typing.Optional[builtins.str] = None,
2302
+ ) -> None:
2303
+ """Type checking stubs"""
2304
+ pass
2305
+
2306
+ def _typecheckingstub__a276f8424bdc34ea475b2154afcc166ec7c942b054911427f1337d0e31dba971(
2307
+ workspace_id: builtins.str,
2308
+ ) -> None:
2309
+ """Type checking stubs"""
2310
+ pass
2311
+
2312
+ def _typecheckingstub__e82b32e64bf2f45936f97dd7e9c4f587db6f6dc8f86a630542d208da05807e97(
2313
+ workspace_arn: builtins.str,
2314
+ ) -> None:
2315
+ """Type checking stubs"""
2316
+ pass
2317
+
2318
+ def _typecheckingstub__a19e08d1da95762003a1adc6b6920b31ab0030dc3f030331c79c2bfcebcfdcf2(
2319
+ *,
2320
+ account_access_type: AccountAccessType,
2321
+ authentication_providers: typing.Sequence[AuthenticationProviders],
2322
+ permission_type: PermissionTypes,
2323
+ client_token: typing.Optional[builtins.str] = None,
2324
+ data_sources: typing.Optional[typing.Sequence[builtins.str]] = None,
2325
+ description: typing.Optional[builtins.str] = None,
2326
+ grafana_version: typing.Optional[builtins.str] = None,
2327
+ name: typing.Optional[builtins.str] = None,
2328
+ network_access_control: typing.Optional[typing.Union[NetworkAccessControl, typing.Dict[builtins.str, typing.Any]]] = None,
2329
+ notification_destinations: typing.Optional[typing.Sequence[NotificationDestinations]] = None,
2330
+ organizational_units: typing.Optional[typing.Sequence[builtins.str]] = None,
2331
+ organization_role_name: typing.Optional[builtins.str] = None,
2332
+ plugin_admin_enabled: typing.Optional[builtins.bool] = None,
2333
+ role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
2334
+ saml_configuration: typing.Optional[typing.Union[SamlConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2335
+ stack_set_name: typing.Optional[builtins.str] = None,
2336
+ vpc_configuration: typing.Optional[typing.Union[VpcConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2337
+ ) -> None:
2338
+ """Type checking stubs"""
2339
+ pass
2340
+
2341
+ def _typecheckingstub__2b689f4d81575ce56f0717294fb20c042f4f3a61a02b0d137e099a528d65a115(
2342
+ scope: _constructs_77d1e7e8.Construct,
2343
+ id: builtins.str,
2344
+ *,
2345
+ account_access_type: AccountAccessType,
2346
+ authentication_providers: typing.Sequence[AuthenticationProviders],
2347
+ permission_type: PermissionTypes,
2348
+ client_token: typing.Optional[builtins.str] = None,
2349
+ data_sources: typing.Optional[typing.Sequence[builtins.str]] = None,
2350
+ description: typing.Optional[builtins.str] = None,
2351
+ grafana_version: typing.Optional[builtins.str] = None,
2352
+ name: typing.Optional[builtins.str] = None,
2353
+ network_access_control: typing.Optional[typing.Union[NetworkAccessControl, typing.Dict[builtins.str, typing.Any]]] = None,
2354
+ notification_destinations: typing.Optional[typing.Sequence[NotificationDestinations]] = None,
2355
+ organizational_units: typing.Optional[typing.Sequence[builtins.str]] = None,
2356
+ organization_role_name: typing.Optional[builtins.str] = None,
2357
+ plugin_admin_enabled: typing.Optional[builtins.bool] = None,
2358
+ role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
2359
+ saml_configuration: typing.Optional[typing.Union[SamlConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2360
+ stack_set_name: typing.Optional[builtins.str] = None,
2361
+ vpc_configuration: typing.Optional[typing.Union[VpcConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2362
+ ) -> None:
2363
+ """Type checking stubs"""
2364
+ pass
2365
+
2366
+ def _typecheckingstub__3998e8138348ba3fd0198ea857bd0357c9ffc4806dd420f1974b384d9116186f(
2367
+ scope: _constructs_77d1e7e8.Construct,
2368
+ id: builtins.str,
2369
+ *,
2370
+ account_access_type: AccountAccessType,
2371
+ authentication_providers: typing.Sequence[AuthenticationProviders],
2372
+ permission_type: PermissionTypes,
2373
+ workspace_arn: builtins.str,
2374
+ client_token: typing.Optional[builtins.str] = None,
2375
+ data_sources: typing.Optional[typing.Sequence[builtins.str]] = None,
2376
+ description: typing.Optional[builtins.str] = None,
2377
+ name: typing.Optional[builtins.str] = None,
2378
+ network_access_control: typing.Optional[typing.Union[NetworkAccessControl, typing.Dict[builtins.str, typing.Any]]] = None,
2379
+ notification_destinations: typing.Optional[typing.Sequence[NotificationDestinations]] = None,
2380
+ organizational_units: typing.Optional[typing.Sequence[builtins.str]] = None,
2381
+ organization_role_name: typing.Optional[builtins.str] = None,
2382
+ plugin_admin_enabled: typing.Optional[builtins.bool] = None,
2383
+ role: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IRole] = None,
2384
+ saml_configuration: typing.Optional[typing.Union[SamlConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2385
+ stack_set_name: typing.Optional[builtins.str] = None,
2386
+ vpc_configuration: typing.Optional[typing.Union[VpcConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
2387
+ ) -> None:
2388
+ """Type checking stubs"""
2389
+ pass
2390
+
2391
+ def _typecheckingstub__8766b8935a0812af5a2370796de3e9ea5301499bca4f246f4d41b667fa063728(
2392
+ x: typing.Any,
2393
+ ) -> None:
2394
+ """Type checking stubs"""
2395
+ pass
2396
+
2397
+ for cls in [IWorkspace]:
2398
+ typing.cast(typing.Any, cls).__protocol_attrs__ = typing.cast(typing.Any, cls).__protocol_attrs__ - set(['__jsii_proxy_class__', '__jsii_type__'])