Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getKubernetesVersion

This data source provides the details of the Kubernetes version supported by ACK.

NOTE: Available in 1.170.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.CS.GetKubernetesVersion.InvokeAsync(new AliCloud.CS.GetKubernetesVersionArgs
        {
            ClusterType = "ManagedKubernetes",
            KubernetesVersion = "1.22.3-aliyun.1",
            Profile = "Default",
        }));
        this.Metadata = @default.Apply(@default => @default.Metadatas);
    }

    [Output("metadata")]
    public Output<string> Metadata { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := cs.GetKubernetesVersion(ctx, &cs.GetKubernetesVersionArgs{
			ClusterType:       "ManagedKubernetes",
			KubernetesVersion: pulumi.StringRef("1.22.3-aliyun.1"),
			Profile:           pulumi.StringRef("Default"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("metadata", _default.Metadatas)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cs.CsFunctions;
import com.pulumi.alicloud.cs.inputs.GetKubernetesVersionArgs;
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 default = CsFunctions.getKubernetesVersion(GetKubernetesVersionArgs.builder()
            .clusterType("ManagedKubernetes")
            .kubernetesVersion("1.22.3-aliyun.1")
            .profile("Default")
            .build());

        ctx.export("metadata", default_.metadatas());
    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.cs.get_kubernetes_version(cluster_type="ManagedKubernetes",
    kubernetes_version="1.22.3-aliyun.1",
    profile="Default")
pulumi.export("metadata", default.metadatas)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const default = alicloud.cs.getKubernetesVersion({
    clusterType: "ManagedKubernetes",
    kubernetesVersion: "1.22.3-aliyun.1",
    profile: "Default",
});
export const metadata = _default.then(_default => _default.metadatas);
variables:
  default:
    Fn::Invoke:
      Function: alicloud:cs:getKubernetesVersion
      Arguments:
        clusterType: ManagedKubernetes
        kubernetesVersion: 1.22.3-aliyun.1
        profile: Default
outputs:
  metadata: ${default.metadatas}
using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.CS.GetKubernetesVersion.InvokeAsync(new AliCloud.CS.GetKubernetesVersionArgs
        {
            ClusterType = "Kubernetes",
            KubernetesVersion = "1.22.3-aliyun.1",
            Profile = "Default",
        }));
        this.Metadata = @default.Apply(@default => @default.Metadatas);
    }

    [Output("metadata")]
    public Output<string> Metadata { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := cs.GetKubernetesVersion(ctx, &cs.GetKubernetesVersionArgs{
			ClusterType:       "Kubernetes",
			KubernetesVersion: pulumi.StringRef("1.22.3-aliyun.1"),
			Profile:           pulumi.StringRef("Default"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("metadata", _default.Metadatas)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cs.CsFunctions;
import com.pulumi.alicloud.cs.inputs.GetKubernetesVersionArgs;
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 default = CsFunctions.getKubernetesVersion(GetKubernetesVersionArgs.builder()
            .clusterType("Kubernetes")
            .kubernetesVersion("1.22.3-aliyun.1")
            .profile("Default")
            .build());

        ctx.export("metadata", default_.metadatas());
    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.cs.get_kubernetes_version(cluster_type="Kubernetes",
    kubernetes_version="1.22.3-aliyun.1",
    profile="Default")
pulumi.export("metadata", default.metadatas)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const default = alicloud.cs.getKubernetesVersion({
    clusterType: "Kubernetes",
    kubernetesVersion: "1.22.3-aliyun.1",
    profile: "Default",
});
export const metadata = _default.then(_default => _default.metadatas);
variables:
  default:
    Fn::Invoke:
      Function: alicloud:cs:getKubernetesVersion
      Arguments:
        clusterType: Kubernetes
        kubernetesVersion: 1.22.3-aliyun.1
        profile: Default
outputs:
  metadata: ${default.metadatas}
using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.CS.GetKubernetesVersion.InvokeAsync(new AliCloud.CS.GetKubernetesVersionArgs
        {
            ClusterType = "ManagedKubernetes",
            KubernetesVersion = "1.22.3-aliyun.1",
            Profile = "Serverless",
        }));
        this.Metadata = @default.Apply(@default => @default.Metadatas);
    }

    [Output("metadata")]
    public Output<string> Metadata { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := cs.GetKubernetesVersion(ctx, &cs.GetKubernetesVersionArgs{
			ClusterType:       "ManagedKubernetes",
			KubernetesVersion: pulumi.StringRef("1.22.3-aliyun.1"),
			Profile:           pulumi.StringRef("Serverless"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("metadata", _default.Metadatas)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cs.CsFunctions;
import com.pulumi.alicloud.cs.inputs.GetKubernetesVersionArgs;
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 default = CsFunctions.getKubernetesVersion(GetKubernetesVersionArgs.builder()
            .clusterType("ManagedKubernetes")
            .kubernetesVersion("1.22.3-aliyun.1")
            .profile("Serverless")
            .build());

        ctx.export("metadata", default_.metadatas());
    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.cs.get_kubernetes_version(cluster_type="ManagedKubernetes",
    kubernetes_version="1.22.3-aliyun.1",
    profile="Serverless")
pulumi.export("metadata", default.metadatas)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const default = alicloud.cs.getKubernetesVersion({
    clusterType: "ManagedKubernetes",
    kubernetesVersion: "1.22.3-aliyun.1",
    profile: "Serverless",
});
export const metadata = _default.then(_default => _default.metadatas);
variables:
  default:
    Fn::Invoke:
      Function: alicloud:cs:getKubernetesVersion
      Arguments:
        clusterType: ManagedKubernetes
        kubernetesVersion: 1.22.3-aliyun.1
        profile: Serverless
outputs:
  metadata: ${default.metadatas}
using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.CS.GetKubernetesVersion.InvokeAsync(new AliCloud.CS.GetKubernetesVersionArgs
        {
            ClusterType = "ManagedKubernetes",
            KubernetesVersion = "1.20.11-aliyunedge.1",
            Profile = "Edge",
        }));
        this.Metadata = @default.Apply(@default => @default.Metadatas);
    }

    [Output("metadata")]
    public Output<string> Metadata { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := cs.GetKubernetesVersion(ctx, &cs.GetKubernetesVersionArgs{
			ClusterType:       "ManagedKubernetes",
			KubernetesVersion: pulumi.StringRef("1.20.11-aliyunedge.1"),
			Profile:           pulumi.StringRef("Edge"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("metadata", _default.Metadatas)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cs.CsFunctions;
import com.pulumi.alicloud.cs.inputs.GetKubernetesVersionArgs;
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 default = CsFunctions.getKubernetesVersion(GetKubernetesVersionArgs.builder()
            .clusterType("ManagedKubernetes")
            .kubernetesVersion("1.20.11-aliyunedge.1")
            .profile("Edge")
            .build());

        ctx.export("metadata", default_.metadatas());
    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.cs.get_kubernetes_version(cluster_type="ManagedKubernetes",
    kubernetes_version="1.20.11-aliyunedge.1",
    profile="Edge")
pulumi.export("metadata", default.metadatas)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const default = alicloud.cs.getKubernetesVersion({
    clusterType: "ManagedKubernetes",
    kubernetesVersion: "1.20.11-aliyunedge.1",
    profile: "Edge",
});
export const metadata = _default.then(_default => _default.metadatas);
variables:
  default:
    Fn::Invoke:
      Function: alicloud:cs:getKubernetesVersion
      Arguments:
        clusterType: ManagedKubernetes
        kubernetesVersion: 1.20.11-aliyunedge.1
        profile: Edge
outputs:
  metadata: ${default.metadatas}

Using getKubernetesVersion

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 getKubernetesVersion(args: GetKubernetesVersionArgs, opts?: InvokeOptions): Promise<GetKubernetesVersionResult>
function getKubernetesVersionOutput(args: GetKubernetesVersionOutputArgs, opts?: InvokeOptions): Output<GetKubernetesVersionResult>
def get_kubernetes_version(cluster_type: Optional[str] = None,
                           kubernetes_version: Optional[str] = None,
                           profile: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetKubernetesVersionResult
def get_kubernetes_version_output(cluster_type: Optional[pulumi.Input[str]] = None,
                           kubernetes_version: Optional[pulumi.Input[str]] = None,
                           profile: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetKubernetesVersionResult]
func GetKubernetesVersion(ctx *Context, args *GetKubernetesVersionArgs, opts ...InvokeOption) (*GetKubernetesVersionResult, error)
func GetKubernetesVersionOutput(ctx *Context, args *GetKubernetesVersionOutputArgs, opts ...InvokeOption) GetKubernetesVersionResultOutput

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

public static class GetKubernetesVersion 
{
    public static Task<GetKubernetesVersionResult> InvokeAsync(GetKubernetesVersionArgs args, InvokeOptions? opts = null)
    public static Output<GetKubernetesVersionResult> Invoke(GetKubernetesVersionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetKubernetesVersionResult> getKubernetesVersion(GetKubernetesVersionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:cs/getKubernetesVersion:getKubernetesVersion
  arguments:
    # arguments dictionary

The following arguments are supported:

ClusterType string

The type of cluster. Its valid value are Kubernetes and ManagedKubernetes.

KubernetesVersion string

The ACK released kubernetes version.

Profile string

The profile of cluster. Its valid value are Default, Serverless and Edge.

ClusterType string

The type of cluster. Its valid value are Kubernetes and ManagedKubernetes.

KubernetesVersion string

The ACK released kubernetes version.

Profile string

The profile of cluster. Its valid value are Default, Serverless and Edge.

clusterType String

The type of cluster. Its valid value are Kubernetes and ManagedKubernetes.

kubernetesVersion String

The ACK released kubernetes version.

profile String

The profile of cluster. Its valid value are Default, Serverless and Edge.

clusterType string

The type of cluster. Its valid value are Kubernetes and ManagedKubernetes.

kubernetesVersion string

The ACK released kubernetes version.

profile string

The profile of cluster. Its valid value are Default, Serverless and Edge.

cluster_type str

The type of cluster. Its valid value are Kubernetes and ManagedKubernetes.

kubernetes_version str

The ACK released kubernetes version.

profile str

The profile of cluster. Its valid value are Default, Serverless and Edge.

clusterType String

The type of cluster. Its valid value are Kubernetes and ManagedKubernetes.

kubernetesVersion String

The ACK released kubernetes version.

profile String

The profile of cluster. Its valid value are Default, Serverless and Edge.

getKubernetesVersion Result

The following output properties are available:

ClusterType string
Id string

The provider-assigned unique ID for this managed resource.

Metadatas List<Pulumi.AliCloud.CS.Outputs.GetKubernetesVersionMetadata>

A list of metadata of kubernetes version.

KubernetesVersion string
Profile string
ClusterType string
Id string

The provider-assigned unique ID for this managed resource.

Metadatas []GetKubernetesVersionMetadata

A list of metadata of kubernetes version.

KubernetesVersion string
Profile string
clusterType String
id String

The provider-assigned unique ID for this managed resource.

metadatas List<GetKubernetesVersionMetadata>

A list of metadata of kubernetes version.

kubernetesVersion String
profile String
clusterType string
id string

The provider-assigned unique ID for this managed resource.

metadatas GetKubernetesVersionMetadata[]

A list of metadata of kubernetes version.

kubernetesVersion string
profile string
cluster_type str
id str

The provider-assigned unique ID for this managed resource.

metadatas Sequence[GetKubernetesVersionMetadata]

A list of metadata of kubernetes version.

kubernetes_version str
profile str
clusterType String
id String

The provider-assigned unique ID for this managed resource.

metadatas List<Property Map>

A list of metadata of kubernetes version.

kubernetesVersion String
profile String

Supporting Types

GetKubernetesVersionMetadata

Runtimes List<Pulumi.AliCloud.CS.Inputs.GetKubernetesVersionMetadataRuntime>

The list of supported runtime.

Version string

The runtime version.

Runtimes []GetKubernetesVersionMetadataRuntime

The list of supported runtime.

Version string

The runtime version.

runtimes List<GetKubernetesVersionMetadataRuntime>

The list of supported runtime.

version String

The runtime version.

runtimes GetKubernetesVersionMetadataRuntime[]

The list of supported runtime.

version string

The runtime version.

runtimes Sequence[GetKubernetesVersionMetadataRuntime]

The list of supported runtime.

version str

The runtime version.

runtimes List<Property Map>

The list of supported runtime.

version String

The runtime version.

GetKubernetesVersionMetadataRuntime

Name string

The runtime name.

Version string

The runtime version.

Name string

The runtime name.

Version string

The runtime version.

name String

The runtime name.

version String

The runtime version.

name string

The runtime name.

version string

The runtime version.

name str

The runtime name.

version str

The runtime version.

name String

The runtime name.

version String

The runtime version.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.