1. Packages
  2. Vultr
  3. API Docs
  4. getInference
Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien

vultr.getInference

Explore with Pulumi AI

vultr logo
Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien

    Get information about a Vultr Serverless Inference subscription.

    Example Usage

    Get the information for an inference subscription by label:

    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@pulumi/vultr";
    
    const exampleInference = vultr.getInference({
        filters: [{
            name: "label",
            values: ["my_inference_label"],
        }],
    });
    
    import pulumi
    import pulumi_vultr as vultr
    
    example_inference = vultr.get_inference(filters=[vultr.GetInferenceFilterArgs(
        name="label",
        values=["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.LookupInference(ctx, &vultr.LookupInferenceArgs{
    			Filters: []vultr.GetInferenceFilter{
    				{
    					Name: "label",
    					Values: []string{
    						"my_inference_label",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vultr = Pulumi.Vultr;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleInference = Vultr.GetInference.Invoke(new()
        {
            Filters = new[]
            {
                new Vultr.Inputs.GetInferenceFilterInputArgs
                {
                    Name = "label",
                    Values = new[]
                    {
                        "my_inference_label",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vultr.VultrFunctions;
    import com.pulumi.vultr.inputs.GetInferenceArgs;
    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) {
            final var exampleInference = VultrFunctions.getInference(GetInferenceArgs.builder()
                .filters(GetInferenceFilterArgs.builder()
                    .name("label")
                    .values("my_inference_label")
                    .build())
                .build());
    
        }
    }
    
    variables:
      exampleInference:
        fn::invoke:
          Function: vultr:getInference
          Arguments:
            filters:
              - name: label
                values:
                  - my_inference_label
    

    Using getInference

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getInference(args: GetInferenceArgs, opts?: InvokeOptions): Promise<GetInferenceResult>
    function getInferenceOutput(args: GetInferenceOutputArgs, opts?: InvokeOptions): Output<GetInferenceResult>
    def get_inference(filters: Optional[Sequence[GetInferenceFilter]] = None,
                      opts: Optional[InvokeOptions] = None) -> GetInferenceResult
    def get_inference_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetInferenceFilterArgs]]]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetInferenceResult]
    func LookupInference(ctx *Context, args *LookupInferenceArgs, opts ...InvokeOption) (*LookupInferenceResult, error)
    func LookupInferenceOutput(ctx *Context, args *LookupInferenceOutputArgs, opts ...InvokeOption) LookupInferenceResultOutput

    > Note: This function is named LookupInference in the Go SDK.

    public static class GetInference 
    {
        public static Task<GetInferenceResult> InvokeAsync(GetInferenceArgs args, InvokeOptions? opts = null)
        public static Output<GetInferenceResult> Invoke(GetInferenceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInferenceResult> getInference(GetInferenceArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: vultr:index/getInference:getInference
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<ediri.Vultr.Inputs.GetInferenceFilter>
    Query parameters for finding inference subscriptions.
    Filters []GetInferenceFilter
    Query parameters for finding inference subscriptions.
    filters List<GetInferenceFilter>
    Query parameters for finding inference subscriptions.
    filters GetInferenceFilter[]
    Query parameters for finding inference subscriptions.
    filters Sequence[GetInferenceFilter]
    Query parameters for finding inference subscriptions.
    filters List<Property Map>
    Query parameters for finding inference subscriptions.

    getInference Result

    The following output properties are available:

    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.
    Label string
    The inference subscription's label.
    Usage Dictionary<string, object>
    Filters List<ediri.Vultr.Outputs.GetInferenceFilter>
    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.
    Label string
    The inference subscription's label.
    Usage map[string]interface{}
    Filters []GetInferenceFilter
    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.
    label String
    The inference subscription's label.
    usage Map<String,Object>
    filters List<GetInferenceFilter>
    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.
    label string
    The inference subscription's label.
    usage {[key: string]: any}
    filters GetInferenceFilter[]
    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.
    label str
    The inference subscription's label.
    usage Mapping[str, Any]
    filters Sequence[GetInferenceFilter]
    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.
    label String
    The inference subscription's label.
    usage Map<Any>
    filters List<Property Map>

    Supporting Types

    GetInferenceFilter

    Name string
    Attribute name to filter with.
    Values List<string>
    One or more values filter with.
    Name string
    Attribute name to filter with.
    Values []string
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.
    name string
    Attribute name to filter with.
    values string[]
    One or more values filter with.
    name str
    Attribute name to filter with.
    values Sequence[str]
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.

    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.1 published on Monday, Jul 22, 2024 by dirien