"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.AiIndexEndpoint = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An endpoint indexes are deployed into. An index endpoint can have multiple deployed indexes.
 *
 * To get more information about IndexEndpoint, see:
 *
 * * [API documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.indexEndpoints/)
 *
 * ## Example Usage
 *
 * ### Vertex Ai Index Endpoint
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const vertexNetwork = new gcp.compute.Network("vertex_network", {name: "network-name"});
 * const vertexRange = new gcp.compute.GlobalAddress("vertex_range", {
 *     name: "address-name",
 *     purpose: "VPC_PEERING",
 *     addressType: "INTERNAL",
 *     prefixLength: 24,
 *     network: vertexNetwork.id,
 * });
 * const vertexVpcConnection = new gcp.servicenetworking.Connection("vertex_vpc_connection", {
 *     network: vertexNetwork.id,
 *     service: "servicenetworking.googleapis.com",
 *     reservedPeeringRanges: [vertexRange.name],
 * });
 * const project = gcp.organizations.getProject({});
 * const indexEndpoint = new gcp.vertex.AiIndexEndpoint("index_endpoint", {
 *     displayName: "sample-endpoint",
 *     description: "A sample vertex endpoint",
 *     region: "us-central1",
 *     labels: {
 *         "label-one": "value-one",
 *     },
 *     network: pulumi.all([project, vertexNetwork.name]).apply(([project, name]) => `projects/${project.number}/global/networks/${name}`),
 * }, {
 *     dependsOn: [vertexVpcConnection],
 * });
 * ```
 * ### Vertex Ai Index Endpoint With Psc
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const project = gcp.organizations.getProject({});
 * const indexEndpoint = new gcp.vertex.AiIndexEndpoint("index_endpoint", {
 *     displayName: "sample-endpoint",
 *     description: "A sample vertex endpoint",
 *     region: "us-central1",
 *     labels: {
 *         "label-one": "value-one",
 *     },
 *     privateServiceConnectConfig: {
 *         enablePrivateServiceConnect: true,
 *         projectAllowlists: [project.then(project => project.name)],
 *     },
 * });
 * ```
 * ### Vertex Ai Index Endpoint With Public Endpoint
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const indexEndpoint = new gcp.vertex.AiIndexEndpoint("index_endpoint", {
 *     displayName: "sample-endpoint",
 *     description: "A sample vertex endpoint with an public endpoint",
 *     region: "us-central1",
 *     labels: {
 *         "label-one": "value-one",
 *     },
 *     publicEndpointEnabled: true,
 * });
 * ```
 *
 * ## Import
 *
 * IndexEndpoint can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{region}}/indexEndpoints/{{name}}`
 *
 * * `{{project}}/{{region}}/{{name}}`
 *
 * * `{{region}}/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, IndexEndpoint can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:vertex/aiIndexEndpoint:AiIndexEndpoint default projects/{{project}}/locations/{{region}}/indexEndpoints/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:vertex/aiIndexEndpoint:AiIndexEndpoint default {{project}}/{{region}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:vertex/aiIndexEndpoint:AiIndexEndpoint default {{region}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:vertex/aiIndexEndpoint:AiIndexEndpoint default {{name}}
 * ```
 */
class AiIndexEndpoint extends pulumi.CustomResource {
    /**
     * Get an existing AiIndexEndpoint 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 AiIndexEndpoint(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AiIndexEndpoint.  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'] === AiIndexEndpoint.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["encryptionSpec"] = state?.encryptionSpec;
            resourceInputs["etag"] = state?.etag;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["name"] = state?.name;
            resourceInputs["network"] = state?.network;
            resourceInputs["privateServiceConnectConfig"] = state?.privateServiceConnectConfig;
            resourceInputs["project"] = state?.project;
            resourceInputs["publicEndpointDomainName"] = state?.publicEndpointDomainName;
            resourceInputs["publicEndpointEnabled"] = state?.publicEndpointEnabled;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["region"] = state?.region;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["encryptionSpec"] = args?.encryptionSpec;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["network"] = args?.network;
            resourceInputs["privateServiceConnectConfig"] = args?.privateServiceConnectConfig;
            resourceInputs["project"] = args?.project;
            resourceInputs["publicEndpointEnabled"] = args?.publicEndpointEnabled;
            resourceInputs["region"] = args?.region;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["etag"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["publicEndpointDomainName"] = 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(AiIndexEndpoint.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AiIndexEndpoint = AiIndexEndpoint;
/** @internal */
AiIndexEndpoint.__pulumiType = 'gcp:vertex/aiIndexEndpoint:AiIndexEndpoint';
//# sourceMappingURL=aiIndexEndpoint.js.map