Sumo Logic v0.23.7 published on Thursday, Oct 24, 2024 by Pulumi
sumologic.getRoleV2
Explore with Pulumi AI
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:
getRoleV2 Result
The following output properties are available:
- Audit
Data stringFilter - Capabilities List<string>
- Description string
- Id string
- Log
Analytics stringFilter - Name string
- Security
Data stringFilter - Selected
Views List<Pulumi.Sumo Logic. Outputs. Get Role V2Selected View> - Selection
Type string
- Audit
Data stringFilter - Capabilities []string
- Description string
- Id string
- Log
Analytics stringFilter - Name string
- Security
Data stringFilter - Selected
Views []GetRole V2Selected View - Selection
Type string
- audit
Data StringFilter - capabilities List<String>
- description String
- id String
- log
Analytics StringFilter - name String
- security
Data StringFilter - selected
Views List<GetRole V2Selected View> - selection
Type String
- audit
Data stringFilter - capabilities string[]
- description string
- id string
- log
Analytics stringFilter - name string
- security
Data stringFilter - selected
Views GetRole V2Selected View[] - selection
Type string
- audit_
data_ strfilter - capabilities Sequence[str]
- description str
- id str
- log_
analytics_ strfilter - name str
- security_
data_ strfilter - selected_
views Sequence[GetRole V2Selected View] - selection_
type str
- audit
Data StringFilter - capabilities List<String>
- description String
- id String
- log
Analytics StringFilter - name String
- security
Data StringFilter - selected
Views List<Property Map> - selection
Type String
Supporting Types
GetRoleV2SelectedView
- View
Filter string - View
Name string
- View
Filter string - View
Name string
- view
Filter String - view
Name String
- view
Filter string - view
Name string
- view_
filter str - view_
name str
- view
Filter String - view
Name String
Package Details
- Repository
- Sumo Logic pulumi/pulumi-sumologic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
sumologic
Terraform Provider.