1. Packages
  2. OVHcloud
  3. API Docs
  4. getServers
OVH v0.29.0 published on Wednesday, Apr 5, 2023 by lbrlabs

ovh.getServers

Explore with Pulumi AI

ovh logo
OVH v0.29.0 published on Wednesday, Apr 5, 2023 by lbrlabs

    Use this data source to get the list of dedicated servers associated with your OVHcloud Account.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var servers = Ovh.GetServers.Invoke();
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ovh.GetServers(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.OvhFunctions;
    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 servers = OvhFunctions.getServers();
    
        }
    }
    
    import pulumi
    import pulumi_ovh as ovh
    
    servers = ovh.get_servers()
    
    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@pulumi/ovh";
    
    const servers = ovh.getServers({});
    
    variables:
      servers:
        fn::invoke:
          Function: ovh:getServers
          Arguments: {}
    

    Using getServers

    function getServers(opts?: InvokeOptions): Promise<GetServersResult>
    def get_servers(opts: Optional[InvokeOptions] = None) -> GetServersResult
    func GetServers(ctx *Context, opts ...InvokeOption) (*GetServersResult, error)

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

    public static class GetServers 
    {
        public static Task<GetServersResult> InvokeAsync(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServersResult> getServers(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: ovh:index/getServers:getServers
      arguments:
        # arguments dictionary

    getServers Result

    The following output properties are available:

    Id string

    The provider-assigned unique ID for this managed resource.

    Results List<string>

    The list of dedicated servers IDs associated with your OVHcloud Account.

    Id string

    The provider-assigned unique ID for this managed resource.

    Results []string

    The list of dedicated servers IDs associated with your OVHcloud Account.

    id String

    The provider-assigned unique ID for this managed resource.

    results List<String>

    The list of dedicated servers IDs associated with your OVHcloud Account.

    id string

    The provider-assigned unique ID for this managed resource.

    results string[]

    The list of dedicated servers IDs associated with your OVHcloud Account.

    id str

    The provider-assigned unique ID for this managed resource.

    results Sequence[str]

    The list of dedicated servers IDs associated with your OVHcloud Account.

    id String

    The provider-assigned unique ID for this managed resource.

    results List<String>

    The list of dedicated servers IDs associated with your OVHcloud Account.

    Package Details

    Repository
    ovh lbrlabs/pulumi-ovh
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the ovh Terraform Provider.

    ovh logo
    OVH v0.29.0 published on Wednesday, Apr 5, 2023 by lbrlabs