1. Packages
  2. Nexus Provider
  3. API Docs
  4. getSecurityRole
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

nexus.getSecurityRole

Explore with Pulumi AI

nexus logo
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

    Use this to get a specified secrity role.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nexus from "@pulumi/nexus";
    
    const nxAdmin = nexus.getSecurityRole({
        roleid: "nx-admin",
    });
    
    import pulumi
    import pulumi_nexus as nexus
    
    nx_admin = nexus.get_security_role(roleid="nx-admin")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/nexus/v2/nexus"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nexus.LookupSecurityRole(ctx, &nexus.LookupSecurityRoleArgs{
    			Roleid: "nx-admin",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nexus = Pulumi.Nexus;
    
    return await Deployment.RunAsync(() => 
    {
        var nxAdmin = Nexus.GetSecurityRole.Invoke(new()
        {
            Roleid = "nx-admin",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nexus.NexusFunctions;
    import com.pulumi.nexus.inputs.GetSecurityRoleArgs;
    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 nxAdmin = NexusFunctions.getSecurityRole(GetSecurityRoleArgs.builder()
                .roleid("nx-admin")
                .build());
    
        }
    }
    
    variables:
      nxAdmin:
        fn::invoke:
          function: nexus:getSecurityRole
          arguments:
            roleid: nx-admin
    

    Using getSecurityRole

    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 getSecurityRole(args: GetSecurityRoleArgs, opts?: InvokeOptions): Promise<GetSecurityRoleResult>
    function getSecurityRoleOutput(args: GetSecurityRoleOutputArgs, opts?: InvokeOptions): Output<GetSecurityRoleResult>
    def get_security_role(roleid: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetSecurityRoleResult
    def get_security_role_output(roleid: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetSecurityRoleResult]
    func LookupSecurityRole(ctx *Context, args *LookupSecurityRoleArgs, opts ...InvokeOption) (*LookupSecurityRoleResult, error)
    func LookupSecurityRoleOutput(ctx *Context, args *LookupSecurityRoleOutputArgs, opts ...InvokeOption) LookupSecurityRoleResultOutput

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

    public static class GetSecurityRole 
    {
        public static Task<GetSecurityRoleResult> InvokeAsync(GetSecurityRoleArgs args, InvokeOptions? opts = null)
        public static Output<GetSecurityRoleResult> Invoke(GetSecurityRoleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSecurityRoleResult> getSecurityRole(GetSecurityRoleArgs args, InvokeOptions options)
    public static Output<GetSecurityRoleResult> getSecurityRole(GetSecurityRoleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: nexus:index/getSecurityRole:getSecurityRole
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Roleid string
    The id of the role.
    Roleid string
    The id of the role.
    roleid String
    The id of the role.
    roleid string
    The id of the role.
    roleid str
    The id of the role.
    roleid String
    The id of the role.

    getSecurityRole Result

    The following output properties are available:

    Description string
    The description of this role.
    Id string
    Used to identify data source at nexus
    Name string
    The name of the role.
    Privileges List<string>
    The privileges of this role.
    Roleid string
    The id of the role.
    Roles List<string>
    The roles of this role.
    Description string
    The description of this role.
    Id string
    Used to identify data source at nexus
    Name string
    The name of the role.
    Privileges []string
    The privileges of this role.
    Roleid string
    The id of the role.
    Roles []string
    The roles of this role.
    description String
    The description of this role.
    id String
    Used to identify data source at nexus
    name String
    The name of the role.
    privileges List<String>
    The privileges of this role.
    roleid String
    The id of the role.
    roles List<String>
    The roles of this role.
    description string
    The description of this role.
    id string
    Used to identify data source at nexus
    name string
    The name of the role.
    privileges string[]
    The privileges of this role.
    roleid string
    The id of the role.
    roles string[]
    The roles of this role.
    description str
    The description of this role.
    id str
    Used to identify data source at nexus
    name str
    The name of the role.
    privileges Sequence[str]
    The privileges of this role.
    roleid str
    The id of the role.
    roles Sequence[str]
    The roles of this role.
    description String
    The description of this role.
    id String
    Used to identify data source at nexus
    name String
    The name of the role.
    privileges List<String>
    The privileges of this role.
    roleid String
    The id of the role.
    roles List<String>
    The roles of this role.

    Package Details

    Repository
    nexus datadrivers/terraform-provider-nexus
    License
    Notes
    This Pulumi package is based on the nexus Terraform Provider.
    nexus logo
    nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers