1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. StackMonitoring
  5. getDiscoveryJobs
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

oci.StackMonitoring.getDiscoveryJobs

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

This data source provides the list of Discovery Jobs in Oracle Cloud Infrastructure Stack Monitoring service.

API to get the details of all Discovery Jobs.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testDiscoveryJobs = oci.StackMonitoring.getDiscoveryJobs({
    compartmentId: compartmentId,
    name: discoveryJobName,
});
Copy
import pulumi
import pulumi_oci as oci

test_discovery_jobs = oci.StackMonitoring.get_discovery_jobs(compartment_id=compartment_id,
    name=discovery_job_name)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/stackmonitoring"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := stackmonitoring.GetDiscoveryJobs(ctx, &stackmonitoring.GetDiscoveryJobsArgs{
			CompartmentId: compartmentId,
			Name:          pulumi.StringRef(discoveryJobName),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testDiscoveryJobs = Oci.StackMonitoring.GetDiscoveryJobs.Invoke(new()
    {
        CompartmentId = compartmentId,
        Name = discoveryJobName,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.StackMonitoring.StackMonitoringFunctions;
import com.pulumi.oci.StackMonitoring.inputs.GetDiscoveryJobsArgs;
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 testDiscoveryJobs = StackMonitoringFunctions.getDiscoveryJobs(GetDiscoveryJobsArgs.builder()
            .compartmentId(compartmentId)
            .name(discoveryJobName)
            .build());

    }
}
Copy
variables:
  testDiscoveryJobs:
    fn::invoke:
      function: oci:StackMonitoring:getDiscoveryJobs
      arguments:
        compartmentId: ${compartmentId}
        name: ${discoveryJobName}
Copy

