Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi
oci.DataSafe.getTargetDatabaseRoles
Start a Neo task
Explain and create an oci.DataSafe.getTargetDatabaseRoles resource
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/v3/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:
- Target
Database stringId - The OCID of the Data Safe target database.
- Authentication
Type string - A filter to return roles based on authentication type.
- Filters
List<Get
Target Database Roles Filter> - Is
Oracle boolMaintained - A filter to return roles based on whether they are maintained by oracle or not.
- Role
Name stringContains - A filter to return only items if role name contains a specific string.
- Role
Names List<string> - A filter to return only a specific role based on role name.
- Target
Database stringId - The OCID of the Data Safe target database.
- Authentication
Type string - A filter to return roles based on authentication type.
- Filters
[]Get
Target Database Roles Filter - Is
Oracle boolMaintained - A filter to return roles based on whether they are maintained by oracle or not.
- Role
Name stringContains - A filter to return only items if role name contains a specific string.
- Role
Names []string - A filter to return only a specific role based on role name.
- target
Database StringId - The OCID of the Data Safe target database.
- authentication
Type String - A filter to return roles based on authentication type.
- filters
List<Get
Target Database Roles Filter> - is
Oracle BooleanMaintained - A filter to return roles based on whether they are maintained by oracle or not.
- role
Name StringContains - A filter to return only items if role name contains a specific string.
- role
Names List<String> - A filter to return only a specific role based on role name.
- target
Database stringId - The OCID of the Data Safe target database.
- authentication
Type string - A filter to return roles based on authentication type.
- filters
Get
Target Database Roles Filter[] - is
Oracle booleanMaintained - A filter to return roles based on whether they are maintained by oracle or not.
- role
Name stringContains - A filter to return only items if role name contains a specific string.
- role
Names 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[Get
Target 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.
- target
Database StringId - The OCID of the Data Safe target database.
- authentication
Type String - A filter to return roles based on authentication type.
- filters List<Property Map>
- is
Oracle BooleanMaintained - A filter to return roles based on whether they are maintained by oracle or not.
- role
Name StringContains - A filter to return only items if role name contains a specific string.
- role
Names 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<Get
Target Database Roles Role> - The list of roles.
- Target
Database stringId - Authentication
Type string - Type of authentication.
- Filters
List<Get
Target Database Roles Filter> - Is
Oracle boolMaintained - Is the role oracle maintained.
- Role
Name stringContains - Role
Names List<string> - The name of the role.
- Id string
- The provider-assigned unique ID for this managed resource.
- Roles
[]Get
Target Database Roles Role - The list of roles.
- Target
Database stringId - Authentication
Type string - Type of authentication.
- Filters
[]Get
Target Database Roles Filter - Is
Oracle boolMaintained - Is the role oracle maintained.
- Role
Name stringContains - Role
Names []string - The name of the role.
- id String
- The provider-assigned unique ID for this managed resource.
- roles
List<Get
Target Database Roles Role> - The list of roles.
- target
Database StringId - authentication
Type String - Type of authentication.
- filters
List<Get
Target Database Roles Filter> - is
Oracle BooleanMaintained - Is the role oracle maintained.
- role
Name StringContains - role
Names List<String> - The name of the role.
- id string
- The provider-assigned unique ID for this managed resource.
- roles
Get
Target Database Roles Role[] - The list of roles.
- target
Database stringId - authentication
Type string - Type of authentication.
- filters
Get
Target Database Roles Filter[] - is
Oracle booleanMaintained - Is the role oracle maintained.
- role
Name stringContains - role
Names string[] - The name of the role.
- id str
- The provider-assigned unique ID for this managed resource.
- roles
Sequence[Get
Target Database Roles Role] - The list of roles.
- target_
database_ strid - authentication_
type str - Type of authentication.
- filters
Sequence[Get
Target 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.
- target
Database StringId - authentication
Type String - Type of authentication.
- filters List<Property Map>
- is
Oracle BooleanMaintained - Is the role oracle maintained.
- role
Name StringContains - role
Names List<String> - The name of the role.
Supporting Types
GetTargetDatabaseRolesFilter
GetTargetDatabaseRolesRole
- Authentication
Type string - 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 string - A filter to return only a specific role based on role name.
- Authentication
Type string - 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 string - A filter to return only a specific role based on role name.
- authentication
Type String - A filter to return roles based on authentication type.
- is
Common Boolean - Is the role common.
- is
Implicit Boolean - Is the role implicit.
- is
Inherited Boolean - Is the role inherited.
- is
Oracle BooleanMaintained - A filter to return roles based on whether they are maintained by oracle or not.
- is
Password BooleanRequired - Is password required.
- role
Name String - A filter to return only a specific role based on role name.
- authentication
Type string - A filter to return roles based on authentication type.
- is
Common boolean - Is the role common.
- is
Implicit boolean - Is the role implicit.
- is
Inherited boolean - Is the role inherited.
- is
Oracle booleanMaintained - A filter to return roles based on whether they are maintained by oracle or not.
- is
Password booleanRequired - Is password required.
- role
Name 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.
- authentication
Type String - A filter to return roles based on authentication type.
- is
Common Boolean - Is the role common.
- is
Implicit Boolean - Is the role implicit.
- is
Inherited Boolean - Is the role inherited.
- is
Oracle BooleanMaintained - A filter to return roles based on whether they are maintained by oracle or not.
- is
Password BooleanRequired - Is password required.
- role
Name 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.
