import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * FeatureView is representation of values that the FeatureOnlineStore will serve based on its syncConfig. * * To get more information about FeatureOnlineStoreFeatureview, see: * * * [API documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.featureOnlineStores.featureViews) * * How-to Guides * * [Official Documentation](https://cloud.google.com/vertex-ai/docs) * * ## Example Usage * * ### Vertex Ai Featureonlinestore Featureview * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const featureonlinestore = new gcp.vertex.AiFeatureOnlineStore("featureonlinestore", { * name: "example_feature_view", * labels: { * foo: "bar", * }, * region: "us-central1", * bigtable: { * autoScaling: { * minNodeCount: 1, * maxNodeCount: 2, * cpuUtilizationTarget: 80, * }, * }, * }); * const tf_test_dataset = new gcp.bigquery.Dataset("tf-test-dataset", { * datasetId: "example_feature_view", * friendlyName: "test", * description: "This is a test description", * location: "US", * }); * const tf_test_table = new gcp.bigquery.Table("tf-test-table", { * deletionProtection: false, * datasetId: tf_test_dataset.datasetId, * tableId: "example_feature_view", * schema: ` [ * { * \\"name\\": \\"entity_id\\", * \\"mode\\": \\"NULLABLE\\", * \\"type\\": \\"STRING\\", * \\"description\\": \\"Test default entity_id\\" * }, * { * \\"name\\": \\"test_entity_column\\", * \\"mode\\": \\"NULLABLE\\", * \\"type\\": \\"STRING\\", * \\"description\\": \\"test secondary entity column\\" * }, * { * \\"name\\": \\"feature_timestamp\\", * \\"mode\\": \\"NULLABLE\\", * \\"type\\": \\"TIMESTAMP\\", * \\"description\\": \\"Default timestamp value\\" * } * ] * `, * }); * const featureview = new gcp.vertex.AiFeatureOnlineStoreFeatureview("featureview", { * name: "example_feature_view", * region: "us-central1", * featureOnlineStore: featureonlinestore.name, * syncConfig: { * cron: "0 0 * * *", * }, * bigQuerySource: { * uri: pulumi.interpolate`bq://${tf_test_table.project}.${tf_test_table.datasetId}.${tf_test_table.tableId}`, * entityIdColumns: ["test_entity_column"], * }, * }); * const project = gcp.organizations.getProject({}); * ``` * ### Vertex Ai Featureonlinestore Featureview Feature Registry * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const featureonlinestore = new gcp.vertex.AiFeatureOnlineStore("featureonlinestore", { * name: "example_feature_view_feature_registry", * labels: { * foo: "bar", * }, * region: "us-central1", * bigtable: { * autoScaling: { * minNodeCount: 1, * maxNodeCount: 2, * cpuUtilizationTarget: 80, * }, * }, * }); * const sampleDataset = new gcp.bigquery.Dataset("sample_dataset", { * datasetId: "example_feature_view_feature_registry", * friendlyName: "test", * description: "This is a test description", * location: "US", * }); * const sampleTable = new gcp.bigquery.Table("sample_table", { * deletionProtection: false, * datasetId: sampleDataset.datasetId, * tableId: "example_feature_view_feature_registry", * schema: `[ * { * \\"name\\": \\"feature_id\\", * \\"type\\": \\"STRING\\", * \\"mode\\": \\"NULLABLE\\" * }, * { * \\"name\\": \\"example_feature_view_feature_registry\\", * \\"type\\": \\"STRING\\", * \\"mode\\": \\"NULLABLE\\" * }, * { * \\"name\\": \\"feature_timestamp\\", * \\"type\\": \\"TIMESTAMP\\", * \\"mode\\": \\"NULLABLE\\" * } * ] * `, * }); * const sampleFeatureGroup = new gcp.vertex.AiFeatureGroup("sample_feature_group", { * name: "example_feature_view_feature_registry", * description: "A sample feature group", * region: "us-central1", * labels: { * "label-one": "value-one", * }, * bigQuery: { * bigQuerySource: { * inputUri: pulumi.interpolate`bq://${sampleTable.project}.${sampleTable.datasetId}.${sampleTable.tableId}`, * }, * entityIdColumns: ["feature_id"], * }, * }); * const sampleFeature = new gcp.vertex.AiFeatureGroupFeature("sample_feature", { * name: "example_feature_view_feature_registry", * region: "us-central1", * featureGroup: sampleFeatureGroup.name, * description: "A sample feature", * labels: { * "label-one": "value-one", * }, * }); * const featureviewFeatureregistry = new gcp.vertex.AiFeatureOnlineStoreFeatureview("featureview_featureregistry", { * name: "example_feature_view_feature_registry", * region: "us-central1", * featureOnlineStore: featureonlinestore.name, * syncConfig: { * cron: "0 0 * * *", * }, * featureRegistrySource: { * featureGroups: [{ * featureGroupId: sampleFeatureGroup.name, * featureIds: [sampleFeature.name], * }], * }, * }); * ``` * ### Vertex Ai Featureonlinestore Featureview Cross Project * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as time from "@pulumiverse/time"; * * const testProject = gcp.organizations.getProject({}); * const project = new gcp.organizations.Project("project", { * projectId: "tf-test_12125", * name: "tf-test_82749", * orgId: "123456789", * billingAccount: "000000-0000000-0000000-000000", * deletionPolicy: "DELETE", * }); * const wait60Seconds = new time.Sleep("wait_60_seconds", {createDuration: "60s"}, { * dependsOn: [project], * }); * const vertexai = new gcp.projects.Service("vertexai", { * service: "aiplatform.googleapis.com", * project: project.projectId, * }, { * dependsOn: [wait60Seconds], * }); * const featureonlinestore = new gcp.vertex.AiFeatureOnlineStore("featureonlinestore", { * name: "example_cross_project_featureview", * project: project.projectId, * labels: { * foo: "bar", * }, * region: "us-central1", * bigtable: { * autoScaling: { * minNodeCount: 1, * maxNodeCount: 2, * cpuUtilizationTarget: 80, * }, * }, * }, { * dependsOn: [vertexai], * }); * const sampleDataset = new gcp.bigquery.Dataset("sample_dataset", { * datasetId: "example_cross_project_featureview", * friendlyName: "test", * description: "This is a test description", * location: "US", * }); * const viewer = new gcp.bigquery.DatasetIamMember("viewer", { * project: testProject.then(testProject => testProject.projectId), * datasetId: sampleDataset.datasetId, * role: "roles/bigquery.dataViewer", * member: pulumi.interpolate`serviceAccount:service-${project.number}@gcp-sa-aiplatform.iam.gserviceaccount.com`, * }, { * dependsOn: [featureonlinestore], * }); * const wait30Seconds = new time.Sleep("wait_30_seconds", {createDuration: "30s"}, { * dependsOn: [viewer], * }); * const sampleTable = new gcp.bigquery.Table("sample_table", { * deletionProtection: false, * datasetId: sampleDataset.datasetId, * tableId: "example_cross_project_featureview", * schema: `[ * { * \\"name\\": \\"feature_id\\", * \\"type\\": \\"STRING\\", * \\"mode\\": \\"NULLABLE\\" * }, * { * \\"name\\": \\"example_cross_project_featureview\\", * \\"type\\": \\"STRING\\", * \\"mode\\": \\"NULLABLE\\" * }, * { * \\"name\\": \\"feature_timestamp\\", * \\"type\\": \\"TIMESTAMP\\", * \\"mode\\": \\"NULLABLE\\" * } * ] * `, * }); * const sampleFeatureGroup = new gcp.vertex.AiFeatureGroup("sample_feature_group", { * name: "example_cross_project_featureview", * description: "A sample feature group", * region: "us-central1", * labels: { * "label-one": "value-one", * }, * bigQuery: { * bigQuerySource: { * inputUri: pulumi.interpolate`bq://${sampleTable.project}.${sampleTable.datasetId}.${sampleTable.tableId}`, * }, * entityIdColumns: ["feature_id"], * }, * }); * const sampleFeature = new gcp.vertex.AiFeatureGroupFeature("sample_feature", { * name: "example_cross_project_featureview", * region: "us-central1", * featureGroup: sampleFeatureGroup.name, * description: "A sample feature", * labels: { * "label-one": "value-one", * }, * }); * const crossProjectFeatureview = new gcp.vertex.AiFeatureOnlineStoreFeatureview("cross_project_featureview", { * name: "example_cross_project_featureview", * project: project.projectId, * region: "us-central1", * featureOnlineStore: featureonlinestore.name, * syncConfig: { * continuous: true, * }, * featureRegistrySource: { * featureGroups: [{ * featureGroupId: sampleFeatureGroup.name, * featureIds: [sampleFeature.name], * }], * projectNumber: testProject.then(testProject => testProject.number), * }, * }, { * dependsOn: [ * vertexai, * wait30Seconds, * ], * }); * ``` * ### Vertex Ai Featureonlinestore Featureview With Vector Search * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const featureonlinestore = new gcp.vertex.AiFeatureOnlineStore("featureonlinestore", { * name: "example_feature_view_vector_search", * labels: { * foo: "bar", * }, * region: "us-central1", * optimized: {}, * embeddingManagement: { * enabled: true, * }, * }); * const tf_test_dataset = new gcp.bigquery.Dataset("tf-test-dataset", { * datasetId: "example_feature_view_vector_search", * friendlyName: "test", * description: "This is a test description", * location: "US", * }); * const tf_test_table = new gcp.bigquery.Table("tf-test-table", { * deletionProtection: false, * datasetId: tf_test_dataset.datasetId, * tableId: "example_feature_view_vector_search", * schema: `[ * { * \\"name\\": \\"test_primary_id\\", * \\"mode\\": \\"NULLABLE\\", * \\"type\\": \\"STRING\\", * \\"description\\": \\"primary test id\\" * }, * { * \\"name\\": \\"embedding\\", * \\"mode\\": \\"REPEATED\\", * \\"type\\": \\"FLOAT\\", * \\"description\\": \\"embedding column for primary_id column\\" * }, * { * \\"name\\": \\"country\\", * \\"mode\\": \\"NULLABLE\\", * \\"type\\": \\"STRING\\", * \\"description\\": \\"country\\" * }, * { * \\"name\\": \\"test_crowding_column\\", * \\"mode\\": \\"NULLABLE\\", * \\"type\\": \\"INTEGER\\", * \\"description\\": \\"test crowding column\\" * }, * { * \\"name\\": \\"entity_id\\", * \\"mode\\": \\"NULLABLE\\", * \\"type\\": \\"STRING\\", * \\"description\\": \\"Test default entity_id\\" * }, * { * \\"name\\": \\"test_entity_column\\", * \\"mode\\": \\"NULLABLE\\", * \\"type\\": \\"STRING\\", * \\"description\\": \\"test secondary entity column\\" * }, * { * \\"name\\": \\"feature_timestamp\\", * \\"mode\\": \\"NULLABLE\\", * \\"type\\": \\"TIMESTAMP\\", * \\"description\\": \\"Default timestamp value\\" * } * ] * `, * }); * const featureviewVectorSearch = new gcp.vertex.AiFeatureOnlineStoreFeatureview("featureview_vector_search", { * name: "example_feature_view_vector_search", * region: "us-central1", * featureOnlineStore: featureonlinestore.name, * syncConfig: { * cron: "0 0 * * *", * }, * bigQuerySource: { * uri: pulumi.interpolate`bq://${tf_test_table.project}.${tf_test_table.datasetId}.${tf_test_table.tableId}`, * entityIdColumns: ["test_entity_column"], * }, * vectorSearchConfig: { * embeddingColumn: "embedding", * filterColumns: ["country"], * crowdingColumn: "test_crowding_column", * distanceMeasureType: "DOT_PRODUCT_DISTANCE", * treeAhConfig: { * leafNodeEmbeddingCount: "1000", * }, * embeddingDimension: 2, * }, * }); * const project = gcp.organizations.getProject({}); * ``` * * ## Import * * FeatureOnlineStoreFeatureview can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{region}}/featureOnlineStores/{{feature_online_store}}/featureViews/{{name}}` * * * `{{project}}/{{region}}/{{feature_online_store}}/{{name}}` * * * `{{region}}/{{feature_online_store}}/{{name}}` * * * `{{feature_online_store}}/{{name}}` * * When using the `pulumi import` command, FeatureOnlineStoreFeatureview can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:vertex/aiFeatureOnlineStoreFeatureview:AiFeatureOnlineStoreFeatureview default projects/{{project}}/locations/{{region}}/featureOnlineStores/{{feature_online_store}}/featureViews/{{name}} * ``` * * ```sh * $ pulumi import gcp:vertex/aiFeatureOnlineStoreFeatureview:AiFeatureOnlineStoreFeatureview default {{project}}/{{region}}/{{feature_online_store}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:vertex/aiFeatureOnlineStoreFeatureview:AiFeatureOnlineStoreFeatureview default {{region}}/{{feature_online_store}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:vertex/aiFeatureOnlineStoreFeatureview:AiFeatureOnlineStoreFeatureview default {{feature_online_store}}/{{name}} * ``` */ export declare class AiFeatureOnlineStoreFeatureview extends pulumi.CustomResource { /** * Get an existing AiFeatureOnlineStoreFeatureview resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: AiFeatureOnlineStoreFeatureviewState, opts?: pulumi.CustomResourceOptions): AiFeatureOnlineStoreFeatureview; /** * Returns true if the given object is an instance of AiFeatureOnlineStoreFeatureview. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is AiFeatureOnlineStoreFeatureview; /** * Configures how data is supposed to be extracted from a BigQuery source to be loaded onto the FeatureOnlineStore. * Structure is documented below. */ readonly bigQuerySource: pulumi.Output; /** * The timestamp of when the featureOnlinestore was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. */ readonly createTime: pulumi.Output; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * The name of the FeatureOnlineStore to use for the featureview. */ readonly featureOnlineStore: pulumi.Output; /** * Configures the features from a Feature Registry source that need to be loaded onto the FeatureOnlineStore. * Structure is documented below. */ readonly featureRegistrySource: pulumi.Output; /** * A set of key/value label pairs to assign to this FeatureView. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Name of the FeatureView. This value may be up to 60 characters, and valid characters are [a-z0-9_]. The first character cannot be a number. */ readonly name: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * The region for the resource. It should be the same as the featureonlinestore region. */ readonly region: pulumi.Output; /** * Configures when data is to be synced/updated for this FeatureView. At the end of the sync the latest featureValues for each entityId of this FeatureView are made ready for online serving. * Structure is documented below. */ readonly syncConfig: pulumi.Output; /** * The timestamp of when the featureOnlinestore was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. */ readonly updateTime: pulumi.Output; /** * Configuration for vector search. It contains the required configurations to create an index from source data, so that approximate nearest neighbor (a.k.a ANN) algorithms search can be performed during online serving. * Structure is documented below. */ readonly vectorSearchConfig: pulumi.Output; /** * Create a AiFeatureOnlineStoreFeatureview resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AiFeatureOnlineStoreFeatureviewArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AiFeatureOnlineStoreFeatureview resources. */ export interface AiFeatureOnlineStoreFeatureviewState { /** * Configures how data is supposed to be extracted from a BigQuery source to be loaded onto the FeatureOnlineStore. * Structure is documented below. */ bigQuerySource?: pulumi.Input; /** * The timestamp of when the featureOnlinestore was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. */ createTime?: pulumi.Input; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The name of the FeatureOnlineStore to use for the featureview. */ featureOnlineStore?: pulumi.Input; /** * Configures the features from a Feature Registry source that need to be loaded onto the FeatureOnlineStore. * Structure is documented below. */ featureRegistrySource?: pulumi.Input; /** * A set of key/value label pairs to assign to this FeatureView. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Name of the FeatureView. This value may be up to 60 characters, and valid characters are [a-z0-9_]. The first character cannot be a number. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The region for the resource. It should be the same as the featureonlinestore region. */ region?: pulumi.Input; /** * Configures when data is to be synced/updated for this FeatureView. At the end of the sync the latest featureValues for each entityId of this FeatureView are made ready for online serving. * Structure is documented below. */ syncConfig?: pulumi.Input; /** * The timestamp of when the featureOnlinestore was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. */ updateTime?: pulumi.Input; /** * Configuration for vector search. It contains the required configurations to create an index from source data, so that approximate nearest neighbor (a.k.a ANN) algorithms search can be performed during online serving. * Structure is documented below. */ vectorSearchConfig?: pulumi.Input; } /** * The set of arguments for constructing a AiFeatureOnlineStoreFeatureview resource. */ export interface AiFeatureOnlineStoreFeatureviewArgs { /** * Configures how data is supposed to be extracted from a BigQuery source to be loaded onto the FeatureOnlineStore. * Structure is documented below. */ bigQuerySource?: pulumi.Input; /** * The name of the FeatureOnlineStore to use for the featureview. */ featureOnlineStore: pulumi.Input; /** * Configures the features from a Feature Registry source that need to be loaded onto the FeatureOnlineStore. * Structure is documented below. */ featureRegistrySource?: pulumi.Input; /** * A set of key/value label pairs to assign to this FeatureView. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Name of the FeatureView. This value may be up to 60 characters, and valid characters are [a-z0-9_]. The first character cannot be a number. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The region for the resource. It should be the same as the featureonlinestore region. */ region?: pulumi.Input; /** * Configures when data is to be synced/updated for this FeatureView. At the end of the sync the latest featureValues for each entityId of this FeatureView are made ready for online serving. * Structure is documented below. */ syncConfig?: pulumi.Input; /** * Configuration for vector search. It contains the required configurations to create an index from source data, so that approximate nearest neighbor (a.k.a ANN) algorithms search can be performed during online serving. * Structure is documented below. */ vectorSearchConfig?: pulumi.Input; }