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.
| CloudFormation | AWS::Grafana::Workspace |
|---|---|
| Source | |
| Type last changed |
Example
// 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'],
},
});
# 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"]
)
)
// 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();
// 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" }
}
});
// 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
new CfnWorkspace(scope: Construct, id: string, props: CfnWorkspaceProps)
CfnWorkspace(scope: Construct, id: str, props: CfnWorkspaceProps)
new CfnWorkspace(Construct scope, String id, CfnWorkspaceProps props)
new CfnWorkspace(Construct scope, string id, CfnWorkspaceProps props)
NewCfnWorkspace(Scope Construct, Id *string, Props CfnWorkspaceProps)
Construct Props
accountAccessTypestringaccount_access_typestraccountAccessTypeStringAccountAccessTypestringAccountAccessType*string required #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 #Allowed Values : AWS_SSO | SAML
clientTokenoptionalstringclient_tokenoptionalstrclientTokenoptionalStringClientTokenoptionalstringClientTokenoptional*string #dataSourcesoptionalstring[]data_sourcesoptionaltyping.List[str]dataSourcesoptionalList<String>DataSourcesoptionalstring[]DataSourcesoptional*[]*string #This list is only used when the workspace was created through the AWS console, and the permissionType is SERVICE_MANAGED .
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #networkAccessControloptionalIResolvable | CfnWorkspace.network_access_controloptionaltyping.Union[IResolvable, NetworkAccessControlProperty]networkAccessControloptionalIResolvableNetworkAccessControloptionalIResolvableNetworkAccessControloptionalinterface{} #notificationDestinationsoptionalstring[]notification_destinationsoptionaltyping.List[str]notificationDestinationsoptionalList<String>NotificationDestinationsoptionalstring[]NotificationDestinationsoptional*[]*string #AllowedValues : SNS
organizationalUnitsoptionalstring[]organizational_unitsoptionaltyping.List[str]organizationalUnitsoptionalList<String>OrganizationalUnitsoptionalstring[]OrganizationalUnitsoptional*[]*string #organizationRoleNameoptionalstringorganization_role_nameoptionalstrorganizationRoleNameoptionalStringOrganizationRoleNameoptionalstringOrganizationRoleNameoptional*string #permissionTypestringpermission_typestrpermissionTypeStringPermissionTypestringPermissionType*string required #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{} #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{} #This role must already exist.
samlConfigurationoptionalIResolvable | CfnWorkspace.saml_configurationoptionaltyping.Union[IResolvable, SamlConfigurationProperty]samlConfigurationoptionalIResolvableSamlConfigurationoptionalIResolvableSamlConfigurationoptionalinterface{} #stackSetNameoptionalstringstack_set_nameoptionalstrstackSetNameoptionalStringStackSetNameoptionalstringStackSetNameoptional*string #tagsoptionalCfnWorkspace.TagsItemsProperty[]tagsoptionaltyping.List[TagsItemsProperty]tagsoptionalList<TagsItemsProperty>TagsoptionalTagsItemsProperty[]Tagsoptional*[]TagsItemsProperty #vpcConfigurationoptionalIResolvable | CfnWorkspace.vpc_configurationoptionaltyping.Union[IResolvable, VpcConfigurationProperty]vpcConfigurationoptionalIResolvableVpcConfigurationoptionalIResolvableVpcConfigurationoptionalinterface{} #Connecting to a private VPC is not yet available in the Asia Pacific (Seoul) Region (ap-northeast-2).
Properties
accountAccessTypestringaccount_access_typestraccountAccessTypeStringAccountAccessTypestringAccountAccessType*string #attrCreationTimestampstringattr_creation_timestampstrattrCreationTimestampStringAttrCreationTimestampstringAttrCreationTimestamp*string #Type: Timestamp
Type: String
Type: String
attrModificationTimestampstringattr_modification_timestampstrattrModificationTimestampStringAttrModificationTimestampstringAttrModificationTimestamp*string #Type: Timestamp
attrSamlConfigurationStatusstringattr_saml_configuration_statusstrattrSamlConfigurationStatusStringAttrSamlConfigurationStatusstringAttrSamlConfigurationStatus*string #Valid values: CONFIGURED | NOT_CONFIGURED
Type: String
attrSsoClientIdstringattr_sso_client_idstrattrSsoClientIdStringAttrSsoClientIdstringAttrSsoClientId*string #Type: String
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 #cdkTagManagerTagManagercdk_tag_managerTagManagercdkTagManagerTagManagerCdkTagManagerTagManagerCdkTagManagerTagManager #CFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAMEstrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*string static #cfnOptionsICfnResourceOptionscfn_optionsICfnResourceOptionscfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptions #cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string #clientTokenmay be undefinedstringclient_tokenmay be undefinedstrclientTokenmay be undefinedStringClientTokenmay be undefinedstringClientTokenmay be undefined*string #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 #descriptionmay be undefinedstringdescriptionmay be undefinedstrdescriptionmay be undefinedStringDescriptionmay be undefinedstringDescriptionmay be undefined*string #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 #networkAccessControlmay be undefinedIResolvable | CfnWorkspace.network_access_controlmay be undefinedtyping.Union[IResolvable, NetworkAccessControlProperty]networkAccessControlmay be undefinedIResolvableNetworkAccessControlmay be undefinedIResolvableNetworkAccessControlmay be undefinedinterface{} #notificationDestinationsmay be undefinedstring[]notification_destinationsmay be undefinedtyping.List[str]notificationDestinationsmay be undefinedList<String>NotificationDestinationsmay be undefinedstring[]NotificationDestinationsmay be undefined*[]*string #organizationalUnitsmay be undefinedstring[]organizational_unitsmay be undefinedtyping.List[str]organizationalUnitsmay be undefinedList<String>OrganizationalUnitsmay be undefinedstring[]OrganizationalUnitsmay be undefined*[]*string #organizationRoleNamemay be undefinedstringorganization_role_namemay be undefinedstrorganizationRoleNamemay be undefinedStringOrganizationRoleNamemay be undefinedstringOrganizationRoleNamemay be undefined*string #permissionTypestringpermission_typestrpermissionTypeStringPermissionTypestringPermissionType*string #pluginAdminEnabledmay be undefinedboolean | IResolvableplugin_admin_enabledmay be undefinedtyping.Union[bool, IResolvable]pluginAdminEnabledmay be undefinedBooleanPluginAdminEnabledmay be undefinedboolPluginAdminEnabledmay be undefinedinterface{} #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 #samlConfigurationmay be undefinedIResolvable | CfnWorkspace.saml_configurationmay be undefinedtyping.Union[IResolvable, SamlConfigurationProperty]samlConfigurationmay be undefinedIResolvableSamlConfigurationmay be undefinedIResolvableSamlConfigurationmay be undefinedinterface{} #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 #tagsmay be undefinedCfnWorkspace.TagsItemsProperty[]tagsmay be undefinedtyping.List[TagsItemsProperty]tagsmay be undefinedList<TagsItemsProperty>Tagsmay be undefinedTagsItemsProperty[]Tagsmay be undefined*[]TagsItemsProperty #vpcConfigurationmay be undefinedIResolvable | CfnWorkspace.vpc_configurationmay be undefinedtyping.Union[IResolvable, VpcConfigurationProperty]vpcConfigurationmay be undefinedIResolvableVpcConfigurationmay be undefinedIResolvableVpcConfigurationmay be undefinedinterface{} #workspaceRefWorkspaceReferenceworkspace_refWorkspaceReferenceworkspaceRefWorkspaceReferenceWorkspaceRefWorkspaceReferenceWorkspaceRefWorkspaceReference #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) #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 #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 #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{}) #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{}) #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,
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
would add the overrides
"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) #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{}) #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) #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) #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) #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 #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{} #inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector) #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 #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 #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 #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 #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{} #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) #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 #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) #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) #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
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 #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.