Alibaba Cloud

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

getSaslAcls

This data source provides a list of ALIKAFKA Sasl acls in an Alibaba Cloud account according to the specified filters.

NOTE: Available in 1.66.0+

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var saslAclsDs = Output.Create(AliCloud.ActionTrail.GetSaslAcls.InvokeAsync(new AliCloud.ActionTrail.GetSaslAclsArgs
        {
            AclResourceName = "testTopic",
            AclResourceType = "Topic",
            InstanceId = "xxx",
            OutputFile = "saslAcls.txt",
            Username = "username",
        }));
        this.FirstSaslAclUsername = saslAclsDs.Apply(saslAclsDs => saslAclsDs.Acls?[0]?.Username);
    }

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

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		saslAclsDs, err := actiontrail.GetSaslAcls(ctx, &actiontrail.GetSaslAclsArgs{
			AclResourceName: "testTopic",
			AclResourceType: "Topic",
			InstanceId:      "xxx",
			OutputFile:      pulumi.StringRef("saslAcls.txt"),
			Username:        "username",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstSaslAclUsername", saslAclsDs.Acls[0].Username)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.actiontrail.ActiontrailFunctions;
import com.pulumi.alicloud.actiontrail.inputs.GetSaslAclsArgs;
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 saslAclsDs = ActiontrailFunctions.getSaslAcls(GetSaslAclsArgs.builder()
            .aclResourceName("testTopic")
            .aclResourceType("Topic")
            .instanceId("xxx")
            .outputFile("saslAcls.txt")
            .username("username")
            .build());

        ctx.export("firstSaslAclUsername", saslAclsDs.applyValue(getSaslAclsResult -> getSaslAclsResult.acls()[0].username()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

sasl_acls_ds = alicloud.actiontrail.get_sasl_acls(acl_resource_name="testTopic",
    acl_resource_type="Topic",
    instance_id="xxx",
    output_file="saslAcls.txt",
    username="username")
pulumi.export("firstSaslAclUsername", sasl_acls_ds.acls[0].username)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const saslAclsDs = pulumi.output(alicloud.actiontrail.getSaslAcls({
    aclResourceName: "testTopic",
    aclResourceType: "Topic",
    instanceId: "xxx",
    outputFile: "saslAcls.txt",
    username: "username",
}));

export const firstSaslAclUsername = saslAclsDs.acls[0].username;
variables:
  saslAclsDs:
    Fn::Invoke:
      Function: alicloud:actiontrail:getSaslAcls
      Arguments:
        aclResourceName: testTopic
        aclResourceType: Topic
        instanceId: xxx
        outputFile: saslAcls.txt
        username: username
outputs:
  firstSaslAclUsername: ${saslAclsDs.acls[0].username}

Using getSaslAcls

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 getSaslAcls(args: GetSaslAclsArgs, opts?: InvokeOptions): Promise<GetSaslAclsResult>
function getSaslAclsOutput(args: GetSaslAclsOutputArgs, opts?: InvokeOptions): Output<GetSaslAclsResult>
def get_sasl_acls(acl_resource_name: Optional[str] = None,
                  acl_resource_type: Optional[str] = None,
                  instance_id: Optional[str] = None,
                  output_file: Optional[str] = None,
                  username: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetSaslAclsResult
def get_sasl_acls_output(acl_resource_name: Optional[pulumi.Input[str]] = None,
                  acl_resource_type: Optional[pulumi.Input[str]] = None,
                  instance_id: Optional[pulumi.Input[str]] = None,
                  output_file: Optional[pulumi.Input[str]] = None,
                  username: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetSaslAclsResult]
func GetSaslAcls(ctx *Context, args *GetSaslAclsArgs, opts ...InvokeOption) (*GetSaslAclsResult, error)
func GetSaslAclsOutput(ctx *Context, args *GetSaslAclsOutputArgs, opts ...InvokeOption) GetSaslAclsResultOutput

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

public static class GetSaslAcls 
{
    public static Task<GetSaslAclsResult> InvokeAsync(GetSaslAclsArgs args, InvokeOptions? opts = null)
    public static Output<GetSaslAclsResult> Invoke(GetSaslAclsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSaslAclsResult> getSaslAcls(GetSaslAclsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:actiontrail/getSaslAcls:getSaslAcls
  Arguments:
    # Arguments dictionary

The following arguments are supported:

AclResourceName string

Get results for the specified resource name.

AclResourceType string

Get results for the specified resource type.

InstanceId string

ID of the ALIKAFKA Instance that owns the sasl acls.

Username string

Get results for the specified username.

OutputFile string
AclResourceName string

Get results for the specified resource name.

AclResourceType string

Get results for the specified resource type.

InstanceId string

ID of the ALIKAFKA Instance that owns the sasl acls.

Username string

Get results for the specified username.

OutputFile string
aclResourceName String

Get results for the specified resource name.

aclResourceType String

Get results for the specified resource type.

instanceId String

ID of the ALIKAFKA Instance that owns the sasl acls.

username String

Get results for the specified username.

outputFile String
aclResourceName string

Get results for the specified resource name.

aclResourceType string

Get results for the specified resource type.

instanceId string

ID of the ALIKAFKA Instance that owns the sasl acls.

username string

Get results for the specified username.

outputFile string
acl_resource_name str

Get results for the specified resource name.

acl_resource_type str

Get results for the specified resource type.

instance_id str

ID of the ALIKAFKA Instance that owns the sasl acls.

username str

Get results for the specified username.

output_file str
aclResourceName String

Get results for the specified resource name.

aclResourceType String

Get results for the specified resource type.

instanceId String

ID of the ALIKAFKA Instance that owns the sasl acls.

username String

Get results for the specified username.

outputFile String

getSaslAcls Result

The following output properties are available:

AclResourceName string

The resource name of the sasl acl.

AclResourceType string

The resource type of the sasl acl.

Acls List<Pulumi.AliCloud.ActionTrail.Outputs.GetSaslAclsAcl>

A list of sasl acls. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

InstanceId string
Username string

The username of the sasl acl.

OutputFile string
AclResourceName string

The resource name of the sasl acl.

AclResourceType string

The resource type of the sasl acl.

Acls []GetSaslAclsAcl

A list of sasl acls. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

InstanceId string
Username string

The username of the sasl acl.

OutputFile string
aclResourceName String

The resource name of the sasl acl.

aclResourceType String

The resource type of the sasl acl.

acls List<GetSaslAclsAcl>

A list of sasl acls. Each element contains the following attributes:

id String

The provider-assigned unique ID for this managed resource.

instanceId String
username String

The username of the sasl acl.

outputFile String
aclResourceName string

The resource name of the sasl acl.

aclResourceType string

The resource type of the sasl acl.

acls GetSaslAclsAcl[]

A list of sasl acls. Each element contains the following attributes:

id string

The provider-assigned unique ID for this managed resource.

instanceId string
username string

The username of the sasl acl.

outputFile string
acl_resource_name str

The resource name of the sasl acl.

acl_resource_type str

The resource type of the sasl acl.

acls Sequence[GetSaslAclsAcl]

A list of sasl acls. Each element contains the following attributes:

id str

The provider-assigned unique ID for this managed resource.

instance_id str
username str

The username of the sasl acl.

output_file str
aclResourceName String

The resource name of the sasl acl.

aclResourceType String

The resource type of the sasl acl.

acls List<Property Map>

A list of sasl acls. Each element contains the following attributes:

id String

The provider-assigned unique ID for this managed resource.

instanceId String
username String

The username of the sasl acl.

outputFile String

Supporting Types

GetSaslAclsAcl

AclOperationType string

The operation type of the sasl acl.

AclResourceName string

Get results for the specified resource name.

AclResourcePatternType string

The resource pattern type of the sasl acl.

AclResourceType string

Get results for the specified resource type.

Host string

The host of the sasl acl.

Username string

Get results for the specified username.

AclOperationType string

The operation type of the sasl acl.

AclResourceName string

Get results for the specified resource name.

AclResourcePatternType string

The resource pattern type of the sasl acl.

AclResourceType string

Get results for the specified resource type.

Host string

The host of the sasl acl.

Username string

Get results for the specified username.

aclOperationType String

The operation type of the sasl acl.

aclResourceName String

Get results for the specified resource name.

aclResourcePatternType String

The resource pattern type of the sasl acl.

aclResourceType String

Get results for the specified resource type.

host String

The host of the sasl acl.

username String

Get results for the specified username.

aclOperationType string

The operation type of the sasl acl.

aclResourceName string

Get results for the specified resource name.

aclResourcePatternType string

The resource pattern type of the sasl acl.

aclResourceType string

Get results for the specified resource type.

host string

The host of the sasl acl.

username string

Get results for the specified username.

acl_operation_type str

The operation type of the sasl acl.

acl_resource_name str

Get results for the specified resource name.

acl_resource_pattern_type str

The resource pattern type of the sasl acl.

acl_resource_type str

Get results for the specified resource type.

host str

The host of the sasl acl.

username str

Get results for the specified username.

aclOperationType String

The operation type of the sasl acl.

aclResourceName String

Get results for the specified resource name.

aclResourcePatternType String

The resource pattern type of the sasl acl.

aclResourceType String

Get results for the specified resource type.

host String

The host of the sasl acl.

username String

Get results for the specified username.

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.