Oracle Cloud Infrastructure
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:
- 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
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
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
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
- https://github.com/pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.