Using getDiscoveryJobs

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 getDiscoveryJobs(args: GetDiscoveryJobsArgs, opts?: InvokeOptions): Promise<GetDiscoveryJobsResult>
function getDiscoveryJobsOutput(args: GetDiscoveryJobsOutputArgs, opts?: InvokeOptions): Output<GetDiscoveryJobsResult>
Copy
def get_discovery_jobs(compartment_id: Optional[str] = None,
                       filters: Optional[Sequence[_stackmonitoring.GetDiscoveryJobsFilter]] = None,
                       name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetDiscoveryJobsResult
def get_discovery_jobs_output(compartment_id: Optional[pulumi.Input[str]] = None,
                       filters: Optional[pulumi.Input[Sequence[pulumi.Input[_stackmonitoring.GetDiscoveryJobsFilterArgs]]]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetDiscoveryJobsResult]
Copy
func GetDiscoveryJobs(ctx *Context, args *GetDiscoveryJobsArgs, opts ...InvokeOption) (*GetDiscoveryJobsResult, error)
func GetDiscoveryJobsOutput(ctx *Context, args *GetDiscoveryJobsOutputArgs, opts ...InvokeOption) GetDiscoveryJobsResultOutput
Copy

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

public static class GetDiscoveryJobs 
{
    public static Task<GetDiscoveryJobsResult> InvokeAsync(GetDiscoveryJobsArgs args, InvokeOptions? opts = null)
    public static Output<GetDiscoveryJobsResult> Invoke(GetDiscoveryJobsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDiscoveryJobsResult> getDiscoveryJobs(GetDiscoveryJobsArgs args, InvokeOptions options)
public static Output<GetDiscoveryJobsResult> getDiscoveryJobs(GetDiscoveryJobsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:StackMonitoring/getDiscoveryJobs:getDiscoveryJobs
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
The ID of the compartment in which data is listed.
Filters Changes to this property will trigger replacement. List<GetDiscoveryJobsFilter>
Name string
A filter to return only discovery jobs that match the entire resource name given.
CompartmentId This property is required. string
The ID of the compartment in which data is listed.
Filters Changes to this property will trigger replacement. []GetDiscoveryJobsFilter
Name string
A filter to return only discovery jobs that match the entire resource name given.
compartmentId This property is required. String
The ID of the compartment in which data is listed.
filters Changes to this property will trigger replacement. List<GetDiscoveryJobsFilter>
name String
A filter to return only discovery jobs that match the entire resource name given.
compartmentId This property is required. string
The ID of the compartment in which data is listed.
filters Changes to this property will trigger replacement. GetDiscoveryJobsFilter[]
name string
A filter to return only discovery jobs that match the entire resource name given.
compartment_id This property is required. str
The ID of the compartment in which data is listed.
filters Changes to this property will trigger replacement. Sequence[stackmonitoring.GetDiscoveryJobsFilter]
name str
A filter to return only discovery jobs that match the entire resource name given.
compartmentId This property is required. String
The ID of the compartment in which data is listed.
filters Changes to this property will trigger replacement. List<Property Map>
name String
A filter to return only discovery jobs that match the entire resource name given.

getDiscoveryJobs Result

The following output properties are available:

CompartmentId string
The OCID of the Compartment
DiscoveryJobCollections List<GetDiscoveryJobsDiscoveryJobCollection>
The list of discovery_job_collection.
Id string
The provider-assigned unique ID for this managed resource.
Filters List<GetDiscoveryJobsFilter>
Name string
CompartmentId string
The OCID of the Compartment
DiscoveryJobCollections []GetDiscoveryJobsDiscoveryJobCollection
The list of discovery_job_collection.
Id string
The provider-assigned unique ID for this managed resource.
Filters []GetDiscoveryJobsFilter
Name string
compartmentId String
The OCID of the Compartment
discoveryJobCollections List<GetDiscoveryJobsDiscoveryJobCollection>
The list of discovery_job_collection.
id String
The provider-assigned unique ID for this managed resource.
filters List<GetDiscoveryJobsFilter>
name String
compartmentId string
The OCID of the Compartment
discoveryJobCollections GetDiscoveryJobsDiscoveryJobCollection[]
The list of discovery_job_collection.
id string
The provider-assigned unique ID for this managed resource.
filters GetDiscoveryJobsFilter[]
name string
compartment_id str
The OCID of the Compartment
discovery_job_collections Sequence[stackmonitoring.GetDiscoveryJobsDiscoveryJobCollection]
The list of discovery_job_collection.
id str
The provider-assigned unique ID for this managed resource.
filters Sequence[stackmonitoring.GetDiscoveryJobsFilter]
name str
compartmentId String
The OCID of the Compartment
discoveryJobCollections List<Property Map>
The list of discovery_job_collection.
id String
The provider-assigned unique ID for this managed resource.
filters List<Property Map>
name String

Supporting Types

GetDiscoveryJobsDiscoveryJobCollection

Items This property is required. List<GetDiscoveryJobsDiscoveryJobCollectionItem>
List of DiscoveryJob credentials.
Items This property is required. []GetDiscoveryJobsDiscoveryJobCollectionItem
List of DiscoveryJob credentials.
items This property is required. List<GetDiscoveryJobsDiscoveryJobCollectionItem>
List of DiscoveryJob credentials.
items This property is required. GetDiscoveryJobsDiscoveryJobCollectionItem[]
List of DiscoveryJob credentials.
items This property is required. Sequence[stackmonitoring.GetDiscoveryJobsDiscoveryJobCollectionItem]
List of DiscoveryJob credentials.
items This property is required. List<Property Map>
List of DiscoveryJob credentials.

GetDiscoveryJobsDiscoveryJobCollectionItem

CompartmentId This property is required. string
The ID of the compartment in which data is listed.
DefinedTags This property is required. Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
DiscoveryType This property is required. string
Add option submits new discovery Job. Add with retry option to re-submit failed discovery job. Refresh option refreshes the existing discovered resources.
FreeformTags This property is required. 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 This property is required. string
The OCID of Discovery job
ResourceName This property is required. string
The Name of resource type
ResourceType This property is required. string
Resource Type.
State This property is required. string
The current state of the DiscoveryJob Resource.
Status This property is required. string
Specifies the status of the discovery job
StatusMessage This property is required. string
The short summary of the status of the discovery job
SystemTags This property is required. Dictionary<string, string>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
TenantId This property is required. string
The OCID of Tenant
TimeUpdated This property is required. string
The time the discovery Job was updated.
UserId This property is required. string
The OCID of user in which the job is submitted
CompartmentId This property is required. string
The ID of the compartment in which data is listed.
DefinedTags This property is required. map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
DiscoveryType This property is required. string
Add option submits new discovery Job. Add with retry option to re-submit failed discovery job. Refresh option refreshes the existing discovered resources.
FreeformTags This property is required. 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 This property is required. string
The OCID of Discovery job
ResourceName This property is required. string
The Name of resource type
ResourceType This property is required. string
Resource Type.
State This property is required. string
The current state of the DiscoveryJob Resource.
Status This property is required. string
Specifies the status of the discovery job
StatusMessage This property is required. string
The short summary of the status of the discovery job
SystemTags This property is required. map[string]string
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
TenantId This property is required. string
The OCID of Tenant
TimeUpdated This property is required. string
The time the discovery Job was updated.
UserId This property is required. string
The OCID of user in which the job is submitted
compartmentId This property is required. String
The ID of the compartment in which data is listed.
definedTags This property is required. Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
discoveryType This property is required. String
Add option submits new discovery Job. Add with retry option to re-submit failed discovery job. Refresh option refreshes the existing discovered resources.
freeformTags This property is required. 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 This property is required. String
The OCID of Discovery job
resourceName This property is required. String
The Name of resource type
resourceType This property is required. String
Resource Type.
state This property is required. String
The current state of the DiscoveryJob Resource.
status This property is required. String
Specifies the status of the discovery job
statusMessage This property is required. String
The short summary of the status of the discovery job
systemTags This property is required. Map<String,String>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
tenantId This property is required. String
The OCID of Tenant
timeUpdated This property is required. String
The time the discovery Job was updated.
userId This property is required. String
The OCID of user in which the job is submitted
compartmentId This property is required. string
The ID of the compartment in which data is listed.
definedTags This property is required. {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
discoveryType This property is required. string
Add option submits new discovery Job. Add with retry option to re-submit failed discovery job. Refresh option refreshes the existing discovered resources.
freeformTags This property is required. {[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 This property is required. string
The OCID of Discovery job
resourceName This property is required. string
The Name of resource type
resourceType This property is required. string
Resource Type.
state This property is required. string
The current state of the DiscoveryJob Resource.
status This property is required. string
Specifies the status of the discovery job
statusMessage This property is required. string
The short summary of the status of the discovery job
systemTags This property is required. {[key: string]: string}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
tenantId This property is required. string
The OCID of Tenant
timeUpdated This property is required. string
The time the discovery Job was updated.
userId This property is required. string
The OCID of user in which the job is submitted
compartment_id This property is required. str
The ID of the compartment in which data is listed.
defined_tags This property is required. Mapping[str, str]
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
discovery_type This property is required. str
Add option submits new discovery Job. Add with retry option to re-submit failed discovery job. Refresh option refreshes the existing discovered resources.
freeform_tags This property is required. 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 This property is required. str
The OCID of Discovery job
resource_name This property is required. str
The Name of resource type
resource_type This property is required. str
Resource Type.
state This property is required. str
The current state of the DiscoveryJob Resource.
status This property is required. str
Specifies the status of the discovery job
status_message This property is required. str
The short summary of the status of the discovery job
system_tags This property is required. Mapping[str, str]
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
tenant_id This property is required. str
The OCID of Tenant
time_updated This property is required. str
The time the discovery Job was updated.
user_id This property is required. str
The OCID of user in which the job is submitted
compartmentId This property is required. String
The ID of the compartment in which data is listed.
definedTags This property is required. Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
discoveryType This property is required. String
Add option submits new discovery Job. Add with retry option to re-submit failed discovery job. Refresh option refreshes the existing discovered resources.
freeformTags This property is required. 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 This property is required. String
The OCID of Discovery job
resourceName This property is required. String
The Name of resource type
resourceType This property is required. String
Resource Type.
state This property is required. String
The current state of the DiscoveryJob Resource.
status This property is required. String
Specifies the status of the discovery job
statusMessage This property is required. String
The short summary of the status of the discovery job
systemTags This property is required. Map<String>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
tenantId This property is required. String
The OCID of Tenant
timeUpdated This property is required. String
The time the discovery Job was updated.
userId This property is required. String
The OCID of user in which the job is submitted

GetDiscoveryJobsFilter

Name This property is required. string
A filter to return only discovery jobs that match the entire resource name given.
Values This property is required. List<string>
Regex bool
Name This property is required. string
A filter to return only discovery jobs that match the entire resource name given.
Values This property is required. []string
Regex bool
name This property is required. String
A filter to return only discovery jobs that match the entire resource name given.
values This property is required. List<String>
regex Boolean
name This property is required. string
A filter to return only discovery jobs that match the entire resource name given.
values This property is required. string[]
regex boolean
name This property is required. str
A filter to return only discovery jobs that match the entire resource name given.
values This property is required. Sequence[str]
regex bool
name This property is required. String
A filter to return only discovery jobs that match the entire resource name given.
values This property is required. List<String>
regex Boolean

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi