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/v2/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[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[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)
public static Output<GetListUserGrantsResult> getListUserGrants(GetListUserGrantsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DataSafe/getListUserGrants:getListUserGrants
  arguments:
    # arguments dictionaryThe following arguments are supported:
- UserAssessment stringId 
- 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.
- DepthLevel 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.
- DepthLevel intLess Than 
- A filter to return only items that are at a level less than the specified user grant depth level.
- Filters
List<GetList User Grants Filter> 
- 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.
- UserAssessment stringId 
- 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.
- DepthLevel 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.
- DepthLevel intLess Than 
- A filter to return only items that are at a level less than the specified user grant depth level.
- Filters
[]GetList User Grants Filter 
- 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.
- userAssessment StringId 
- 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.
- depthLevel 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.
- depthLevel IntegerLess Than 
- A filter to return only items that are at a level less than the specified user grant depth level.
- filters
List<GetList User Grants Filter> 
- 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.
- userAssessment stringId 
- 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.
- depthLevel 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.
- depthLevel numberLess Than 
- A filter to return only items that are at a level less than the specified user grant depth level.
- filters
GetList User Grants Filter[] 
- 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_ 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[GetList 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.
- userAssessment StringId 
- 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.
- depthLevel 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.
- depthLevel 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>
- 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<GetList User Grants Grant> 
- The list of grants.
- Id string
- The provider-assigned unique ID for this managed resource.
- UserAssessment stringId 
- 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.
- DepthLevel intGreater Than Or Equal To 
- DepthLevel intLess Than 
- Filters
List<GetList User Grants Filter> 
- GrantKey string
- GrantName string
- The name of a user grant.
- PrivilegeCategory string
- The privilege category.
- PrivilegeType string
- The type of a user grant.
- Grants
[]GetList User Grants Grant 
- The list of grants.
- Id string
- The provider-assigned unique ID for this managed resource.
- UserAssessment stringId 
- 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.
- DepthLevel intGreater Than Or Equal To 
- DepthLevel intLess Than 
- Filters
[]GetList User Grants Filter 
- 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<GetList User Grants Grant> 
- The list of grants.
- id String
- The provider-assigned unique ID for this managed resource.
- userAssessment StringId 
- 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.
- depthLevel IntegerGreater Than Or Equal To 
- depthLevel IntegerLess Than 
- filters
List<GetList User Grants Filter> 
- grantKey String
- grantName String
- The name of a user grant.
- privilegeCategory String
- The privilege category.
- privilegeType String
- The type of a user grant.
- grants
GetList User Grants Grant[] 
- The list of grants.
- id string
- The provider-assigned unique ID for this managed resource.
- userAssessment stringId 
- 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.
- depthLevel numberGreater Than Or Equal To 
- depthLevel numberLess Than 
- filters
GetList User Grants Filter[] 
- grantKey string
- grantName string
- The name of a user grant.
- privilegeCategory string
- The privilege category.
- privilegeType string
- The type of a user grant.
- grants
Sequence[GetList 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[GetList 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.
- userAssessment StringId 
- 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.
- depthLevel NumberGreater Than Or Equal To 
- depthLevel NumberLess Than 
- 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    
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
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.