1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. AiAnomalyDetection
  5. getDetectionProjects
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

oci.AiAnomalyDetection.getDetectionProjects

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

This data source provides the list of Projects in Oracle Cloud Infrastructure Ai Anomaly Detection service.

Returns a list of Projects.

Example Usage

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

const testProjects = oci.AiAnomalyDetection.getDetectionProjects({
    compartmentId: compartmentId,
    displayName: projectDisplayName,
    state: projectState,
});
Copy
import pulumi
import pulumi_oci as oci

test_projects = oci.AiAnomalyDetection.get_detection_projects(compartment_id=compartment_id,
    display_name=project_display_name,
    state=project_state)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aianomalydetection.GetDetectionProjects(ctx, &aianomalydetection.GetDetectionProjectsArgs{
			CompartmentId: compartmentId,
			DisplayName:   pulumi.StringRef(projectDisplayName),
			State:         pulumi.StringRef(projectState),
		}, 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 testProjects = Oci.AiAnomalyDetection.GetDetectionProjects.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = projectDisplayName,
        State = projectState,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.AiAnomalyDetection.AiAnomalyDetectionFunctions;
import com.pulumi.oci.AiAnomalyDetection.inputs.GetDetectionProjectsArgs;
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 testProjects = AiAnomalyDetectionFunctions.getDetectionProjects(GetDetectionProjectsArgs.builder()
            .compartmentId(compartmentId)
            .displayName(projectDisplayName)
            .state(projectState)
            .build());

    }
}
Copy
variables:
  testProjects:
    fn::invoke:
      function: oci:AiAnomalyDetection:getDetectionProjects
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${projectDisplayName}
        state: ${projectState}
Copy

