1. Packages
  2. Hsdp Provider
  3. API Docs
  4. getIamRole
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

hsdp.getIamRole

Explore with Pulumi AI

hsdp logo
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

    Retrieve details of an existing role

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hsdp from "@pulumi/hsdp";
    
    const someRole = hsdp.getIamRole({
        managingOrganizationId: _var.org_id,
        name: "GROUP NAME",
    });
    
    import pulumi
    import pulumi_hsdp as hsdp
    
    some_role = hsdp.get_iam_role(managing_organization_id=var["org_id"],
        name="GROUP NAME")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hsdp/hsdp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := hsdp.LookupIamRole(ctx, &hsdp.LookupIamRoleArgs{
    			ManagingOrganizationId: _var.Org_id,
    			Name:                   "GROUP NAME",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Hsdp = Pulumi.Hsdp;
    
    return await Deployment.RunAsync(() => 
    {
        var someRole = Hsdp.GetIamRole.Invoke(new()
        {
            ManagingOrganizationId = @var.Org_id,
            Name = "GROUP NAME",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hsdp.HsdpFunctions;
    import com.pulumi.hsdp.inputs.GetIamRoleArgs;
    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 someRole = HsdpFunctions.getIamRole(GetIamRoleArgs.builder()
                .managingOrganizationId(var_.org_id())
                .name("GROUP NAME")
                .build());
    
        }
    }
    
    variables:
      someRole:
        fn::invoke:
          function: hsdp:getIamRole
          arguments:
            managingOrganizationId: ${var.org_id}
            name: GROUP NAME
    
    import * as pulumi from "@pulumi/pulumi";
    
    export const roleGuid = data.hsdp_iam_role.id;
    
    import pulumi
    
    pulumi.export("roleGuid", data["hsdp_iam_role"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ctx.Export("roleGuid", data.Hsdp_iam_role.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        return new Dictionary<string, object?>
        {
            ["roleGuid"] = data.Hsdp_iam_role.Id,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
            ctx.export("roleGuid", data.hsdp_iam_role().id());
        }
    }
    
    outputs:
      roleGuid: ${data.hsdp_iam_role.id}
    

    Using getIamRole

    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 getIamRole(args: GetIamRoleArgs, opts?: InvokeOptions): Promise<GetIamRoleResult>
    function getIamRoleOutput(args: GetIamRoleOutputArgs, opts?: InvokeOptions): Output<GetIamRoleResult>
    def get_iam_role(id: Optional[str] = None,
                     managing_organization_id: Optional[str] = None,
                     name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetIamRoleResult
    def get_iam_role_output(id: Optional[pulumi.Input[str]] = None,
                     managing_organization_id: Optional[pulumi.Input[str]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetIamRoleResult]
    func LookupIamRole(ctx *Context, args *LookupIamRoleArgs, opts ...InvokeOption) (*LookupIamRoleResult, error)
    func LookupIamRoleOutput(ctx *Context, args *LookupIamRoleOutputArgs, opts ...InvokeOption) LookupIamRoleResultOutput

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

    public static class GetIamRole 
    {
        public static Task<GetIamRoleResult> InvokeAsync(GetIamRoleArgs args, InvokeOptions? opts = null)
        public static Output<GetIamRoleResult> Invoke(GetIamRoleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIamRoleResult> getIamRole(GetIamRoleArgs args, InvokeOptions options)
    public static Output<GetIamRoleResult> getIamRole(GetIamRoleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: hsdp:index/getIamRole:getIamRole
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ManagingOrganizationId string
    the UUID of the managing organization of the role
    Name string
    The name of the role to look up
    Id string
    The group GUID
    ManagingOrganizationId string
    the UUID of the managing organization of the role
    Name string
    The name of the role to look up
    Id string
    The group GUID
    managingOrganizationId String
    the UUID of the managing organization of the role
    name String
    The name of the role to look up
    id String
    The group GUID
    managingOrganizationId string
    the UUID of the managing organization of the role
    name string
    The name of the role to look up
    id string
    The group GUID
    managing_organization_id str
    the UUID of the managing organization of the role
    name str
    The name of the role to look up
    id str
    The group GUID
    managingOrganizationId String
    the UUID of the managing organization of the role
    name String
    The name of the role to look up
    id String
    The group GUID

    getIamRole Result

    The following output properties are available:

    Description string
    The description of the group
    Id string
    The group GUID
    ManagingOrganizationId string
    Name string
    Description string
    The description of the group
    Id string
    The group GUID
    ManagingOrganizationId string
    Name string
    description String
    The description of the group
    id String
    The group GUID
    managingOrganizationId String
    name String
    description string
    The description of the group
    id string
    The group GUID
    managingOrganizationId string
    name string
    description str
    The description of the group
    id str
    The group GUID
    managing_organization_id str
    name str
    description String
    The description of the group
    id String
    The group GUID
    managingOrganizationId String
    name String

    Package Details

    Repository
    hsdp philips-software/terraform-provider-hsdp
    License
    Notes
    This Pulumi package is based on the hsdp Terraform Provider.
    hsdp logo
    hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software