1. Packages
  2. Vultr
  3. API Docs
  4. Inference
Vultr v2.23.1 published on Tuesday, Dec 10, 2024 by dirien

vultr.Inference

Explore with Pulumi AI

Provides a Vultr Serverless Inference resource. This can be used to create, read, modify, and delete managed inference subscriptions on your Vultr account.

Example Usage

Create a new inference subscription:

import * as pulumi from "@pulumi/pulumi";
import * as vultr from "@ediri/vultr";

const myInferenceSubscription = new vultr.Inference("myInferenceSubscription", {label: "my_inference_label"});
Copy
import pulumi
import ediri_vultr as vultr

my_inference_subscription = vultr.Inference("myInferenceSubscription", label="my_inference_label")
Copy
package main

import (
	"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vultr.NewInference(ctx, "myInferenceSubscription", &vultr.InferenceArgs{
			Label: pulumi.String("my_inference_label"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vultr = ediri.Vultr;

return await Deployment.RunAsync(() => 
{
    var myInferenceSubscription = new Vultr.Inference("myInferenceSubscription", new()
    {
        Label = "my_inference_label",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vultr.Inference;
import com.pulumi.vultr.InferenceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var myInferenceSubscription = new Inference("myInferenceSubscription", InferenceArgs.builder()
            .label("my_inference_label")
            .build());

    }
}
Copy
resources:
  myInferenceSubscription:
    type: vultr:Inference
    properties:
      label: my_inference_label
Copy

Create Inference Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Inference(name: string, args: InferenceArgs, opts?: CustomResourceOptions);
@overload
def Inference(resource_name: str,
              args: InferenceArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def Inference(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              label: Optional[str] = None)
func NewInference(ctx *Context, name string, args InferenceArgs, opts ...ResourceOption) (*Inference, error)
public Inference(string name, InferenceArgs args, CustomResourceOptions? opts = null)
public Inference(String name, InferenceArgs args)
public Inference(String name, InferenceArgs args, CustomResourceOptions options)
type: vultr:Inference
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. InferenceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. InferenceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. InferenceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. InferenceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. InferenceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var inferenceResource = new Vultr.Inference("inferenceResource", new()
{
    Label = "string",
});
Copy
example, err := vultr.NewInference(ctx, "inferenceResource", &vultr.InferenceArgs{
	Label: pulumi.String("string"),
})
Copy
var inferenceResource = new Inference("inferenceResource", InferenceArgs.builder()
    .label("string")
    .build());
Copy
inference_resource = vultr.Inference("inferenceResource", label="string")
Copy
const inferenceResource = new vultr.Inference("inferenceResource", {label: "string"});
Copy
type: vultr:Inference
properties:
    label: string
Copy

Inference Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Inference resource accepts the following input properties:

Label This property is required. string
A label for the inference subscription.
Label This property is required. string
A label for the inference subscription.
label This property is required. String
A label for the inference subscription.
label This property is required. string
A label for the inference subscription.
label This property is required. str
A label for the inference subscription.
label This property is required. String
A label for the inference subscription.

Outputs

All input properties are implicitly available as output properties. Additionally, the Inference resource produces the following output properties:

ApiKey string
The inference subscription's API key for accessing the Vultr Inference API.
DateCreated string
The date the inference subscription was added to your Vultr account.
Id string
The provider-assigned unique ID for this managed resource.
Usage Dictionary<string, string>
ApiKey string
The inference subscription's API key for accessing the Vultr Inference API.
DateCreated string
The date the inference subscription was added to your Vultr account.
Id string
The provider-assigned unique ID for this managed resource.
Usage map[string]string
apiKey String
The inference subscription's API key for accessing the Vultr Inference API.
dateCreated String
The date the inference subscription was added to your Vultr account.
id String
The provider-assigned unique ID for this managed resource.
usage Map<String,String>
apiKey string
The inference subscription's API key for accessing the Vultr Inference API.
dateCreated string
The date the inference subscription was added to your Vultr account.
id string
The provider-assigned unique ID for this managed resource.
usage {[key: string]: string}
api_key str
The inference subscription's API key for accessing the Vultr Inference API.
date_created str
The date the inference subscription was added to your Vultr account.
id str
The provider-assigned unique ID for this managed resource.
usage Mapping[str, str]
apiKey String
The inference subscription's API key for accessing the Vultr Inference API.
dateCreated String
The date the inference subscription was added to your Vultr account.
id String
The provider-assigned unique ID for this managed resource.
usage Map<String>

Look up Existing Inference Resource

Get an existing Inference resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: InferenceState, opts?: CustomResourceOptions): Inference
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        api_key: Optional[str] = None,
        date_created: Optional[str] = None,
        label: Optional[str] = None,
        usage: Optional[Mapping[str, str]] = None) -> Inference
func GetInference(ctx *Context, name string, id IDInput, state *InferenceState, opts ...ResourceOption) (*Inference, error)
public static Inference Get(string name, Input<string> id, InferenceState? state, CustomResourceOptions? opts = null)
public static Inference get(String name, Output<String> id, InferenceState state, CustomResourceOptions options)
resources:  _:    type: vultr:Inference    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ApiKey string
The inference subscription's API key for accessing the Vultr Inference API.
DateCreated string
The date the inference subscription was added to your Vultr account.
Label string
A label for the inference subscription.
Usage Dictionary<string, string>
ApiKey string
The inference subscription's API key for accessing the Vultr Inference API.
DateCreated string
The date the inference subscription was added to your Vultr account.
Label string
A label for the inference subscription.
Usage map[string]string
apiKey String
The inference subscription's API key for accessing the Vultr Inference API.
dateCreated String
The date the inference subscription was added to your Vultr account.
label String
A label for the inference subscription.
usage Map<String,String>
apiKey string
The inference subscription's API key for accessing the Vultr Inference API.
dateCreated string
The date the inference subscription was added to your Vultr account.
label string
A label for the inference subscription.
usage {[key: string]: string}
api_key str
The inference subscription's API key for accessing the Vultr Inference API.
date_created str
The date the inference subscription was added to your Vultr account.
label str
A label for the inference subscription.
usage Mapping[str, str]
apiKey String
The inference subscription's API key for accessing the Vultr Inference API.
dateCreated String
The date the inference subscription was added to your Vultr account.
label String
A label for the inference subscription.
usage Map<String>

Import

Inference subscriptions can be imported using the subscription’s ID, e.g.

$ pulumi import vultr:index/inference:Inference my_inference_subscription b6a859c5-b299-49dd-8888-b1abbc517d08
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
vultr dirien/pulumi-vultr
License
Apache-2.0
Notes
This Pulumi package is based on the vultr Terraform Provider.