Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.RecoveryMod.getProtectedDatabaseFetchConfiguration
Explore with Pulumi AI
This data source provides details about a specific Protected Database Fetch Configuration resource in Oracle Cloud Infrastructure Recovery service.
Downloads the network service configuration file ’tnsnames.ora’ for a specified protected database. Applies to user-defined recovery systems only.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testProtectedDatabaseFetchConfiguration = oci.RecoveryMod.getProtectedDatabaseFetchConfiguration({
    protectedDatabaseId: testProtectedDatabase.id,
    base64EncodeContent: true,
    configurationType: protectedDatabaseFetchConfigurationConfigurationType,
});
import pulumi
import pulumi_oci as oci
test_protected_database_fetch_configuration = oci.RecoveryMod.get_protected_database_fetch_configuration(protected_database_id=test_protected_database["id"],
    base64_encode_content=True,
    configuration_type=protected_database_fetch_configuration_configuration_type)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/recoverymod"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := recoverymod.GetProtectedDatabaseFetchConfiguration(ctx, &recoverymod.GetProtectedDatabaseFetchConfigurationArgs{
			ProtectedDatabaseId: testProtectedDatabase.Id,
			Base64EncodeContent: pulumi.BoolRef(true),
			ConfigurationType:   pulumi.StringRef(protectedDatabaseFetchConfigurationConfigurationType),
		}, 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 testProtectedDatabaseFetchConfiguration = Oci.RecoveryMod.GetProtectedDatabaseFetchConfiguration.Invoke(new()
    {
        ProtectedDatabaseId = testProtectedDatabase.Id,
        Base64EncodeContent = true,
        ConfigurationType = protectedDatabaseFetchConfigurationConfigurationType,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.RecoveryMod.RecoveryModFunctions;
import com.pulumi.oci.RecoveryMod.inputs.GetProtectedDatabaseFetchConfigurationArgs;
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 testProtectedDatabaseFetchConfiguration = RecoveryModFunctions.getProtectedDatabaseFetchConfiguration(GetProtectedDatabaseFetchConfigurationArgs.builder()
            .protectedDatabaseId(testProtectedDatabase.id())
            .base64EncodeContent(true)
            .configurationType(protectedDatabaseFetchConfigurationConfigurationType)
            .build());
    }
}
variables:
  testProtectedDatabaseFetchConfiguration:
    fn::invoke:
      function: oci:RecoveryMod:getProtectedDatabaseFetchConfiguration
      arguments:
        protectedDatabaseId: ${testProtectedDatabase.id}
        base64EncodeContent: true
        configurationType: ${protectedDatabaseFetchConfigurationConfigurationType}
Using getProtectedDatabaseFetchConfiguration
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 getProtectedDatabaseFetchConfiguration(args: GetProtectedDatabaseFetchConfigurationArgs, opts?: InvokeOptions): Promise<GetProtectedDatabaseFetchConfigurationResult>
function getProtectedDatabaseFetchConfigurationOutput(args: GetProtectedDatabaseFetchConfigurationOutputArgs, opts?: InvokeOptions): Output<GetProtectedDatabaseFetchConfigurationResult>def get_protected_database_fetch_configuration(base64_encode_content: Optional[bool] = None,
                                               configuration_type: Optional[str] = None,
                                               protected_database_id: Optional[str] = None,
                                               opts: Optional[InvokeOptions] = None) -> GetProtectedDatabaseFetchConfigurationResult
def get_protected_database_fetch_configuration_output(base64_encode_content: Optional[pulumi.Input[bool]] = None,
                                               configuration_type: Optional[pulumi.Input[str]] = None,
                                               protected_database_id: Optional[pulumi.Input[str]] = None,
                                               opts: Optional[InvokeOptions] = None) -> Output[GetProtectedDatabaseFetchConfigurationResult]func GetProtectedDatabaseFetchConfiguration(ctx *Context, args *GetProtectedDatabaseFetchConfigurationArgs, opts ...InvokeOption) (*GetProtectedDatabaseFetchConfigurationResult, error)
