@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-25T18:28:57.339Z") public class CfnDataset extends CfnResource implements IInspectable
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.Domain
and 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
Status
of a dataset must beACTIVE
before 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();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnDataset.AttributesItemsProperty
Example:
|
static class |
CfnDataset.Builder
A fluent builder for
CfnDataset . |
static interface |
CfnDataset.EncryptionConfigProperty
An 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 interface |
CfnDataset.SchemaProperty
Defines the fields of a dataset.
|
static interface |
CfnDataset.TagsItemsProperty
Example:
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnDataset(Construct scope,
java.lang.String id,
CfnDatasetProps props)
Create a new `AWS::Forecast::Dataset`.
|
protected |
CfnDataset(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnDataset(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
The Amazon Resource Name (ARN) of the dataset.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDataFrequency()
The frequency of data collection.
|
java.lang.String |
getDatasetName()
The name of the dataset.
|
java.lang.String |
getDatasetType()
The dataset type.
|
java.lang.String |
getDomain()
The domain associated with the dataset.
|
java.lang.Object |
getEncryptionConfig()
A Key Management Service (KMS) key and the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.
|
java.lang.Object |
getSchema()
The schema for the dataset.
|
java.util.List<CfnDataset.TagsItemsProperty> |
getTags()
An array of key-value pairs to apply to this resource.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setDataFrequency(java.lang.String value)
The frequency of data collection.
|
void |
setDatasetName(java.lang.String value)
The name of the dataset.
|
void |
setDatasetType(java.lang.String value)
The dataset type.
|
void |
setDomain(java.lang.String value)
The domain associated with the dataset.
|
void |
setEncryptionConfig(java.lang.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.
|
void |
setSchema(java.lang.Object value)
The schema for the dataset.
|
void |
setTags(java.util.List<CfnDataset.TagsItemsProperty> value)
An array of key-value pairs to apply to this resource.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnDataset(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDataset(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnDataset(Construct scope, java.lang.String id, CfnDatasetProps 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getDatasetName()
public void setDatasetName(java.lang.String value)
public java.lang.String getDatasetType()
public void setDatasetType(java.lang.String value)
public java.lang.String getDomain()
public void setDomain(java.lang.String value)
public java.lang.Object getEncryptionConfig()
public void setEncryptionConfig(java.lang.Object value)
public java.lang.Object getSchema()
The schema attributes and their order must match the fields in your data. The dataset Domain
and DatasetType
that 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 .
public void setSchema(java.lang.Object value)
The schema attributes and their order must match the fields in your data. The dataset Domain
and DatasetType
that 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 .
public java.lang.String getDataFrequency()
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:
Thus, if you want every other week forecasts, specify "2W". Or, if you want quarterly forecasts, you specify "3M".
public void setDataFrequency(java.lang.String value)
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:
Thus, if you want every other week forecasts, specify "2W". Or, if you want quarterly forecasts, you specify "3M".
public java.util.List<CfnDataset.TagsItemsProperty> getTags()
For more information, see Tag .
public void setTags(java.util.List<CfnDataset.TagsItemsProperty> value)
For more information, see Tag .