Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.DataSafe.getTargetDatabaseRoles
Explore with Pulumi AI
This data source provides the list of Target Database Roles in Oracle Cloud Infrastructure Data Safe service.
Returns a list of role metadata objects.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testTargetDatabaseRoles = oci.DataSafe.getTargetDatabaseRoles({
    targetDatabaseId: testTargetDatabase.id,
    authenticationType: targetDatabaseRoleAuthenticationType,
    isOracleMaintained: targetDatabaseRoleIsOracleMaintained,
    roleNames: targetDatabaseRoleRoleName,
    roleNameContains: targetDatabaseRoleRoleNameContains,
});
import pulumi
import pulumi_oci as oci
test_target_database_roles = oci.DataSafe.get_target_database_roles(target_database_id=test_target_database["id"],
    authentication_type=target_database_role_authentication_type,
    is_oracle_maintained=target_database_role_is_oracle_maintained,
    role_names=target_database_role_role_name,
    role_name_contains=target_database_role_role_name_contains)
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.GetTargetDatabaseRoles(ctx, &datasafe.GetTargetDatabaseRolesArgs{
			TargetDatabaseId:   testTargetDatabase.Id,
			AuthenticationType: pulumi.StringRef(targetDatabaseRoleAuthenticationType),
			IsOracleMaintained: pulumi.BoolRef(targetDatabaseRoleIsOracleMaintained),
			RoleNames:          targetDatabaseRoleRoleName,
			RoleNameContains:   pulumi.StringRef(targetDatabaseRoleRoleNameContains),
		}, 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 testTargetDatabaseRoles = Oci.DataSafe.GetTargetDatabaseRoles.Invoke(new()
    {
        TargetDatabaseId = testTargetDatabase.Id,
        AuthenticationType = targetDatabaseRoleAuthenticationType,
        IsOracleMaintained = targetDatabaseRoleIsOracleMaintained,
        RoleNames = targetDatabaseRoleRoleName,
        RoleNameContains = targetDatabaseRoleRoleNameContains,
    });
});
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.GetTargetDatabaseRolesArgs;
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 testTargetDatabaseRoles = DataSafeFunctions.getTargetDatabaseRoles(GetTargetDatabaseRolesArgs.builder()
            .targetDatabaseId(testTargetDatabase.id())
            .authenticationType(targetDatabaseRoleAuthenticationType)
            .isOracleMaintained(targetDatabaseRoleIsOracleMaintained)
            .roleNames(targetDatabaseRoleRoleName)
            .roleNameContains(targetDatabaseRoleRoleNameContains)
            .build());
    }
}
variables:
  testTargetDatabaseRoles:
    fn::invoke:
      function: oci:DataSafe:getTargetDatabaseRoles
      arguments:
        targetDatabaseId: ${testTargetDatabase.id}
        authenticationType: ${targetDatabaseRoleAuthenticationType}
        isOracleMaintained: ${targetDatabaseRoleIsOracleMaintained}
        roleNames: ${targetDatabaseRoleRoleName}
        roleNameContains: ${targetDatabaseRoleRoleNameContains}
Using getTargetDatabaseRoles
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 getTargetDatabaseRoles(args: GetTargetDatabaseRolesArgs, opts?: InvokeOptions): Promise<GetTargetDatabaseRolesResult>
function getTargetDatabaseRolesOutput(args: GetTargetDatabaseRolesOutputArgs, opts?: InvokeOptions): Output<GetTargetDatabaseRolesResult>def get_target_database_roles(authentication_type: Optional[str] = None,
                              filters: Optional[Sequence[GetTargetDatabaseRolesFilter]] = None,
                              is_oracle_maintained: Optional[bool] = None,
                              role_name_contains: Optional[str] = None,
                              role_names: Optional[Sequence[str]] = None,
                              target_database_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetTargetDatabaseRolesResult
def get_target_database_roles_output(authentication_type: Optional[pulumi.Input[str]] = None,
                              filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetTargetDatabaseRolesFilterArgs]]]] = None,
                              is_oracle_maintained: Optional[pulumi.Input[bool]] = None,
                              role_name_contains: Optional[pulumi.Input[str]] = None,
                              role_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                              target_database_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetTargetDatabaseRolesResult]func GetTargetDatabaseRoles(ctx *Context, args *GetTargetDatabaseRolesArgs, opts ...InvokeOption) (*GetTargetDatabaseRolesResult, error)
