Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:RecoveryMod/getProtectedDatabaseFetchConfiguration:getProtectedDatabaseFetchConfiguration
arguments:
# arguments dictionary
The following arguments are supported:
- Protected
Database stringId - The protected database OCID.
- Base64Encode
Content bool - Configuration
Type 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 stringId - The protected database OCID.
- Base64Encode
Content bool - Configuration
Type 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 StringId - The protected database OCID.
- base64Encode
Content Boolean - configuration
Type 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 stringId - The protected database OCID.
- base64Encode
Content boolean - configuration
Type 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.
- protected
Database StringId - The protected database OCID.
- base64Encode
Content Boolean - configuration
Type 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_content
to false. - Id string
- The provider-assigned unique ID for this managed resource.
- Protected
Database stringId - Base64Encode
Content bool - Configuration
Type 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_content
to false. - Id string
- The provider-assigned unique ID for this managed resource.
- Protected
Database stringId - Base64Encode
Content bool - Configuration
Type 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_content
to false. - id String
- The provider-assigned unique ID for this managed resource.
- protected
Database StringId - base64Encode
Content Boolean - configuration
Type 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_content
to false. - id string
- The provider-assigned unique ID for this managed resource.
- protected
Database stringId - base64Encode
Content boolean - configuration
Type 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_content
to 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_content
to false. - id String
- The provider-assigned unique ID for this managed resource.
- protected
Database StringId - base64Encode
Content Boolean - configuration
Type String
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.