From b0593aba67f141f6daf9e009b15bb8bbcf4773d7 Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 20 Jul 2023 18:25:52 +0000 Subject: [PATCH] feat(client-sagemaker-featurestore-runtime): Cross account support for SageMaker Feature Store --- .../src/commands/DeleteRecordCommand.ts | 6 ++-- .../src/commands/PutRecordCommand.ts | 21 +++++++++--- .../src/models/models_0.ts | 27 ++++++++------- .../sagemaker-featurestore-runtime.json | 34 +++++++++---------- 4 files changed, 51 insertions(+), 37 deletions(-) diff --git a/clients/client-sagemaker-featurestore-runtime/src/commands/DeleteRecordCommand.ts b/clients/client-sagemaker-featurestore-runtime/src/commands/DeleteRecordCommand.ts index 8ccaee99459f9..3c43b01cf2d12 100644 --- a/clients/client-sagemaker-featurestore-runtime/src/commands/DeleteRecordCommand.ts +++ b/clients/client-sagemaker-featurestore-runtime/src/commands/DeleteRecordCommand.ts @@ -42,9 +42,9 @@ export interface DeleteRecordCommandOutput extends __MetadataBearer {} * @public *

Deletes a Record from a FeatureGroup in the * OnlineStore. Feature Store supports both SoftDelete and - * HardDelete. For SoftDelete (default), feature columns are - * set to null and the record is no longer retrievable by GetRecord - * or BatchGetRecord. For HardDelete, the complete + * HardDelete. For SoftDelete (default), feature columns are set + * to null and the record is no longer retrievable by GetRecord or + * BatchGetRecord. For HardDelete, the complete * Record is removed from the OnlineStore. In both cases, Feature * Store appends the deleted record marker to the OfflineStore with feature * values set to null, is_deleted value set to True, diff --git a/clients/client-sagemaker-featurestore-runtime/src/commands/PutRecordCommand.ts b/clients/client-sagemaker-featurestore-runtime/src/commands/PutRecordCommand.ts index 675f1259bcd73..67865c2f58b1b 100644 --- a/clients/client-sagemaker-featurestore-runtime/src/commands/PutRecordCommand.ts +++ b/clients/client-sagemaker-featurestore-runtime/src/commands/PutRecordCommand.ts @@ -40,11 +40,22 @@ export interface PutRecordCommandOutput extends __MetadataBearer {} /** * @public - *

Used for data ingestion into the FeatureStore. The PutRecord - * API writes to both the OnlineStore and OfflineStore. If the - * record is the latest record for the recordIdentifier, the record is written to - * both the OnlineStore and OfflineStore. If the record is a - * historic record, it is written only to the OfflineStore.

+ *

The PutRecord API is used to ingest a list of Records into + * your feature group.

+ *

If a new record’s EventTime is greater, the new record is written to both + * the OnlineStore and OfflineStore. Otherwise, the record is a + * historic record and it is written only to the OfflineStore.

+ *

You can specify the ingestion to be applied to the OnlineStore, + * OfflineStore, or both by using the TargetStores request + * parameter.

+ *

You can set the ingested record to expire at a given time to live (TTL) duration after + * the record’s event time, ExpiresAt = EventTime + + * TtlDuration, by specifying the TtlDuration parameter. A record + * level TtlDuration is set when specifying the TtlDuration + * parameter using the PutRecord API call. If the input TtlDuration + * is null or unspecified, TtlDuration is set to the default feature + * group level TtlDuration. A record level TtlDuration supersedes + * the group level TtlDuration.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-sagemaker-featurestore-runtime/src/models/models_0.ts b/clients/client-sagemaker-featurestore-runtime/src/models/models_0.ts index f83d4aee7259e..19b83315118c1 100644 --- a/clients/client-sagemaker-featurestore-runtime/src/models/models_0.ts +++ b/clients/client-sagemaker-featurestore-runtime/src/models/models_0.ts @@ -46,7 +46,8 @@ export type ExpirationTimeResponse = (typeof ExpirationTimeResponse)[keyof typeo */ export interface BatchGetRecordIdentifier { /** - *

A FeatureGroupName containing Records you are retrieving in a batch.

+ *

The name or Amazon Resource Name (ARN) of the FeatureGroup containing the + * records you are retrieving in a batch.

*/ FeatureGroupName: string | undefined; @@ -67,15 +68,15 @@ export interface BatchGetRecordIdentifier { */ export interface BatchGetRecordRequest { /** - *

A list of FeatureGroup names, with their corresponding - * RecordIdentifier value, and Feature name that have been requested to be - * retrieved in batch.

+ *

A list containing the name or Amazon Resource Name (ARN) of the + * FeatureGroup, the list of names of Features to be retrieved, + * and the corresponding RecordIdentifier values as strings.

*/ Identifiers: BatchGetRecordIdentifier[] | undefined; /** *

Parameter to request ExpiresAt in response. If Enabled, - * BatchGetRecord will return the value of ExpiresAt, if it is + * BatchGetRecord will return the value of ExpiresAt, if it is * not null. If Disabled and null, BatchGetRecord will return * null.

*/ @@ -131,7 +132,7 @@ export interface FeatureValue { /** * @public - *

The output of Records that have been retrieved in a batch.

+ *

The output of records that have been retrieved in a batch.

*/ export interface BatchGetRecordResultDetail { /** @@ -276,7 +277,8 @@ export type TargetStore = (typeof TargetStore)[keyof typeof TargetStore]; */ export interface DeleteRecordRequest { /** - *

The name of the feature group to delete the record from.

+ *

The name or Amazon Resource Name (ARN) of the feature group to delete the record from. + *

*/ FeatureGroupName: string | undefined; @@ -311,7 +313,8 @@ export interface DeleteRecordRequest { */ export interface GetRecordRequest { /** - *

The name of the feature group from which you want to retrieve a record.

+ *

The name or Amazon Resource Name (ARN) of the feature group from which you want to + * retrieve a record.

*/ FeatureGroupName: string | undefined; @@ -329,9 +332,8 @@ export interface GetRecordRequest { /** *

Parameter to request ExpiresAt in response. If Enabled, - * BatchGetRecord will return the value of ExpiresAt, if it is - * not null. If Disabled and null, BatchGetRecord will return - * null.

+ * GetRecord will return the value of ExpiresAt, if it is not + * null. If Disabled and null, GetRecord will return null.

*/ ExpirationTimeResponse?: ExpirationTimeResponse | string; } @@ -415,7 +417,8 @@ export interface TtlDuration { */ export interface PutRecordRequest { /** - *

The name of the feature group that you want to insert the record into.

+ *

The name or Amazon Resource Name (ARN) of the feature group that you want to insert the + * record into.

*/ FeatureGroupName: string | undefined; diff --git a/codegen/sdk-codegen/aws-models/sagemaker-featurestore-runtime.json b/codegen/sdk-codegen/aws-models/sagemaker-featurestore-runtime.json index aaee3bc4d621d..45bc54acc8aed 100644 --- a/codegen/sdk-codegen/aws-models/sagemaker-featurestore-runtime.json +++ b/codegen/sdk-codegen/aws-models/sagemaker-featurestore-runtime.json @@ -821,9 +821,9 @@ "type": "structure", "members": { "FeatureGroupName": { - "target": "com.amazonaws.sagemakerfeaturestoreruntime#FeatureGroupName", + "target": "com.amazonaws.sagemakerfeaturestoreruntime#FeatureGroupNameOrArn", "traits": { - "smithy.api#documentation": "

A FeatureGroupName containing Records you are retrieving in a batch.

", + "smithy.api#documentation": "

The name or Amazon Resource Name (ARN) of the FeatureGroup containing the\n records you are retrieving in a batch.

", "smithy.api#required": {} } }, @@ -863,14 +863,14 @@ "Identifiers": { "target": "com.amazonaws.sagemakerfeaturestoreruntime#BatchGetRecordIdentifiers", "traits": { - "smithy.api#documentation": "

A list of FeatureGroup names, with their corresponding\n RecordIdentifier value, and Feature name that have been requested to be\n retrieved in batch.

", + "smithy.api#documentation": "

A list containing the name or Amazon Resource Name (ARN) of the\n FeatureGroup, the list of names of Features to be retrieved,\n and the corresponding RecordIdentifier values as strings.

", "smithy.api#required": {} } }, "ExpirationTimeResponse": { "target": "com.amazonaws.sagemakerfeaturestoreruntime#ExpirationTimeResponse", "traits": { - "smithy.api#documentation": "

Parameter to request ExpiresAt in response. If Enabled,\n BatchGetRecord will return the value of ExpiresAt, if it is\n not null. If Disabled and null, BatchGetRecord will return\n null.

" + "smithy.api#documentation": "

Parameter to request ExpiresAt in response. If Enabled,\n BatchGetRecord will return the value of ExpiresAt, if it is\n not null. If Disabled and null, BatchGetRecord will return\n null.

" } } }, @@ -939,7 +939,7 @@ } }, "traits": { - "smithy.api#documentation": "

The output of Records that have been retrieved in a batch.

" + "smithy.api#documentation": "

The output of records that have been retrieved in a batch.

" } }, "com.amazonaws.sagemakerfeaturestoreruntime#BatchGetRecordResultDetails": { @@ -976,7 +976,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a Record from a FeatureGroup in the\n OnlineStore. Feature Store supports both SoftDelete and\n HardDelete. For SoftDelete (default), feature columns are\n set to null and the record is no longer retrievable by GetRecord\n or BatchGetRecord. For HardDelete, the complete\n Record is removed from the OnlineStore. In both cases, Feature\n Store appends the deleted record marker to the OfflineStore with feature\n values set to null, is_deleted value set to True,\n and EventTime set to the delete input EventTime.

\n

Note that the EventTime specified in DeleteRecord should be\n set later than the EventTime of the existing record in the\n OnlineStore for that RecordIdentifer. If it is not, the\n deletion does not occur:

\n ", + "smithy.api#documentation": "

Deletes a Record from a FeatureGroup in the\n OnlineStore. Feature Store supports both SoftDelete and\n HardDelete. For SoftDelete (default), feature columns are set\n to null and the record is no longer retrievable by GetRecord or\n BatchGetRecord. For HardDelete, the complete\n Record is removed from the OnlineStore. In both cases, Feature\n Store appends the deleted record marker to the OfflineStore with feature\n values set to null, is_deleted value set to True,\n and EventTime set to the delete input EventTime.

\n

Note that the EventTime specified in DeleteRecord should be\n set later than the EventTime of the existing record in the\n OnlineStore for that RecordIdentifer. If it is not, the\n deletion does not occur:

\n ", "smithy.api#http": { "method": "DELETE", "uri": "/FeatureGroup/{FeatureGroupName}", @@ -988,9 +988,9 @@ "type": "structure", "members": { "FeatureGroupName": { - "target": "com.amazonaws.sagemakerfeaturestoreruntime#FeatureGroupName", + "target": "com.amazonaws.sagemakerfeaturestoreruntime#FeatureGroupNameOrArn", "traits": { - "smithy.api#documentation": "

The name of the feature group to delete the record from.

", + "smithy.api#documentation": "

The name or Amazon Resource Name (ARN) of the feature group to delete the record from.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1067,14 +1067,14 @@ "com.amazonaws.sagemakerfeaturestoreruntime#ExpiresAt": { "type": "string" }, - "com.amazonaws.sagemakerfeaturestoreruntime#FeatureGroupName": { + "com.amazonaws.sagemakerfeaturestoreruntime#FeatureGroupNameOrArn": { "type": "string", "traits": { "smithy.api#length": { "min": 1, - "max": 64 + "max": 150 }, - "smithy.api#pattern": "^[a-zA-Z0-9]([-_]*[a-zA-Z0-9]){0,63}$" + "smithy.api#pattern": "^(arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:feature-group/)?([a-zA-Z0-9]([-_]*[a-zA-Z0-9]){0,63})$" } }, "com.amazonaws.sagemakerfeaturestoreruntime#FeatureName": { @@ -1158,9 +1158,9 @@ "type": "structure", "members": { "FeatureGroupName": { - "target": "com.amazonaws.sagemakerfeaturestoreruntime#FeatureGroupName", + "target": "com.amazonaws.sagemakerfeaturestoreruntime#FeatureGroupNameOrArn", "traits": { - "smithy.api#documentation": "

The name of the feature group from which you want to retrieve a record.

", + "smithy.api#documentation": "

The name or Amazon Resource Name (ARN) of the feature group from which you want to\n retrieve a record.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1183,7 +1183,7 @@ "ExpirationTimeResponse": { "target": "com.amazonaws.sagemakerfeaturestoreruntime#ExpirationTimeResponse", "traits": { - "smithy.api#documentation": "

Parameter to request ExpiresAt in response. If Enabled,\n BatchGetRecord will return the value of ExpiresAt, if it is\n not null. If Disabled and null, BatchGetRecord will return\n null.

", + "smithy.api#documentation": "

Parameter to request ExpiresAt in response. If Enabled,\n GetRecord will return the value of ExpiresAt, if it is not\n null. If Disabled and null, GetRecord will return null.

", "smithy.api#httpQuery": "ExpirationTimeResponse" } } @@ -1257,7 +1257,7 @@ } ], "traits": { - "smithy.api#documentation": "

Used for data ingestion into the FeatureStore. The PutRecord\n API writes to both the OnlineStore and OfflineStore. If the\n record is the latest record for the recordIdentifier, the record is written to\n both the OnlineStore and OfflineStore. If the record is a\n historic record, it is written only to the OfflineStore.

", + "smithy.api#documentation": "

The PutRecord API is used to ingest a list of Records into\n your feature group.

\n

If a new record’s EventTime is greater, the new record is written to both\n the OnlineStore and OfflineStore. Otherwise, the record is a\n historic record and it is written only to the OfflineStore.

\n

You can specify the ingestion to be applied to the OnlineStore,\n OfflineStore, or both by using the TargetStores request\n parameter.

\n

You can set the ingested record to expire at a given time to live (TTL) duration after\n the record’s event time, ExpiresAt = EventTime +\n TtlDuration, by specifying the TtlDuration parameter. A record\n level TtlDuration is set when specifying the TtlDuration\n parameter using the PutRecord API call. If the input TtlDuration\n is null or unspecified, TtlDuration is set to the default feature\n group level TtlDuration. A record level TtlDuration supersedes\n the group level TtlDuration.

", "smithy.api#http": { "method": "PUT", "uri": "/FeatureGroup/{FeatureGroupName}", @@ -1269,9 +1269,9 @@ "type": "structure", "members": { "FeatureGroupName": { - "target": "com.amazonaws.sagemakerfeaturestoreruntime#FeatureGroupName", + "target": "com.amazonaws.sagemakerfeaturestoreruntime#FeatureGroupNameOrArn", "traits": { - "smithy.api#documentation": "

The name of the feature group that you want to insert the record into.

", + "smithy.api#documentation": "

The name or Amazon Resource Name (ARN) of the feature group that you want to insert the\n record into.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} }