func GetProtectedDatabaseFetchConfigurationOutput(ctx *Context, args *GetProtectedDatabaseFetchConfigurationOutputArgs, opts ...InvokeOption) GetProtectedDatabaseFetchConfigurationResultOutput> Note: This function is named GetProtectedDatabaseFetchConfiguration in the Go SDK.
public static class GetProtectedDatabaseFetchConfiguration 
{
    public static Task<GetProtectedDatabaseFetchConfigurationResult> InvokeAsync(GetProtectedDatabaseFetchConfigurationArgs args, InvokeOptions? opts = null)
    public static Output<GetProtectedDatabaseFetchConfigurationResult> Invoke(GetProtectedDatabaseFetchConfigurationInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetProtectedDatabaseFetchConfigurationResult> getProtectedDatabaseFetchConfiguration(GetProtectedDatabaseFetchConfigurationArgs args, InvokeOptions options)
public static Output<GetProtectedDatabaseFetchConfigurationResult> getProtectedDatabaseFetchConfiguration(GetProtectedDatabaseFetchConfigurationArgs args, InvokeOptions options)
fn::invoke:
  function: oci:RecoveryMod/getProtectedDatabaseFetchConfiguration:getProtectedDatabaseFetchConfiguration
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ProtectedDatabase stringId 
- The protected database OCID.
- Base64EncodeContent bool
- ConfigurationType string
- Currently has four config options ALL, TNSNAMES, HOSTS and CABUNDLE. All will return a zipped folder containing the contents of both tnsnames and the certificateChainPem.
- ProtectedDatabase stringId 
- The protected database OCID.
- Base64EncodeContent bool
- ConfigurationType string
- Currently has four config options ALL, TNSNAMES, HOSTS and CABUNDLE. All will return a zipped folder containing the contents of both tnsnames and the certificateChainPem.
- protectedDatabase StringId 
- The protected database OCID.
- base64EncodeContent Boolean
- configurationType String
- Currently has four config options ALL, TNSNAMES, HOSTS and CABUNDLE. All will return a zipped folder containing the contents of both tnsnames and the certificateChainPem.
- protectedDatabase stringId 
- The protected database OCID.
- base64EncodeContent boolean
- configurationType string
- Currently has four config options ALL, TNSNAMES, HOSTS and CABUNDLE. All will return a zipped folder containing the contents of both tnsnames and the certificateChainPem.
- protected_database_ strid 
- The protected database OCID.
- base64_encode_ boolcontent 
- configuration_type str
- Currently has four config options ALL, TNSNAMES, HOSTS and CABUNDLE. All will return a zipped folder containing the contents of both tnsnames and the certificateChainPem.
- protectedDatabase StringId 
- The protected database OCID.
- base64EncodeContent Boolean
- configurationType String
- Currently has four config options ALL, TNSNAMES, HOSTS and CABUNDLE. All will return a zipped folder containing the contents of both tnsnames and the certificateChainPem.
getProtectedDatabaseFetchConfiguration Result
The following output properties are available:
- Content string
- content of the downloaded config file for recovery service. It is base64 encoded by default. To store the config in plaintext set base_64_encode_contentto false.
- Id string
- The provider-assigned unique ID for this managed resource.
- ProtectedDatabase stringId 
- Base64EncodeContent bool
- ConfigurationType string
- Content string
- content of the downloaded config file for recovery service. It is base64 encoded by default. To store the config in plaintext set base_64_encode_contentto false.
- Id string
- The provider-assigned unique ID for this managed resource.
- ProtectedDatabase stringId 
- Base64EncodeContent bool
- ConfigurationType string
- content String
- content of the downloaded config file for recovery service. It is base64 encoded by default. To store the config in plaintext set base_64_encode_contentto false.
- id String
- The provider-assigned unique ID for this managed resource.
- protectedDatabase StringId 
- base64EncodeContent Boolean
- configurationType String
- content string
- content of the downloaded config file for recovery service. It is base64 encoded by default. To store the config in plaintext set base_64_encode_contentto false.
- id string
- The provider-assigned unique ID for this managed resource.
- protectedDatabase stringId 
- base64EncodeContent boolean
- configurationType string
- content str
- content of the downloaded config file for recovery service. It is base64 encoded by default. To store the config in plaintext set base_64_encode_contentto false.
- id str
- The provider-assigned unique ID for this managed resource.
- protected_database_ strid 
- base64_encode_ boolcontent 
- configuration_type str
- content String
- content of the downloaded config file for recovery service. It is base64 encoded by default. To store the config in plaintext set base_64_encode_contentto false.
- id String
- The provider-assigned unique ID for this managed resource.
- protectedDatabase StringId 
- base64EncodeContent Boolean
- configurationType String
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.