Class CfnDataset

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-02T15:58:26.721Z") @Stability(Stable) 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 be ACTIVE 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();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnDataset

      protected CfnDataset(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnDataset

      protected CfnDataset(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnDataset

      @Stability(Stable) public CfnDataset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDatasetProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the dataset.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getDatasetName

      @Stability(Stable) @NotNull public String getDatasetName()
      The name of the dataset.
    • setDatasetName

      @Stability(Stable) public void setDatasetName(@NotNull String value)
      The name of the dataset.
    • getDatasetType

      @Stability(Stable) @NotNull public String getDatasetType()
      The dataset type.
    • setDatasetType

      @Stability(Stable) public void setDatasetType(@NotNull String value)
      The dataset type.
    • getDomain

      @Stability(Stable) @NotNull public String getDomain()
      The domain associated with the dataset.
    • setDomain

      @Stability(Stable) public void setDomain(@NotNull String value)
      The domain associated with the dataset.
    • getSchema

      @Stability(Stable) @NotNull public Object getSchema()
      The schema for the dataset.
    • setSchema

      @Stability(Stable) public void setSchema(@NotNull Object value)
      The schema for the dataset.
    • getDataFrequency

      @Stability(Stable) @Nullable public String getDataFrequency()
      The frequency of data collection.

      This parameter is required for RELATED_TIME_SERIES datasets.

    • setDataFrequency

      @Stability(Stable) public void setDataFrequency(@Nullable String value)
      The frequency of data collection.

      This parameter is required for RELATED_TIME_SERIES datasets.

    • getEncryptionConfig

      @Stability(Stable) @Nullable public 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.
    • setEncryptionConfig

      @Stability(Stable) public void setEncryptionConfig(@Nullable 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.
    • getTags

      @Stability(Stable) @Nullable public List<CfnDataset.TagsItemsProperty> getTags()
      An array of key-value pairs to apply to this resource.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnDataset.TagsItemsProperty> value)
      An array of key-value pairs to apply to this resource.