Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

getListUserGrants

This data source provides the list of List User Grants in Oracle Cloud Infrastructure Data Safe service.

Gets a list of grants for a particular user in the specified user assessment. A user grant contains details such as the privilege name, type, category, and depth level. The depth level indicates how deep in the hierarchy of roles granted to roles a privilege grant is. The userKey in this operation is a system-generated identifier. Perform the operation ListUsers to get the userKey for a particular user.

Example Usage

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testListUserGrants = Output.Create(Oci.DataSafe.GetListUserGrants.InvokeAsync(new Oci.DataSafe.GetListUserGrantsArgs
        {
            UserAssessmentId = oci_data_safe_user_assessment.Test_user_assessment.Id,
            UserKey = @var.List_user_grant_user_key,
            DepthLevel = @var.List_user_grant_depth_level,
            DepthLevelGreaterThanOrEqualTo = @var.List_user_grant_depth_level_greater_than_or_equal_to,
            DepthLevelLessThan = @var.List_user_grant_depth_level_less_than,
            GrantKey = @var.List_user_grant_grant_key,
            GrantName = @var.List_user_grant_grant_name,
            PrivilegeCategory = @var.List_user_grant_privilege_category,
            PrivilegeType = @var.List_user_grant_privilege_type,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/DataSafe"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := DataSafe.GetListUserGrants(ctx, &datasafe.GetListUserGrantsArgs{
			UserAssessmentId:               oci_data_safe_user_assessment.Test_user_assessment.Id,
			UserKey:                        _var.List_user_grant_user_key,
			DepthLevel:                     pulumi.IntRef(_var.List_user_grant_depth_level),
			DepthLevelGreaterThanOrEqualTo: pulumi.IntRef(_var.List_user_grant_depth_level_greater_than_or_equal_to),
			DepthLevelLessThan:             pulumi.IntRef(_var.List_user_grant_depth_level_less_than),
			GrantKey:                       pulumi.StringRef(_var.List_user_grant_grant_key),
			GrantName:                      pulumi.StringRef(_var.List_user_grant_grant_name),
			PrivilegeCategory:              pulumi.StringRef(_var.List_user_grant_privilege_category),
			PrivilegeType:                  pulumi.StringRef(_var.List_user_grant_privilege_type),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_list_user_grants = oci.DataSafe.get_list_user_grants(user_assessment_id=oci_data_safe_user_assessment["test_user_assessment"]["id"],
    user_key=var["list_user_grant_user_key"],
    depth_level=var["list_user_grant_depth_level"],
    depth_level_greater_than_or_equal_to=var["list_user_grant_depth_level_greater_than_or_equal_to"],
    depth_level_less_than=var["list_user_grant_depth_level_less_than"],
    grant_key=var["list_user_grant_grant_key"],
    grant_name=var["list_user_grant_grant_name"],
    privilege_category=var["list_user_grant_privilege_category"],
    privilege_type=var["list_user_grant_privilege_type"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testListUserGrants = oci.DataSafe.getListUserGrants({
    userAssessmentId: oci_data_safe_user_assessment.test_user_assessment.id,
    userKey: _var.list_user_grant_user_key,
    depthLevel: _var.list_user_grant_depth_level,
    depthLevelGreaterThanOrEqualTo: _var.list_user_grant_depth_level_greater_than_or_equal_to,
    depthLevelLessThan: _var.list_user_grant_depth_level_less_than,
    grantKey: _var.list_user_grant_grant_key,
    grantName: _var.list_user_grant_grant_name,
    privilegeCategory: _var.list_user_grant_privilege_category,
    privilegeType: _var.list_user_grant_privilege_type,
});

Coming soon!

Using getListUserGrants

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 getListUserGrants(args: GetListUserGrantsArgs, opts?: InvokeOptions): Promise<GetListUserGrantsResult>
function getListUserGrantsOutput(args: GetListUserGrantsOutputArgs, opts?: InvokeOptions): Output<GetListUserGrantsResult>
def get_list_user_grants(depth_level: Optional[int] = None,
                         depth_level_greater_than_or_equal_to: Optional[int] = None,
                         depth_level_less_than: Optional[int] = None,
                         filters: Optional[Sequence[_datasafe.GetListUserGrantsFilter]] = None,
                         grant_key: Optional[str] = None,
                         grant_name: Optional[str] = None,
                         privilege_category: Optional[str] = None,
                         privilege_type: Optional[str] = None,
                         user_assessment_id: Optional[str] = None,
                         user_key: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetListUserGrantsResult
def get_list_user_grants_output(depth_level: Optional[pulumi.Input[int]] = None,
                         depth_level_greater_than_or_equal_to: Optional[pulumi.Input[int]] = None,
                         depth_level_less_than: Optional[pulumi.Input[int]] = None,
                         filters: Optional[pulumi.Input[Sequence[pulumi.Input[_datasafe.GetListUserGrantsFilterArgs]]]] = None,
                         grant_key: Optional[pulumi.Input[str]] = None,
                         grant_name: Optional[pulumi.Input[str]] = None,
                         privilege_category: Optional[pulumi.Input[str]] = None,
                         privilege_type: Optional[pulumi.Input[str]] = None,
                         user_assessment_id: Optional[pulumi.Input[str]] = None,
                         user_key: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetListUserGrantsResult]
func GetListUserGrants(ctx *Context, args *GetListUserGrantsArgs, opts ...InvokeOption) (*GetListUserGrantsResult, error)
func GetListUserGrantsOutput(ctx *Context, args *GetListUserGrantsOutputArgs, opts ...InvokeOption) GetListUserGrantsResultOutput

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

public static class GetListUserGrants 
{
    public static Task<GetListUserGrantsResult> InvokeAsync(GetListUserGrantsArgs args, InvokeOptions? opts = null)
    public static Output<GetListUserGrantsResult> Invoke(GetListUserGrantsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetListUserGrantsResult> getListUserGrants(GetListUserGrantsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:DataSafe/getListUserGrants:getListUserGrants
  Arguments:
    # Arguments dictionary

The following arguments are supported:

UserAssessmentId string

The OCID of the user assessment.

UserKey string

The unique user key. This is a system-generated identifier. ListUsers gets the user key for a user.

DepthLevel int

A filter to return only items that match the specified user grant depth level.

DepthLevelGreaterThanOrEqualTo int

A filter to return only items that are at a level greater than or equal to the specified user grant depth level.

DepthLevelLessThan int

A filter to return only items that are at a level less than the specified user grant depth level.

Filters List<GetListUserGrantsFilter>
GrantKey string

A filter to return only items that match the specified user grant key.

GrantName string

A filter to return only items that match the specified user grant name.

PrivilegeCategory string

A filter to return only items that match the specified user privilege category.

PrivilegeType string

A filter to return only items that match the specified privilege grant type.

UserAssessmentId string

The OCID of the user assessment.

UserKey string

The unique user key. This is a system-generated identifier. ListUsers gets the user key for a user.

DepthLevel int

A filter to return only items that match the specified user grant depth level.

DepthLevelGreaterThanOrEqualTo int

A filter to return only items that are at a level greater than or equal to the specified user grant depth level.

DepthLevelLessThan int

A filter to return only items that are at a level less than the specified user grant depth level.

Filters []GetListUserGrantsFilter
GrantKey string

A filter to return only items that match the specified user grant key.

GrantName string

A filter to return only items that match the specified user grant name.

PrivilegeCategory string

A filter to return only items that match the specified user privilege category.

PrivilegeType string

A filter to return only items that match the specified privilege grant type.

userAssessmentId String

The OCID of the user assessment.

userKey String

The unique user key. This is a system-generated identifier. ListUsers gets the user key for a user.

depthLevel Integer

A filter to return only items that match the specified user grant depth level.

depthLevelGreaterThanOrEqualTo Integer

A filter to return only items that are at a level greater than or equal to the specified user grant depth level.

depthLevelLessThan Integer

A filter to return only items that are at a level less than the specified user grant depth level.

filters List<GetListUserGrantsFilter>
grantKey String

A filter to return only items that match the specified user grant key.

grantName String

A filter to return only items that match the specified user grant name.

privilegeCategory String

A filter to return only items that match the specified user privilege category.

privilegeType String

A filter to return only items that match the specified privilege grant type.

userAssessmentId string

The OCID of the user assessment.

userKey string

The unique user key. This is a system-generated identifier. ListUsers gets the user key for a user.

depthLevel number

A filter to return only items that match the specified user grant depth level.

depthLevelGreaterThanOrEqualTo number

A filter to return only items that are at a level greater than or equal to the specified user grant depth level.

depthLevelLessThan number

A filter to return only items that are at a level less than the specified user grant depth level.

filters GetListUserGrantsFilter[]
grantKey string

A filter to return only items that match the specified user grant key.

grantName string

A filter to return only items that match the specified user grant name.

privilegeCategory string

A filter to return only items that match the specified user privilege category.

privilegeType string

A filter to return only items that match the specified privilege grant type.

user_assessment_id str

The OCID of the user assessment.

user_key str

The unique user key. This is a system-generated identifier. ListUsers gets the user key for a user.

depth_level int

A filter to return only items that match the specified user grant depth level.

depth_level_greater_than_or_equal_to int

A filter to return only items that are at a level greater than or equal to the specified user grant depth level.

depth_level_less_than int

A filter to return only items that are at a level less than the specified user grant depth level.

filters GetListUserGrantsFilter]
grant_key str

A filter to return only items that match the specified user grant key.

grant_name str

A filter to return only items that match the specified user grant name.

privilege_category str

A filter to return only items that match the specified user privilege category.

privilege_type str

A filter to return only items that match the specified privilege grant type.

userAssessmentId String

The OCID of the user assessment.

userKey String

The unique user key. This is a system-generated identifier. ListUsers gets the user key for a user.

depthLevel Number

A filter to return only items that match the specified user grant depth level.

depthLevelGreaterThanOrEqualTo Number

A filter to return only items that are at a level greater than or equal to the specified user grant depth level.

depthLevelLessThan Number

A filter to return only items that are at a level less than the specified user grant depth level.

filters List<Property Map>
grantKey String

A filter to return only items that match the specified user grant key.

grantName String

A filter to return only items that match the specified user grant name.

privilegeCategory String

A filter to return only items that match the specified user privilege category.

privilegeType String

A filter to return only items that match the specified privilege grant type.

getListUserGrants Result

The following output properties are available:

Grants List<GetListUserGrantsGrant>

The list of grants.

Id string

The provider-assigned unique ID for this managed resource.

UserAssessmentId string
UserKey string
DepthLevel int

The grant depth level of the indirect grant. An indirectly granted role/privilege is granted to the user through another role. The depth level indicates how deep a privilege is within the grant hierarchy.

DepthLevelGreaterThanOrEqualTo int
DepthLevelLessThan int
Filters List<GetListUserGrantsFilter>
GrantKey string
GrantName string

The name of a user grant.

PrivilegeCategory string

The privilege category.

PrivilegeType string

The type of a user grant.

Grants []GetListUserGrantsGrant

The list of grants.

Id string

The provider-assigned unique ID for this managed resource.

UserAssessmentId string
UserKey string
DepthLevel int

The grant depth level of the indirect grant. An indirectly granted role/privilege is granted to the user through another role. The depth level indicates how deep a privilege is within the grant hierarchy.

DepthLevelGreaterThanOrEqualTo int
DepthLevelLessThan int
Filters []GetListUserGrantsFilter
GrantKey string
GrantName string

The name of a user grant.

PrivilegeCategory string

The privilege category.

PrivilegeType string

The type of a user grant.

grants List<GetListUserGrantsGrant>

The list of grants.

id String

The provider-assigned unique ID for this managed resource.

userAssessmentId String
userKey String
depthLevel Integer

The grant depth level of the indirect grant. An indirectly granted role/privilege is granted to the user through another role. The depth level indicates how deep a privilege is within the grant hierarchy.

depthLevelGreaterThanOrEqualTo Integer
depthLevelLessThan Integer
filters List<GetListUserGrantsFilter>
grantKey String
grantName String

The name of a user grant.

privilegeCategory String

The privilege category.

privilegeType String

The type of a user grant.

grants GetListUserGrantsGrant[]

The list of grants.

id string

The provider-assigned unique ID for this managed resource.

userAssessmentId string
userKey string
depthLevel number

The grant depth level of the indirect grant. An indirectly granted role/privilege is granted to the user through another role. The depth level indicates how deep a privilege is within the grant hierarchy.

depthLevelGreaterThanOrEqualTo number
depthLevelLessThan number
filters GetListUserGrantsFilter[]
grantKey string
grantName string

The name of a user grant.

privilegeCategory string

The privilege category.

privilegeType string

The type of a user grant.

grants GetListUserGrantsGrant]

The list of grants.

id str

The provider-assigned unique ID for this managed resource.

user_assessment_id str
user_key str
depth_level int

The grant depth level of the indirect grant. An indirectly granted role/privilege is granted to the user through another role. The depth level indicates how deep a privilege is within the grant hierarchy.

depth_level_greater_than_or_equal_to int
depth_level_less_than int
filters GetListUserGrantsFilter]
grant_key str
grant_name str

The name of a user grant.

privilege_category str

The privilege category.

privilege_type str

The type of a user grant.

grants List<Property Map>

The list of grants.

id String

The provider-assigned unique ID for this managed resource.

userAssessmentId String
userKey String
depthLevel Number

The grant depth level of the indirect grant. An indirectly granted role/privilege is granted to the user through another role. The depth level indicates how deep a privilege is within the grant hierarchy.

depthLevelGreaterThanOrEqualTo Number
depthLevelLessThan Number
filters List<Property Map>
grantKey String
grantName String

The name of a user grant.

privilegeCategory String

The privilege category.

privilegeType String

The type of a user grant.

Supporting Types

GetListUserGrantsFilter

Name string
Values List<string>
Regex bool
Name string
Values []string
Regex bool
name String
values List<String>
regex Boolean
name string
values string[]
regex boolean
name str
values Sequence[str]
regex bool
name String
values List<String>
regex Boolean

GetListUserGrantsGrant

DepthLevel int

A filter to return only items that match the specified user grant depth level.

GrantName string

A filter to return only items that match the specified user grant name.

Key string

The unique key of a user grant.

PrivilegeCategory string

A filter to return only items that match the specified user privilege category.

PrivilegeType string

A filter to return only items that match the specified privilege grant type.

DepthLevel int

A filter to return only items that match the specified user grant depth level.

GrantName string

A filter to return only items that match the specified user grant name.

Key string

The unique key of a user grant.

PrivilegeCategory string

A filter to return only items that match the specified user privilege category.

PrivilegeType string

A filter to return only items that match the specified privilege grant type.

depthLevel Integer

A filter to return only items that match the specified user grant depth level.

grantName String

A filter to return only items that match the specified user grant name.

key String

The unique key of a user grant.

privilegeCategory String

A filter to return only items that match the specified user privilege category.

privilegeType String

A filter to return only items that match the specified privilege grant type.

depthLevel number

A filter to return only items that match the specified user grant depth level.

grantName string

A filter to return only items that match the specified user grant name.

key string

The unique key of a user grant.

privilegeCategory string

A filter to return only items that match the specified user privilege category.

privilegeType string

A filter to return only items that match the specified privilege grant type.

depth_level int

A filter to return only items that match the specified user grant depth level.

grant_name str

A filter to return only items that match the specified user grant name.

key str

The unique key of a user grant.

privilege_category str

A filter to return only items that match the specified user privilege category.

privilege_type str

A filter to return only items that match the specified privilege grant type.

depthLevel Number

A filter to return only items that match the specified user grant depth level.

grantName String

A filter to return only items that match the specified user grant name.

key String

The unique key of a user grant.

privilegeCategory String

A filter to return only items that match the specified user privilege category.

privilegeType String

A filter to return only items that match the specified privilege grant type.

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.