"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.AiEndpoint = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Models are deployed into it, and afterwards Endpoint is called to obtain predictions and explanations.
 *
 * To get more information about Endpoint, see:
 *
 * * [API documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/vertex-ai/docs)
 *
 * ## Example Usage
 *
 * ### Vertex Ai Endpoint Network
 *
 * ```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 bqDataset = new gcp.bigquery.Dataset("bq_dataset", {
 *     datasetId: "some_dataset",
 *     friendlyName: "logging dataset",
 *     description: "This is a dataset that requests are logged to",
 *     location: "US",
 *     deleteContentsOnDestroy: true,
 * });
 * const project = gcp.organizations.getProject({});
 * const endpoint = new gcp.vertex.AiEndpoint("endpoint", {
 *     name: "endpoint-name",
 *     displayName: "sample-endpoint",
 *     description: "A sample vertex endpoint",
 *     location: "us-central1",
 *     region: "us-central1",
 *     labels: {
 *         "label-one": "value-one",
 *     },
 *     network: pulumi.all([project, vertexNetwork.name]).apply(([project, name]) => `projects/${project.number}/global/networks/${name}`),
 *     encryptionSpec: {
 *         kmsKeyName: "kms-name",
 *     },
 *     predictRequestResponseLoggingConfig: {
 *         bigqueryDestination: {
 *             outputUri: pulumi.all([project, bqDataset.datasetId]).apply(([project, datasetId]) => `bq://${project.projectId}.${datasetId}.request_response_logging`),
 *         },
 *         enabled: true,
 *         samplingRate: 0.1,
 *     },
 *     trafficSplit: JSON.stringify({
 *         "12345": 100,
 *     }),
 * }, {
 *     dependsOn: [vertexVpcConnection],
 * });
 * const cryptoKey = new gcp.kms.CryptoKeyIAMMember("crypto_key", {
 *     cryptoKeyId: "kms-name",
 *     role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
 *     member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-aiplatform.iam.gserviceaccount.com`),
 * });
 * ```
 * ### Vertex Ai Endpoint Private Service Connect
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const project = gcp.organizations.getProject({});
 * const endpoint = new gcp.vertex.AiEndpoint("endpoint", {
 *     name: "endpoint-name_32270",
 *     displayName: "sample-endpoint",
 *     description: "A sample vertex endpoint",
 *     location: "us-central1",
 *     region: "us-central1",
 *     labels: {
 *         "label-one": "value-one",
 *     },
 *     privateServiceConnectConfig: {
 *         enablePrivateServiceConnect: true,
 *         projectAllowlists: [project.then(project => project.projectId)],
 *     },
 * });
 * ```
 * ### Vertex Ai Endpoint Dedicated Endpoint
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const endpoint = new gcp.vertex.AiEndpoint("endpoint", {
 *     name: "endpoint-name_44703",
 *     displayName: "sample-endpoint",
 *     description: "A sample vertex endpoint",
 *     location: "us-central1",
 *     region: "us-central1",
 *     labels: {
 *         "label-one": "value-one",
 *     },
 *     dedicatedEndpointEnabled: true,
 * });
 * const project = gcp.organizations.getProject({});
 * ```
 *
 * ## Import
 *
 * Endpoint can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/endpoints/{{name}}`
 *
 * * `{{project}}/{{location}}/{{name}}`
 *
 * * `{{location}}/{{name}}`
 *
 * When using the `pulumi import` command, Endpoint can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:vertex/aiEndpoint:AiEndpoint default projects/{{project}}/locations/{{location}}/endpoints/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:vertex/aiEndpoint:AiEndpoint default {{project}}/{{location}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:vertex/aiEndpoint:AiEndpoint default {{location}}/{{name}}
 * ```
 */
class AiEndpoint extends pulumi.CustomResource {
    /**
     * Get an existing AiEndpoint 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 AiEndpoint(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AiEndpoint.  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'] === AiEndpoint.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["dedicatedEndpointDns"] = state?.dedicatedEndpointDns;
            resourceInputs["dedicatedEndpointEnabled"] = state?.dedicatedEndpointEnabled;
            resourceInputs["deployedModels"] = state?.deployedModels;
            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["location"] = state?.location;
            resourceInputs["modelDeploymentMonitoringJob"] = state?.modelDeploymentMonitoringJob;
            resourceInputs["name"] = state?.name;
            resourceInputs["network"] = state?.network;
            resourceInputs["predictRequestResponseLoggingConfig"] = state?.predictRequestResponseLoggingConfig;
            resourceInputs["privateServiceConnectConfig"] = state?.privateServiceConnectConfig;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["region"] = state?.region;
            resourceInputs["trafficSplit"] = state?.trafficSplit;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["dedicatedEndpointEnabled"] = args?.dedicatedEndpointEnabled;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["encryptionSpec"] = args?.encryptionSpec;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["network"] = args?.network;
            resourceInputs["predictRequestResponseLoggingConfig"] = args?.predictRequestResponseLoggingConfig;
            resourceInputs["privateServiceConnectConfig"] = args?.privateServiceConnectConfig;
            resourceInputs["project"] = args?.project;
            resourceInputs["region"] = args?.region;
            resourceInputs["trafficSplit"] = args?.trafficSplit;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["dedicatedEndpointDns"] = undefined /*out*/;
            resourceInputs["deployedModels"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["etag"] = undefined /*out*/;
            resourceInputs["modelDeploymentMonitoringJob"] = 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(AiEndpoint.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AiEndpoint = AiEndpoint;
/** @internal */
AiEndpoint.__pulumiType = 'gcp:vertex/aiEndpoint:AiEndpoint';
//# sourceMappingURL=aiEndpoint.js.map