1. Packages
  2. Sumo Logic
  3. API Docs
  4. getRoleV2
Sumo Logic v0.22.1 published on Sunday, Jun 9, 2024 by Pulumi

sumologic.getRoleV2

Explore with Pulumi AI

sumologic logo
Sumo Logic v0.22.1 published on Sunday, Jun 9, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sumologic from "@pulumi/sumologic";
    
    const this = sumologic.getRoleV2({
        name: "MyRole",
    });
    
    import pulumi
    import pulumi_sumologic as sumologic
    
    this = sumologic.get_role_v2(name="MyRole")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sumologic.LookupRoleV2(ctx, &sumologic.LookupRoleV2Args{
    			Name: pulumi.StringRef("MyRole"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using SumoLogic = Pulumi.SumoLogic;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = SumoLogic.GetRoleV2.Invoke(new()
        {
            Name = "MyRole",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sumologic.SumologicFunctions;
    import com.pulumi.sumologic.inputs.GetRoleV2Args;
    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 this = SumologicFunctions.getRoleV2(GetRoleV2Args.builder()
                .name("MyRole")
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          Function: sumologic:getRoleV2
          Arguments:
            name: MyRole
    
    import * as pulumi from "@pulumi/pulumi";
    import * as sumologic from "@pulumi/sumologic";
    
    const that = sumologic.getRoleV2({
        id: "1234567890",
    });
    
    import pulumi
    import pulumi_sumologic as sumologic
    
    that = sumologic.get_role_v2(id="1234567890")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sumologic.LookupRoleV2(ctx, &sumologic.LookupRoleV2Args{
    			Id: pulumi.StringRef("1234567890"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using SumoLogic = Pulumi.SumoLogic;
    
    return await Deployment.RunAsync(() => 
    {
        var that = SumoLogic.GetRoleV2.Invoke(new()
        {
            Id = "1234567890",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sumologic.SumologicFunctions;
    import com.pulumi.sumologic.inputs.GetRoleV2Args;
    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 that = SumologicFunctions.getRoleV2(GetRoleV2Args.builder()
                .id("1234567890")
                .build());
    
        }
    }
    
    variables:
      that:
        fn::invoke:
          Function: sumologic:getRoleV2
          Arguments:
            id: '1234567890'
    

    A role can be looked up by either id or name. One of those attributes needs to be specified.

    If both id and name have been specified, id takes precedence.

    Attributes reference

    The following attributes are exported:

    • id - The internal ID of the role. This can be used to create users having that role.
    • name - The name of the role.
    • description - The description of the role.
    • capabilities - The list of capabilities associated with the role.
    • selected_views - List of views with specific view level filters in accordance to the selectionType chosen.
    • audit_data_filter - The search filter which would be applied on partitions which belong to Audit Data product area. Help Doc : (https://help.sumologic.com/docs/manage/security/audit-index/).
    • security_data_filter - The search filter which would be applied on partitions which belong to Security Data product area.
    • log_analytics_filter - The search filter which would be applied on partitions which belong to Log Analytics product area.
    • selection_type - Describes the Permission Construct for the list of views in “selectedViews” parameter.

    Values in selection type are :

    • All selectionType would allow access to all views in the org.
    • Allow selectionType would allow access to specific views mentioned in “selectedViews” parameter.
    • Deny selectionType would deny access to specific views mentioned in “selectedViews” parameter.

    Using getRoleV2

    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 getRoleV2(args: GetRoleV2Args, opts?: InvokeOptions): Promise<GetRoleV2Result>
    function getRoleV2Output(args: GetRoleV2OutputArgs, opts?: InvokeOptions): Output<GetRoleV2Result>
    def get_role_v2(id: Optional[str] = None,
                    name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetRoleV2Result
    def get_role_v2_output(id: Optional[pulumi.Input[str]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetRoleV2Result]
    func LookupRoleV2(ctx *Context, args *LookupRoleV2Args, opts ...InvokeOption) (*LookupRoleV2Result, error)
    func LookupRoleV2Output(ctx *Context, args *LookupRoleV2OutputArgs, opts ...InvokeOption) LookupRoleV2ResultOutput

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

    public static class GetRoleV2 
    {
        public static Task<GetRoleV2Result> InvokeAsync(GetRoleV2Args args, InvokeOptions? opts = null)
        public static Output<GetRoleV2Result> Invoke(GetRoleV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRoleV2Result> getRoleV2(GetRoleV2Args args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: sumologic:index/getRoleV2:getRoleV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Name string
    Id string
    Name string
    id String
    name String
    id string
    name string
    id str
    name str
    id String
    name String

    getRoleV2 Result

    The following output properties are available:

    Supporting Types

    GetRoleV2SelectedView

    ViewFilter string
    ViewName string
    ViewFilter string
    ViewName string
    viewFilter String
    viewName String
    viewFilter string
    viewName string
    viewFilter String
    viewName String

    Package Details

    Repository
    Sumo Logic pulumi/pulumi-sumologic
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the sumologic Terraform Provider.
    sumologic logo
    Sumo Logic v0.22.1 published on Sunday, Jun 9, 2024 by Pulumi