AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi
aws.msk.getKafkaVersion
Explore with Pulumi AI
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:
- Preferred
Versions List<string> - Ordered list of preferred Kafka versions. The first match in this list will be returned. Either
preferred_versions
orversion
must be set. - Version string
- Version of MSK Kafka. For example 2.4.1.1 or "2.2.1" etc. Either
preferred_versions
orversion
must be set.
- Preferred
Versions []string - Ordered list of preferred Kafka versions. The first match in this list will be returned. Either
preferred_versions
orversion
must be set. - Version string
- Version of MSK Kafka. For example 2.4.1.1 or "2.2.1" etc. Either
preferred_versions
orversion
must be set.
- preferred
Versions List<String> - Ordered list of preferred Kafka versions. The first match in this list will be returned. Either
preferred_versions
orversion
must be set. - version String
- Version of MSK Kafka. For example 2.4.1.1 or "2.2.1" etc. Either
preferred_versions
orversion
must be set.
- preferred
Versions string[] - Ordered list of preferred Kafka versions. The first match in this list will be returned. Either
preferred_versions
orversion
must be set. - version string
- Version of MSK Kafka. For example 2.4.1.1 or "2.2.1" etc. Either
preferred_versions
orversion
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
orversion
must be set. - version str
- Version of MSK Kafka. For example 2.4.1.1 or "2.2.1" etc. Either
preferred_versions
orversion
must be set.
- preferred
Versions List<String> - Ordered list of preferred Kafka versions. The first match in this list will be returned. Either
preferred_versions
orversion
must be set. - version String
- Version of MSK Kafka. For example 2.4.1.1 or "2.2.1" etc. Either
preferred_versions
orversion
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
orDEPRECATED
. - Version string
- Preferred
Versions List<string>
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Status of the MSK Kafka version eg.
ACTIVE
orDEPRECATED
. - Version string
- Preferred
Versions []string
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Status of the MSK Kafka version eg.
ACTIVE
orDEPRECATED
. - version String
- preferred
Versions List<String>
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- Status of the MSK Kafka version eg.
ACTIVE
orDEPRECATED
. - version string
- preferred
Versions string[]
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- Status of the MSK Kafka version eg.
ACTIVE
orDEPRECATED
. - 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
orDEPRECATED
. - version String
- preferred
Versions 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.