func GetTargetDatabaseRolesOutput(ctx *Context, args *GetTargetDatabaseRolesOutputArgs, opts ...InvokeOption) GetTargetDatabaseRolesResultOutput> Note: This function is named GetTargetDatabaseRoles in the Go SDK.
public static class GetTargetDatabaseRoles 
{
    public static Task<GetTargetDatabaseRolesResult> InvokeAsync(GetTargetDatabaseRolesArgs args, InvokeOptions? opts = null)
    public static Output<GetTargetDatabaseRolesResult> Invoke(GetTargetDatabaseRolesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTargetDatabaseRolesResult> getTargetDatabaseRoles(GetTargetDatabaseRolesArgs args, InvokeOptions options)
public static Output<GetTargetDatabaseRolesResult> getTargetDatabaseRoles(GetTargetDatabaseRolesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DataSafe/getTargetDatabaseRoles:getTargetDatabaseRoles
  arguments:
    # arguments dictionaryThe following arguments are supported:
- TargetDatabase stringId 
- The OCID of the Data Safe target database.
- AuthenticationType string
- A filter to return roles based on authentication type.
- Filters
List<GetTarget Database Roles Filter> 
- IsOracle boolMaintained 
- A filter to return roles based on whether they are maintained by oracle or not.
- RoleName stringContains 
- A filter to return only items if role name contains a specific string.
- RoleNames List<string>
- A filter to return only a specific role based on role name.
- TargetDatabase stringId 
- The OCID of the Data Safe target database.
- AuthenticationType string
- A filter to return roles based on authentication type.
- Filters
[]GetTarget Database Roles Filter 
- IsOracle boolMaintained 
- A filter to return roles based on whether they are maintained by oracle or not.
- RoleName stringContains 
- A filter to return only items if role name contains a specific string.
- RoleNames []string
- A filter to return only a specific role based on role name.
- targetDatabase StringId 
- The OCID of the Data Safe target database.
- authenticationType String
- A filter to return roles based on authentication type.
- filters
List<GetTarget Database Roles Filter> 
- isOracle BooleanMaintained 
- A filter to return roles based on whether they are maintained by oracle or not.
- roleName StringContains 
- A filter to return only items if role name contains a specific string.
- roleNames List<String>
- A filter to return only a specific role based on role name.
- targetDatabase stringId 
- The OCID of the Data Safe target database.
- authenticationType string
- A filter to return roles based on authentication type.
- filters
GetTarget Database Roles Filter[] 
- isOracle booleanMaintained 
- A filter to return roles based on whether they are maintained by oracle or not.
- roleName stringContains 
- A filter to return only items if role name contains a specific string.
- roleNames string[]
- A filter to return only a specific role based on role name.
- target_database_ strid 
- The OCID of the Data Safe target database.
- authentication_type str
- A filter to return roles based on authentication type.
- filters
Sequence[GetTarget Database Roles Filter] 
- is_oracle_ boolmaintained 
- A filter to return roles based on whether they are maintained by oracle or not.
- role_name_ strcontains 
- A filter to return only items if role name contains a specific string.
- role_names Sequence[str]
- A filter to return only a specific role based on role name.
- targetDatabase StringId 
- The OCID of the Data Safe target database.
- authenticationType String
- A filter to return roles based on authentication type.
- filters List<Property Map>
- isOracle BooleanMaintained 
- A filter to return roles based on whether they are maintained by oracle or not.
- roleName StringContains 
- A filter to return only items if role name contains a specific string.
- roleNames List<String>
- A filter to return only a specific role based on role name.
getTargetDatabaseRoles Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Roles
List<GetTarget Database Roles Role> 
- The list of roles.
- TargetDatabase stringId 
- AuthenticationType string
- Type of authentication.
- Filters
List<GetTarget Database Roles Filter> 
- IsOracle boolMaintained 
- Is the role oracle maintained.
- RoleName stringContains 
- RoleNames List<string>
- The name of the role.
- Id string
- The provider-assigned unique ID for this managed resource.
- Roles
[]GetTarget Database Roles Role 
- The list of roles.
- TargetDatabase stringId 
- AuthenticationType string
- Type of authentication.
- Filters
[]GetTarget Database Roles Filter 
- IsOracle boolMaintained 
- Is the role oracle maintained.
- RoleName stringContains 
- RoleNames []string
- The name of the role.
- id String
- The provider-assigned unique ID for this managed resource.
- roles
List<GetTarget Database Roles Role> 
- The list of roles.
- targetDatabase StringId 
- authenticationType String
- Type of authentication.
- filters
List<GetTarget Database Roles Filter> 
- isOracle BooleanMaintained 
- Is the role oracle maintained.
- roleName StringContains 
- roleNames List<String>
- The name of the role.
- id string
- The provider-assigned unique ID for this managed resource.
- roles
GetTarget Database Roles Role[] 
- The list of roles.
- targetDatabase stringId 
- authenticationType string
- Type of authentication.
- filters
GetTarget Database Roles Filter[] 
- isOracle booleanMaintained 
- Is the role oracle maintained.
- roleName stringContains 
- roleNames string[]
- The name of the role.
- id str
- The provider-assigned unique ID for this managed resource.
- roles
Sequence[GetTarget Database Roles Role] 
- The list of roles.
- target_database_ strid 
- authentication_type str
- Type of authentication.
- filters
Sequence[GetTarget Database Roles Filter] 
- is_oracle_ boolmaintained 
- Is the role oracle maintained.
- role_name_ strcontains 
- role_names Sequence[str]
- The name of the role.
- id String
- The provider-assigned unique ID for this managed resource.
- roles List<Property Map>
- The list of roles.
- targetDatabase StringId 
- authenticationType String
- Type of authentication.
- filters List<Property Map>
- isOracle BooleanMaintained 
- Is the role oracle maintained.
- roleName StringContains 
- roleNames List<String>
- The name of the role.
Supporting Types
GetTargetDatabaseRolesFilter    
GetTargetDatabaseRolesRole    
- AuthenticationType string
- A filter to return roles based on authentication type.
- IsCommon bool
- Is the role common.
- IsImplicit bool
- Is the role implicit.
- IsInherited bool
- Is the role inherited.
- IsOracle boolMaintained 
- A filter to return roles based on whether they are maintained by oracle or not.
- IsPassword boolRequired 
- Is password required.
- RoleName string
- A filter to return only a specific role based on role name.
- AuthenticationType string
- A filter to return roles based on authentication type.
- IsCommon bool
- Is the role common.
- IsImplicit bool
- Is the role implicit.
- IsInherited bool
- Is the role inherited.
- IsOracle boolMaintained 
- A filter to return roles based on whether they are maintained by oracle or not.
- IsPassword boolRequired 
- Is password required.
- RoleName string
- A filter to return only a specific role based on role name.
- authenticationType String
- A filter to return roles based on authentication type.
- isCommon Boolean
- Is the role common.
- isImplicit Boolean
- Is the role implicit.
- isInherited Boolean
- Is the role inherited.
- isOracle BooleanMaintained 
- A filter to return roles based on whether they are maintained by oracle or not.
- isPassword BooleanRequired 
- Is password required.
- roleName String
- A filter to return only a specific role based on role name.
- authenticationType string
- A filter to return roles based on authentication type.
- isCommon boolean
- Is the role common.
- isImplicit boolean
- Is the role implicit.
- isInherited boolean
- Is the role inherited.
- isOracle booleanMaintained 
- A filter to return roles based on whether they are maintained by oracle or not.
- isPassword booleanRequired 
- Is password required.
- roleName string
- A filter to return only a specific role based on role name.
- authentication_type str
- A filter to return roles based on authentication type.
- is_common bool
- Is the role common.
- is_implicit bool
- Is the role implicit.
- is_inherited bool
- Is the role inherited.
- is_oracle_ boolmaintained 
- A filter to return roles based on whether they are maintained by oracle or not.
- is_password_ boolrequired 
- Is password required.
- role_name str
- A filter to return only a specific role based on role name.
- authenticationType String
- A filter to return roles based on authentication type.
- isCommon Boolean
- Is the role common.
- isImplicit Boolean
- Is the role implicit.
- isInherited Boolean
- Is the role inherited.
- isOracle BooleanMaintained 
- A filter to return roles based on whether they are maintained by oracle or not.
- isPassword BooleanRequired 
- Is password required.
- roleName String
- A filter to return only a specific role based on role name.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.