Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.actiontrail.getSaslAcls
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const saslAclsDs = alicloud.actiontrail.getSaslAcls({
    instanceId: "xxx",
    username: "username",
    aclResourceType: "Topic",
    aclResourceName: "testTopic",
    outputFile: "saslAcls.txt",
});
export const firstSaslAclUsername = saslAclsDs.then(saslAclsDs => saslAclsDs.acls?.[0]?.username);
import pulumi
import pulumi_alicloud as alicloud
sasl_acls_ds = alicloud.actiontrail.get_sasl_acls(instance_id="xxx",
    username="username",
    acl_resource_type="Topic",
    acl_resource_name="testTopic",
    output_file="saslAcls.txt")
pulumi.export("firstSaslAclUsername", sasl_acls_ds.acls[0].username)
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{
			InstanceId:      "xxx",
			Username:        "username",
			AclResourceType: "Topic",
			AclResourceName: "testTopic",
			OutputFile:      pulumi.StringRef("saslAcls.txt"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstSaslAclUsername", saslAclsDs.Acls[0].Username)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var saslAclsDs = AliCloud.ActionTrail.GetSaslAcls.Invoke(new()
    {
        InstanceId = "xxx",
        Username = "username",
        AclResourceType = "Topic",
        AclResourceName = "testTopic",
        OutputFile = "saslAcls.txt",
    });
    return new Dictionary<string, object?>
    {
        ["firstSaslAclUsername"] = saslAclsDs.Apply(getSaslAclsResult => getSaslAclsResult.Acls[0]?.Username),
    };
});
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()
            .instanceId("xxx")
            .username("username")
            .aclResourceType("Topic")
            .aclResourceName("testTopic")
            .outputFile("saslAcls.txt")
            .build());
        ctx.export("firstSaslAclUsername", saslAclsDs.applyValue(getSaslAclsResult -> getSaslAclsResult.acls()[0].username()));
    }
}
variables:
  saslAclsDs:
    fn::invoke:
      Function: alicloud:actiontrail:getSaslAcls
      Arguments:
        instanceId: xxx
        username: username
        aclResourceType: Topic
        aclResourceName: testTopic
        outputFile: saslAcls.txt
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 dictionaryThe following arguments are supported:
- Acl
Resource stringName  - Get results for the specified resource name.
 - Acl
Resource stringType  - Get results for the specified resource type.
 - Instance
Id string - ID of the ALIKAFKA Instance that owns the sasl acls.
 - Username string
 - Get results for the specified username.
 - Output
File string - File name where to save data source results (after running 
pulumi preview). 
- Acl
Resource stringName  - Get results for the specified resource name.
 - Acl
Resource stringType  - Get results for the specified resource type.
 - Instance
Id string - ID of the ALIKAFKA Instance that owns the sasl acls.
 - Username string
 - Get results for the specified username.
 - Output
File string - File name where to save data source results (after running 
pulumi preview). 
- acl
Resource StringName  - Get results for the specified resource name.
 - acl
Resource StringType  - Get results for the specified resource type.
 - instance
Id String - ID of the ALIKAFKA Instance that owns the sasl acls.
 - username String
 - Get results for the specified username.
 - output
File String - File name where to save data source results (after running 
pulumi preview). 
- acl
Resource stringName  - Get results for the specified resource name.
 - acl
Resource stringType  - Get results for the specified resource type.
 - instance
Id string - ID of the ALIKAFKA Instance that owns the sasl acls.
 - username string
 - Get results for the specified username.
 - output
File string - File name where to save data source results (after running 
pulumi preview). 
- acl_
resource_ strname  - Get results for the specified resource name.
 - acl_
resource_ strtype  - 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 - File name where to save data source results (after running 
pulumi preview). 
- acl
Resource StringName  - Get results for the specified resource name.
 - acl
Resource StringType  - Get results for the specified resource type.
 - instance
