1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. AiAnomalyDetection
  5. getDetectionProjects
Oracle Cloud Infrastructure v1.27.0 published on Friday, Mar 15, 2024 by Pulumi

oci.AiAnomalyDetection.getDetectionProjects

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.27.0 published on Friday, Mar 15, 2024 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: _var.compartment_id,
        displayName: _var.project_display_name,
        state: _var.project_state,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_projects = oci.AiAnomalyDetection.get_detection_projects(compartment_id=var["compartment_id"],
        display_name=var["project_display_name"],
        state=var["project_state"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/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: _var.Compartment_id,
    			DisplayName:   pulumi.StringRef(_var.Project_display_name),
    			State:         pulumi.StringRef(_var.Project_state),
    		}, 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 testProjects = Oci.AiAnomalyDetection.GetDetectionProjects.Invoke(new()
        {
            CompartmentId = @var.Compartment_id,
            DisplayName = @var.Project_display_name,
            State = @var.Project_state,
        });
    
    });
    
    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(var_.compartment_id())
                .displayName(var_.project_display_name())
                .state(var_.project_state())
                .build());
    
        }
    }
    
    variables:
      testProjects:
        fn::invoke:
          Function: oci:AiAnomalyDetection:getDetectionProjects
          Arguments:
            compartmentId: ${var.compartment_id}
            displayName: ${var.project_display_name}
            state: ${var.project_state}
    

    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>
    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]
    func GetDetectionProjects(ctx *Context, args *GetDetectionProjectsArgs, opts ...InvokeOption) (*GetDetectionProjectsResult, error)
    func GetDetectionProjectsOutput(ctx *Context, args *GetDetectionProjectsOutputArgs, opts ...InvokeOption) GetDetectionProjectsResultOutput

    > 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)
    }
    public static CompletableFuture<GetDetectionProjectsResult> getDetectionProjects(GetDetectionProjectsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:AiAnomalyDetection/getDetectionProjects:getDetectionProjects
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId 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 List<GetDetectionProjectsFilter>
    State string
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    CompartmentId 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 []GetDetectionProjectsFilter
    State string
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    compartmentId 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 List<GetDetectionProjectsFilter>
    state String
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    compartmentId 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 GetDetectionProjectsFilter[]
    state string
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    compartment_id 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 GetDetectionProjectsFilter]
    state str
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    compartmentId 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 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 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 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 string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetDetectionProjectsProjectCollection

    GetDetectionProjectsProjectCollectionItem

    CompartmentId string
    The ID of the compartment in which to list resources.
    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    A short description of the project.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    FreeformTags Dictionary<string, object>
    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 project that is immutable on creation.
    State string
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    SystemTags Dictionary<string, object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time the resource was created in the timestamp format defined by RFC3339.
    TimeUpdated string
    The date and time the resource was updated in the timestamp format defined by RFC3339.
    CompartmentId string
    The ID of the compartment in which to list resources.
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    A short description of the project.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    FreeformTags map[string]interface{}
    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 project that is immutable on creation.
    State string
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    SystemTags map[string]interface{}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time the resource was created in the timestamp format defined by RFC3339.
    TimeUpdated string
    The date and time the resource was updated in the timestamp format defined by RFC3339.
    compartmentId String
    The ID of the compartment in which to list resources.
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    A short description of the project.
    displayName String
    A filter to return only resources that match the entire display name given.
    freeformTags Map<String,Object>
    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 project that is immutable on creation.
    state String
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    systemTags Map<String,Object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time the resource was created in the timestamp format defined by RFC3339.
    timeUpdated String
    The date and time the resource was updated in the timestamp format defined by RFC3339.
    compartmentId string
    The ID of the compartment in which to list resources.
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    A short description of the project.
    displayName string
    A filter to return only resources that match the entire display name given.
    freeformTags {[key: string]: any}
    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 project that is immutable on creation.
    state string
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    systemTags {[key: string]: any}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    The date and time the resource was created in the timestamp format defined by RFC3339.
    timeUpdated string
    The date and time the resource was updated in the timestamp format defined by RFC3339.
    compartment_id str
    The ID of the compartment in which to list resources.
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    A short description of the project.
    display_name str
    A filter to return only resources that match the entire display name given.
    freeform_tags Mapping[str, Any]
    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 project that is immutable on creation.
    state str
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    system_tags Mapping[str, Any]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    The date and time the resource was created in the timestamp format defined by RFC3339.
    time_updated str
    The date and time the resource was updated in the timestamp format defined by RFC3339.
    compartmentId String
    The ID of the compartment in which to list resources.
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    A short description of the project.
    displayName String
    A filter to return only resources that match the entire display name given.
    freeformTags Map<Any>
    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 project that is immutable on creation.
    state String
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    systemTags Map<Any>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time the resource was created in the timestamp format defined by RFC3339.
    timeUpdated 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.
    oci logo
    Oracle Cloud Infrastructure v1.27.0 published on Friday, Mar 15, 2024 by Pulumi