Skip to content
v2.278.0

CfnWorkspace L1 construct ​

Specifies a workspace .

In a workspace, you can create Grafana dashboards and visualizations to analyze your metrics, logs, and traces. You don't have to build, package, or deploy any hardware to run the Grafana server.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_grafana as grafana } from 'aws-cdk-lib';
const cfnWorkspace = new grafana.CfnWorkspace(this, 'MyCfnWorkspace', {
  accountAccessType: 'accountAccessType',
  authenticationProviders: ['authenticationProviders'],
  permissionType: 'permissionType',

  // the properties below are optional
  clientToken: 'clientToken',
  dataSources: ['dataSources'],
  description: 'description',
  grafanaVersion: 'grafanaVersion',
  name: 'name',
  networkAccessControl: {
    prefixListIds: ['prefixListIds'],
    vpceIds: ['vpceIds'],
  },
  notificationDestinations: ['notificationDestinations'],
  organizationalUnits: ['organizationalUnits'],
  organizationRoleName: 'organizationRoleName',
  pluginAdminEnabled: false,
  roleArn: 'roleArn',
  samlConfiguration: {
    idpMetadata: {
      url: 'url',
      xml: 'xml',
    },

    // the properties below are optional
    allowedOrganizations: ['allowedOrganizations'],
    assertionAttributes: {
      email: 'email',
      groups: 'groups',
      login: 'login',
      name: 'name',
      org: 'org',
      role: 'role',
    },
    loginValidityDuration: 123,
    roleValues: {
      admin: ['admin'],
      editor: ['editor'],
    },
  },
  stackSetName: 'stackSetName',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  vpcConfiguration: {
    securityGroupIds: ['securityGroupIds'],
    subnetIds: ['subnetIds'],
  },
});
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_grafana as grafana