Id String - ID of the ALIKAFKA Instance that owns the sasl acls.
 - username String
 - Get results for the specified username.
 - output
File String - File name where to save data source results (after running 
pulumi preview). 
getSaslAcls Result
The following output properties are available:
- Acl
Resource stringName  - The resource name of the sasl acl.
 - Acl
Resource stringType  - The resource type of the sasl acl.
 - Acls
List<Pulumi.
Ali Cloud. Action Trail. Outputs. Get Sasl Acls Acl>  - A list of sasl acls. Each element contains the following attributes:
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Instance
Id string - Username string
 - The username of the sasl acl.
 - Output
File string 
- Acl
Resource stringName  - The resource name of the sasl acl.
 - Acl
Resource stringType  - The resource type of the sasl acl.
 - Acls
[]Get
Sasl Acls Acl  - A list of sasl acls. Each element contains the following attributes:
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Instance
Id string - Username string
 - The username of the sasl acl.
 - Output
File string 
- acl
Resource StringName  - The resource name of the sasl acl.
 - acl
Resource StringType  - The resource type of the sasl acl.
 - acls
List<Get
Sasl Acls Acl>  - A list of sasl acls. Each element contains the following attributes:
 - id String
 - The provider-assigned unique ID for this managed resource.
 - instance
Id String - username String
 - The username of the sasl acl.
 - output
File String 
- acl
Resource stringName  - The resource name of the sasl acl.
 - acl
Resource stringType  - The resource type of the sasl acl.
 - acls
Get
Sasl Acls Acl[]  - A list of sasl acls. Each element contains the following attributes:
 - id string
 - The provider-assigned unique ID for this managed resource.
 - instance
Id string - username string
 - The username of the sasl acl.
 - output
File string 
- acl_
resource_ strname  - The resource name of the sasl acl.
 - acl_
resource_ strtype  - The resource type of the sasl acl.
 - acls
Sequence[Get
Sasl Acls Acl]  - 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 
- acl
Resource StringName  - The resource name of the sasl acl.
 - acl
Resource StringType  - 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.
 - instance
Id String - username String
 - The username of the sasl acl.
 - output
File String 
Supporting Types
GetSaslAclsAcl   
- Acl
Operation stringType  - The operation type of the sasl acl.
 - Acl
Resource stringName  - Get results for the specified resource name.
 - Acl
Resource stringPattern Type  - The resource pattern type of the sasl acl.
 - Acl
Resource stringType  - 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 stringType  - The operation type of the sasl acl.
 - Acl
Resource stringName  - Get results for the specified resource name.
 - Acl
Resource stringPattern Type  - The resource pattern type of the sasl acl.
 - Acl
Resource stringType  - 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 StringType  - The operation type of the sasl acl.
 - acl
Resource StringName  - Get results for the specified resource name.
 - acl
Resource StringPattern Type  - The resource pattern type of the sasl acl.
 - acl
Resource StringType  - 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 stringType  - The operation type of the sasl acl.
 - acl
Resource stringName  - Get results for the specified resource name.
 - acl
Resource stringPattern Type  - The resource pattern type of the sasl acl.
 - acl
Resource stringType  - 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_ strtype  - The operation type of the sasl acl.
 - acl_
resource_ strname  - Get results for the specified resource name.
 - acl_
resource_ strpattern_ type  - The resource pattern type of the sasl acl.
 - acl_
resource_ strtype  - Get results for the specified resource type.
 - host str
 - The host of the sasl acl.
 - username str
 - Get results for the specified username.
 
- acl
Operation StringType  - The operation type of the sasl acl.
 - acl
Resource StringName  - Get results for the specified resource name.
 - acl
Resource StringPattern Type  - The resource pattern type of the sasl acl.
 - acl
Resource StringType  - 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
 - Alibaba Cloud pulumi/pulumi-alicloud
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
alicloudTerraform Provider.