1. Packages
  2. Vultr
  3. API Docs
  4. Inference
Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien

vultr.Inference

Explore with Pulumi AI

vultr logo
Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien

    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"});
    
    import pulumi
    import ediri_vultr as vultr
    
    my_inference_subscription = vultr.Inference("myInferenceSubscription", label="my_inference_label")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      myInferenceSubscription:
        type: vultr:Inference
        properties:
          label: my_inference_label
    

    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 string
    The unique name of the resource.
    args InferenceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args InferenceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InferenceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
    });
    
    example, err := vultr.NewInference(ctx, "inferenceResource", &vultr.InferenceArgs{
    	Label: pulumi.String("string"),
    })
    
    var inferenceResource = new Inference("inferenceResource", InferenceArgs.builder()
        .label("string")
        .build());
    
    inference_resource = vultr.Inference("inferenceResource", label="string")
    
    const inferenceResource = new vultr.Inference("inferenceResource", {label: "string"});
    
    type: vultr:Inference
    properties:
        label: string
    

    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

    The Inference resource accepts the following input properties:

    Label string
    A label for the inference subscription.
    Label string
    A label for the inference subscription.
    label String
    A label for the inference subscription.
    label string
    A label for the inference subscription.
    label str
    A label for the inference subscription.
    label 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, object>
    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]interface{}
    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,Object>
    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]: any}
    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, Any]
    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<Any>

    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, Any]] = 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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, object>
    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]interface{}
    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,Object>
    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]: any}
    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, Any]
    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<Any>

    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
    

    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.
    vultr logo
    Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien