Skip to content

Commit

Permalink
feat(client-sagemaker): Introducing TTL for online store records in f…
Browse files Browse the repository at this point in the history
…eature groups.
  • Loading branch information
awstools committed Jun 27, 2023
1 parent 5e12ed4 commit 9e6d60d
Show file tree
Hide file tree
Showing 15 changed files with 314 additions and 136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ export interface CreateFeatureGroupCommandOutput extends CreateFeatureGroupRespo
* KmsKeyId: "STRING_VALUE",
* },
* EnableOnlineStore: true || false,
* TtlDuration: { // TtlDuration
* Unit: "Seconds" || "Minutes" || "Hours" || "Days" || "Weeks",
* Value: Number("int"),
* },
* },
* OfflineStoreConfig: { // OfflineStoreConfig
* S3StorageConfig: { // S3StorageConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { SerdeContext as __SerdeContext } from "@smithy/types";

import { DeleteModelBiasJobDefinitionRequest } from "../models/models_1";
import { DeleteModelBiasJobDefinitionRequest } from "../models/models_2";
import {
de_DeleteModelBiasJobDefinitionCommand,
se_DeleteModelBiasJobDefinitionCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { SerdeContext as __SerdeContext } from "@smithy/types";

import { DeleteModelInput } from "../models/models_1";
import { DeleteModelInput } from "../models/models_2";
import { de_DeleteModelCommand, se_DeleteModelCommand } from "../protocols/Aws_json1_1";
import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ export interface DescribeFeatureGroupCommandOutput extends DescribeFeatureGroupR
* // KmsKeyId: "STRING_VALUE",
* // },
* // EnableOnlineStore: true || false,
* // TtlDuration: { // TtlDuration
* // Unit: "Seconds" || "Minutes" || "Hours" || "Days" || "Weeks",
* // Value: Number("int"),
* // },
* // },
* // OfflineStoreConfig: { // OfflineStoreConfig
* // S3StorageConfig: { // S3StorageConfig
Expand Down
4 changes: 4 additions & 0 deletions clients/client-sagemaker/src/commands/SearchCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,10 @@ export interface SearchCommandOutput extends SearchResponse, __MetadataBearer {}
* // KmsKeyId: "STRING_VALUE",
* // },
* // EnableOnlineStore: true || false,
* // TtlDuration: { // TtlDuration
* // Unit: "Seconds" || "Minutes" || "Hours" || "Days" || "Weeks",
* // Value: Number("int"),
* // },
* // },
* // OfflineStoreConfig: { // OfflineStoreConfig
* // S3StorageConfig: { // S3StorageConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { SerdeContext as __SerdeContext } from "@smithy/types";

import { StartEdgeDeploymentStageRequest } from "../models/models_3";
import { StartEdgeDeploymentStageRequest } from "../models/models_4";
import { de_StartEdgeDeploymentStageCommand, se_StartEdgeDeploymentStageCommand } from "../protocols/Aws_json1_1";
import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { SerdeContext as __SerdeContext } from "@smithy/types";

import { StartInferenceExperimentRequest, StartInferenceExperimentResponse } from "../models/models_3";
import { StartInferenceExperimentRequest, StartInferenceExperimentResponse } from "../models/models_4";
import { de_StartInferenceExperimentCommand, se_StartInferenceExperimentCommand } from "../protocols/Aws_json1_1";
import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ export interface UpdateFeatureGroupCommandOutput extends UpdateFeatureGroupRespo
* FeatureType: "Integral" || "Fractional" || "String",
* },
* ],
* OnlineStoreConfig: { // OnlineStoreConfigUpdate
* TtlDuration: { // TtlDuration
* Unit: "Seconds" || "Minutes" || "Hours" || "Days" || "Weeks",
* Value: Number("int"),
* },
* },
* };
* const command = new UpdateFeatureGroupCommand(input);
* const response = await client.send(command);
Expand Down
12 changes: 6 additions & 6 deletions clients/client-sagemaker/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7687,8 +7687,8 @@ export interface S3ModelDataSource {
* SageMaker uses all objects that match the specified key name prefix as part of the ML model
* data to deploy. A valid key name prefix identified by <code>S3Uri</code> always ends
* with a forward slash (/).</p>
* <p>If you choose S3Object, S3Uri identifies an object that is the ML model data to
* deploy.</p>
* <p>If you choose <code>S3Object</code>, <code>S3Uri</code> identifies an object that is
* the ML model data to deploy.</p>
*/
S3DataType: S3ModelDataType | string | undefined;

Expand Down Expand Up @@ -7747,9 +7747,9 @@ export interface S3ModelDataSource {
* if your uncompressed ML model consists of two S3 objects
* <code>s3://mybucket/model/weights</code> and <code>s3://mybucket/model/weights/part1</code>
* and you specify <code>s3://mybucket/model/</code> as the value of <code>S3Uri</code> and
* <code>S3Prefix</code> as the value of S3DataType, then it will result in name clash between
* <code>/opt/ml/model/weights</code> (a regular file) and <code>/opt/ml/model/weights/</code>
* (a directory).</p>
* <code>S3Prefix</code> as the value of <code>S3DataType</code>, then it will result in name
* clash between <code>/opt/ml/model/weights</code> (a regular file) and
* <code>/opt/ml/model/weights/</code> (a directory).</p>
* </li>
* <li>
* <p>Do not organize the model artifacts in
Expand Down Expand Up @@ -7912,7 +7912,7 @@ export interface ContainerDefinition {
/**
* <p>Specifies the location of ML model data to deploy.</p>
* <note>
* <p>Currently you cannot use <code>ModelDataSource</code> in conjuction with
* <p>Currently you cannot use <code>ModelDataSource</code> in conjunction with
* SageMaker batch transform, SageMaker serverless endpoints, SageMaker multi-model endpoints, and SageMaker
* Marketplace.</p>
* </note>
Expand Down
64 changes: 44 additions & 20 deletions clients/client-sagemaker/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,43 @@ export interface OnlineStoreSecurityConfig {
KmsKeyId?: string;
}

/**
* @public
* @enum
*/
export const TtlDurationUnit = {
DAYS: "Days",
HOURS: "Hours",
MINUTES: "Minutes",
SECONDS: "Seconds",
WEEKS: "Weeks",
} as const;

/**
* @public
*/
export type TtlDurationUnit = (typeof TtlDurationUnit)[keyof typeof TtlDurationUnit];

/**
* @public
* <p>Time to live duration, where the record is hard deleted after the expiration time is
* reached; <code>ExpiresAt</code> = <code>EventTime</code> + <code>TtlDuration</code>. For
* information on HardDelete, see the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_feature_store_DeleteRecord.html">DeleteRecord</a> API in the Amazon SageMaker API Reference guide.</p>
*/
export interface TtlDuration {
/**
* <p>
* <code>TtlDuration</code> time unit.</p>
*/
Unit?: TtlDurationUnit | string;

/**
* <p>
* <code>TtlDuration</code> time value.</p>
*/
Value?: number;
}

/**
* @public
* <p>Use this to specify the Amazon Web Services Key Management Service (KMS) Key ID, or
Expand All @@ -1170,6 +1207,13 @@ export interface OnlineStoreConfig {
* <p>The default value is <code>False</code>.</p>
*/
EnableOnlineStore?: boolean;

/**
* <p>Time to live duration, where the record is hard deleted after the expiration time is
* reached; <code>ExpiresAt</code> = <code>EventTime</code> + <code>TtlDuration</code>. For
* information on HardDelete, see the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_feature_store_DeleteRecord.html">DeleteRecord</a> API in the Amazon SageMaker API Reference guide.</p>
*/
TtlDuration?: TtlDuration;
}

/**
Expand Down Expand Up @@ -10629,26 +10673,6 @@ export interface DeleteInferenceExperimentResponse {
InferenceExperimentArn: string | undefined;
}

/**
* @public
*/
export interface DeleteModelInput {
/**
* <p>The name of the model to delete.</p>
*/
ModelName: string | undefined;
}

/**
* @public
*/
export interface DeleteModelBiasJobDefinitionRequest {
/**
* <p>The name of the model bias job definition to delete.</p>
*/
JobDefinitionName: string | undefined;
}

/**
* @internal
*/
Expand Down
81 changes: 20 additions & 61 deletions clients/client-sagemaker/src/models/models_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,26 @@ import {
VendorGuidance,
} from "./models_1";

/**
* @public
*/
export interface DeleteModelInput {
/**
* <p>The name of the model to delete.</p>
*/
ModelName: string | undefined;
}

/**
* @public
*/
export interface DeleteModelBiasJobDefinitionRequest {
/**
* <p>The name of the model bias job definition to delete.</p>
*/
JobDefinitionName: string | undefined;
}

/**
* @public
*/
Expand Down Expand Up @@ -10150,67 +10170,6 @@ export interface HubContentInfo {
CreationTime: Date | undefined;
}

/**
* @public
* @enum
*/
export const HubContentSortBy = {
CREATION_TIME: "CreationTime",
HUB_CONTENT_NAME: "HubContentName",
HUB_CONTENT_STATUS: "HubContentStatus",
} as const;

/**
* @public
*/
export type HubContentSortBy = (typeof HubContentSortBy)[keyof typeof HubContentSortBy];

/**
* @public
* <p>Information about a hub.</p>
*/
export interface HubInfo {
/**
* <p>The name of the hub.</p>
*/
HubName: string | undefined;

/**
* <p>The Amazon Resource Name (ARN) of the hub.</p>
*/
HubArn: string | undefined;

/**
* <p>The display name of the hub.</p>
*/
HubDisplayName?: string;

/**
* <p>A description of the hub.</p>
*/
HubDescription?: string;

/**
* <p>The searchable keywords for the hub.</p>
*/
HubSearchKeywords?: string[];

/**
* <p>The status of the hub.</p>
*/
HubStatus: HubStatus | string | undefined;

/**
* <p>The date and time that the hub was created.</p>
*/
CreationTime: Date | undefined;

/**
* <p>The date and time that the hub was last modified.</p>
*/
LastModifiedTime: Date | undefined;
}

/**
* @internal
*/
Expand Down
Loading

0 comments on commit 9e6d60d

Please sign in to comment.