1. Packages
  2. AWS
  3. API Docs
  4. msk
  5. getKafkaVersion
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.msk.getKafkaVersion

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Get information on a Amazon MSK Kafka Version

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const preferred = aws.msk.getKafkaVersion({
        preferredVersions: [
            "2.4.1.1",
            "2.4.1",
            "2.2.1",
        ],
    });
    const example = aws.msk.getKafkaVersion({
        version: "2.8.0",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    preferred = aws.msk.get_kafka_version(preferred_versions=[
        "2.4.1.1",
        "2.4.1",
        "2.2.1",
    ])
    example = aws.msk.get_kafka_version(version="2.8.0")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/msk"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := msk.GetKafkaVersion(ctx, &msk.GetKafkaVersionArgs{
    			PreferredVersions: []string{
    				"2.4.1.1",
    				"2.4.1",
    				"2.2.1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = msk.GetKafkaVersion(ctx, &msk.GetKafkaVersionArgs{
    			Version: pulumi.StringRef("2.8.0"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var preferred = Aws.Msk.GetKafkaVersion.Invoke(new()
        {
            PreferredVersions = new[]
            {
                "2.4.1.1",
                "2.4.1",
                "2.2.1",
            },
        });
    
        var example = Aws.Msk.GetKafkaVersion.Invoke(new()
        {
            Version = "2.8.0",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.msk.MskFunctions;
    import com.pulumi.aws.msk.inputs.GetKafkaVersionArgs;
    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 preferred = MskFunctions.getKafkaVersion(GetKafkaVersionArgs.builder()
                .preferredVersions(            
                    "2.4.1.1",
                    "2.4.1",
                    "2.2.1")
                .build());
    
            final var example = MskFunctions.getKafkaVersion(GetKafkaVersionArgs.builder()
                .version("2.8.0")
                .build());
    
        }
    }
    
    variables:
      preferred:
        fn::invoke:
          Function: aws:msk:getKafkaVersion
          Arguments:
            preferredVersions:
              - 2.4.1.1
              - 2.4.1
              - 2.2.1
      example:
        fn::invoke:
          Function: aws:msk:getKafkaVersion
          Arguments:
            version: 2.8.0
    

    Using getKafkaVersion

    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 getKafkaVersion(args: GetKafkaVersionArgs, opts?: InvokeOptions): Promise<GetKafkaVersionResult>
    function getKafkaVersionOutput(args: GetKafkaVersionOutputArgs, opts?: InvokeOptions): Output<GetKafkaVersionResult>
    def get_kafka_version(preferred_versions: Optional[Sequence[str]] = None,
                          version: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetKafkaVersionResult
    def get_kafka_version_output(preferred_versions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                          version: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetKafkaVersionResult]
    func GetKafkaVersion(ctx *Context, args *GetKafkaVersionArgs, opts ...InvokeOption) (*GetKafkaVersionResult, error)
    func GetKafkaVersionOutput(ctx *Context, args *GetKafkaVersionOutputArgs, opts ...InvokeOption) GetKafkaVersionResultOutput

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

    public static class GetKafkaVersion 
    {
        public static Task<GetKafkaVersionResult> InvokeAsync(GetKafkaVersionArgs args, InvokeOptions? opts = null)
        public static Output<GetKafkaVersionResult> Invoke(GetKafkaVersionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKafkaVersionResult> getKafkaVersion(GetKafkaVersionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:msk/getKafkaVersion:getKafkaVersion
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PreferredVersions List<string>
    Ordered list of preferred Kafka versions. The first match in this list will be returned. Either preferred_versions or version must be set.
    Version string
    Version of MSK Kafka. For example 2.4.1.1 or "2.2.1" etc. Either preferred_versions or version must be set.
    PreferredVersions []string
    Ordered list of preferred Kafka versions. The first match in this list will be returned. Either preferred_versions or version must be set.
    Version string
    Version of MSK Kafka. For example 2.4.1.1 or "2.2.1" etc. Either preferred_versions or version must be set.
    preferredVersions List<String>
    Ordered list of preferred Kafka versions. The first match in this list will be returned. Either preferred_versions or version must be set.
    version String
    Version of MSK Kafka. For example 2.4.1.1 or "2.2.1" etc. Either preferred_versions or version must be set.
    preferredVersions string[]
    Ordered list of preferred Kafka versions. The first match in this list will be returned. Either preferred_versions or version must be set.
    version string
    Version of MSK Kafka. For example 2.4.1.1 or "2.2.1" etc. Either preferred_versions or version must be set.
    preferred_versions Sequence[str]
    Ordered list of preferred Kafka versions. The first match in this list will be returned. Either preferred_versions or version must be set.
    version str
    Version of MSK Kafka. For example 2.4.1.1 or "2.2.1" etc. Either preferred_versions or version must be set.
    preferredVersions List<String>
    Ordered list of preferred Kafka versions. The first match in this list will be returned. Either preferred_versions or version must be set.
    version String
    Version of MSK Kafka. For example 2.4.1.1 or "2.2.1" etc. Either preferred_versions or version must be set.

    getKafkaVersion Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Status of the MSK Kafka version eg. ACTIVE or DEPRECATED.
    Version string
    PreferredVersions List<string>
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Status of the MSK Kafka version eg. ACTIVE or DEPRECATED.
    Version string
    PreferredVersions []string
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Status of the MSK Kafka version eg. ACTIVE or DEPRECATED.
    version String
    preferredVersions List<String>
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Status of the MSK Kafka version eg. ACTIVE or DEPRECATED.
    version string
    preferredVersions string[]
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Status of the MSK Kafka version eg. ACTIVE or DEPRECATED.
    version str
    preferred_versions Sequence[str]
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Status of the MSK Kafka version eg. ACTIVE or DEPRECATED.
    version String
    preferredVersions List<String>

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi