CfnDatasetPropsMixin
- class aws_cdk.mixins_preview.aws_forecast.mixins.CfnDatasetPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- 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:
- 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.
- attribute_type
Data type of the field.
EncryptionConfigProperty
- class CfnDatasetPropsMixin.EncryptionConfigProperty(*, kms_key_arn=None, role_arn=None)
Bases:
objectAn 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 anInvalidInputExceptionerror.
- See:
- 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.
- 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
InvalidInputExceptionerror.
SchemaProperty
- class CfnDatasetPropsMixin.SchemaProperty(*, attributes=None)
Bases:
objectDefines 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:
- 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.