1. Packages
  2. Juju Provider
  3. API Docs
  4. getJaasRole
juju 0.19.0 published on Wednesday, Apr 30, 2025 by juju

juju.getJaasRole

Explore with Pulumi AI

juju logo
juju 0.19.0 published on Wednesday, Apr 30, 2025 by juju

    A data source representing a Juju JAAS Role.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as juju from "@pulumi/juju";
    
    const test = juju.getJaasRole({
        name: "role-0",
    });
    export const roleUuid = test.then(test => test.uuid);
    
    import pulumi
    import pulumi_juju as juju
    
    test = juju.get_jaas_role(name="role-0")
    pulumi.export("roleUuid", test.uuid)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/juju/juju"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		test, err := juju.LookupJaasRole(ctx, &juju.LookupJaasRoleArgs{
    			Name: "role-0",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("roleUuid", test.Uuid)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Juju = Pulumi.Juju;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Juju.GetJaasRole.Invoke(new()
        {
            Name = "role-0",
        });
    
        return new Dictionary<string, object?>
        {
            ["roleUuid"] = test.Apply(getJaasRoleResult => getJaasRoleResult.Uuid),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.juju.JujuFunctions;
    import com.pulumi.juju.inputs.GetJaasRoleArgs;
    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 test = JujuFunctions.getJaasRole(GetJaasRoleArgs.builder()
                .name("role-0")
                .build());
    
            ctx.export("roleUuid", test.applyValue(getJaasRoleResult -> getJaasRoleResult.uuid()));
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: juju:getJaasRole
          arguments:
            name: role-0
    outputs:
      roleUuid: ${test.uuid}
    

    Using getJaasRole

    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 getJaasRole(args: GetJaasRoleArgs, opts?: InvokeOptions): Promise<GetJaasRoleResult>
    function getJaasRoleOutput(args: GetJaasRoleOutputArgs, opts?: InvokeOptions): Output<GetJaasRoleResult>
    def get_jaas_role(name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetJaasRoleResult
    def get_jaas_role_output(name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetJaasRoleResult]
    func LookupJaasRole(ctx *Context, args *LookupJaasRoleArgs, opts ...InvokeOption) (*LookupJaasRoleResult, error)
    func LookupJaasRoleOutput(ctx *Context, args *LookupJaasRoleOutputArgs, opts ...InvokeOption) LookupJaasRoleResultOutput

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

    public static class GetJaasRole 
    {
        public static Task<GetJaasRoleResult> InvokeAsync(GetJaasRoleArgs args, InvokeOptions? opts = null)
        public static Output<GetJaasRoleResult> Invoke(GetJaasRoleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetJaasRoleResult> getJaasRole(GetJaasRoleArgs args, InvokeOptions options)
    public static Output<GetJaasRoleResult> getJaasRole(GetJaasRoleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: juju:index/getJaasRole:getJaasRole
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the role.
    Name string
    The name of the role.
    name String
    The name of the role.
    name string
    The name of the role.
    name str
    The name of the role.
    name String
    The name of the role.

    getJaasRole Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the role.
    Uuid string
    The UUID of the role. The UUID is used to reference roles in other resources.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the role.
    Uuid string
    The UUID of the role. The UUID is used to reference roles in other resources.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the role.
    uuid String
    The UUID of the role. The UUID is used to reference roles in other resources.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the role.
    uuid string
    The UUID of the role. The UUID is used to reference roles in other resources.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the role.
    uuid str
    The UUID of the role. The UUID is used to reference roles in other resources.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the role.
    uuid String
    The UUID of the role. The UUID is used to reference roles in other resources.

    Package Details

    Repository
    juju juju/terraform-provider-juju
    License
    Notes
    This Pulumi package is based on the juju Terraform Provider.
    juju logo
    juju 0.19.0 published on Wednesday, Apr 30, 2025 by juju