oci.DataSafe.getListUserGrants
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testListUserGrants = oci.DataSafe.getListUserGrants({
    userAssessmentId: testUserAssessment.id,
    userKey: listUserGrantUserKey,
    depthLevel: listUserGrantDepthLevel,
    depthLevelGreaterThanOrEqualTo: listUserGrantDepthLevelGreaterThanOrEqualTo,
    depthLevelLessThan: listUserGrantDepthLevelLessThan,
    grantKey: listUserGrantGrantKey,
    grantName: listUserGrantGrantName,
    privilegeCategory: listUserGrantPrivilegeCategory,
    privilegeType: listUserGrantPrivilegeType,
});
import pulumi
import pulumi_oci as oci
test_list_user_grants = oci.DataSafe.get_list_user_grants(user_assessment_id=test_user_assessment["id"],
    user_key=list_user_grant_user_key,
    depth_level=list_user_grant_depth_level,
    depth_level_greater_than_or_equal_to=list_user_grant_depth_level_greater_than_or_equal_to,
    depth_level_less_than=list_user_grant_depth_level_less_than,
    grant_key=list_user_grant_grant_key,
    grant_name=list_user_grant_grant_name,
    privilege_category=list_user_grant_privilege_category,
    privilege_type=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:               testUserAssessment.Id,
			UserKey:                        listUserGrantUserKey,
			DepthLevel:                     pulumi.IntRef(listUserGrantDepthLevel),
			DepthLevelGreaterThanOrEqualTo: pulumi.IntRef(listUserGrantDepthLevelGreaterThanOrEqualTo),
			DepthLevelLessThan:             pulumi.IntRef(listUserGrantDepthLevelLessThan),
			GrantKey:                       pulumi.StringRef(listUserGrantGrantKey),
			GrantName:                      pulumi.StringRef(listUserGrantGrantName),
			PrivilegeCategory:              pulumi.StringRef(listUserGrantPrivilegeCategory),
			PrivilegeType:                  pulumi.StringRef(listUserGrantPrivilegeType),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testListUserGrants = Oci.DataSafe.GetListUserGrants.Invoke(new()
    {
        UserAssessmentId = testUserAssessment.Id,
        UserKey = listUserGrantUserKey,
        DepthLevel = listUserGrantDepthLevel,
        DepthLevelGreaterThanOrEqualTo = listUserGrantDepthLevelGreaterThanOrEqualTo,
        DepthLevelLessThan = listUserGrantDepthLevelLessThan,
        GrantKey = listUserGrantGrantKey,
        GrantName = listUserGrantGrantName,
        PrivilegeCategory = listUserGrantPrivilegeCategory,
        PrivilegeType = listUserGrantPrivilegeType,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DataSafe.DataSafeFunctions;
import com.pulumi.oci.DataSafe.inputs.GetListUserGrantsArgs;
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 testListUserGrants = DataSafeFunctions.getListUserGrants(GetListUserGrantsArgs.builder()
            .userAssessmentId(testUserAssessment.id())
            .userKey(listUserGrantUserKey)
            .depthLevel(listUserGrantDepthLevel)
            .depthLevelGreaterThanOrEqualTo(listUserGrantDepthLevelGreaterThanOrEqualTo)
            .depthLevelLessThan(listUserGrantDepthLevelLessThan)
            .grantKey(listUserGrantGrantKey)
            .grantName(listUserGrantGrantName)
            .privilegeCategory(listUserGrantPrivilegeCategory)
            .privilegeType(listUserGrantPrivilegeType)
            .build());
    }
}
variables:
  testListUserGrants:
    fn::invoke:
      Function: oci:DataSafe:getListUserGrants
      Arguments:
        userAssessmentId: ${testUserAssessment.id}
        userKey: ${listUserGrantUserKey}
        depthLevel: ${listUserGrantDepthLevel}
        depthLevelGreaterThanOrEqualTo: ${listUserGrantDepthLevelGreaterThanOrEqualTo}
        depthLevelLessThan: ${listUserGrantDepthLevelLessThan}
        grantKey: ${listUserGrantGrantKey}
        grantName: ${listUserGrantGrantName}
        privilegeCategory: ${listUserGrantPrivilegeCategory}
        privilegeType: ${listUserGrantPrivilegeType}
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 dictionaryThe following arguments are supported:
- User
Assessment stringId  - The OCID of the user assessment.
 - User
Key string - 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 intGreater Than Or Equal To  - A filter to return only items that are at a level greater than or equal to the specified user grant depth level.
 - Depth
Level intLess Than  - A filter to return only items that are at a level less than the specified user grant depth level.
 - Filters
List<Get
List User Grants Filter>  - Grant
Key string - A filter to return only items that match the specified user grant key.
 - Grant
Name string - A filter to return only items that match the specified user grant name.
 - Privilege
Category string - A filter to return only items that match the specified user privilege category.
 - Privilege
Type string - A filter to return only items that match the specified privilege grant type.
 
- User
Assessment stringId  - The OCID of the user assessment.
 - User
Key string - 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 intGreater Than Or Equal To  - A filter to return only items that are at a level greater than or equal to the specified user grant depth level.
 - Depth
Level intLess Than  - A filter to return only items that are at a level less than the specified user grant depth level.
 - Filters
[]Get
List User Grants Filter  - Grant
Key string - A filter to return only items that match the specified user grant key.
 - Grant
Name string - A filter to return only items that match the specified user grant name.
 - Privilege
Category string - A filter to return only items that match the specified user privilege category.
 - Privilege
Type string - A filter to return only items that match the specified privilege grant type.
 
- user
Assessment StringId  - The OCID of the user assessment.
 - user
Key String - The unique user key. This is a system-generated identifier. ListUsers gets the user key for a user.
 - depth
Level Integer - A filter to return only items that match the specified user grant depth level.
 - depth
Level IntegerGreater Than Or Equal To  - A filter to return only items that are at a level greater than or equal to the specified user grant depth level.
 - depth
Level IntegerLess Than  - A filter to return only items that are at a level less than the specified user grant depth level.
 - filters
List<Get
List User Grants Filter>  - grant
Key String - A filter to return only items that match the specified user grant key.
 - grant
Name String - A filter to return only items that match the specified user grant name.
 - privilege
Category String - A filter to return only items that match the specified user privilege category.
 - privilege
Type String - A filter to return only items that match the specified privilege grant type.
 
- user
Assessment stringId  - The OCID of the user assessment.
 - user
Key string - The unique user key. This is a system-generated identifier. ListUsers gets the user key for a user.
 - depth
Level number - A filter to return only items that match the specified user grant depth level.
 - depth
Level numberGreater Than Or Equal To  - A filter to return only items that are at a level greater than or equal to the specified user grant depth level.
 - depth
Level numberLess Than  - A filter to return only items that are at a level less than the specified user grant depth level.
 - filters
Get
List User Grants Filter[]  - grant
Key string - A filter to return only items that match the specified user grant key.
 - grant
Name string - A filter to return only items that match the specified user grant name.
 - privilege
Category string - A filter to return only items that match the specified user privilege category.
 - privilege
Type string - A filter to return only items that match the specified privilege grant type.
 
- user_
assessment_ strid  - 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_ intgreater_ than_ or_ equal_ to  - A filter to return only items that are at a level greater than or equal to the specified user grant depth level.
 - depth_
level_ intless_ than  - A filter to return only items that are at a level less than the specified user grant depth level.
 - filters
Sequence[datasafe.
Get List User Grants Filter]  - 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.
 
- user
Assessment StringId  - The OCID of the user assessment.
 - user
Key String - The unique user key. This is a system-generated identifier. ListUsers gets the user key for a user.
 - depth
Level Number - A filter to return only items that match the specified user grant depth level.
 - depth
Level NumberGreater Than Or Equal To  - A filter to return only items that are at a level greater than or equal to the specified user grant depth level.
 - depth
Level NumberLess Than  - A filter to return only items that are at a level less than the specified user grant depth level.
 - filters List<Property Map>
 - grant
Key String - A filter to return only items that match the specified user grant key.
 - grant
Name String - A filter to return only items that match the specified user grant name.
 - privilege
Category String - A filter to return only items that match the specified user privilege category.
 - privilege
Type String - A filter to return only items that match the specified privilege grant type.
 
getListUserGrants Result
The following output properties are available:
- Grants
List<Get
List User Grants Grant>  - The list of grants.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - User
Assessment stringId  - User
Key string - 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 intGreater Than Or Equal To  - Depth
Level intLess Than  - Filters
List<Get
List User Grants Filter>  - Grant
Key string - Grant
Name string - The name of a user grant.
 - Privilege
Category string - The privilege category.
 - Privilege
Type string - The type of a user grant.
 
- Grants
[]Get
List User Grants Grant  - The list of grants.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - User
Assessment stringId  - User
Key string - 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 intGreater Than Or Equal To  - Depth
Level intLess Than  - Filters
[]Get
List User Grants Filter  - Grant
Key string - Grant
Name string - The name of a user grant.
 - Privilege
Category string - The privilege category.
 - Privilege
Type string - The type of a user grant.
 
- grants
List<Get
List User Grants Grant>  - The list of grants.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - user
Assessment StringId  - user
Key String - depth
Level 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.
 - depth
Level IntegerGreater Than Or Equal To  - depth
Level IntegerLess Than  - filters
List<Get
List User Grants Filter>  - grant
Key String - grant
Name String - The name of a user grant.
 - privilege
Category String - The privilege category.
 - privilege
Type String - The type of a user grant.
 
- grants
Get
List User Grants Grant[]  - The list of grants.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - user
Assessment stringId  - user
Key string - depth
Level 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.
 - depth
Level numberGreater Than Or Equal To  - depth
Level numberLess Than  - filters
Get
List User Grants Filter[]  - grant
Key string - grant
Name string - The name of a user grant.
 - privilege
Category string - The privilege category.
 - privilege
Type string - The type of a user grant.
 
- grants
Sequence[datasafe.
Get List User Grants Grant]  - The list of grants.
 - id str
 - The provider-assigned unique ID for this managed resource.
 - user_
assessment_ strid  - 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_ intgreater_ than_ or_ equal_ to  - depth_
level_ intless_ than  - filters
Sequence[datasafe.
Get List User Grants Filter]  - 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.
 - user
Assessment StringId  - user
Key String - depth
Level 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.
 - depth
Level NumberGreater Than Or Equal To  - depth
Level NumberLess Than  - filters List<Property Map>
 - grant
Key String - grant
Name String - The name of a user grant.
 - privilege
Category String - The privilege category.
 - privilege
Type String - The type of a user grant.
 
Supporting Types
GetListUserGrantsFilter    
GetListUserGrantsGrant    
- Depth
Level int - A filter to return only items that match the specified user grant depth level.
 - Grant
Name string - A filter to return only items that match the specified user grant name.
 - Key string
 - The unique key of a user grant.
 - Privilege
Category string - A filter to return only items that match the specified user privilege category.
 - Privilege
Type 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 string - A filter to return only items that match the specified user grant name.
 - Key string
 - The unique key of a user grant.
 - Privilege
Category string - A filter to return only items that match the specified user privilege category.
 - Privilege
Type string - A filter to return only items that match the specified privilege grant type.
 
- depth
Level Integer - A filter to return only items that match the specified user grant depth level.
 - grant
Name String - A filter to return only items that match the specified user grant name.
 - key String
 - The unique key of a user grant.
 - privilege
Category String - A filter to return only items that match the specified user privilege category.
 - privilege
Type String - A filter to return only items that match the specified privilege grant type.
 
- depth
Level number - A filter to return only items that match the specified user grant depth level.
 - grant
Name string - A filter to return only items that match the specified user grant name.
 - key string
 - The unique key of a user grant.
 - privilege
Category string - A filter to return only items that match the specified user privilege category.
 - privilege
Type 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.
 
- depth
Level Number - A filter to return only items that match the specified user grant depth level.
 - grant
Name String - A filter to return only items that match the specified user grant name.
 - key String
 - The unique key of a user grant.
 - privilege
Category String - A filter to return only items that match the specified user privilege category.
 - privilege
Type String - A filter to return only items that match the specified privilege grant type.
 
Package Details
- Repository
 - oci pulumi/pulumi-oci
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
ociTerraform Provider.