1. Packages
  2. Nutanix
  3. API Docs
  4. getKarbonClusterKubeConfig
Nutanix v0.5.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg

nutanix.getKarbonClusterKubeConfig

Explore with Pulumi AI

nutanix logo
Nutanix v0.5.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg

    Describes the SSH config from a Karbon Cluster

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pulumi/nutanix";
    
    const configbyid = nutanix.getKarbonClusterKubeConfig({
        karbonClusterId: "<YOUR-CLUSTER-ID>",
    });
    const configbyname = nutanix.getKarbonClusterKubeConfig({
        karbonClusterName: "<YOUR-CLUSTER-NAME>",
    });
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    configbyid = nutanix.get_karbon_cluster_kube_config(karbon_cluster_id="<YOUR-CLUSTER-ID>")
    configbyname = nutanix.get_karbon_cluster_kube_config(karbon_cluster_name="<YOUR-CLUSTER-NAME>")
    
    package main
    
    import (
    	"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nutanix.GetKarbonClusterKubeConfig(ctx, &nutanix.GetKarbonClusterKubeConfigArgs{
    			KarbonClusterId: pulumi.StringRef("<YOUR-CLUSTER-ID>"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = nutanix.GetKarbonClusterKubeConfig(ctx, &nutanix.GetKarbonClusterKubeConfigArgs{
    			KarbonClusterName: pulumi.StringRef("<YOUR-CLUSTER-NAME>"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nutanix = Pulumi.Nutanix;
    
    return await Deployment.RunAsync(() => 
    {
        var configbyid = Nutanix.GetKarbonClusterKubeConfig.Invoke(new()
        {
            KarbonClusterId = "<YOUR-CLUSTER-ID>",
        });
    
        var configbyname = Nutanix.GetKarbonClusterKubeConfig.Invoke(new()
        {
            KarbonClusterName = "<YOUR-CLUSTER-NAME>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nutanix.NutanixFunctions;
    import com.pulumi.nutanix.inputs.GetKarbonClusterKubeConfigArgs;
    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 configbyid = NutanixFunctions.getKarbonClusterKubeConfig(GetKarbonClusterKubeConfigArgs.builder()
                .karbonClusterId("<YOUR-CLUSTER-ID>")
                .build());
    
            final var configbyname = NutanixFunctions.getKarbonClusterKubeConfig(GetKarbonClusterKubeConfigArgs.builder()
                .karbonClusterName("<YOUR-CLUSTER-NAME>")
                .build());
    
        }
    }
    
    variables:
      configbyid:
        fn::invoke:
          Function: nutanix:getKarbonClusterKubeConfig
          Arguments:
            karbonClusterId: <YOUR-CLUSTER-ID>
      configbyname:
        fn::invoke:
          Function: nutanix:getKarbonClusterKubeConfig
          Arguments:
            karbonClusterName: <YOUR-CLUSTER-NAME>
    

    Using getKarbonClusterKubeConfig

    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 getKarbonClusterKubeConfig(args: GetKarbonClusterKubeConfigArgs, opts?: InvokeOptions): Promise<GetKarbonClusterKubeConfigResult>
    function getKarbonClusterKubeConfigOutput(args: GetKarbonClusterKubeConfigOutputArgs, opts?: InvokeOptions): Output<GetKarbonClusterKubeConfigResult>
    def get_karbon_cluster_kube_config(karbon_cluster_id: Optional[str] = None,
                                       karbon_cluster_name: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetKarbonClusterKubeConfigResult
    def get_karbon_cluster_kube_config_output(karbon_cluster_id: Optional[pulumi.Input[str]] = None,
                                       karbon_cluster_name: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetKarbonClusterKubeConfigResult]
    func GetKarbonClusterKubeConfig(ctx *Context, args *GetKarbonClusterKubeConfigArgs, opts ...InvokeOption) (*GetKarbonClusterKubeConfigResult, error)
    func GetKarbonClusterKubeConfigOutput(ctx *Context, args *GetKarbonClusterKubeConfigOutputArgs, opts ...InvokeOption) GetKarbonClusterKubeConfigResultOutput

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

    public static class GetKarbonClusterKubeConfig 
    {
        public static Task<GetKarbonClusterKubeConfigResult> InvokeAsync(GetKarbonClusterKubeConfigArgs args, InvokeOptions? opts = null)
        public static Output<GetKarbonClusterKubeConfigResult> Invoke(GetKarbonClusterKubeConfigInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKarbonClusterKubeConfigResult> getKarbonClusterKubeConfig(GetKarbonClusterKubeConfigArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: nutanix:index/getKarbonClusterKubeConfig:getKarbonClusterKubeConfig
      arguments:
        # arguments dictionary

    The following arguments are supported:

    KarbonClusterId string
    Represents karbon cluster uuid
    KarbonClusterName string
    Represents the name of karbon cluster
    KarbonClusterId string
    Represents karbon cluster uuid
    KarbonClusterName string
    Represents the name of karbon cluster
    karbonClusterId String
    Represents karbon cluster uuid
    karbonClusterName String
    Represents the name of karbon cluster
    karbonClusterId string
    Represents karbon cluster uuid
    karbonClusterName string
    Represents the name of karbon cluster
    karbon_cluster_id str
    Represents karbon cluster uuid
    karbon_cluster_name str
    Represents the name of karbon cluster
    karbonClusterId String
    Represents karbon cluster uuid
    karbonClusterName String
    Represents the name of karbon cluster

    getKarbonClusterKubeConfig Result

    The following output properties are available:

    AccessToken string
    ClusterCaCertificate string
    ClusterUrl string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    KarbonClusterId string
    KarbonClusterName string
    AccessToken string
    ClusterCaCertificate string
    ClusterUrl string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    KarbonClusterId string
    KarbonClusterName string
    accessToken String
    clusterCaCertificate String
    clusterUrl String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    karbonClusterId String
    karbonClusterName String
    accessToken string
    clusterCaCertificate string
    clusterUrl string
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    karbonClusterId string
    karbonClusterName string
    access_token str
    cluster_ca_certificate str
    cluster_url str
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    karbon_cluster_id str
    karbon_cluster_name str
    accessToken String
    clusterCaCertificate String
    clusterUrl String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    karbonClusterId String
    karbonClusterName String

    Package Details

    Repository
    nutanix pierskarsenbarg/pulumi-nutanix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nutanix Terraform Provider.
    nutanix logo
    Nutanix v0.5.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg