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

oci.ApmTraces.getScheduledQuery

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 Scheduled Query resource in Oracle Cloud Infrastructure Apm Traces service.

    Retrieve a scheduled query in the APM Domain.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testScheduledQuery = oci.ApmTraces.getScheduledQuery({
        apmDomainId: testApmDomain.id,
        scheduledQueryId: testScheduledQueryOciApmTracesScheduledQuery.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_scheduled_query = oci.ApmTraces.get_scheduled_query(apm_domain_id=test_apm_domain["id"],
        scheduled_query_id=test_scheduled_query_oci_apm_traces_scheduled_query["id"])
    
    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.GetScheduledQuery(ctx, &apmtraces.GetScheduledQueryArgs{
    			ApmDomainId:      testApmDomain.Id,
    			ScheduledQueryId: testScheduledQueryOciApmTracesScheduledQuery.Id,
    		}, 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 testScheduledQuery = Oci.ApmTraces.GetScheduledQuery.Invoke(new()
        {
            ApmDomainId = testApmDomain.Id,
            ScheduledQueryId = testScheduledQueryOciApmTracesScheduledQuery.Id,
        });
    
    });
    
    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.GetScheduledQueryArgs;
    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 testScheduledQuery = ApmTracesFunctions.getScheduledQuery(GetScheduledQueryArgs.builder()
                .apmDomainId(testApmDomain.id())
                .scheduledQueryId(testScheduledQueryOciApmTracesScheduledQuery.id())
                .build());
    
        }
    }
    
    variables:
      testScheduledQuery:
        fn::invoke:
          function: oci:ApmTraces:getScheduledQuery
          arguments:
            apmDomainId: ${testApmDomain.id}
            scheduledQueryId: ${testScheduledQueryOciApmTracesScheduledQuery.id}
    

    Using getScheduledQuery

    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 getScheduledQuery(args: GetScheduledQueryArgs, opts?: InvokeOptions): Promise<GetScheduledQueryResult>
    function getScheduledQueryOutput(args: GetScheduledQueryOutputArgs, opts?: InvokeOptions): Output<GetScheduledQueryResult>
    def get_scheduled_query(apm_domain_id: Optional[str] = None,
                            scheduled_query_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetScheduledQueryResult
    def get_scheduled_query_output(apm_domain_id: Optional[pulumi.Input[str]] = None,
                            scheduled_query_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetScheduledQueryResult]
    func LookupScheduledQuery(ctx *Context, args *LookupScheduledQueryArgs, opts ...InvokeOption) (*LookupScheduledQueryResult, error)
    func LookupScheduledQueryOutput(ctx *Context, args *LookupScheduledQueryOutputArgs, opts ...InvokeOption) LookupScheduledQueryResultOutput

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

    public static class GetScheduledQuery 
    {
        public static Task<GetScheduledQueryResult> InvokeAsync(GetScheduledQueryArgs args, InvokeOptions? opts = null)
        public static Output<GetScheduledQueryResult> Invoke(GetScheduledQueryInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetScheduledQueryResult> getScheduledQuery(GetScheduledQueryArgs args, InvokeOptions options)
    public static Output<GetScheduledQueryResult> getScheduledQuery(GetScheduledQueryArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:ApmTraces/getScheduledQuery:getScheduledQuery
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ApmDomainId string
    The APM Domain ID for the intended request.
    ScheduledQueryId string
    Id of the scheduled query.
    ApmDomainId string
    The APM Domain ID for the intended request.
    ScheduledQueryId string
    Id of the scheduled query.
    apmDomainId String
    The APM Domain ID for the intended request.
    scheduledQueryId String
    Id of the scheduled query.
    apmDomainId string
    The APM Domain ID for the intended request.
    scheduledQueryId string
    Id of the scheduled query.
    apm_domain_id str
    The APM Domain ID for the intended request.
    scheduled_query_id str
    Id of the scheduled query.
    apmDomainId String
    The APM Domain ID for the intended request.
    scheduledQueryId String
    Id of the scheduled query.

    getScheduledQuery Result

    The following output properties are available:

    ApmDomainId string
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    FreeformTags Dictionary<string, string>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    The OCID of the scheduled query . An OCID is generated when the scheduled query is created.
    OpcDryRun string
    ScheduledQueryDescription string
    Description for the scheduled query.
    ScheduledQueryId string
    ScheduledQueryInstances string
    Scheduled query instances.
    ScheduledQueryMaximumRuntimeInSeconds string
    Maximum runtime for the scheduled query in seconds.
    ScheduledQueryName string
    Name of the scheduled query.
    ScheduledQueryNextRunInMs string
    Next run for the scheduled query.
    ScheduledQueryProcessingConfigurations List<GetScheduledQueryScheduledQueryProcessingConfiguration>
    Definition of the scheduled query processing configuration.
    ScheduledQueryProcessingSubType string
    Processing sub type of the scheduled query.
    ScheduledQueryProcessingType string
    Processing type of the scheduled query.
    ScheduledQueryRetentionCriteria string
    Retention criteria for the scheduled query.
    ScheduledQueryRetentionPeriodInMs string
    Retention period for the scheduled query in milliseconds.
    ScheduledQuerySchedule string
    Schedule for the scheduled query.
    ScheduledQueryText string
    Scheduled query to be run.
    State string
    The current lifecycle state of the Scheduled Query.
    SystemTags Dictionary<string, string>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    ApmDomainId string
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    FreeformTags map[string]string
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    The OCID of the scheduled query . An OCID is generated when the scheduled query is created.
    OpcDryRun string
    ScheduledQueryDescription string
    Description for the scheduled query.
    ScheduledQueryId string
    ScheduledQueryInstances string
    Scheduled query instances.
    ScheduledQueryMaximumRuntimeInSeconds string
    Maximum runtime for the scheduled query in seconds.
    ScheduledQueryName string
    Name of the scheduled query.
    ScheduledQueryNextRunInMs string
    Next run for the scheduled query.
    ScheduledQueryProcessingConfigurations []GetScheduledQueryScheduledQueryProcessingConfiguration
    Definition of the scheduled query processing configuration.
    ScheduledQueryProcessingSubType string
    Processing sub type of the scheduled query.
    ScheduledQueryProcessingType string
    Processing type of the scheduled query.
    ScheduledQueryRetentionCriteria string
    Retention criteria for the scheduled query.
    ScheduledQueryRetentionPeriodInMs string
    Retention period for the scheduled query in milliseconds.
    ScheduledQuerySchedule string
    Schedule for the scheduled query.
    ScheduledQueryText string
    Scheduled query to be run.
    State string
    The current lifecycle state of the Scheduled Query.
    SystemTags map[string]string
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    apmDomainId String
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    freeformTags Map<String,String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    The OCID of the scheduled query . An OCID is generated when the scheduled query is created.
    opcDryRun String
    scheduledQueryDescription String
    Description for the scheduled query.
    scheduledQueryId String
    scheduledQueryInstances String
    Scheduled query instances.
    scheduledQueryMaximumRuntimeInSeconds String
    Maximum runtime for the scheduled query in seconds.
    scheduledQueryName String
    Name of the scheduled query.
    scheduledQueryNextRunInMs String
    Next run for the scheduled query.
    scheduledQueryProcessingConfigurations List<GetScheduledQueryScheduledQueryProcessingConfiguration>
    Definition of the scheduled query processing configuration.
    scheduledQueryProcessingSubType String
    Processing sub type of the scheduled query.
    scheduledQueryProcessingType String
    Processing type of the scheduled query.
    scheduledQueryRetentionCriteria String
    Retention criteria for the scheduled query.
    scheduledQueryRetentionPeriodInMs String
    Retention period for the scheduled query in milliseconds.
    scheduledQuerySchedule String
    Schedule for the scheduled query.
    scheduledQueryText String
    Scheduled query to be run.
    state String
    The current lifecycle state of the Scheduled Query.
    systemTags Map<String,String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    apmDomainId string
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    freeformTags {[key: string]: string}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id string
    The OCID of the scheduled query . An OCID is generated when the scheduled query is created.
    opcDryRun string
    scheduledQueryDescription string
    Description for the scheduled query.
    scheduledQueryId string
    scheduledQueryInstances string
    Scheduled query instances.
    scheduledQueryMaximumRuntimeInSeconds string
    Maximum runtime for the scheduled query in seconds.
    scheduledQueryName string
    Name of the scheduled query.
    scheduledQueryNextRunInMs string
    Next run for the scheduled query.
    scheduledQueryProcessingConfigurations GetScheduledQueryScheduledQueryProcessingConfiguration[]
    Definition of the scheduled query processing configuration.
    scheduledQueryProcessingSubType string
    Processing sub type of the scheduled query.
    scheduledQueryProcessingType string
    Processing type of the scheduled query.
    scheduledQueryRetentionCriteria string
    Retention criteria for the scheduled query.
    scheduledQueryRetentionPeriodInMs string
    Retention period for the scheduled query in milliseconds.
    scheduledQuerySchedule string
    Schedule for the scheduled query.
    scheduledQueryText string
    Scheduled query to be run.
    state string
    The current lifecycle state of the Scheduled Query.
    systemTags {[key: string]: string}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    apm_domain_id str
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    freeform_tags Mapping[str, str]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id str
    The OCID of the scheduled query . An OCID is generated when the scheduled query is created.
    opc_dry_run str
    scheduled_query_description str
    Description for the scheduled query.
    scheduled_query_id str
    scheduled_query_instances str
    Scheduled query instances.
    scheduled_query_maximum_runtime_in_seconds str
    Maximum runtime for the scheduled query in seconds.
    scheduled_query_name str
    Name of the scheduled query.
    scheduled_query_next_run_in_ms str
    Next run for the scheduled query.
    scheduled_query_processing_configurations Sequence[GetScheduledQueryScheduledQueryProcessingConfiguration]
    Definition of the scheduled query processing configuration.
    scheduled_query_processing_sub_type str
    Processing sub type of the scheduled query.
    scheduled_query_processing_type str
    Processing type of the scheduled query.
    scheduled_query_retention_criteria str
    Retention criteria for the scheduled query.
    scheduled_query_retention_period_in_ms str
    Retention period for the scheduled query in milliseconds.
    scheduled_query_schedule str
    Schedule for the scheduled query.
    scheduled_query_text str
    Scheduled query to be run.
    state str
    The current lifecycle state of the Scheduled Query.
    system_tags Mapping[str, str]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    apmDomainId String
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    freeformTags Map<String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    The OCID of the scheduled query . An OCID is generated when the scheduled query is created.
    opcDryRun String
    scheduledQueryDescription String
    Description for the scheduled query.
    scheduledQueryId String
    scheduledQueryInstances String
    Scheduled query instances.
    scheduledQueryMaximumRuntimeInSeconds String
    Maximum runtime for the scheduled query in seconds.
    scheduledQueryName String
    Name of the scheduled query.
    scheduledQueryNextRunInMs String
    Next run for the scheduled query.
    scheduledQueryProcessingConfigurations List<Property Map>
    Definition of the scheduled query processing configuration.
    scheduledQueryProcessingSubType String
    Processing sub type of the scheduled query.
    scheduledQueryProcessingType String
    Processing type of the scheduled query.
    scheduledQueryRetentionCriteria String
    Retention criteria for the scheduled query.
    scheduledQueryRetentionPeriodInMs String
    Retention period for the scheduled query in milliseconds.
    scheduledQuerySchedule String
    Schedule for the scheduled query.
    scheduledQueryText String
    Scheduled query to be run.
    state String
    The current lifecycle state of the Scheduled Query.
    systemTags Map<String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

    Supporting Types

    GetScheduledQueryScheduledQueryProcessingConfiguration

    customMetrics List<Property Map>
    Definition of the Custom Metric.
    objectStorages List<Property Map>
    Definition of the object storage.
    streamings List<Property Map>
    Definition of the Stream.

    GetScheduledQueryScheduledQueryProcessingConfigurationCustomMetric

    Compartment string
    Compartment of the Monitoring Service. It defaults to the APM domain's compartment if not specified. If specified, the necessary Oracle Cloud Infrastructure policies should be set to allow APM to write to that compartment.
    Description string
    Description of the Custom Metric.
    IsAnomalyDetectionEnabled bool
    Indicates whether anomaly Detection should be performed on the generated metric.
    IsMetricPublished bool
    Used in conjunction with the dry run header. When the dry run header is set and the isPublishMetric flag is set to true, the scheduled query is not created, but validations happen to check if the right Oracle Cloud Infrastructure policies have been set to write to the specified namespace/compartment.
    Name string
    Name of the Custom Metric.
    Namespace string
    Namespace in the Custom Metric. It defaults to oracle_apm_custom if not specified. If specified, the necessary Oracle Cloud Infrastructure policies should be set to allow APM to write to that namespace.
    ResourceGroup string
    Resource Group of the Custom Metric.
    Unit string
    Unit in which the metric value is reported. For example 'ms'.
    Compartment string
    Compartment of the Monitoring Service. It defaults to the APM domain's compartment if not specified. If specified, the necessary Oracle Cloud Infrastructure policies should be set to allow APM to write to that compartment.
    Description string
    Description of the Custom Metric.
    IsAnomalyDetectionEnabled bool
    Indicates whether anomaly Detection should be performed on the generated metric.
    IsMetricPublished bool
    Used in conjunction with the dry run header. When the dry run header is set and the isPublishMetric flag is set to true, the scheduled query is not created, but validations happen to check if the right Oracle Cloud Infrastructure policies have been set to write to the specified namespace/compartment.
    Name string
    Name of the Custom Metric.
    Namespace string
    Namespace in the Custom Metric. It defaults to oracle_apm_custom if not specified. If specified, the necessary Oracle Cloud Infrastructure policies should be set to allow APM to write to that namespace.
    ResourceGroup string
    Resource Group of the Custom Metric.
    Unit string
    Unit in which the metric value is reported. For example 'ms'.
    compartment String
    Compartment of the Monitoring Service. It defaults to the APM domain's compartment if not specified. If specified, the necessary Oracle Cloud Infrastructure policies should be set to allow APM to write to that compartment.
    description String
    Description of the Custom Metric.
    isAnomalyDetectionEnabled Boolean
    Indicates whether anomaly Detection should be performed on the generated metric.
    isMetricPublished Boolean
    Used in conjunction with the dry run header. When the dry run header is set and the isPublishMetric flag is set to true, the scheduled query is not created, but validations happen to check if the right Oracle Cloud Infrastructure policies have been set to write to the specified namespace/compartment.
    name String
    Name of the Custom Metric.
    namespace String
    Namespace in the Custom Metric. It defaults to oracle_apm_custom if not specified. If specified, the necessary Oracle Cloud Infrastructure policies should be set to allow APM to write to that namespace.
    resourceGroup String
    Resource Group of the Custom Metric.
    unit String
    Unit in which the metric value is reported. For example 'ms'.
    compartment string
    Compartment of the Monitoring Service. It defaults to the APM domain's compartment if not specified. If specified, the necessary Oracle Cloud Infrastructure policies should be set to allow APM to write to that compartment.
    description string
    Description of the Custom Metric.
    isAnomalyDetectionEnabled boolean
    Indicates whether anomaly Detection should be performed on the generated metric.
    isMetricPublished boolean
    Used in conjunction with the dry run header. When the dry run header is set and the isPublishMetric flag is set to true, the scheduled query is not created, but validations happen to check if the right Oracle Cloud Infrastructure policies have been set to write to the specified namespace/compartment.
    name string
    Name of the Custom Metric.
    namespace string
    Namespace in the Custom Metric. It defaults to oracle_apm_custom if not specified. If specified, the necessary Oracle Cloud Infrastructure policies should be set to allow APM to write to that namespace.
    resourceGroup string
    Resource Group of the Custom Metric.
    unit string
    Unit in which the metric value is reported. For example 'ms'.
    compartment str
    Compartment of the Monitoring Service. It defaults to the APM domain's compartment if not specified. If specified, the necessary Oracle Cloud Infrastructure policies should be set to allow APM to write to that compartment.
    description str
    Description of the Custom Metric.
    is_anomaly_detection_enabled bool
    Indicates whether anomaly Detection should be performed on the generated metric.
    is_metric_published bool
    Used in conjunction with the dry run header. When the dry run header is set and the isPublishMetric flag is set to true, the scheduled query is not created, but validations happen to check if the right Oracle Cloud Infrastructure policies have been set to write to the specified namespace/compartment.
    name str
    Name of the Custom Metric.
    namespace str
    Namespace in the Custom Metric. It defaults to oracle_apm_custom if not specified. If specified, the necessary Oracle Cloud Infrastructure policies should be set to allow APM to write to that namespace.
    resource_group str
    Resource Group of the Custom Metric.
    unit str
    Unit in which the metric value is reported. For example 'ms'.
    compartment String
    Compartment of the Monitoring Service. It defaults to the APM domain's compartment if not specified. If specified, the necessary Oracle Cloud Infrastructure policies should be set to allow APM to write to that compartment.
    description String
    Description of the Custom Metric.
    isAnomalyDetectionEnabled Boolean
    Indicates whether anomaly Detection should be performed on the generated metric.
    isMetricPublished Boolean
    Used in conjunction with the dry run header. When the dry run header is set and the isPublishMetric flag is set to true, the scheduled query is not created, but validations happen to check if the right Oracle Cloud Infrastructure policies have been set to write to the specified namespace/compartment.
    name String
    Name of the Custom Metric.
    namespace String
    Namespace in the Custom Metric. It defaults to oracle_apm_custom if not specified. If specified, the necessary Oracle Cloud Infrastructure policies should be set to allow APM to write to that namespace.
    resourceGroup String
    Resource Group of the Custom Metric.
    unit String
    Unit in which the metric value is reported. For example 'ms'.

    GetScheduledQueryScheduledQueryProcessingConfigurationObjectStorage

    Bucket string
    Bucket name in the object store.
    NameSpace string
    Namespace in the object store.
    ObjectNamePrefix string
    Object name prefix in the object store.
    Bucket string
    Bucket name in the object store.
    NameSpace string
    Namespace in the object store.
    ObjectNamePrefix string
    Object name prefix in the object store.
    bucket String
    Bucket name in the object store.
    nameSpace String
    Namespace in the object store.
    objectNamePrefix String
    Object name prefix in the object store.
    bucket string
    Bucket name in the object store.
    nameSpace string
    Namespace in the object store.
    objectNamePrefix string
    Object name prefix in the object store.
    bucket str
    Bucket name in the object store.
    name_space str
    Namespace in the object store.
    object_name_prefix str
    Object name prefix in the object store.
    bucket String
    Bucket name in the object store.
    nameSpace String
    Namespace in the object store.
    objectNamePrefix String
    Object name prefix in the object store.

    GetScheduledQueryScheduledQueryProcessingConfigurationStreaming

    StreamId string
    Stream Id.
    StreamId string
    Stream Id.
    streamId String
    Stream Id.
    streamId string
    Stream Id.
    stream_id str
    Stream Id.
    streamId String
    Stream Id.

    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