@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
136 lines • 5.95 kB
JavaScript
;
// *** 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.ModelServingProvisionedThroughput = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* This resource allows you to manage [Foundation Model provisioned throughput](https://docs.databricks.com/aws/en/machine-learning/foundation-model-apis/deploy-prov-throughput-foundation-model-apis) endpoints in Databricks.
*
* > This resource is currently in private preview, and only available for enrolled customers.
*
* > This resource can only be used with a workspace-level provider!
*
* ## Example Usage
*
* Creating a Foundation Model provisioned throughput endpoint
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const llama = new databricks.ModelServingProvisionedThroughput("llama", {
* aiGateway: {
* usageTrackingConfig: {
* enabled: true,
* },
* },
* config: {
* servedEntities: [{
* entityName: "system.ai.llama-4-maverick",
* entityVersion: "1",
* provisionedModelUnits: 100,
* }],
* },
* });
* ```
*
* ## Access Control
*
* * databricks.Permissions can control which groups or individual users can *Manage*, *Query* or *View* individual serving endpoints.
*
* ## Related Resources
*
* The following resources are often used in the same context:
*
* * databricks.ModelServing to create custom and external serving endpoints in Databricks.
* * databricks.RegisteredModel to create [Models in Unity Catalog](https://docs.databricks.com/en/mlflow/models-in-uc.html) in Databricks.
* * End to end workspace management guide.
* * databricks.Directory to manage directories in [Databricks Workspace](https://docs.databricks.com/workspace/workspace-objects.html).
* * databricks.MlflowModel to create models in the [workspace model registry](https://docs.databricks.com/en/mlflow/model-registry.html) in Databricks.
* * databricks.Notebook to manage [Databricks Notebooks](https://docs.databricks.com/notebooks/index.html).
* * databricks.Notebook data to export a notebook from Databricks Workspace.
* * databricks.Repo to manage [Databricks Repos](https://docs.databricks.com/repos.html).
*
* ## Import
*
* The model serving provisioned throughput resource can be imported using the name of the endpoint:
*
* hcl
*
* import {
*
* to = databricks_model_serving_provisioned_throughput.this
*
* id = "<model-serving-endpoint-name>"
*
* }
*
* ```sh
* $ pulumi import databricks:index/modelServingProvisionedThroughput:ModelServingProvisionedThroughput Alternatively, when using Pulumi version 1.4 or earlier, import using the command:
* ```
*
* bash
*
* ```sh
* $ pulumi import databricks:index/modelServingProvisionedThroughput:ModelServingProvisionedThroughput this <model-serving-endpoint-name>
* ```
*/
class ModelServingProvisionedThroughput extends pulumi.CustomResource {
/**
* Get an existing ModelServingProvisionedThroughput 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 ModelServingProvisionedThroughput(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ModelServingProvisionedThroughput. 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'] === ModelServingProvisionedThroughput.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["aiGateway"] = state?.aiGateway;
resourceInputs["budgetPolicyId"] = state?.budgetPolicyId;
resourceInputs["config"] = state?.config;
resourceInputs["emailNotifications"] = state?.emailNotifications;
resourceInputs["name"] = state?.name;
resourceInputs["servingEndpointId"] = state?.servingEndpointId;
resourceInputs["tags"] = state?.tags;
}
else {
const args = argsOrState;
if (args?.config === undefined && !opts.urn) {
throw new Error("Missing required property 'config'");
}
resourceInputs["aiGateway"] = args?.aiGateway;
resourceInputs["budgetPolicyId"] = args?.budgetPolicyId;
resourceInputs["config"] = args?.config;
resourceInputs["emailNotifications"] = args?.emailNotifications;
resourceInputs["name"] = args?.name;
resourceInputs["tags"] = args?.tags;
resourceInputs["servingEndpointId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ModelServingProvisionedThroughput.__pulumiType, name, resourceInputs, opts);
}
}
exports.ModelServingProvisionedThroughput = ModelServingProvisionedThroughput;
/** @internal */
ModelServingProvisionedThroughput.__pulumiType = 'databricks:index/modelServingProvisionedThroughput:ModelServingProvisionedThroughput';
//# sourceMappingURL=modelServingProvisionedThroughput.js.map