CfnFeatureGroupPropsMixin
- class aws_cdk.mixins_preview.aws_sagemaker.mixins.CfnFeatureGroupPropsMixin(props, *, strategy=None)
Bases:
MixinCreate a new
FeatureGroup.A
FeatureGroupis a group ofFeaturesdefined in theFeatureStoreto describe aRecord.The
FeatureGroupdefines the schema and features contained in the FeatureGroup. AFeatureGroupdefinition is composed of a list ofFeatures, aRecordIdentifierFeatureName, anEventTimeFeatureNameand configurations for itsOnlineStoreandOfflineStore. Check AWS service quotas to see theFeatureGroups quota for your AWS account. .. epigraph:You must include at least one of ``OnlineStoreConfig`` and ``OfflineStoreConfig`` to create a ``FeatureGroup`` .
- See:
- CloudformationResource:
AWS::SageMaker::FeatureGroup
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
from aws_cdk import CfnTag # 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_sagemaker import mixins as sagemaker_mixins # offline_store_config: Any # online_store_config: Any cfn_feature_group_props_mixin = sagemaker_mixins.CfnFeatureGroupPropsMixin(sagemaker_mixins.CfnFeatureGroupMixinProps( description="description", event_time_feature_name="eventTimeFeatureName", feature_definitions=[sagemaker_mixins.CfnFeatureGroupPropsMixin.FeatureDefinitionProperty( feature_name="featureName", feature_type="featureType" )], feature_group_name="featureGroupName", offline_store_config=offline_store_config, online_store_config=online_store_config, record_identifier_feature_name="recordIdentifierFeatureName", role_arn="roleArn", tags=[CfnTag( key="key", value="value" )], throughput_config=sagemaker_mixins.CfnFeatureGroupPropsMixin.ThroughputConfigProperty( provisioned_read_capacity_units=123, provisioned_write_capacity_units=123, throughput_mode="throughputMode" ) ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::SageMaker::FeatureGroup.- Parameters:
props (
Union[CfnFeatureGroupMixinProps,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 = ['description', 'eventTimeFeatureName', 'featureDefinitions', 'featureGroupName', 'offlineStoreConfig', 'onlineStoreConfig', 'recordIdentifierFeatureName', 'roleArn', 'tags', 'throughputConfig']
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
DataCatalogConfigProperty
- class CfnFeatureGroupPropsMixin.DataCatalogConfigProperty(*, catalog=None, database=None, table_name=None)
Bases:
objectThe meta data of the Glue table which serves as data catalog for the
OfflineStore.- Parameters:
catalog (
Optional[str]) – The name of the Glue table catalog.database (
Optional[str]) – The name of the Glue table database.table_name (
Optional[str]) – The name of the Glue table.
- 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_sagemaker import mixins as sagemaker_mixins data_catalog_config_property = sagemaker_mixins.CfnFeatureGroupPropsMixin.DataCatalogConfigProperty( catalog="catalog", database="database", table_name="tableName" )
Attributes
- catalog
The name of the Glue table catalog.
- database
The name of the Glue table database.
FeatureDefinitionProperty
- class CfnFeatureGroupPropsMixin.FeatureDefinitionProperty(*, feature_name=None, feature_type=None)
Bases:
objectA list of features.
You must include
FeatureNameandFeatureType. Valid featureFeatureTypes areIntegral,FractionalandString.- Parameters:
feature_name (
Optional[str]) – The name of a feature. The type must be a string.FeatureNamecannot be any of the following:is_deleted,write_time,api_invocation_time. The name: - Must start with an alphanumeric character. - Can only include alphanumeric characters, underscores, and hyphens. Spaces are not allowed.feature_type (
Optional[str]) – The value type of a feature. Valid values are Integral, Fractional, or String.
- 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_sagemaker import mixins as sagemaker_mixins feature_definition_property = sagemaker_mixins.CfnFeatureGroupPropsMixin.FeatureDefinitionProperty( feature_name="featureName", feature_type="featureType" )
Attributes
- feature_name
The name of a feature.
The type must be a string.
FeatureNamecannot be any of the following:is_deleted,write_time,api_invocation_time.The name:
Must start with an alphanumeric character.
Can only include alphanumeric characters, underscores, and hyphens. Spaces are not allowed.
- feature_type
The value type of a feature.
Valid values are Integral, Fractional, or String.
OfflineStoreConfigProperty
- class CfnFeatureGroupPropsMixin.OfflineStoreConfigProperty(*, data_catalog_config=None, disable_glue_table_creation=None, s3_storage_config=None, table_format=None)
Bases:
objectThe configuration of an
OfflineStore.Provide an
OfflineStoreConfigin a request toCreateFeatureGroupto create anOfflineStore.To encrypt an
OfflineStoreusing at rest data encryption, specify AWS Key Management Service (KMS) key ID, orKMSKeyId, inS3StorageConfig.- Parameters:
data_catalog_config (
Union[IResolvable,DataCatalogConfigProperty,Dict[str,Any],None]) – The meta data of the Glue table that is autogenerated when anOfflineStoreis created.disable_glue_table_creation (
Union[bool,IResolvable,None]) – Set toTrueto disable the automatic creation of an AWS Glue table when configuring anOfflineStore. If set toFalse, Feature Store will name theOfflineStoreGlue table following Athena’s naming recommendations . The default value isFalse.s3_storage_config (
Union[IResolvable,S3StorageConfigProperty,Dict[str,Any],None]) – The Amazon Simple Storage (Amazon S3) location ofOfflineStore.table_format (
Optional[str]) – Format for the offline store table. Supported formats are Glue (Default) and Apache Iceberg .
- 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_sagemaker import mixins as sagemaker_mixins offline_store_config_property = sagemaker_mixins.CfnFeatureGroupPropsMixin.OfflineStoreConfigProperty( data_catalog_config=sagemaker_mixins.CfnFeatureGroupPropsMixin.DataCatalogConfigProperty( catalog="catalog", database="database", table_name="tableName" ), disable_glue_table_creation=False, s3_storage_config=sagemaker_mixins.CfnFeatureGroupPropsMixin.S3StorageConfigProperty( kms_key_id="kmsKeyId", s3_uri="s3Uri" ), table_format="tableFormat" )
Attributes
- data_catalog_config
The meta data of the Glue table that is autogenerated when an
OfflineStoreis created.
- disable_glue_table_creation
Set to
Trueto disable the automatic creation of an AWS Glue table when configuring anOfflineStore.If set to
False, Feature Store will name theOfflineStoreGlue table following Athena’s naming recommendations .The default value is
False.
- s3_storage_config
The Amazon Simple Storage (Amazon S3) location of
OfflineStore.
- table_format
Format for the offline store table.
Supported formats are Glue (Default) and Apache Iceberg .
OnlineStoreConfigProperty
- class CfnFeatureGroupPropsMixin.OnlineStoreConfigProperty(*, enable_online_store=None, security_config=None, storage_type=None, ttl_duration=None)
Bases:
objectUse this to specify the AWS Key Management Service (KMS) Key ID, or
KMSKeyId, for at rest data encryption.You can turn
OnlineStoreon or off by specifying theEnableOnlineStoreflag at General Assembly.The default value is
False.- Parameters:
enable_online_store (
Union[bool,IResolvable,None]) – TurnOnlineStoreoff by specifyingFalsefor theEnableOnlineStoreflag. TurnOnlineStoreon by specifyingTruefor theEnableOnlineStoreflag. The default value isFalse.security_config (
Union[IResolvable,OnlineStoreSecurityConfigProperty,Dict[str,Any],None]) – Use to specify KMS Key ID (KMSKeyId) for at-rest encryption of yourOnlineStore.storage_type (
Optional[str]) – Option for different tiers of low latency storage for real-time data retrieval. -Standard: A managed low latency data store for feature groups. -InMemory: A managed data store for feature groups that supports very low latency retrieval.ttl_duration (
Union[IResolvable,TtlDurationProperty,Dict[str,Any],None]) – Time to live duration, where the record is hard deleted after the expiration time is reached;ExpiresAt=EventTime+TtlDuration. For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide.
- 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_sagemaker import mixins as sagemaker_mixins online_store_config_property = sagemaker_mixins.CfnFeatureGroupPropsMixin.OnlineStoreConfigProperty( enable_online_store=False, security_config=sagemaker_mixins.CfnFeatureGroupPropsMixin.OnlineStoreSecurityConfigProperty( kms_key_id="kmsKeyId" ), storage_type="storageType", ttl_duration=sagemaker_mixins.CfnFeatureGroupPropsMixin.TtlDurationProperty( unit="unit", value=123 ) )
Attributes
- enable_online_store
Turn
OnlineStoreoff by specifyingFalsefor theEnableOnlineStoreflag.Turn
OnlineStoreon by specifyingTruefor theEnableOnlineStoreflag.The default value is
False.
- security_config
Use to specify KMS Key ID (
KMSKeyId) for at-rest encryption of yourOnlineStore.
- storage_type
Option for different tiers of low latency storage for real-time data retrieval.
Standard: A managed low latency data store for feature groups.InMemory: A managed data store for feature groups that supports very low latency retrieval.
- ttl_duration
Time to live duration, where the record is hard deleted after the expiration time is reached;
ExpiresAt=EventTime+TtlDuration. For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide.
OnlineStoreSecurityConfigProperty
- class CfnFeatureGroupPropsMixin.OnlineStoreSecurityConfigProperty(*, kms_key_id=None)
Bases:
objectThe security configuration for
OnlineStore.- Parameters:
kms_key_id (
Optional[str]) – The AWS Key Management Service (KMS) key ARN that SageMaker Feature Store uses to encrypt the Amazon S3 objects at rest using Amazon S3 server-side encryption. The caller (either user or IAM role) ofCreateFeatureGroupmust have below permissions to theOnlineStoreKmsKeyId: -"kms:Encrypt"-"kms:Decrypt"-"kms:DescribeKey"-"kms:CreateGrant"-"kms:RetireGrant"-"kms:ReEncryptFrom"-"kms:ReEncryptTo"-"kms:GenerateDataKey"-"kms:ListAliases"-"kms:ListGrants"-"kms:RevokeGrant"The caller (either user or IAM role) to all DataPlane operations (PutRecord,GetRecord,DeleteRecord) must have the following permissions to theKmsKeyId: -"kms:Decrypt"- 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_sagemaker import mixins as sagemaker_mixins online_store_security_config_property = sagemaker_mixins.CfnFeatureGroupPropsMixin.OnlineStoreSecurityConfigProperty( kms_key_id="kmsKeyId" )
Attributes
- kms_key_id
The AWS Key Management Service (KMS) key ARN that SageMaker Feature Store uses to encrypt the Amazon S3 objects at rest using Amazon S3 server-side encryption.
The caller (either user or IAM role) of
CreateFeatureGroupmust have below permissions to theOnlineStoreKmsKeyId:"kms:Encrypt""kms:Decrypt""kms:DescribeKey""kms:CreateGrant""kms:RetireGrant""kms:ReEncryptFrom""kms:ReEncryptTo""kms:GenerateDataKey""kms:ListAliases""kms:ListGrants""kms:RevokeGrant"
The caller (either user or IAM role) to all DataPlane operations (
PutRecord,GetRecord,DeleteRecord) must have the following permissions to theKmsKeyId:"kms:Decrypt"
S3StorageConfigProperty
- class CfnFeatureGroupPropsMixin.S3StorageConfigProperty(*, kms_key_id=None, s3_uri=None)
Bases:
objectThe Amazon Simple Storage (Amazon S3) location and security configuration for
OfflineStore.- Parameters:
kms_key_id (
Optional[str]) – The AWS Key Management Service (KMS) key ARN of the key used to encrypt any objects written into theOfflineStoreS3 location. The IAMroleARNthat is passed as a parameter toCreateFeatureGroupmust have below permissions to theKmsKeyId: -"kms:GenerateDataKey"s3_uri (
Optional[str]) – The S3 URI, or location in Amazon S3, ofOfflineStore. S3 URIs have a format similar to the following:s3://example-bucket/prefix/.
- 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_sagemaker import mixins as sagemaker_mixins s3_storage_config_property = sagemaker_mixins.CfnFeatureGroupPropsMixin.S3StorageConfigProperty( kms_key_id="kmsKeyId", s3_uri="s3Uri" )
Attributes
- kms_key_id
The AWS Key Management Service (KMS) key ARN of the key used to encrypt any objects written into the
OfflineStoreS3 location.The IAM
roleARNthat is passed as a parameter toCreateFeatureGroupmust have below permissions to theKmsKeyId:"kms:GenerateDataKey"
- s3_uri
The S3 URI, or location in Amazon S3, of
OfflineStore.S3 URIs have a format similar to the following:
s3://example-bucket/prefix/.
ThroughputConfigProperty
- class CfnFeatureGroupPropsMixin.ThroughputConfigProperty(*, provisioned_read_capacity_units=None, provisioned_write_capacity_units=None, throughput_mode=None)
Bases:
objectUsed to set feature group throughput configuration.
There are two modes:
ON_DEMANDandPROVISIONED. With on-demand mode, you are charged for data reads and writes that your application performs on your feature group. You do not need to specify read and write throughput because Feature Store accommodates your workloads as they ramp up and down. You can switch a feature group to on-demand only once in a 24 hour period. With provisioned throughput mode, you specify the read and write capacity per second that you expect your application to require, and you are billed based on those limits. Exceeding provisioned throughput will result in your requests being throttled.Note:
PROVISIONEDthroughput mode is supported only for feature groups that are offline-only, or use the`Standard<https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_OnlineStoreConfig.html#sagemaker-Type-OnlineStoreConfig-StorageType>`_ tier online store.- Parameters:
provisioned_read_capacity_units (
Union[int,float,None]) – For provisioned feature groups with online store enabled, this indicates the read throughput you are billed for and can consume without throttling. This field is not applicable for on-demand feature groups.provisioned_write_capacity_units (
Union[int,float,None]) – For provisioned feature groups, this indicates the write throughput you are billed for and can consume without throttling. This field is not applicable for on-demand feature groups.throughput_mode (
Optional[str]) – The mode used for your feature group throughput:ON_DEMANDorPROVISIONED.
- 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_sagemaker import mixins as sagemaker_mixins throughput_config_property = sagemaker_mixins.CfnFeatureGroupPropsMixin.ThroughputConfigProperty( provisioned_read_capacity_units=123, provisioned_write_capacity_units=123, throughput_mode="throughputMode" )
Attributes
- provisioned_read_capacity_units
For provisioned feature groups with online store enabled, this indicates the read throughput you are billed for and can consume without throttling.
This field is not applicable for on-demand feature groups.
- provisioned_write_capacity_units
For provisioned feature groups, this indicates the write throughput you are billed for and can consume without throttling.
This field is not applicable for on-demand feature groups.
- throughput_mode
ON_DEMANDorPROVISIONED.- See:
- Type:
The mode used for your feature group throughput
TtlDurationProperty
- class CfnFeatureGroupPropsMixin.TtlDurationProperty(*, unit=None, value=None)
Bases:
objectTime to live duration, where the record is hard deleted after the expiration time is reached;
ExpiresAt=EventTime+TtlDuration. For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide.- Parameters:
unit (
Optional[str]) –TtlDurationtime unit.value (
Union[int,float,None]) –TtlDurationtime value.
- 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_sagemaker import mixins as sagemaker_mixins ttl_duration_property = sagemaker_mixins.CfnFeatureGroupPropsMixin.TtlDurationProperty( unit="unit", value=123 )
Attributes
- unit
TtlDurationtime unit.