cfn_workspace = grafana.CfnWorkspace(self, "MyCfnWorkspace",
    account_access_type="accountAccessType",
    authentication_providers=["authenticationProviders"],
    permission_type="permissionType",

    # the properties below are optional
    client_token="clientToken",
    data_sources=["dataSources"],
    description="description",
    grafana_version="grafanaVersion",
    name="name",
    network_access_control=grafana.CfnWorkspace.NetworkAccessControlProperty(
        prefix_list_ids=["prefixListIds"],
        vpce_ids=["vpceIds"]
    ),
    notification_destinations=["notificationDestinations"],
    organizational_units=["organizationalUnits"],
    organization_role_name="organizationRoleName",
    plugin_admin_enabled=False,
    role_arn="roleArn",
    saml_configuration=grafana.CfnWorkspace.SamlConfigurationProperty(
        idp_metadata=grafana.CfnWorkspace.IdpMetadataProperty(
            url="url",
            xml="xml"
        ),

        # the properties below are optional
        allowed_organizations=["allowedOrganizations"],
        assertion_attributes=grafana.CfnWorkspace.AssertionAttributesProperty(
            email="email",
            groups="groups",
            login="login",
            name="name",
            org="org",
            role="role"
        ),
        login_validity_duration=123,
        role_values=grafana.CfnWorkspace.RoleValuesProperty(
            admin=["admin"],
            editor=["editor"]
        )
    ),
    stack_set_name="stackSetName",
    tags=[grafana.CfnWorkspace.TagsItemsProperty(
        key="key",
        value="value"
    )],
    vpc_configuration=grafana.CfnWorkspace.VpcConfigurationProperty(
        security_group_ids=["securityGroupIds"],
        subnet_ids=["subnetIds"]
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.grafana.*;

CfnWorkspace cfnWorkspace = CfnWorkspace.Builder.create(this, "MyCfnWorkspace")
        .accountAccessType("accountAccessType")
        .authenticationProviders(List.of("authenticationProviders"))
        .permissionType("permissionType")

        // the properties below are optional
        .clientToken("clientToken")
        .dataSources(List.of("dataSources"))
        .description("description")
        .grafanaVersion("grafanaVersion")
        .name("name")
        .networkAccessControl(NetworkAccessControlProperty.builder()
                .prefixListIds(List.of("prefixListIds"))
                .vpceIds(List.of("vpceIds"))
                .build())
        .notificationDestinations(List.of("notificationDestinations"))
        .organizationalUnits(List.of("organizationalUnits"))
        .organizationRoleName("organizationRoleName")
        .pluginAdminEnabled(false)
        .roleArn("roleArn")
        .samlConfiguration(SamlConfigurationProperty.builder()
                .idpMetadata(IdpMetadataProperty.builder()
                        .url("url")
                        .xml("xml")
                        .build())

                // the properties below are optional
                .allowedOrganizations(List.of("allowedOrganizations"))
                .assertionAttributes(AssertionAttributesProperty.builder()
                        .email("email")
                        .groups("groups")
                        .login("login")
                        .name("name")
                        .org("org")
                        .role("role")
                        .build())
                .loginValidityDuration(123)
                .roleValues(RoleValuesProperty.builder()
                        .admin(List.of("admin"))
                        .editor(List.of("editor"))
                        .build())
                .build())
        .stackSetName("stackSetName")
        .tags(List.of(TagsItemsProperty.builder()
                .key("key")
                .value("value")
                .build()))
        .vpcConfiguration(VpcConfigurationProperty.builder()
                .securityGroupIds(List.of("securityGroupIds"))
                .subnetIds(List.of("subnetIds"))
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Grafana;

var cfnWorkspace = new CfnWorkspace(this, "MyCfnWorkspace", new CfnWorkspaceProps {
    AccountAccessType = "accountAccessType",
    AuthenticationProviders = new [] { "authenticationProviders" },
    PermissionType = "permissionType",

    // the properties below are optional
    ClientToken = "clientToken",
    DataSources = new [] { "dataSources" },
    Description = "description",
    GrafanaVersion = "grafanaVersion",
    Name = "name",
    NetworkAccessControl = new NetworkAccessControlProperty {
        PrefixListIds = new [] { "prefixListIds" },
        VpceIds = new [] { "vpceIds" }
    },
    NotificationDestinations = new [] { "notificationDestinations" },
    OrganizationalUnits = new [] { "organizationalUnits" },
    OrganizationRoleName = "organizationRoleName",
    PluginAdminEnabled = false,
    RoleArn = "roleArn",
    SamlConfiguration = new SamlConfigurationProperty {
        IdpMetadata = new IdpMetadataProperty {
            Url = "url",
            Xml = "xml"
        },

        // the properties below are optional
        AllowedOrganizations = new [] { "allowedOrganizations" },
        AssertionAttributes = new AssertionAttributesProperty {
            Email = "email",
            Groups = "groups",
            Login = "login",
            Name = "name",
            Org = "org",
            Role = "role"
        },
        LoginValidityDuration = 123,
        RoleValues = new RoleValuesProperty {
            Admin = new [] { "admin" },
            Editor = new [] { "editor" }
        }
    },
    StackSetName = "stackSetName",
    Tags = new [] { new TagsItemsProperty {
        Key = "key",
        Value = "value"
    } },
    VpcConfiguration = new VpcConfigurationProperty {
        SecurityGroupIds = new [] { "securityGroupIds" },
        SubnetIds = new [] { "subnetIds" }
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnWorkspace := awscdk.Aws_grafana.NewCfnWorkspace(this, jsii.String("MyCfnWorkspace"), &CfnWorkspaceProps{
	AccountAccessType: jsii.String("accountAccessType"),
	AuthenticationProviders: []*string{
		jsii.String("authenticationProviders"),
	},
	PermissionType: jsii.String("permissionType"),

	// the properties below are optional
	ClientToken: jsii.String("clientToken"),
	DataSources: []*string{
		jsii.String("dataSources"),
	},
	Description: jsii.String("description"),
	GrafanaVersion: jsii.String("grafanaVersion"),
	Name: jsii.String("name"),
	NetworkAccessControl: &NetworkAccessControlProperty{
		PrefixListIds: []*string{
			jsii.String("prefixListIds"),
		},
		VpceIds: []*string{
			jsii.String("vpceIds"),
		},
	},
	NotificationDestinations: []*string{
		jsii.String("notificationDestinations"),
	},
	OrganizationalUnits: []*string{
		jsii.String("organizationalUnits"),
	},
	OrganizationRoleName: jsii.String("organizationRoleName"),
	PluginAdminEnabled: jsii.Boolean(false),
	RoleArn: jsii.String("roleArn"),
	SamlConfiguration: &SamlConfigurationProperty{
		IdpMetadata: &IdpMetadataProperty{
			Url: jsii.String("url"),
			Xml: jsii.String("xml"),
		},

		// the properties below are optional
		AllowedOrganizations: []*string{
			jsii.String("allowedOrganizations"),
		},
		AssertionAttributes: &AssertionAttributesProperty{
			Email: jsii.String("email"),
			Groups: jsii.String("groups"),
			Login: jsii.String("login"),
			Name: jsii.String("name"),
			Org: jsii.String("org"),
			Role: jsii.String("role"),
		},
		LoginValidityDuration: jsii.Number(123),
		RoleValues: &RoleValuesProperty{
			Admin: []*string{
				jsii.String("admin"),
			},
			Editor: []*string{
				jsii.String("editor"),
			},
		},
	},
	StackSetName: jsii.String("stackSetName"),
	Tags: []TagsItemsProperty{
		&TagsItemsProperty{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	VpcConfiguration: &VpcConfigurationProperty{
		SecurityGroupIds: []*string{
			jsii.String("securityGroupIds"),
		},
		SubnetIds: []*string{
			jsii.String("subnetIds"),
		},
	},
})

Initializer ​

ts
new CfnWorkspace(scope: Construct, id: string, props: CfnWorkspaceProps)
python
CfnWorkspace(scope: Construct, id: str, props: CfnWorkspaceProps)
java
new CfnWorkspace(Construct scope, String id, CfnWorkspaceProps props)
csharp
new CfnWorkspace(Construct scope, string id, CfnWorkspaceProps props)
go
NewCfnWorkspace(Scope Construct, Id *string, Props CfnWorkspaceProps)

Construct Props ​

accountAccessTypestringaccount_access_typestraccountAccessTypeStringAccountAccessTypestringAccountAccessType*string required #
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.

authenticationProvidersstring[]authentication_providerstyping.List[str]authenticationProvidersList<String>AuthenticationProvidersstring[]AuthenticationProviders*[]*string required #
Specifies whether this workspace uses SAML 2.0, SSOlong , or both to authenticate users for using the Grafana console within a workspace. For more information, see User authentication in Amazon Managed Grafana .

Allowed Values : AWS_SSO | SAML

clientTokenoptionalstringclient_tokenoptionalstrclientTokenoptionalStringClientTokenoptionalstringClientTokenoptional*string #
A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
dataSourcesoptionalstring[]data_sourcesoptionaltyping.List[str]dataSourcesoptionalList<String>DataSourcesoptionalstring[]DataSourcesoptional*[]*string #
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 .

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
The user-defined description of the workspace.
grafanaVersionoptionalstringgrafana_versionoptionalstrgrafanaVersionoptionalStringGrafanaVersionoptionalstringGrafanaVersionoptional*string #
Specifies the version of Grafana to support in the workspace.
notes

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).

To know what versions are available to upgrade to for a specific workspace, see the ListVersions operation.

nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*string #
The name of the workspace.
networkAccessControloptionalIResolvable | CfnWorkspace.NetworkAccessControlPropertynetwork_access_controloptionaltyping.Union[IResolvable, NetworkAccessControlProperty]networkAccessControloptionalIResolvableNetworkAccessControloptionalIResolvableNetworkAccessControloptionalinterface{} #
The configuration settings for network access to your workspace.
notificationDestinationsoptionalstring[]notification_destinationsoptionaltyping.List[str]notificationDestinationsoptionalList<String>NotificationDestinationsoptionalstring[]NotificationDestinationsoptional*[]*string #
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.

AllowedValues : SNS

organizationalUnitsoptionalstring[]organizational_unitsoptionaltyping.List[str]organizationalUnitsoptionalList<String>OrganizationalUnitsoptionalstring[]OrganizationalUnitsoptional*[]*string #
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.
organizationRoleNameoptionalstringorganization_role_nameoptionalstrorganizationRoleNameoptionalStringOrganizationRoleNameoptionalstringOrganizationRoleNameoptional*string #
The name of the IAM role that is used to access resources through Organizations.
permissionTypestringpermission_typestrpermissionTypeStringPermissionTypestringPermissionType*string required #
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.
notes

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 .

For more information about converting between customer and service managed, see Managing permissions for data sources and notification channels . For more information about the roles and permissions that must be managed for customer managed workspaces, see Amazon Managed Grafana permissions and policies for AWS data sources and notification channels

pluginAdminEnabledoptionalboolean | IResolvableplugin_admin_enabledoptionaltyping.Union[bool, IResolvable]pluginAdminEnabledoptionalBooleanPluginAdminEnabledoptionalboolPluginAdminEnabledoptionalinterface{} #
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.

roleArnoptionalstring | IRoleRefrole_arnoptionaltyping.Union[str, IRoleRef]roleArnoptionalStringRoleArnoptionalstringRoleArnoptionalinterface{} #
The IAM role that grants permissions to the AWS resources that the workspace will view data from.

This role must already exist.

samlConfigurationoptionalIResolvable | CfnWorkspace.SamlConfigurationPropertysaml_configurationoptionaltyping.Union[IResolvable, SamlConfigurationProperty]samlConfigurationoptionalIResolvableSamlConfigurationoptionalIResolvableSamlConfigurationoptionalinterface{} #
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.
stackSetNameoptionalstringstack_set_nameoptionalstrstackSetNameoptionalStringStackSetNameoptionalstringStackSetNameoptional*string #
The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.
tagsoptionalCfnWorkspace.TagsItemsProperty[]tagsoptionaltyping.List[TagsItemsProperty]tagsoptionalList<TagsItemsProperty>TagsoptionalTagsItemsProperty[]Tagsoptional*[]TagsItemsProperty #
The list of tags associated with the workspace.
vpcConfigurationoptionalIResolvable | CfnWorkspace.VpcConfigurationPropertyvpc_configurationoptionaltyping.Union[IResolvable, VpcConfigurationProperty]vpcConfigurationoptionalIResolvableVpcConfigurationoptionalIResolvableVpcConfigurationoptionalinterface{} #
The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.

Connecting to a private VPC is not yet available in the Asia Pacific (Seoul) Region (ap-northeast-2).

Properties ​

accountAccessTypestringaccount_access_typestraccountAccessTypeStringAccountAccessTypestringAccountAccessType*string #
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.
attrCreationTimestampstringattr_creation_timestampstrattrCreationTimestampStringAttrCreationTimestampstringAttrCreationTimestamp*string #
The date that the workspace was created.

Type: Timestamp

attrEndpointstringattr_endpointstrattrEndpointStringAttrEndpointstringAttrEndpoint*string #
The URL that users can use to access the Grafana console in the workspace.

Type: String

attrGrafanaVersionstringattr_grafana_versionstrattrGrafanaVersionStringAttrGrafanaVersionstringAttrGrafanaVersion*string #
Specifies the version of Grafana supported by this workspace.

Type: String

attrIdstringattr_idstrattrIdStringAttrIdstringAttrId*string #
The unique ID of this workspace.

Type: String

attrModificationTimestampstringattr_modification_timestampstrattrModificationTimestampStringAttrModificationTimestampstringAttrModificationTimestamp*string #
The most recent date that the workspace was modified.

Type: Timestamp

attrSamlConfigurationStatusstringattr_saml_configuration_statusstrattrSamlConfigurationStatusStringAttrSamlConfigurationStatusstringAttrSamlConfigurationStatus*string #
Specifies whether the workspace's SAML configuration is complete.

Valid values: CONFIGURED | NOT_CONFIGURED

Type: String

attrSsoClientIdstringattr_sso_client_idstrattrSsoClientIdStringAttrSsoClientIdstringAttrSsoClientId*string #
The ID of the IAM Identity Center-managed application that is created by Amazon Managed Grafana .

Type: String

attrStatusstringattr_statusstrattrStatusStringAttrStatusstringAttrStatus*string #
The current status of the workspace.

Valid values: ACTIVE | CREATING | DELETING | FAILED | UPDATING | UPGRADING | DELETION_FAILED | CREATION_FAILED | UPDATE_FAILED | UPGRADE_FAILED | LICENSE_REMOVAL_FAILED

Type: String

authenticationProvidersstring[]authentication_providerstyping.List[str]authenticationProvidersList<String>AuthenticationProvidersstring[]AuthenticationProviders*[]*string #
Specifies whether this workspace uses SAML 2.0, SSOlong , or both to authenticate users for using the Grafana console within a workspace. For more information, see User authentication in Amazon Managed Grafana .
cdkTagManagerTagManagercdk_tag_managerTagManagercdkTagManagerTagManagerCdkTagManagerTagManagerCdkTagManagerTagManager #
Tag Manager which manages the tags for this resource.
CFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAMEstrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*string static #
The CloudFormation resource type name for this resource class.
Options for this resource, such as condition, update policy etc.
cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string #
AWS resource type.
clientTokenmay be undefinedstringclient_tokenmay be undefinedstrclientTokenmay be undefinedStringClientTokenmay be undefinedstringClientTokenmay be undefined*string #
A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*string #
dataSourcesmay be undefinedstring[]data_sourcesmay be undefinedtyping.List[str]dataSourcesmay be undefinedList<String>DataSourcesmay be undefinedstring[]DataSourcesmay be undefined*[]*string #
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.
descriptionmay be undefinedstringdescriptionmay be undefinedstrdescriptionmay be undefinedStringDescriptionmay be undefinedstringDescriptionmay be undefined*string #
The user-defined description of the workspace.
grafanaVersionmay be undefinedstringgrafana_versionmay be undefinedstrgrafanaVersionmay be undefinedStringGrafanaVersionmay be undefinedstringGrafanaVersionmay be undefined*string #
Specifies the version of Grafana to support in the workspace.
logicalIdstringlogical_idstrlogicalIdStringLogicalIdstringLogicalId*string #
The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

namemay be undefinedstringnamemay be undefinedstrnamemay be undefinedStringNamemay be undefinedstringNamemay be undefined*string #
The name of the workspace.
networkAccessControlmay be undefinedIResolvable | CfnWorkspace.NetworkAccessControlPropertynetwork_access_controlmay be undefinedtyping.Union[IResolvable, NetworkAccessControlProperty]networkAccessControlmay be undefinedIResolvableNetworkAccessControlmay be undefinedIResolvableNetworkAccessControlmay be undefinedinterface{} #
The configuration settings for network access to your workspace.
nodeNodenodeNodenodeNodeNodeNodeNodeNode #
The tree node.
notificationDestinationsmay be undefinedstring[]notification_destinationsmay be undefinedtyping.List[str]notificationDestinationsmay be undefinedList<String>NotificationDestinationsmay be undefinedstring[]NotificationDestinationsmay be undefined*[]*string #
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.
organizationalUnitsmay be undefinedstring[]organizational_unitsmay be undefinedtyping.List[str]organizationalUnitsmay be undefinedList<String>OrganizationalUnitsmay be undefinedstring[]OrganizationalUnitsmay be undefined*[]*string #
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.
organizationRoleNamemay be undefinedstringorganization_role_namemay be undefinedstrorganizationRoleNamemay be undefinedStringOrganizationRoleNamemay be undefinedstringOrganizationRoleNamemay be undefined*string #
The name of the IAM role that is used to access resources through Organizations.
permissionTypestringpermission_typestrpermissionTypeStringPermissionTypestringPermissionType*string #
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.
pluginAdminEnabledmay be undefinedboolean | IResolvableplugin_admin_enabledmay be undefinedtyping.Union[bool, IResolvable]pluginAdminEnabledmay be undefinedBooleanPluginAdminEnabledmay be undefinedboolPluginAdminEnabledmay be undefinedinterface{} #
Whether plugin administration is enabled in the workspace.
refstringrefstrrefStringRefstringRef*string #
Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

roleArnmay be undefinedstringrole_arnmay be undefinedstrroleArnmay be undefinedStringRoleArnmay be undefinedstringRoleArnmay be undefined*string #
The IAM role that grants permissions to the AWS resources that the workspace will view data from.
samlConfigurationmay be undefinedIResolvable | CfnWorkspace.SamlConfigurationPropertysaml_configurationmay be undefinedtyping.Union[IResolvable, SamlConfigurationProperty]samlConfigurationmay be undefinedIResolvableSamlConfigurationmay be undefinedIResolvableSamlConfigurationmay be undefinedinterface{} #
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.
stackStackstackStackstackStackStackStackStackStack #
The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

stackSetNamemay be undefinedstringstack_set_namemay be undefinedstrstackSetNamemay be undefinedStringStackSetNamemay be undefinedstringStackSetNamemay be undefined*string #
The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.
tagsmay be undefinedCfnWorkspace.TagsItemsProperty[]tagsmay be undefinedtyping.List[TagsItemsProperty]tagsmay be undefinedList<TagsItemsProperty>Tagsmay be undefinedTagsItemsProperty[]Tagsmay be undefined*[]TagsItemsProperty #
The list of tags associated with the workspace.
vpcConfigurationmay be undefinedIResolvable | CfnWorkspace.VpcConfigurationPropertyvpc_configurationmay be undefinedtyping.Union[IResolvable, VpcConfigurationProperty]vpcConfigurationmay be undefinedIResolvableVpcConfigurationmay be undefinedIResolvableVpcConfigurationmay be undefinedinterface{} #
The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.
workspaceRefWorkspaceReferenceworkspace_refWorkspaceReferenceworkspaceRefWorkspaceReferenceWorkspaceRefWorkspaceReferenceWorkspaceRefWorkspaceReference #
A reference to a Workspace resource.

Methods ​

addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string) #
Syntactic sugar for `addOverride(path, undefined)`.
1 parameter

Parameters

  • pathpathpathpathPath — The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource) deprecated #
Use `addResourceDependency` instead.

This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.

addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource) deprecated #
Use `addResourceDependency` instead.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.

addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{}) #
Add a value to the CloudFormation Resource Metadata.
addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{}) #
Adds an override to the synthesized CloudFormation resource.
notes · 2 parameters

To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example,

typescript
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');

would add the overrides

json
"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters

  • pathpathpathpathPath — - The path of the property, you can use dot notation to override values in complex types.
  • valuevaluevaluevalueValue — - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string) #
Adds an override that deletes the value of a property from the resource definition.
1 parameter

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{}) #
Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

