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