1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getTargetDatabaseRoles
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.DataSafe.getTargetDatabaseRoles

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    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[_datasafe.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[_datasafe.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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DataSafe/getTargetDatabaseRoles:getTargetDatabaseRoles
      arguments:
        # arguments dictionary

    The following arguments are supported:

    TargetDatabaseId string
    The OCID of the Data Safe target database.
    AuthenticationType string
    A filter to return roles based on authentication type.
    Filters List<GetTargetDatabaseRolesFilter>
    IsOracleMaintained bool
    A filter to return roles based on whether they are maintained by oracle or not.
    RoleNameContains string
    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.
    TargetDatabaseId string
    The OCID of the Data Safe target database.
    AuthenticationType string
    A filter to return roles based on authentication type.
    Filters []GetTargetDatabaseRolesFilter
    IsOracleMaintained bool
    A filter to return roles based on whether they are maintained by oracle or not.
    RoleNameContains string
    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.
    targetDatabaseId String
    The OCID of the Data Safe target database.
    authenticationType String
    A filter to return roles based on authentication type.
    filters List<GetTargetDatabaseRolesFilter>
    isOracleMaintained Boolean
    A filter to return roles based on whether they are maintained by oracle or not.
    roleNameContains String
    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.
    targetDatabaseId string
    The OCID of the Data Safe target database.
    authenticationType string
    A filter to return roles based on authentication type.
    filters GetTargetDatabaseRolesFilter[]
    isOracleMaintained boolean
    A filter to return roles based on whether they are maintained by oracle or not.
    roleNameContains string
    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_id str
    The OCID of the Data Safe target database.
    authentication_type str
    A filter to return roles based on authentication type.
    filters Sequence[datasafe.GetTargetDatabaseRolesFilter]
    is_oracle_maintained bool
    A filter to return roles based on whether they are maintained by oracle or not.
    role_name_contains str
    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.
    targetDatabaseId String
    The OCID of the Data Safe target database.
    authenticationType String
    A filter to return roles based on authentication type.
    filters List<Property Map>
    isOracleMaintained Boolean
    A filter to return roles based on whether they are maintained by oracle or not.
    roleNameContains String
    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<GetTargetDatabaseRolesRole>
    The list of roles.
    TargetDatabaseId string
    AuthenticationType string
    Type of authentication.
    Filters List<GetTargetDatabaseRolesFilter>
    IsOracleMaintained bool
    Is the role oracle maintained.
    RoleNameContains string
    RoleNames List<string>
    The name of the role.
    Id string
    The provider-assigned unique ID for this managed resource.
    Roles []GetTargetDatabaseRolesRole
    The list of roles.
    TargetDatabaseId string
    AuthenticationType string
    Type of authentication.
    Filters []GetTargetDatabaseRolesFilter
    IsOracleMaintained bool
    Is the role oracle maintained.
    RoleNameContains string
    RoleNames []string
    The name of the role.
    id String
    The provider-assigned unique ID for this managed resource.
    roles List<GetTargetDatabaseRolesRole>
    The list of roles.
    targetDatabaseId String
    authenticationType String
    Type of authentication.
    filters List<GetTargetDatabaseRolesFilter>
    isOracleMaintained Boolean
    Is the role oracle maintained.
    roleNameContains String
    roleNames List<String>
    The name of the role.
    id string
    The provider-assigned unique ID for this managed resource.
    roles GetTargetDatabaseRolesRole[]
    The list of roles.
    targetDatabaseId string
    authenticationType string
    Type of authentication.
    filters GetTargetDatabaseRolesFilter[]
    isOracleMaintained boolean
    Is the role oracle maintained.
    roleNameContains string
    roleNames string[]
    The name of the role.
    id str
    The provider-assigned unique ID for this managed resource.
    roles Sequence[datasafe.GetTargetDatabaseRolesRole]
    The list of roles.
    target_database_id str
    authentication_type str
    Type of authentication.
    filters Sequence[datasafe.GetTargetDatabaseRolesFilter]
    is_oracle_maintained bool
    Is the role oracle maintained.
    role_name_contains str
    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.
    targetDatabaseId String
    authenticationType String
    Type of authentication.
    filters List<Property Map>
    isOracleMaintained Boolean
    Is the role oracle maintained.
    roleNameContains String
    roleNames List<String>
    The name of the role.

    Supporting Types

    GetTargetDatabaseRolesFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    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.
    IsOracleMaintained bool
    A filter to return roles based on whether they are maintained by oracle or not.
    IsPasswordRequired bool
    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.
    IsOracleMaintained bool
    A filter to return roles based on whether they are maintained by oracle or not.
    IsPasswordRequired bool
    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.
    isOracleMaintained Boolean
    A filter to return roles based on whether they are maintained by oracle or not.
    isPasswordRequired Boolean
    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.
    isOracleMaintained boolean
    A filter to return roles based on whether they are maintained by oracle or not.
    isPasswordRequired boolean
    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_maintained bool
    A filter to return roles based on whether they are maintained by oracle or not.
    is_password_required bool
    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.
    isOracleMaintained Boolean
    A filter to return roles based on whether they are maintained by oracle or not.
    isPasswordRequired Boolean
    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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi