Class CfnDataset
- All Implemented Interfaces:
- IConstruct,- IDependable,- IInspectable,- software.amazon.jsii.JsiiSerializable,- software.constructs.IConstruct
AWS::Forecast::Dataset.
 Creates an Amazon Forecast dataset. The information about the dataset that you provide helps Forecast understand how to consume the data for model training. This includes the following:
- DataFrequency- How frequently your historical time-series data is collected.
- Domainand- DatasetType- Each dataset has an associated dataset domain and a type within the domain. Amazon Forecast provides a list of predefined domains and types within each domain. For each unique dataset domain and type within the domain, Amazon Forecast requires your data to include a minimum set of predefined fields.
- Schema- A schema specifies the fields in the dataset, including the field name and data type.
After creating a dataset, you import your training data into it and add the dataset to a dataset group. You use the dataset group to create a predictor. For more information, see Importing datasets .
To get a list of all your datasets, use the ListDatasets operation.
For example Forecast datasets, see the Amazon Forecast Sample GitHub repository .
The
Statusof a dataset must beACTIVEbefore you can import training data. Use the DescribeDataset operation to get the status.
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.forecast.*;
 Object encryptionConfig;
 Object schema;
 CfnDataset cfnDataset = CfnDataset.Builder.create(this, "MyCfnDataset")
         .datasetName("datasetName")
         .datasetType("datasetType")
         .domain("domain")
         .schema(schema)
         // the properties below are optional
         .dataFrequency("dataFrequency")
         .encryptionConfig(encryptionConfig)
         .tags(List.of(TagsItemsProperty.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 - 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceExample:static final classA fluent builder forCfnDataset.static interfaceAn AWS Key Management Service (KMS) key and an AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.static interfaceDefines the fields of a dataset.static interfaceExample:Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstructIConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstructsoftware.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectableIInspectable.Jsii$Default, IInspectable.Jsii$Proxy
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionCfnDataset(Construct scope, String id, CfnDatasetProps props) Create a newAWS::Forecast::Dataset.protectedCfnDataset(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDataset(software.amazon.jsii.JsiiObjectRef objRef) 
- 
Method SummaryModifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the dataset.The frequency of data collection.The name of the dataset.The dataset type.The domain associated with the dataset.A Key Management Service (KMS) key and the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.The schema for the dataset.getTags()An array of key-value pairs to apply to this resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDataFrequency(String value) The frequency of data collection.voidsetDatasetName(String value) The name of the dataset.voidsetDatasetType(String value) The dataset type.voidThe domain associated with the dataset.voidsetEncryptionConfig(Object value) A Key Management Service (KMS) key and the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.voidThe schema for the dataset.voidsetTags(List<CfnDataset.TagsItemsProperty> value) An array of key-value pairs to apply to this resource.Methods inherited from class software.amazon.awscdk.core.CfnResourceaddDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElementgetRefMethods inherited from class software.amazon.awscdk.core.CfnElementgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.ConstructgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Field Details- 
CFN_RESOURCE_TYPE_NAMEThe CloudFormation resource type name for this resource class.
 
- 
- 
Constructor Details- 
CfnDatasetprotected CfnDataset(software.amazon.jsii.JsiiObjectRef objRef) 
- 
CfnDatasetprotected CfnDataset(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
- 
CfnDataset@Stability(Stable) public CfnDataset(@NotNull Construct scope, @NotNull String id, @NotNull CfnDatasetProps props) Create a newAWS::Forecast::Dataset.- Parameters:
- scope-- scope in which this resource is defined.
 
- id-- scoped id of the resource.
 
- props-- resource properties.
 
 
 
- 
- 
Method Details- 
inspectExamines the CloudFormation resource and discloses attributes.- Specified by:
- inspectin interface- IInspectable
- Parameters:
- inspector-- tree inspector to collect and process attributes.
 
 
- 
renderProperties@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
- renderPropertiesin class- CfnResource
- Parameters:
- props- This parameter is required.
 
- 
getAttrArnThe Amazon Resource Name (ARN) of the dataset.
- 
getCfnProperties- Overrides:
- getCfnPropertiesin class- CfnResource
 
- 
getDatasetNameThe name of the dataset.
- 
setDatasetNameThe name of the dataset.
- 
getDatasetTypeThe dataset type.
- 
setDatasetTypeThe dataset type.
- 
getDomainThe domain associated with the dataset.
- 
setDomainThe domain associated with the dataset.
- 
getEncryptionConfigA Key Management Service (KMS) key and the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.
- 
setEncryptionConfigA Key Management Service (KMS) key and the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.
- 
getSchemaThe schema for the dataset.The schema attributes and their order must match the fields in your data. The dataset DomainandDatasetTypethat you choose determine the minimum required fields in your training data. For information about the required fields for a specific dataset domain and type, see Dataset Domains and Dataset Types .
- 
setSchemaThe schema for the dataset.The schema attributes and their order must match the fields in your data. The dataset DomainandDatasetTypethat you choose determine the minimum required fields in your training data. For information about the required fields for a specific dataset domain and type, see Dataset Domains and Dataset Types .
- 
getDataFrequencyThe frequency of data collection. This parameter is required for RELATED_TIME_SERIES datasets.Valid intervals are an integer followed by Y (Year), M (Month), W (Week), D (Day), H (Hour), and min (Minute). For example, "1D" indicates every day and "15min" indicates every 15 minutes. You cannot specify a value that would overlap with the next larger frequency. That means, for example, you cannot specify a frequency of 60 minutes, because that is equivalent to 1 hour. The valid values for each frequency are the following: - Minute - 1-59
- Hour - 1-23
- Day - 1-6
- Week - 1-4
- Month - 1-11
- Year - 1
 Thus, if you want every other week forecasts, specify "2W". Or, if you want quarterly forecasts, you specify "3M". 
- 
setDataFrequencyThe frequency of data collection. This parameter is required for RELATED_TIME_SERIES datasets.Valid intervals are an integer followed by Y (Year), M (Month), W (Week), D (Day), H (Hour), and min (Minute). For example, "1D" indicates every day and "15min" indicates every 15 minutes. You cannot specify a value that would overlap with the next larger frequency. That means, for example, you cannot specify a frequency of 60 minutes, because that is equivalent to 1 hour. The valid values for each frequency are the following: - Minute - 1-59
- Hour - 1-23
- Day - 1-6
- Week - 1-4
- Month - 1-11
- Year - 1
 Thus, if you want every other week forecasts, specify "2W". Or, if you want quarterly forecasts, you specify "3M". 
- 
getTagsAn array of key-value pairs to apply to this resource.For more information, see Tag . 
- 
setTagsAn array of key-value pairs to apply to this resource.For more information, see Tag . 
 
-