1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataScience
  5. getProjects
Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi

oci.DataScience.getProjects

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi

This data source provides the list of Projects in Oracle Cloud Infrastructure Data Science service.

Lists projects in the specified compartment.

Example Usage

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

const testProjects = oci.DataScience.getProjects({
    compartmentId: compartmentId,
    createdBy: projectCreatedBy,
    displayName: projectDisplayName,
    id: projectId,
    state: projectState,
});
Copy
import pulumi
import pulumi_oci as oci

test_projects = oci.DataScience.get_projects(compartment_id=compartment_id,
    created_by=project_created_by,
    display_name=project_display_name,
    id=project_id,
    state=project_state)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datascience.GetProjects(ctx, &datascience.GetProjectsArgs{
			CompartmentId: compartmentId,
			CreatedBy:     pulumi.StringRef(projectCreatedBy),
			DisplayName:   pulumi.StringRef(projectDisplayName),
			Id:            pulumi.StringRef(projectId),
			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.DataScience.GetProjects.Invoke(new()
    {
        CompartmentId = compartmentId,
        CreatedBy = projectCreatedBy,
        DisplayName = projectDisplayName,
        Id = projectId,
        State = projectState,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DataScience.DataScienceFunctions;
import com.pulumi.oci.DataScience.inputs.GetProjectsArgs;
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 = DataScienceFunctions.getProjects(GetProjectsArgs.builder()
            .compartmentId(compartmentId)
            .createdBy(projectCreatedBy)
            .displayName(projectDisplayName)
            .id(projectId)
            .state(projectState)
            .build());

    }
}
Copy
variables:
  testProjects:
    fn::invoke:
      function: oci:DataScience:getProjects
      arguments:
        compartmentId: ${compartmentId}
        createdBy: ${projectCreatedBy}
        displayName: ${projectDisplayName}
        id: ${projectId}
        state: ${projectState}
Copy

Using getProjects

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 getProjects(args: GetProjectsArgs, opts?: InvokeOptions): Promise<GetProjectsResult>
function getProjectsOutput(args: GetProjectsOutputArgs, opts?: InvokeOptions): Output<GetProjectsResult>
Copy
def get_projects(compartment_id: Optional[str] = None,
                 created_by: Optional[str] = None,
                 display_name: Optional[str] = None,
                 filters: Optional[Sequence[_datascience.GetProjectsFilter]] = None,
                 id: Optional[str] = None,
                 state: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetProjectsResult
def get_projects_output(compartment_id: Optional[pulumi.Input[str]] = None,
                 created_by: Optional[pulumi.Input[str]] = None,
                 display_name: Optional[pulumi.Input[str]] = None,
                 filters: Optional[pulumi.Input[Sequence[pulumi.Input[_datascience.GetProjectsFilterArgs]]]] = None,
                 id: Optional[pulumi.Input[str]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetProjectsResult]
Copy
func GetProjects(ctx *Context, args *GetProjectsArgs, opts ...InvokeOption) (*GetProjectsResult, error)
func GetProjectsOutput(ctx *Context, args *GetProjectsOutputArgs, opts ...InvokeOption) GetProjectsResultOutput
Copy

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

public static class GetProjects 
{
    public static Task<GetProjectsResult> InvokeAsync(GetProjectsArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectsResult> Invoke(GetProjectsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetProjectsResult> getProjects(GetProjectsArgs args, InvokeOptions options)
public static Output<GetProjectsResult> getProjects(GetProjectsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:DataScience/getProjects:getProjects
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
Filter results by the OCID of the compartment.
CreatedBy string
Filter results by the OCID of the user who created the resource.
DisplayName string
Filter results by its user-friendly name.
Filters Changes to this property will trigger replacement. List<GetProjectsFilter>
Id string
Filter results by OCID. Must be an OCID of the correct type for the resource type.
State string
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
CompartmentId This property is required. string
Filter results by the OCID of the compartment.
CreatedBy string
Filter results by the OCID of the user who created the resource.
DisplayName string
Filter results by its user-friendly name.
Filters Changes to this property will trigger replacement. []GetProjectsFilter
Id string
Filter results by OCID. Must be an OCID of the correct type for the resource type.
State string
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
compartmentId This property is required. String
Filter results by the OCID of the compartment.
createdBy String
Filter results by the OCID of the user who created the resource.
displayName String
Filter results by its user-friendly name.
filters Changes to this property will trigger replacement. List<GetProjectsFilter>
id String
Filter results by OCID. Must be an OCID of the correct type for the resource type.
state String
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
compartmentId This property is required. string
Filter results by the OCID of the compartment.
createdBy string
Filter results by the OCID of the user who created the resource.
displayName string
Filter results by its user-friendly name.
filters Changes to this property will trigger replacement. GetProjectsFilter[]
id string
Filter results by OCID. Must be an OCID of the correct type for the resource type.
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
Filter results by the OCID of the compartment.
created_by str
Filter results by the OCID of the user who created the resource.
display_name str
Filter results by its user-friendly name.
filters Changes to this property will trigger replacement. Sequence[datascience.GetProjectsFilter]
id str
Filter results by OCID. Must be an OCID of the correct type for the resource type.
state str
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
compartmentId This property is required. String
Filter results by the OCID of the compartment.
createdBy String
Filter results by the OCID of the user who created the resource.
displayName String
Filter results by its user-friendly name.
filters Changes to this property will trigger replacement. List<Property Map>
id String
Filter results by OCID. Must be an OCID of the correct type for the resource type.
state String
Filter results by the specified lifecycle state. Must be a valid state for the resource type.

getProjects Result

The following output properties are available:

CompartmentId string
The OCID of the project's compartment.
Projects List<GetProjectsProject>
The list of projects.
CreatedBy string
The OCID of the user who created this project.
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<GetProjectsFilter>
Id string
The OCID of the project.
State string
The state of the project.
CompartmentId string
The OCID of the project's compartment.
Projects []GetProjectsProject
The list of projects.
CreatedBy string
The OCID of the user who created this project.
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 []GetProjectsFilter
Id string
The OCID of the project.
State string
The state of the project.
compartmentId String
The OCID of the project's compartment.
projects List<GetProjectsProject>
The list of projects.
createdBy String
The OCID of the user who created this project.
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<GetProjectsFilter>
id String
The OCID of the project.
state String
The state of the project.
compartmentId string
The OCID of the project's compartment.
projects GetProjectsProject[]
The list of projects.
createdBy string
The OCID of the user who created this project.
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 GetProjectsFilter[]
id string
The OCID of the project.
state string
The state of the project.
compartment_id str
The OCID of the project's compartment.
projects Sequence[datascience.GetProjectsProject]
The list of projects.
created_by str
The OCID of the user who created this project.
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[datascience.GetProjectsFilter]
id str
The OCID of the project.
state str
The state of the project.
compartmentId String
The OCID of the project's compartment.
projects List<Property Map>
The list of projects.
createdBy String
The OCID of the user who created this project.
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>
id String
The OCID of the project.
state String
The state of the project.

Supporting Types

GetProjectsFilter

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

GetProjectsProject

CompartmentId This property is required. string
Filter results by the OCID of the compartment.
CreatedBy This property is required. string
Filter results by the OCID of the user who created the resource.
DefinedTags This property is required. Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"Operations.CostCenter": "42"}
Description This property is required. string
A short description of the project.
DisplayName This property is required. string
Filter results by its user-friendly name.
FreeformTags This property is required. Dictionary<string, string>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See Resource Tags. Example: {"Department": "Finance"}
Id This property is required. string
Filter results by OCID. Must be an OCID of the correct type for the resource type.
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. Example: 2019-08-25T21:10:29.41Z
CompartmentId This property is required. string
Filter results by the OCID of the compartment.
CreatedBy This property is required. string
Filter results by the OCID of the user who created the resource.
DefinedTags This property is required. map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"Operations.CostCenter": "42"}
Description This property is required. string
A short description of the project.
DisplayName This property is required. string
Filter results by its user-friendly name.
FreeformTags This property is required. map[string]string
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See Resource Tags. Example: {"Department": "Finance"}
Id This property is required. string
Filter results by OCID. Must be an OCID of the correct type for the resource type.
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. Example: 2019-08-25T21:10:29.41Z
compartmentId This property is required. String
Filter results by the OCID of the compartment.
createdBy This property is required. String
Filter results by the OCID of the user who created the resource.
definedTags This property is required. Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"Operations.CostCenter": "42"}
description This property is required. String
A short description of the project.
displayName This property is required. String
Filter results by its user-friendly name.
freeformTags This property is required. Map<String,String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See Resource Tags. Example: {"Department": "Finance"}
id This property is required. String
Filter results by OCID. Must be an OCID of the correct type for the resource type.
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. Example: 2019-08-25T21:10:29.41Z
compartmentId This property is required. string
Filter results by the OCID of the compartment.
createdBy This property is required. string
Filter results by the OCID of the user who created the resource.
definedTags This property is required. {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"Operations.CostCenter": "42"}
description This property is required. string
A short description of the project.
displayName This property is required. string
Filter results by its user-friendly name.
freeformTags This property is required. {[key: string]: string}
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See Resource Tags. Example: {"Department": "Finance"}
id This property is required. string
Filter results by OCID. Must be an OCID of the correct type for the resource type.
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. Example: 2019-08-25T21:10:29.41Z
compartment_id This property is required. str
Filter results by the OCID of the compartment.
created_by This property is required. str
Filter results by the OCID of the user who created the resource.
defined_tags This property is required. Mapping[str, str]
Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"Operations.CostCenter": "42"}
description This property is required. str
A short description of the project.
display_name This property is required. str
Filter results by its user-friendly name.
freeform_tags This property is required. Mapping[str, str]
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See Resource Tags. Example: {"Department": "Finance"}
id This property is required. str
Filter results by OCID. Must be an OCID of the correct type for the resource type.
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. Example: 2019-08-25T21:10:29.41Z
compartmentId This property is required. String
Filter results by the OCID of the compartment.
createdBy This property is required. String
Filter results by the OCID of the user who created the resource.
definedTags This property is required. Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"Operations.CostCenter": "42"}
description This property is required. String
A short description of the project.
displayName This property is required. String
Filter results by its user-friendly name.
freeformTags This property is required. Map<String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See Resource Tags. Example: {"Department": "Finance"}
id This property is required. String
Filter results by OCID. Must be an OCID of the correct type for the resource type.
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. Example: 2019-08-25T21:10:29.41Z

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.32.0 published on Thursday, Apr 24, 2025 by Pulumi