Using getDetectionProjects

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 getDetectionProjects(args: GetDetectionProjectsArgs, opts?: InvokeOptions): Promise<GetDetectionProjectsResult>
function getDetectionProjectsOutput(args: GetDetectionProjectsOutputArgs, opts?: InvokeOptions): Output<GetDetectionProjectsResult>
Copy
def get_detection_projects(compartment_id: Optional[str] = None,
                           display_name: Optional[str] = None,
                           filters: Optional[Sequence[_aianomalydetection.GetDetectionProjectsFilter]] = None,
                           state: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetDetectionProjectsResult
def get_detection_projects_output(compartment_id: Optional[pulumi.Input[str]] = None,
                           display_name: Optional[pulumi.Input[str]] = None,
                           filters: Optional[pulumi.Input[Sequence[pulumi.Input[_aianomalydetection.GetDetectionProjectsFilterArgs]]]] = None,
                           state: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetDetectionProjectsResult]
Copy
func GetDetectionProjects(ctx *Context, args *GetDetectionProjectsArgs, opts ...InvokeOption) (*GetDetectionProjectsResult, error)
func GetDetectionProjectsOutput(ctx *Context, args *GetDetectionProjectsOutputArgs, opts ...InvokeOption) GetDetectionProjectsResultOutput
Copy

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

public static class GetDetectionProjects 
{
    public static Task<GetDetectionProjectsResult> InvokeAsync(GetDetectionProjectsArgs args, InvokeOptions? opts = null)
    public static Output<GetDetectionProjectsResult> Invoke(GetDetectionProjectsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDetectionProjectsResult> getDetectionProjects(GetDetectionProjectsArgs args, InvokeOptions options)
public static Output<GetDetectionProjectsResult> getDetectionProjects(GetDetectionProjectsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:AiAnomalyDetection/getDetectionProjects:getDetectionProjects
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
The ID of the compartment in which to list resources.
DisplayName string
A filter to return only resources that match the entire display name given.
Filters Changes to this property will trigger replacement. List<GetDetectionProjectsFilter>
State string
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
CompartmentId This property is required. string
The ID of the compartment in which to list resources.
DisplayName string
A filter to return only resources that match the entire display name given.
Filters Changes to this property will trigger replacement. []GetDetectionProjectsFilter
State string
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
compartmentId This property is required. String
The ID of the compartment in which to list resources.
displayName String
A filter to return only resources that match the entire display name given.
filters Changes to this property will trigger replacement. List<GetDetectionProjectsFilter>
state String
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
compartmentId This property is required. string
The ID of the compartment in which to list resources.
displayName string
A filter to return only resources that match the entire display name given.
filters Changes to this property will trigger replacement. GetDetectionProjectsFilter[]
state string
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
compartment_id This property is required. str
The ID of the compartment in which to list resources.
display_name str
A filter to return only resources that match the entire display name given.
filters Changes to this property will trigger replacement. Sequence[aianomalydetection.GetDetectionProjectsFilter]
state str
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
compartmentId This property is required. String
The ID of the compartment in which to list resources.
displayName String
A filter to return only resources that match the entire display name given.
filters Changes to this property will trigger replacement. List<Property Map>
state String
Filter results by the specified lifecycle state. Must be a valid state for the resource type.

getDetectionProjects Result

The following output properties are available:

CompartmentId string
The OCID for the project's compartment.
Id string
The provider-assigned unique ID for this managed resource.
ProjectCollections List<GetDetectionProjectsProjectCollection>
The list of project_collection.
DisplayName string
A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.
Filters List<GetDetectionProjectsFilter>
State string
The lifecycle state of the Project.
CompartmentId string
The OCID for the project's compartment.
Id string
The provider-assigned unique ID for this managed resource.
ProjectCollections []GetDetectionProjectsProjectCollection
The list of project_collection.
DisplayName string
A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.
Filters []GetDetectionProjectsFilter
State string
The lifecycle state of the Project.
compartmentId String
The OCID for the project's compartment.
id String
The provider-assigned unique ID for this managed resource.
projectCollections List<GetDetectionProjectsProjectCollection>
The list of project_collection.
displayName String
A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.
filters List<GetDetectionProjectsFilter>
state String
The lifecycle state of the Project.
compartmentId string
The OCID for the project's compartment.
id string
The provider-assigned unique ID for this managed resource.
projectCollections GetDetectionProjectsProjectCollection[]
The list of project_collection.
displayName string
A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.
filters GetDetectionProjectsFilter[]
state string
The lifecycle state of the Project.
compartment_id str
The OCID for the project's compartment.
id str
The provider-assigned unique ID for this managed resource.
project_collections Sequence[aianomalydetection.GetDetectionProjectsProjectCollection]
The list of project_collection.
display_name str
A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.
filters Sequence[aianomalydetection.GetDetectionProjectsFilter]
state str
The lifecycle state of the Project.
compartmentId String
The OCID for the project's compartment.
id String
The provider-assigned unique ID for this managed resource.
projectCollections List<Property Map>
The list of project_collection.
displayName String
A user-friendly display name for the resource. It does not have to be unique and can be modified. Avoid entering confidential information.
filters List<Property Map>
state String
The lifecycle state of the Project.

Supporting Types

GetDetectionProjectsFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

GetDetectionProjectsProjectCollection

items This property is required. List<Property Map>

GetDetectionProjectsProjectCollectionItem

CompartmentId This property is required. string
The ID of the compartment in which to list resources.
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"}
Description This property is required. string
A short description of the project.
DisplayName This property is required. string
A filter to return only resources that match the entire display name given.
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 the project that is immutable on creation.
State This property is required. string
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
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"}
TimeCreated This property is required. string
The date and time the resource was created in the timestamp format defined by RFC3339.
TimeUpdated This property is required. string
The date and time the resource was updated in the timestamp format defined by RFC3339.
CompartmentId This property is required. string
The ID of the compartment in which to list resources.
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"}
Description This property is required. string
A short description of the project.
DisplayName This property is required. string
A filter to return only resources that match the entire display name given.
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 the project that is immutable on creation.
State This property is required. string
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
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"}
TimeCreated This property is required. string
The date and time the resource was created in the timestamp format defined by RFC3339.
TimeUpdated This property is required. string
The date and time the resource was updated in the timestamp format defined by RFC3339.
compartmentId This property is required. String
The ID of the compartment in which to list resources.
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"}
description This property is required. String
A short description of the project.
displayName This property is required. String
A filter to return only resources that match the entire display name given.
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 the project that is immutable on creation.
state This property is required. String
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
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"}
timeCreated This property is required. String
The date and time the resource was created in the timestamp format defined by RFC3339.
timeUpdated This property is required. String
The date and time the resource was updated in the timestamp format defined by RFC3339.
compartmentId This property is required. string
The ID of the compartment in which to list resources.
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"}
description This property is required. string
A short description of the project.
displayName This property is required. string
A filter to return only resources that match the entire display name given.
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 the project that is immutable on creation.
state This property is required. string
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
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"}
timeCreated This property is required. string
The date and time the resource was created in the timestamp format defined by RFC3339.
timeUpdated This property is required. string
The date and time the resource was updated in the timestamp format defined by RFC3339.
compartment_id This property is required. str
The ID of the compartment in which to list resources.
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"}
description This property is required. str
A short description of the project.
display_name This property is required. str
A filter to return only resources that match the entire display name given.
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 the project that is immutable on creation.
state This property is required. str
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
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"}
time_created This property is required. str
The date and time the resource was created in the timestamp format defined by RFC3339.
time_updated This property is required. str
The date and time the resource was updated in the timestamp format defined by RFC3339.
compartmentId This property is required. String
The ID of the compartment in which to list resources.
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"}
description This property is required. String
A short description of the project.
displayName This property is required. String
A filter to return only resources that match the entire display name given.
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 the project that is immutable on creation.
state This property is required. String
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
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"}
timeCreated This property is required. String
The date and time the resource was created in the timestamp format defined by RFC3339.
timeUpdated This property is required. String
The date and time the resource was updated in the timestamp format defined by RFC3339.

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.30.0 published on Monday, Apr 14, 2025 by Pulumi