@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
158 lines • 6.25 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.AiFeatureGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Vertex AI Feature Group.
*
* To get more information about FeatureGroup, see:
*
* * [API documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.featureGroups)
* * How-to Guides
* * [Creating a Feature Group](https://cloud.google.com/vertex-ai/docs/featurestore/latest/create-featuregroup)
*
* ## Example Usage
*
* ### Vertex Ai Feature Group
*
* ```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": "feature_timestamp",
* "type": "TIMESTAMP",
* "mode": "NULLABLE"
* }
* ]
* `,
* });
* const featureGroup = new gcp.vertex.AiFeatureGroup("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"],
* },
* });
* ```
*
* ## Import
*
* FeatureGroup can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{region}}/featureGroups/{{name}}`
*
* * `{{project}}/{{region}}/{{name}}`
*
* * `{{region}}/{{name}}`
*
* * `{{name}}`
*
* When using the `pulumi import` command, FeatureGroup can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:vertex/aiFeatureGroup:AiFeatureGroup default projects/{{project}}/locations/{{region}}/featureGroups/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:vertex/aiFeatureGroup:AiFeatureGroup default {{project}}/{{region}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:vertex/aiFeatureGroup:AiFeatureGroup default {{region}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:vertex/aiFeatureGroup:AiFeatureGroup default {{name}}
* ```
*/
class AiFeatureGroup extends pulumi.CustomResource {
/**
* Get an existing AiFeatureGroup 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 AiFeatureGroup(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of AiFeatureGroup. 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'] === AiFeatureGroup.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["bigQuery"] = state ? state.bigQuery : undefined;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined;
resourceInputs["etag"] = state ? state.etag : 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;
}
else {
const args = argsOrState;
resourceInputs["bigQuery"] = args ? args.bigQuery : undefined;
resourceInputs["description"] = args ? args.description : 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["createTime"] = undefined /*out*/;
resourceInputs["effectiveLabels"] = undefined /*out*/;
resourceInputs["etag"] = 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(AiFeatureGroup.__pulumiType, name, resourceInputs, opts);
}
}
exports.AiFeatureGroup = AiFeatureGroup;
/** @internal */
AiFeatureGroup.__pulumiType = 'gcp:vertex/aiFeatureGroup:AiFeatureGroup';
//# sourceMappingURL=aiFeatureGroup.js.map