@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
178 lines • 7.47 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.AiFeatureGroupFeature = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Vertex AI Feature Group Feature is feature metadata information.
*
* To get more information about FeatureGroupFeature, see:
*
* * [API documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations.featureGroups.features)
* * How-to Guides
* * [Creating a Feature](https://cloud.google.com/vertex-ai/docs/featurestore/latest/create-feature)
*
* ## Example Usage
*
* ### Vertex Ai Feature Group Feature
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const sampleDataset = new gcp.bigquery.Dataset("sample_dataset", {
* datasetId: "job_load_dataset",
* friendlyName: "test",
* description: "This is a test description",
* location: "US",
* });
* const sampleTable = new gcp.bigquery.Table("sample_table", {
* deletionProtection: false,
* datasetId: sampleDataset.datasetId,
* tableId: "job_load_table",
* schema: `[
* {
* "name": "feature_id",
* "type": "STRING",
* "mode": "NULLABLE"
* },
* {
* "name": "example_feature",
* "type": "STRING",
* "mode": "NULLABLE"
* },
* {
* "name": "feature_timestamp",
* "type": "TIMESTAMP",
* "mode": "NULLABLE"
* }
* ]
* `,
* });
* const sampleFeatureGroup = new gcp.vertex.AiFeatureGroup("sample_feature_group", {
* name: "example_feature_group",
* 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 featureGroupFeature = new gcp.vertex.AiFeatureGroupFeature("feature_group_feature", {
* name: "example_feature",
* region: "us-central1",
* featureGroup: sampleFeatureGroup.name,
* description: "A sample feature",
* labels: {
* "label-one": "value-one",
* },
* });
* ```
*
* ## Import
*
* FeatureGroupFeature can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{region}}/featureGroups/{{feature_group}}/features/{{name}}`
*
* * `{{project}}/{{region}}/{{feature_group}}/{{name}}`
*
* * `{{region}}/{{feature_group}}/{{name}}`
*
* * `{{feature_group}}/{{name}}`
*
* When using the `pulumi import` command, FeatureGroupFeature can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:vertex/aiFeatureGroupFeature:AiFeatureGroupFeature default projects/{{project}}/locations/{{region}}/featureGroups/{{feature_group}}/features/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:vertex/aiFeatureGroupFeature:AiFeatureGroupFeature default {{project}}/{{region}}/{{feature_group}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:vertex/aiFeatureGroupFeature:AiFeatureGroupFeature default {{region}}/{{feature_group}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:vertex/aiFeatureGroupFeature:AiFeatureGroupFeature default {{feature_group}}/{{name}}
* ```
*/
class AiFeatureGroupFeature extends pulumi.CustomResource {
/**
* Get an existing AiFeatureGroupFeature 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, id, state, opts) {
return new AiFeatureGroupFeature(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of AiFeatureGroupFeature. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === AiFeatureGroupFeature.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined;
resourceInputs["featureGroup"] = state ? state.featureGroup : undefined;
resourceInputs["labels"] = state ? state.labels : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["updateTime"] = state ? state.updateTime : undefined;
resourceInputs["versionColumnName"] = state ? state.versionColumnName : undefined;
}
else {
const args = argsOrState;
if ((!args || args.featureGroup === undefined) && !opts.urn) {
throw new Error("Missing required property 'featureGroup'");
}
if ((!args || args.region === undefined) && !opts.urn) {
throw new Error("Missing required property 'region'");
}
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["featureGroup"] = args ? args.featureGroup : undefined;
resourceInputs["labels"] = args ? args.labels : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["versionColumnName"] = args ? args.versionColumnName : undefined;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["effectiveLabels"] = undefined /*out*/;
resourceInputs["pulumiLabels"] = undefined /*out*/;
resourceInputs["updateTime"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(AiFeatureGroupFeature.__pulumiType, name, resourceInputs, opts);
}
}
exports.AiFeatureGroupFeature = AiFeatureGroupFeature;
/** @internal */
AiFeatureGroupFeature.__pulumiType = 'gcp:vertex/aiFeatureGroupFeature:AiFeatureGroupFeature';
//# sourceMappingURL=aiFeatureGroupFeature.js.map