1. Packages
  2. Packages
  3. Oracle Cloud Infrastructure
  4. API Docs
  5. ApmConfig
  6. getDataFile
Viewing docs for Oracle Cloud Infrastructure v4.16.0
published on Wednesday, Jun 17, 2026 by Pulumi
oci logo
Viewing docs for Oracle Cloud Infrastructure v4.16.0
published on Wednesday, Jun 17, 2026 by Pulumi

    This data source provides details about a specific Data File resource in Oracle Cloud Infrastructure Apm Config service.

    Retrieves the Data file with the specified name and type.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDataFile = oci.apmconfig.getDataFile({
        apmDomainId: testApmDomain.id,
        apmType: dataFileApmType,
        dataFileName: testDataFileOciApmConfigDataFile.name,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_data_file = oci.apmconfig.get_data_file(apm_domain_id=test_apm_domain["id"],
        apm_type=data_file_apm_type,
        data_file_name=test_data_file_oci_apm_config_data_file["name"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v4/go/oci/apmconfig"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := apmconfig.GetDataFile(ctx, &apmconfig.GetDataFileArgs{
    			ApmDomainId:  testApmDomain.Id,
    			ApmType:      dataFileApmType,
    			DataFileName: testDataFileOciApmConfigDataFile.Name,
    		}, 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 testDataFile = Oci.ApmConfig.GetDataFile.Invoke(new()
        {
            ApmDomainId = testApmDomain.Id,
            ApmType = dataFileApmType,
            DataFileName = testDataFileOciApmConfigDataFile.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.ApmConfig.ApmConfigFunctions;
    import com.pulumi.oci.ApmConfig.inputs.GetDataFileArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 testDataFile = ApmConfigFunctions.getDataFile(GetDataFileArgs.builder()
                .apmDomainId(testApmDomain.id())
                .apmType(dataFileApmType)
                .dataFileName(testDataFileOciApmConfigDataFile.name())
                .build());
    
        }
    }
    
    variables:
      testDataFile:
        fn::invoke:
          function: oci:ApmConfig:getDataFile
          arguments:
            apmDomainId: ${testApmDomain.id}
            apmType: ${dataFileApmType}
            dataFileName: ${testDataFileOciApmConfigDataFile.name}
    
    pulumi {
      required_providers {
        oci = {
          source = "pulumi/oci"
        }
      }
    }
    
    data "oci_apmconfig_getdatafile" "testDataFile" {
      apm_domain_id  = testApmDomain.id
      apm_type       = dataFileApmType
      data_file_name = testDataFileOciApmConfigDataFile.name
    }
    

    Using getDataFile

    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 getDataFile(args: GetDataFileArgs, opts?: InvokeOptions): Promise<GetDataFileResult>
    function getDataFileOutput(args: GetDataFileOutputArgs, opts?: InvokeOptions): Output<GetDataFileResult>
    def get_data_file(apm_domain_id: Optional[str] = None,
                      apm_type: Optional[str] = None,
                      base64_encode_content: Optional[bool] = None,
                      data_file_name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetDataFileResult
    def get_data_file_output(apm_domain_id: pulumi.Input[Optional[str]] = None,
                      apm_type: pulumi.Input[Optional[str]] = None,
                      base64_encode_content: pulumi.Input[Optional[bool]] = None,
                      data_file_name: pulumi.Input[Optional[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetDataFileResult]
    func LookupDataFile(ctx *Context, args *LookupDataFileArgs, opts ...InvokeOption) (*LookupDataFileResult, error)
    func LookupDataFileOutput(ctx *Context, args *LookupDataFileOutputArgs, opts ...InvokeOption) LookupDataFileResultOutput

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

    public static class GetDataFile 
    {
        public static Task<GetDataFileResult> InvokeAsync(GetDataFileArgs args, InvokeOptions? opts = null)
        public static Output<GetDataFileResult> Invoke(GetDataFileInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDataFileResult> getDataFile(GetDataFileArgs args, InvokeOptions options)
    public static Output<GetDataFileResult> getDataFile(GetDataFileArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:ApmConfig/getDataFile:getDataFile
      arguments:
        # arguments dictionary
    data "oci_apmconfig_getdatafile" "name" {
        # arguments
    }

    The following arguments are supported:

    ApmDomainId string
    The APM Domain ID the request is intended for.
    ApmType string
    The type of the data file.
    DataFileName string
    The name of the data file.
    Base64EncodeContent bool
    Encodes the downloaded content in base64.
    ApmDomainId string
    The APM Domain ID the request is intended for.
    ApmType string
    The type of the data file.
    DataFileName string
    The name of the data file.
    Base64EncodeContent bool
    Encodes the downloaded content in base64.
    apm_domain_id string
    The APM Domain ID the request is intended for.
    apm_type string
    The type of the data file.
    data_file_name string
    The name of the data file.
    base64_encode_content bool
    Encodes the downloaded content in base64.
    apmDomainId String
    The APM Domain ID the request is intended for.
    apmType String
    The type of the data file.
    dataFileName String
    The name of the data file.
    base64EncodeContent Boolean
    Encodes the downloaded content in base64.
    apmDomainId string
    The APM Domain ID the request is intended for.
    apmType string
    The type of the data file.
    dataFileName string
    The name of the data file.
    base64EncodeContent boolean
    Encodes the downloaded content in base64.
    apm_domain_id str
    The APM Domain ID the request is intended for.
    apm_type str
    The type of the data file.
    data_file_name str
    The name of the data file.
    base64_encode_content bool
    Encodes the downloaded content in base64.
    apmDomainId String
    The APM Domain ID the request is intended for.
    apmType String
    The type of the data file.
    dataFileName String
    The name of the data file.
    base64EncodeContent Boolean
    Encodes the downloaded content in base64.

    getDataFile Result

    The following output properties are available:

    ApmDomainId string
    ApmType string
    Content string
    ContentDisposition string
    ContentEncoding string
    ContentLanguage string
    ContentLength int
    ContentMd5 string
    ContentType string
    DataFileName string
    Id string
    Metadata Dictionary<string, string>
    Source string
    TimeLastModified string
    Base64EncodeContent bool
    apmDomainId String
    apmType String
    content String
    contentDisposition String
    contentEncoding String
    contentLanguage String
    contentLength Integer
    contentMd5 String
    contentType String
    dataFileName String
    id String
    metadata Map<String,String>
    source String
    timeLastModified String
    base64EncodeContent Boolean
    apmDomainId string
    apmType string
    content string
    contentDisposition string
    contentEncoding string
    contentLanguage string
    contentLength number
    contentMd5 string
    contentType string
    dataFileName string
    id string
    metadata {[key: string]: string}
    source string
    timeLastModified string
    base64EncodeContent boolean

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Viewing docs for Oracle Cloud Infrastructure v4.16.0
    published on Wednesday, Jun 17, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial