@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-17T17:31:11.805Z") @Stability(value=Stable) public class CfnTemplate extends CfnResource implements IInspectable
Creates a template from an existing Amazon QuickSight analysis or template. You can use the resulting template to create a dashboard.
A template is an entity in Amazon QuickSight that encapsulates the metadata required to create an analysis and that you can use to create s dashboard. A template adds a layer of abstraction by using placeholders to replace the dataset associated with the analysis. You can use templates to create dashboards by replacing dataset placeholders with datasets that follow the same schema that was used to create the source analysis and template.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.quicksight.*;
CfnTemplate cfnTemplate = CfnTemplate.Builder.create(this, "MyCfnTemplate")
.awsAccountId("awsAccountId")
.sourceEntity(TemplateSourceEntityProperty.builder()
.sourceAnalysis(TemplateSourceAnalysisProperty.builder()
.arn("arn")
.dataSetReferences(List.of(DataSetReferenceProperty.builder()
.dataSetArn("dataSetArn")
.dataSetPlaceholder("dataSetPlaceholder")
.build()))
.build())
.sourceTemplate(TemplateSourceTemplateProperty.builder()
.arn("arn")
.build())
.build())
.templateId("templateId")
// the properties below are optional
.name("name")
.permissions(List.of(ResourcePermissionProperty.builder()
.actions(List.of("actions"))
.principal("principal")
.build()))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.versionDescription("versionDescription")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnTemplate.Builder
A fluent builder for
CfnTemplate. |
static interface |
CfnTemplate.DataSetReferenceProperty
Dataset reference.
|
static interface |
CfnTemplate.ResourcePermissionProperty
Permission for the resource.
|
static interface |
CfnTemplate.TemplateSourceAnalysisProperty
The source analysis of the template.
|
static interface |
CfnTemplate.TemplateSourceEntityProperty
The source entity of the template.
|
static interface |
CfnTemplate.TemplateSourceTemplateProperty
The source template of the template.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnTemplate(Construct scope,
String id,
CfnTemplateProps props)
Create a new `AWS::QuickSight::Template`.
|
protected |
CfnTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnTemplate(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrArn()
The Amazon Resource Name (ARN) of the template.
|
String |
getAttrCreatedTime()
The time this template was created.
|
String |
getAttrLastUpdatedTime()
The time this template was last updated.
|
String |
getAwsAccountId()
The ID for the AWS account that the group is in.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getName()
A display name for the template.
|
Object |
getPermissions()
A list of resource permissions to be set on the template.
|
Object |
getSourceEntity()
The entity that you are using as a source when you create the template.
|
TagManager |
getTags()
Contains a map of the key-value pairs for the resource tag or tags assigned to the resource.
|
String |
getTemplateId()
An ID for the template that you want to create.
|
String |
getVersionDescription()
A description of the current template version being created.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAwsAccountId(String value)
The ID for the AWS account that the group is in.
|
void |
setName(String value)
A display name for the template.
|
void |
setPermissions(IResolvable value)
A list of resource permissions to be set on the template.
|
void |
setPermissions(List<Object> value)
A list of resource permissions to be set on the template.
|
void |
setSourceEntity(CfnTemplate.TemplateSourceEntityProperty value)
The entity that you are using as a source when you create the template.
|
void |
setSourceEntity(IResolvable value)
The entity that you are using as a source when you create the template.
|
void |
setTemplateId(String value)
An ID for the template that you want to create.
|
void |
setVersionDescription(String value)
A description of the current template version being created.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnTemplate(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnTemplate(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
CfnTemplateProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull public String getAttrCreatedTime()
@Stability(value=Stable) @NotNull public String getAttrLastUpdatedTime()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public String getAwsAccountId()
You use the ID for the AWS account that contains your Amazon QuickSight account.
@Stability(value=Stable)
public void setAwsAccountId(@NotNull
String value)
You use the ID for the AWS account that contains your Amazon QuickSight account.
@Stability(value=Stable) @NotNull public Object getSourceEntity()
In SourceEntity , you specify the type of object you're using as source: SourceTemplate for a template or SourceAnalysis for an analysis. Both of these require an Amazon Resource Name (ARN). For SourceTemplate , specify the ARN of the source template. For SourceAnalysis , specify the ARN of the source analysis. The SourceTemplate ARN can contain any AWS account and any Amazon QuickSight-supported AWS Region .
Use the DataSetReferences entity within SourceTemplate or SourceAnalysis to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.
@Stability(value=Stable)
public void setSourceEntity(@NotNull
IResolvable value)
In SourceEntity , you specify the type of object you're using as source: SourceTemplate for a template or SourceAnalysis for an analysis. Both of these require an Amazon Resource Name (ARN). For SourceTemplate , specify the ARN of the source template. For SourceAnalysis , specify the ARN of the source analysis. The SourceTemplate ARN can contain any AWS account and any Amazon QuickSight-supported AWS Region .
Use the DataSetReferences entity within SourceTemplate or SourceAnalysis to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.
@Stability(value=Stable)
public void setSourceEntity(@NotNull
CfnTemplate.TemplateSourceEntityProperty value)
In SourceEntity , you specify the type of object you're using as source: SourceTemplate for a template or SourceAnalysis for an analysis. Both of these require an Amazon Resource Name (ARN). For SourceTemplate , specify the ARN of the source template. For SourceAnalysis , specify the ARN of the source analysis. The SourceTemplate ARN can contain any AWS account and any Amazon QuickSight-supported AWS Region .
Use the DataSetReferences entity within SourceTemplate or SourceAnalysis to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.
@Stability(value=Stable) @NotNull public String getTemplateId()
This template is unique per AWS Region ; in each AWS account.
@Stability(value=Stable)
public void setTemplateId(@NotNull
String value)
This template is unique per AWS Region ; in each AWS account.
@Stability(value=Stable) @Nullable public String getName()
@Stability(value=Stable)
public void setName(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getPermissions()
@Stability(value=Stable)
public void setPermissions(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setPermissions(@Nullable
List<Object> value)
@Stability(value=Stable) @Nullable public String getVersionDescription()
This API operation creates the first version of the template. Every time UpdateTemplate is called, a new version is created. Each version of the template maintains a description of the version in the VersionDescription field.
@Stability(value=Stable)
public void setVersionDescription(@Nullable
String value)
This API operation creates the first version of the template. Every time UpdateTemplate is called, a new version is created. Each version of the template maintains a description of the version in the VersionDescription field.
Copyright © 2022. All rights reserved.