1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ApmTraces
  5. getLog
Oracle Cloud Infrastructure v3.7.0 published on Saturday, Sep 13, 2025 by Pulumi

oci.ApmTraces.getLog

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v3.7.0 published on Saturday, Sep 13, 2025 by Pulumi

    This data source provides details about a specific Log resource in Oracle Cloud Infrastructure Apm Traces service.

    Retrieve a log in the APM Domain.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testLog = oci.ApmTraces.getLog({
        apmDomainId: testApmDomain.id,
        logKey: logLogKey,
        timeLogEndedLessThan: logTimeLogEndedLessThan,
        timeLogStartedGreaterThanOrEqualTo: logTimeLogStartedGreaterThanOrEqualTo,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_log = oci.ApmTraces.get_log(apm_domain_id=test_apm_domain["id"],
        log_key=log_log_key,
        time_log_ended_less_than=log_time_log_ended_less_than,
        time_log_started_greater_than_or_equal_to=log_time_log_started_greater_than_or_equal_to)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/apmtraces"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := apmtraces.GetLog(ctx, &apmtraces.GetLogArgs{
    			ApmDomainId:                        testApmDomain.Id,
    			LogKey:                             logLogKey,
    			TimeLogEndedLessThan:               logTimeLogEndedLessThan,
    			TimeLogStartedGreaterThanOrEqualTo: logTimeLogStartedGreaterThanOrEqualTo,
    		}, 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 testLog = Oci.ApmTraces.GetLog.Invoke(new()
        {
            ApmDomainId = testApmDomain.Id,
            LogKey = logLogKey,
            TimeLogEndedLessThan = logTimeLogEndedLessThan,
            TimeLogStartedGreaterThanOrEqualTo = logTimeLogStartedGreaterThanOrEqualTo,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.ApmTraces.ApmTracesFunctions;
    import com.pulumi.oci.ApmTraces.inputs.GetLogArgs;
    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 testLog = ApmTracesFunctions.getLog(GetLogArgs.builder()
                .apmDomainId(testApmDomain.id())
                .logKey(logLogKey)
                .timeLogEndedLessThan(logTimeLogEndedLessThan)
                .timeLogStartedGreaterThanOrEqualTo(logTimeLogStartedGreaterThanOrEqualTo)
                .build());
    
        }
    }
    
    variables:
      testLog:
        fn::invoke:
          function: oci:ApmTraces:getLog
          arguments:
            apmDomainId: ${testApmDomain.id}
            logKey: ${logLogKey}
            timeLogEndedLessThan: ${logTimeLogEndedLessThan}
            timeLogStartedGreaterThanOrEqualTo: ${logTimeLogStartedGreaterThanOrEqualTo}
    

    Using getLog

    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 getLog(args: GetLogArgs, opts?: InvokeOptions): Promise<GetLogResult>
    function getLogOutput(args: GetLogOutputArgs, opts?: InvokeOptions): Output<GetLogResult>
    def get_log(apm_domain_id: Optional[str] = None,
                log_key: Optional[str] = None,
                time_log_ended_less_than: Optional[str] = None,
                time_log_started_greater_than_or_equal_to: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetLogResult
    def get_log_output(apm_domain_id: Optional[pulumi.Input[str]] = None,
                log_key: Optional[pulumi.Input[str]] = None,
                time_log_ended_less_than: Optional[pulumi.Input[str]] = None,
                time_log_started_greater_than_or_equal_to: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetLogResult]
    func GetLog(ctx *Context, args *GetLogArgs, opts ...InvokeOption) (*GetLogResult, error)
    func GetLogOutput(ctx *Context, args *GetLogOutputArgs, opts ...InvokeOption) GetLogResultOutput

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

    public static class GetLog 
    {
        public static Task<GetLogResult> InvokeAsync(GetLogArgs args, InvokeOptions? opts = null)
        public static Output<GetLogResult> Invoke(GetLogInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLogResult> getLog(GetLogArgs args, InvokeOptions options)
    public static Output<GetLogResult> getLog(GetLogArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:ApmTraces/getLog:getLog
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ApmDomainId string
    The APM Domain ID for the intended request.
    LogKey string
    Log key.
    TimeLogEndedLessThan string
    Include logs with log time less than this value.
    TimeLogStartedGreaterThanOrEqualTo string
    Include logs with log time equal to or greater than this value.
    ApmDomainId string
    The APM Domain ID for the intended request.
    LogKey string
    Log key.
    TimeLogEndedLessThan string
    Include logs with log time less than this value.
    TimeLogStartedGreaterThanOrEqualTo string
    Include logs with log time equal to or greater than this value.
    apmDomainId String
    The APM Domain ID for the intended request.
    logKey String
    Log key.
    timeLogEndedLessThan String
    Include logs with log time less than this value.
    timeLogStartedGreaterThanOrEqualTo String
    Include logs with log time equal to or greater than this value.
    apmDomainId string
    The APM Domain ID for the intended request.
    logKey string
    Log key.
    timeLogEndedLessThan string
    Include logs with log time less than this value.
    timeLogStartedGreaterThanOrEqualTo string
    Include logs with log time equal to or greater than this value.
    apm_domain_id str
    The APM Domain ID for the intended request.
    log_key str
    Log key.
    time_log_ended_less_than str
    Include logs with log time less than this value.
    time_log_started_greater_than_or_equal_to str
    Include logs with log time equal to or greater than this value.
    apmDomainId String
    The APM Domain ID for the intended request.
    logKey String
    Log key.
    timeLogEndedLessThan String
    Include logs with log time less than this value.
    timeLogStartedGreaterThanOrEqualTo String
    Include logs with log time equal to or greater than this value.

    getLog Result

    The following output properties are available:

    ApmDomainId string
    AttributeMetadata Dictionary<string, string>
    Metadata about the attributes in the logs.
    Attributes List<GetLogAttribute>
    List of attributes associated with the logs.
    Body string
    Log body (Body).
    EventName string
    Name of the event.
    Id string
    The provider-assigned unique ID for this managed resource.
    LogKey string
    Unique identifier (logId) for the logKey. Note that this field is defined as logKey in the API and it maps to the logId in Application Performance Monitoring.
    OverflowAttributes string
    Full values for attributes that are too long to be stored as a log attribute (Overflow).
    SeverityNumber int
    Log Severity number (SeverityNumber).
    SeverityText string
    Log Severity text (SeverityText). Also known as Log level.
    SpanKey string
    Unique identifier for the span (spanId) associated with this log.
    TimeCreated string
    Time that the log event occurred (CreatedTime).
    TimeLogEndedLessThan string
    TimeLogStartedGreaterThanOrEqualTo string
    TimeObserved string
    Time that the log was received by apm (ObservedTime).
    Timestamp string
    Time used by the time picker (RecordedTime). Either the timeCreated if present or the timeObserved.
    TraceFlags int
    Trace flags.
    TraceKey string
    Unique identifier for the trace (traceId) associated with this log.
    ApmDomainId string
    AttributeMetadata map[string]string
    Metadata about the attributes in the logs.
    Attributes []GetLogAttribute
    List of attributes associated with the logs.
    Body string
    Log body (Body).
    EventName string
    Name of the event.
    Id string
    The provider-assigned unique ID for this managed resource.
    LogKey string
    Unique identifier (logId) for the logKey. Note that this field is defined as logKey in the API and it maps to the logId in Application Performance Monitoring.
    OverflowAttributes string
    Full values for attributes that are too long to be stored as a log attribute (Overflow).
    SeverityNumber int
    Log Severity number (SeverityNumber).
    SeverityText string
    Log Severity text (SeverityText). Also known as Log level.
    SpanKey string
    Unique identifier for the span (spanId) associated with this log.
    TimeCreated string
    Time that the log event occurred (CreatedTime).
    TimeLogEndedLessThan string
    TimeLogStartedGreaterThanOrEqualTo string
    TimeObserved string
    Time that the log was received by apm (ObservedTime).
    Timestamp string
    Time used by the time picker (RecordedTime). Either the timeCreated if present or the timeObserved.
    TraceFlags int
    Trace flags.
    TraceKey string
    Unique identifier for the trace (traceId) associated with this log.
    apmDomainId String
    attributeMetadata Map<String,String>
    Metadata about the attributes in the logs.
    attributes List<GetLogAttribute>
    List of attributes associated with the logs.
    body String
    Log body (Body).
    eventName String
    Name of the event.
    id String
    The provider-assigned unique ID for this managed resource.
    logKey String
    Unique identifier (logId) for the logKey. Note that this field is defined as logKey in the API and it maps to the logId in Application Performance Monitoring.
    overflowAttributes String
    Full values for attributes that are too long to be stored as a log attribute (Overflow).
    severityNumber Integer
    Log Severity number (SeverityNumber).
    severityText String
    Log Severity text (SeverityText). Also known as Log level.
    spanKey String
    Unique identifier for the span (spanId) associated with this log.
    timeCreated String
    Time that the log event occurred (CreatedTime).
    timeLogEndedLessThan String
    timeLogStartedGreaterThanOrEqualTo String
    timeObserved String
    Time that the log was received by apm (ObservedTime).
    timestamp String
    Time used by the time picker (RecordedTime). Either the timeCreated if present or the timeObserved.
    traceFlags Integer
    Trace flags.
    traceKey String
    Unique identifier for the trace (traceId) associated with this log.
    apmDomainId string
    attributeMetadata {[key: string]: string}
    Metadata about the attributes in the logs.
    attributes GetLogAttribute[]
    List of attributes associated with the logs.
    body string
    Log body (Body).
    eventName string
    Name of the event.
    id string
    The provider-assigned unique ID for this managed resource.
    logKey string
    Unique identifier (logId) for the logKey. Note that this field is defined as logKey in the API and it maps to the logId in Application Performance Monitoring.
    overflowAttributes string
    Full values for attributes that are too long to be stored as a log attribute (Overflow).
    severityNumber number
    Log Severity number (SeverityNumber).
    severityText string
    Log Severity text (SeverityText). Also known as Log level.
    spanKey string
    Unique identifier for the span (spanId) associated with this log.
    timeCreated string
    Time that the log event occurred (CreatedTime).
    timeLogEndedLessThan string
    timeLogStartedGreaterThanOrEqualTo string
    timeObserved string
    Time that the log was received by apm (ObservedTime).
    timestamp string
    Time used by the time picker (RecordedTime). Either the timeCreated if present or the timeObserved.
    traceFlags number
    Trace flags.
    traceKey string
    Unique identifier for the trace (traceId) associated with this log.
    apm_domain_id str
    attribute_metadata Mapping[str, str]
    Metadata about the attributes in the logs.
    attributes Sequence[GetLogAttribute]
    List of attributes associated with the logs.
    body str
    Log body (Body).
    event_name str
    Name of the event.
    id str
    The provider-assigned unique ID for this managed resource.
    log_key str
    Unique identifier (logId) for the logKey. Note that this field is defined as logKey in the API and it maps to the logId in Application Performance Monitoring.
    overflow_attributes str
    Full values for attributes that are too long to be stored as a log attribute (Overflow).
    severity_number int
    Log Severity number (SeverityNumber).
    severity_text str
    Log Severity text (SeverityText). Also known as Log level.
    span_key str
    Unique identifier for the span (spanId) associated with this log.
    time_created str
    Time that the log event occurred (CreatedTime).
    time_log_ended_less_than str
    time_log_started_greater_than_or_equal_to str
    time_observed str
    Time that the log was received by apm (ObservedTime).
    timestamp str
    Time used by the time picker (RecordedTime). Either the timeCreated if present or the timeObserved.
    trace_flags int
    Trace flags.
    trace_key str
    Unique identifier for the trace (traceId) associated with this log.
    apmDomainId String
    attributeMetadata Map<String>
    Metadata about the attributes in the logs.
    attributes List<Property Map>
    List of attributes associated with the logs.
    body String
    Log body (Body).
    eventName String
    Name of the event.
    id String
    The provider-assigned unique ID for this managed resource.
    logKey String
    Unique identifier (logId) for the logKey. Note that this field is defined as logKey in the API and it maps to the logId in Application Performance Monitoring.
    overflowAttributes String
    Full values for attributes that are too long to be stored as a log attribute (Overflow).
    severityNumber Number
    Log Severity number (SeverityNumber).
    severityText String
    Log Severity text (SeverityText). Also known as Log level.
    spanKey String
    Unique identifier for the span (spanId) associated with this log.
    timeCreated String
    Time that the log event occurred (CreatedTime).
    timeLogEndedLessThan String
    timeLogStartedGreaterThanOrEqualTo String
    timeObserved String
    Time that the log was received by apm (ObservedTime).
    timestamp String
    Time used by the time picker (RecordedTime). Either the timeCreated if present or the timeObserved.
    traceFlags Number
    Trace flags.
    traceKey String
    Unique identifier for the trace (traceId) associated with this log.

    Supporting Types

    GetLogAttribute

    AttributeName string
    Key that specifies the attribute name.
    AttributeValue string
    Value associated with the attribute key.
    AttributeName string
    Key that specifies the attribute name.
    AttributeValue string
    Value associated with the attribute key.
    attributeName String
    Key that specifies the attribute name.
    attributeValue String
    Value associated with the attribute key.
    attributeName string
    Key that specifies the attribute name.
    attributeValue string
    Value associated with the attribute key.
    attribute_name str
    Key that specifies the attribute name.
    attribute_value str
    Value associated with the attribute key.
    attributeName String
    Key that specifies the attribute name.
    attributeValue String
    Value associated with the attribute key.

    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 v3.7.0 published on Saturday, Sep 13, 2025 by Pulumi