2 parameters

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path of the property.
  • valuevaluevaluevalueValue — The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string) #
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.

applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength) #
Sets the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.

1 parameter

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions) #
Sets the deletion policy of the resource based on the removal policy specified.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string #
getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference #
Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

1 parameter

Parameters

  • attributeNameattribute_nameattributeNameattributeNameAttributeName — The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{} #
Retrieve a value value from the CloudFormation Resource Metadata.
inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector) #
Examines the CloudFormation resource and discloses attributes.
1 parameter

Parameters

  • inspectorinspectorinspectorinspectorInspector — tree inspector to collect and process attributes.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *bool static #
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

returns

Returns: The construct as a stack element or undefined if it is not a stack element.

isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *bool static #
Check whether the given object is a CfnResource.
isCfnWorkspace(x: any): boolean@staticmethod def is_cfn_workspace(x: Any) -> boolpublic static Boolean isCfnWorkspace(Object x)public static bool IsCfnWorkspace(object x)func IsCfnWorkspace(X interface{}) *bool static #
Checks whether the given object is a CfnWorkspace.
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *bool static #
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{} #
Retrieves an array of resources and stacks this resource depends on.

For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.

overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string) #
Overrides the auto-generated logical ID with a specific ID.
1 parameter

Parameters

  • newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId — The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource) deprecated #
Use `removeResourceDependency` instead

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource) #
Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource) #
Replaces one dependency with another.
2 parameters

Parameters

  • targettargettargettargetTarget — The dependency to replace.
  • newTargetnew_targetnewTargetnewTargetNewTarget — The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string #
Returns a string representation of this construct.
returns

Returns: a string representation of this resource

with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct #
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.