CfnDatasetPropsMixin

class aws_cdk.mixins_preview.aws_forecast.mixins.CfnDatasetPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates an Amazon Forecast dataset.

Amazon Forecast is no longer available to new customers. Existing customers of Amazon Forecast can continue to use the service as normal. Learn more”

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 . .. epigraph:

The ``Status`` of a dataset must be ``ACTIVE`` before you can import training data. Use the `DescribeDataset <https://docs.aws.amazon.com/forecast/latest/dg/API_DescribeDataset.html>`_ operation to get the status.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-forecast-dataset.html

CloudformationResource:

AWS::Forecast::Dataset

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_forecast import mixins as forecast_mixins

# encryption_config: Any
# schema: Any

cfn_dataset_props_mixin = forecast_mixins.CfnDatasetPropsMixin(forecast_mixins.CfnDatasetMixinProps(
    data_frequency="dataFrequency",
    dataset_name="datasetName",
    dataset_type="datasetType",
    domain="domain",
    encryption_config=encryption_config,
    schema=schema,
    tags=[forecast_mixins.CfnDatasetPropsMixin.TagsItemsProperty(
        key="key",
        value="value"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Forecast::Dataset.

Parameters:
  • props (Union[CfnDatasetMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['dataFrequency', 'datasetName', 'datasetType', 'domain', 'encryptionConfig', 'schema', 'tags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

AttributesItemsProperty

class CfnDatasetPropsMixin.AttributesItemsProperty(*, attribute_name=None, attribute_type=None)

Bases: object

Parameters:
  • attribute_name (Optional[str]) – Name of the dataset field.

  • attribute_type (Optional[str]) – Data type of the field.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-forecast-dataset-attributesitems.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_forecast import mixins as forecast_mixins

attributes_items_property = forecast_mixins.CfnDatasetPropsMixin.AttributesItemsProperty(
    attribute_name="attributeName",
    attribute_type="attributeType"
)

Attributes

attribute_name

Name of the dataset field.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-forecast-dataset-attributesitems.html#cfn-forecast-dataset-attributesitems-attributename

attribute_type

Data type of the field.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-forecast-dataset-attributesitems.html#cfn-forecast-dataset-attributesitems-attributetype

EncryptionConfigProperty

class CfnDatasetPropsMixin.EncryptionConfigProperty(*, kms_key_arn=None, role_arn=None)

Bases: object

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.

You can specify this optional object in the CreateDataset and CreatePredictor requests.

Parameters:
  • kms_key_arn (Optional[str]) – The Amazon Resource Name (ARN) of the KMS key.

  • role_arn (Optional[str]) – The ARN of the IAM role that Amazon Forecast can assume to access the AWS key. Passing a role across AWS accounts is not allowed. If you pass a role that isn’t in your account, you get an InvalidInputException error.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-forecast-dataset-encryptionconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_forecast import mixins as forecast_mixins

encryption_config_property = forecast_mixins.CfnDatasetPropsMixin.EncryptionConfigProperty(
    kms_key_arn="kmsKeyArn",
    role_arn="roleArn"
)

Attributes

kms_key_arn

The Amazon Resource Name (ARN) of the KMS key.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-forecast-dataset-encryptionconfig.html#cfn-forecast-dataset-encryptionconfig-kmskeyarn

role_arn

The ARN of the IAM role that Amazon Forecast can assume to access the AWS key.

Passing a role across AWS accounts is not allowed. If you pass a role that isn’t in your account, you get an InvalidInputException error.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-forecast-dataset-encryptionconfig.html#cfn-forecast-dataset-encryptionconfig-rolearn

SchemaProperty

class CfnDatasetPropsMixin.SchemaProperty(*, attributes=None)

Bases: object

Defines the fields of a dataset.

Parameters:

attributes (Union[IResolvable, Sequence[Union[IResolvable, AttributesItemsProperty, Dict[str, Any]]], None]) – An array of attributes specifying the name and type of each field in a dataset.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-forecast-dataset-schema.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_forecast import mixins as forecast_mixins

schema_property = forecast_mixins.CfnDatasetPropsMixin.SchemaProperty(
    attributes=[forecast_mixins.CfnDatasetPropsMixin.AttributesItemsProperty(
        attribute_name="attributeName",
        attribute_type="attributeType"
    )]
)

Attributes

attributes

An array of attributes specifying the name and type of each field in a dataset.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-forecast-dataset-schema.html#cfn-forecast-dataset-schema-attributes

TagsItemsProperty

class CfnDatasetPropsMixin.TagsItemsProperty(*, key=None, value=None)

Bases: object

A key-value pair to associate with a resource.

Parameters:
  • key (Optional[str]) – The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

  • value (Optional[str]) – The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-forecast-dataset-tagsitems.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_forecast import mixins as forecast_mixins

tags_items_property = forecast_mixins.CfnDatasetPropsMixin.TagsItemsProperty(
    key="key",
    value="value"
)

Attributes

key

The key name of the tag.

You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-forecast-dataset-tagsitems.html#cfn-forecast-dataset-tagsitems-key

value

The value for the tag.

You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-forecast-dataset-tagsitems.html#cfn-forecast-dataset-tagsitems-value