Skip to content
v2.278.0

CfnFeatureGroupProps Struct ​

Properties for defining a CfnFeatureGroup.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';

declare const offlineStoreConfig: any;
declare const onlineStoreConfig: any;
const cfnFeatureGroupProps: sagemaker.CfnFeatureGroupProps = {
  eventTimeFeatureName: 'eventTimeFeatureName',
  featureDefinitions: [{
    featureName: 'featureName',
    featureType: 'featureType',
  }],
  featureGroupName: 'featureGroupName',
  recordIdentifierFeatureName: 'recordIdentifierFeatureName',

  // the properties below are optional
  description: 'description',
  offlineStoreConfig: offlineStoreConfig,
  onlineStoreConfig: onlineStoreConfig,
  roleArn: 'roleArn',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  throughputConfig: {
    throughputMode: 'throughputMode',

    // the properties below are optional
    provisionedReadCapacityUnits: 123,
    provisionedWriteCapacityUnits: 123,
  },
};
python
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 import aws_sagemaker as sagemaker

# offline_store_config: Any
# online_store_config: Any

cfn_feature_group_props = sagemaker.CfnFeatureGroupProps(
    event_time_feature_name="eventTimeFeatureName",
    feature_definitions=[sagemaker.CfnFeatureGroup.FeatureDefinitionProperty(
        feature_name="featureName",
        feature_type="featureType"
    )],
    feature_group_name="featureGroupName",
    record_identifier_feature_name="recordIdentifierFeatureName",

    # the properties below are optional
    description="description",
    offline_store_config=offline_store_config,
    online_store_config=online_store_config,
    role_arn="roleArn",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    throughput_config=sagemaker.CfnFeatureGroup.ThroughputConfigProperty(
        throughput_mode="throughputMode",

        # the properties below are optional
        provisioned_read_capacity_units=123,
        provisioned_write_capacity_units=123
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;

Object offlineStoreConfig;
Object onlineStoreConfig;

CfnFeatureGroupProps cfnFeatureGroupProps = CfnFeatureGroupProps.builder()
        .eventTimeFeatureName("eventTimeFeatureName")
        .featureDefinitions(List.of(FeatureDefinitionProperty.builder()
                .featureName("featureName")
                .featureType("featureType")
                .build()))
        .featureGroupName("featureGroupName")
        .recordIdentifierFeatureName("recordIdentifierFeatureName")

        // the properties below are optional
        .description("description")
        .offlineStoreConfig(offlineStoreConfig)
        .onlineStoreConfig(onlineStoreConfig)
        .roleArn("roleArn")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .throughputConfig(ThroughputConfigProperty.builder()
                .throughputMode("throughputMode")

                // the properties below are optional
                .provisionedReadCapacityUnits(123)
                .provisionedWriteCapacityUnits(123)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;

var offlineStoreConfig;
var onlineStoreConfig;

var cfnFeatureGroupProps = new CfnFeatureGroupProps {
    EventTimeFeatureName = "eventTimeFeatureName",
    FeatureDefinitions = new [] { new FeatureDefinitionProperty {
        FeatureName = "featureName",
        FeatureType = "featureType"
    } },
    FeatureGroupName = "featureGroupName",
    RecordIdentifierFeatureName = "recordIdentifierFeatureName",

    // the properties below are optional
    Description = "description",
    OfflineStoreConfig = offlineStoreConfig,
    OnlineStoreConfig = onlineStoreConfig,
    RoleArn = "roleArn",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    ThroughputConfig = new ThroughputConfigProperty {
        ThroughputMode = "throughputMode",

        // the properties below are optional
        ProvisionedReadCapacityUnits = 123,
        ProvisionedWriteCapacityUnits = 123
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var offlineStoreConfig interface{}
var onlineStoreConfig interface{}

cfnFeatureGroupProps := &CfnFeatureGroupProps{
	EventTimeFeatureName: jsii.String("eventTimeFeatureName"),
	FeatureDefinitions: []interface{}{
		&FeatureDefinitionProperty{
			FeatureName: jsii.String("featureName"),
			FeatureType: jsii.String("featureType"),
		},
	},
	FeatureGroupName: jsii.String("featureGroupName"),
	RecordIdentifierFeatureName: jsii.String("recordIdentifierFeatureName"),

	// the properties below are optional
	Description: jsii.String("description"),
	OfflineStoreConfig: offlineStoreConfig,
	OnlineStoreConfig: onlineStoreConfig,
	RoleArn: jsii.String("roleArn"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	ThroughputConfig: &ThroughputConfigProperty{
		ThroughputMode: jsii.String("throughputMode"),

		// the properties below are optional
		ProvisionedReadCapacityUnits: jsii.Number(123),
		ProvisionedWriteCapacityUnits: jsii.Number(123),
	},
}

Properties ​

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
A free form description of a `FeatureGroup` .
eventTimeFeatureNamestringevent_time_feature_namestreventTimeFeatureNameStringEventTimeFeatureNamestringEventTimeFeatureName*string required #
The name of the feature that stores the `EventTime` of a Record in a `FeatureGroup` .

A EventTime is point in time when a new event occurs that corresponds to the creation or update of a Record in FeatureGroup . All Records in the FeatureGroup must have a corresponding EventTime .

featureDefinitionsIResolvable | IResolvable | CfnFeatureGroup.FeatureDefinitionProperty[]feature_definitionstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, FeatureDefinitionProperty]]]featureDefinitionsIResolvableFeatureDefinitionsIResolvableFeatureDefinitionsinterface{} required #
A list of `Feature` s. Each `Feature` must include a `FeatureName` and a `FeatureType` .

Valid FeatureType s are Integral , Fractional and String .

FeatureName s cannot be any of the following: is_deleted , write_time , api_invocation_time .

You can create up to 2,500 FeatureDefinition s per FeatureGroup .

featureGroupNamestringfeature_group_namestrfeatureGroupNameStringFeatureGroupNamestringFeatureGroupName*string required #
The name of the `FeatureGroup` .
offlineStoreConfigoptionalanyoffline_store_configoptionalAnyofflineStoreConfigoptionalObjectOfflineStoreConfigoptionalobjectOfflineStoreConfigoptionalinterface{} #
The configuration of an `OfflineStore` .
onlineStoreConfigoptionalanyonline_store_configoptionalAnyonlineStoreConfigoptionalObjectOnlineStoreConfigoptionalobjectOnlineStoreConfigoptionalinterface{} #
The configuration of an `OnlineStore` .
recordIdentifierFeatureNamestringrecord_identifier_feature_namestrrecordIdentifierFeatureNameStringRecordIdentifierFeatureNamestringRecordIdentifierFeatureName*string required #
The name of the `Feature` whose value uniquely identifies a `Record` defined in the `FeatureGroup` `FeatureDefinitions` .
roleArnoptionalstring | IRoleRefrole_arnoptionaltyping.Union[str, IRoleRef]roleArnoptionalStringRoleArnoptionalstringRoleArnoptionalinterface{} #
The Amazon Resource Name (ARN) of the IAM execution role used to create the feature group.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
Tags used to define a `FeatureGroup` .
throughputConfigoptionalIResolvable | CfnFeatureGroup.ThroughputConfigPropertythroughput_configoptionaltyping.Union[IResolvable, ThroughputConfigProperty]throughputConfigoptionalIResolvableThroughputConfigoptionalIResolvableThroughputConfigoptionalinterface{} #
Used to set feature group throughput configuration.
notes

There are two modes: ON_DEMAND and PROVISIONED . 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: PROVISIONED throughput mode is supported only for feature groups that are offline-only, or use the Standard tier online store.