Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getManagedPreferredCredentials

This data source provides the list of Managed Database Preferred Credentials in Oracle Cloud Infrastructure Database Management service.

Gets the list of preferred credentials for a given Managed Database.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testManagedDatabasePreferredCredentials = Oci.Database.GetManagedPreferredCredentials.Invoke(new()
    {
        ManagedDatabaseId = oci_database_management_managed_database.Test_managed_database.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/Database"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Database.GetManagedPreferredCredentials(ctx, &database.GetManagedPreferredCredentialsArgs{
			ManagedDatabaseId: oci_database_management_managed_database.Test_managed_database.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Database.DatabaseFunctions;
import com.pulumi.oci.Database.inputs.GetManagedPreferredCredentialsArgs;
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 testManagedDatabasePreferredCredentials = DatabaseFunctions.getManagedPreferredCredentials(GetManagedPreferredCredentialsArgs.builder()
            .managedDatabaseId(oci_database_management_managed_database.test_managed_database().id())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_managed_database_preferred_credentials = oci.Database.get_managed_preferred_credentials(managed_database_id=oci_database_management_managed_database["test_managed_database"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testManagedDatabasePreferredCredentials = oci.Database.getManagedPreferredCredentials({
    managedDatabaseId: oci_database_management_managed_database.test_managed_database.id,
});
variables:
  testManagedDatabasePreferredCredentials:
    Fn::Invoke:
      Function: oci:Database:getManagedPreferredCredentials
      Arguments:
        managedDatabaseId: ${oci_database_management_managed_database.test_managed_database.id}

Using getManagedPreferredCredentials

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 getManagedPreferredCredentials(args: GetManagedPreferredCredentialsArgs, opts?: InvokeOptions): Promise<GetManagedPreferredCredentialsResult>
function getManagedPreferredCredentialsOutput(args: GetManagedPreferredCredentialsOutputArgs, opts?: InvokeOptions): Output<GetManagedPreferredCredentialsResult>
def get_managed_preferred_credentials(filters: Optional[Sequence[_database.GetManagedPreferredCredentialsFilter]] = None,
                                      managed_database_id: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetManagedPreferredCredentialsResult
def get_managed_preferred_credentials_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_database.GetManagedPreferredCredentialsFilterArgs]]]] = None,
                                      managed_database_id: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetManagedPreferredCredentialsResult]
func GetManagedPreferredCredentials(ctx *Context, args *GetManagedPreferredCredentialsArgs, opts ...InvokeOption) (*GetManagedPreferredCredentialsResult, error)
func GetManagedPreferredCredentialsOutput(ctx *Context, args *GetManagedPreferredCredentialsOutputArgs, opts ...InvokeOption) GetManagedPreferredCredentialsResultOutput

> Note: This function is named GetManagedPreferredCredentials in the Go SDK.

public static class GetManagedPreferredCredentials 
{
    public static Task<GetManagedPreferredCredentialsResult> InvokeAsync(GetManagedPreferredCredentialsArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedPreferredCredentialsResult> Invoke(GetManagedPreferredCredentialsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetManagedPreferredCredentialsResult> getManagedPreferredCredentials(GetManagedPreferredCredentialsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:Database/getManagedPreferredCredentials:getManagedPreferredCredentials
  Arguments:
    # Arguments dictionary

The following arguments are supported:

managedDatabaseId String

The OCID of the Managed Database.

filters List<Property Map>

getManagedPreferredCredentials Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

ManagedDatabaseId string
PreferredCredentialCollections List<GetManagedPreferredCredentialsPreferredCredentialCollection>

The list of preferred_credential_collection.

Filters List<GetManagedPreferredCredentialsFilter>
Id string

The provider-assigned unique ID for this managed resource.

ManagedDatabaseId string
PreferredCredentialCollections []GetManagedPreferredCredentialsPreferredCredentialCollection

The list of preferred_credential_collection.

Filters []GetManagedPreferredCredentialsFilter
id String

The provider-assigned unique ID for this managed resource.

managedDatabaseId String
preferredCredentialCollections List<GetManagedPreferredCredentialsPreferredCredentialCollection>

The list of preferred_credential_collection.

filters List<GetManagedPreferredCredentialsFilter>
id string

The provider-assigned unique ID for this managed resource.

managedDatabaseId string
preferredCredentialCollections GetManagedPreferredCredentialsPreferredCredentialCollection[]

The list of preferred_credential_collection.

filters GetManagedPreferredCredentialsFilter[]
id str

The provider-assigned unique ID for this managed resource.

managed_database_id str
preferred_credential_collections GetManagedPreferredCredentialsPreferredCredentialCollection]

The list of preferred_credential_collection.

filters GetManagedPreferredCredentialsFilter]
id String

The provider-assigned unique ID for this managed resource.

managedDatabaseId String
preferredCredentialCollections List<Property Map>

The list of preferred_credential_collection.

filters List<Property Map>

Supporting Types

GetManagedPreferredCredentialsFilter

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

GetManagedPreferredCredentialsPreferredCredentialCollection

GetManagedPreferredCredentialsPreferredCredentialCollectionItem

CredentialName string

The name of the preferred credential.

IsAccessible bool

Indicates whether the preferred credential is accessible.

PasswordSecretId string

The OCID of the Vault service secret that contains the database user password.

Role string

The role of the database user.

Status string

The status of the preferred credential.

Type string

The type of preferred credential. Only 'BASIC' is supported currently.

UserName string

The user name used to connect to the database.

CredentialName string

The name of the preferred credential.

IsAccessible bool

Indicates whether the preferred credential is accessible.

PasswordSecretId string

The OCID of the Vault service secret that contains the database user password.

Role string

The role of the database user.

Status string

The status of the preferred credential.

Type string

The type of preferred credential. Only 'BASIC' is supported currently.

UserName string

The user name used to connect to the database.

credentialName String

The name of the preferred credential.

isAccessible Boolean

Indicates whether the preferred credential is accessible.

passwordSecretId String

The OCID of the Vault service secret that contains the database user password.

role String

The role of the database user.

status String

The status of the preferred credential.

type String

The type of preferred credential. Only 'BASIC' is supported currently.

userName String

The user name used to connect to the database.

credentialName string

The name of the preferred credential.

isAccessible boolean

Indicates whether the preferred credential is accessible.

passwordSecretId string

The OCID of the Vault service secret that contains the database user password.

role string

The role of the database user.

status string

The status of the preferred credential.

type string

The type of preferred credential. Only 'BASIC' is supported currently.

userName string

The user name used to connect to the database.

credential_name str

The name of the preferred credential.

is_accessible bool

Indicates whether the preferred credential is accessible.

password_secret_id str

The OCID of the Vault service secret that contains the database user password.

role str

The role of the database user.

status str

The status of the preferred credential.

type str

The type of preferred credential. Only 'BASIC' is supported currently.

user_name str

The user name used to connect to the database.

credentialName String

The name of the preferred credential.

isAccessible Boolean

Indicates whether the preferred credential is accessible.

passwordSecretId String

The OCID of the Vault service secret that contains the database user password.

role String

The role of the database user.

status String

The status of the preferred credential.

type String

The type of preferred credential. Only 'BASIC' is supported currently.

userName String

The user name used to connect to the database.

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.