Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi
oci.DevOps.getProject
Explore with Pulumi AI
This data source provides details about a specific Project resource in Oracle Cloud Infrastructure Devops service.
Retrieves a project by identifier.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testProject = oci.DevOps.getProject({
    projectId: testProjectOciDevopsProject.id,
});
import pulumi
import pulumi_oci as oci
test_project = oci.DevOps.get_project(project_id=test_project_oci_devops_project["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/devops"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devops.GetProject(ctx, &devops.GetProjectArgs{
			ProjectId: testProjectOciDevopsProject.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 testProject = Oci.DevOps.GetProject.Invoke(new()
    {
        ProjectId = testProjectOciDevopsProject.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DevOps.DevOpsFunctions;
import com.pulumi.oci.DevOps.inputs.GetProjectArgs;
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 testProject = DevOpsFunctions.getProject(GetProjectArgs.builder()
            .projectId(testProjectOciDevopsProject.id())
            .build());
    }
}
variables:
  testProject:
    fn::invoke:
      function: oci:DevOps:getProject
      arguments:
        projectId: ${testProjectOciDevopsProject.id}
Using getProject
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 getProject(args: GetProjectArgs, opts?: InvokeOptions): Promise<GetProjectResult>
function getProjectOutput(args: GetProjectOutputArgs, opts?: InvokeOptions): Output<GetProjectResult>def get_project(project_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetProjectResult
def get_project_output(project_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetProjectResult]func GetProject(ctx *Context, args *GetProjectArgs, opts ...InvokeOption) (*GetProjectResult, error)
func GetProjectOutput(ctx *Context, args *GetProjectOutputArgs, opts ...InvokeOption) GetProjectResultOutput> Note: This function is named GetProject in the Go SDK.
public static class GetProject 
{
    public static Task<GetProjectResult> InvokeAsync(GetProjectArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectResult> Invoke(GetProjectInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
public static Output<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DevOps/getProject:getProject
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Project
Id string - Unique project identifier.
 
- Project
Id string - Unique project identifier.
 
- project
Id String - Unique project identifier.
 
- project
Id string - Unique project identifier.
 
- project_
id str - Unique project identifier.
 
- project
Id String - Unique project identifier.
 
getProject Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment where the project is created.
 - Dictionary<string, string>
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: 
{"foo-namespace.bar-key": "value"} - Description string
 - Project description.
 - Dictionary<string, string>
 - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: 
{"bar-key": "value"} - Id string
 - Unique identifier that is immutable on creation.
 - Lifecycle
Details string - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
 - Name string
 - Project name (case-sensitive).
 - Namespace string
 - Namespace associated with the project.
 - Notification
Configs List<GetProject Notification Config>  - Notification configuration for the project.
 - Project
Id string - State string
 - The current state of the project.
 - Dictionary<string, string>
 - Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: 
{"orcl-cloud.free-tier-retained": "true"} - Time
Created string - Time the project was created. Format defined by RFC3339.
 - Time
Updated string - Time the project was updated. Format defined by RFC3339.
 
- Compartment
Id string - The OCID of the compartment where the project is created.
 - map[string]string
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: 
{"foo-namespace.bar-key": "value"} - Description string
 - Project description.
 - map[string]string
 - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: 
{"bar-key": "value"} - Id string
 - Unique identifier that is immutable on creation.
 - Lifecycle
Details string - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
 - Name string
 - Project name (case-sensitive).
 - Namespace string
 - Namespace associated with the project.
 - Notification
Configs []GetProject Notification Config  - Notification configuration for the project.
 - Project
Id string - State string
 - The current state of the project.
 - map[string]string
 - Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: 
{"orcl-cloud.free-tier-retained": "true"} - Time
Created string - Time the project was created. Format defined by RFC3339.
 - Time
Updated string - Time the project was updated. Format defined by RFC3339.
 
- compartment
Id String - The OCID of the compartment where the project is created.
 - Map<String,String>
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: 
{"foo-namespace.bar-key": "value"} - description String
 - Project description.
 - Map<String,String>
 - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: 
{"bar-key": "value"} - id String
 - Unique identifier that is immutable on creation.
 - lifecycle
Details String - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
 - name String
 - Project name (case-sensitive).
 - namespace String
 - Namespace associated with the project.
 - notification
Configs List<GetProject Notification Config>  - Notification configuration for the project.
 - project
Id String - state String
 - The current state of the project.
 - Map<String,String>
 - Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: 
{"orcl-cloud.free-tier-retained": "true"} - time
Created String - Time the project was created. Format defined by RFC3339.
 - time
Updated String - Time the project was updated. Format defined by RFC3339.
 
- compartment
Id string - The OCID of the compartment where the project is created.
 - {[key: string]: string}
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: 
{"foo-namespace.bar-key": "value"} - description string
 - Project description.
 - {[key: string]: string}
 - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: 
{"bar-key": "value"} - id string
 - Unique identifier that is immutable on creation.
 - lifecycle
Details string - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
 - name string
 - Project name (case-sensitive).
 - namespace string
 - Namespace associated with the project.
 - notification
Configs GetProject Notification Config[]  - Notification configuration for the project.
 - project
Id string - state string
 - The current state of the project.
 - {[key: string]: string}
 - Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: 
{"orcl-cloud.free-tier-retained": "true"} - time
Created string - Time the project was created. Format defined by RFC3339.
 - time
Updated string - Time the project was updated. Format defined by RFC3339.
 
- compartment_
id str - The OCID of the compartment where the project is created.
 - Mapping[str, str]
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: 
{"foo-namespace.bar-key": "value"} - description str
 - Project description.
 - Mapping[str, str]
 - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: 
{"bar-key": "value"} - id str
 - Unique identifier that is immutable on creation.
 - lifecycle_
details str - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
 - name str
 - Project name (case-sensitive).
 - namespace str
 - Namespace associated with the project.
 - notification_
configs Sequence[devops.Get Project Notification Config]  - Notification configuration for the project.
 - project_
id str - state str
 - The current state of the project.
 - Mapping[str, str]
 - Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: 
{"orcl-cloud.free-tier-retained": "true"} - time_
created str - Time the project was created. Format defined by RFC3339.
 - time_
updated str - Time the project was updated. Format defined by RFC3339.
 
- compartment
Id String - The OCID of the compartment where the project is created.
 - Map<String>
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: 
{"foo-namespace.bar-key": "value"} - description String
 - Project description.
 - Map<String>
 - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: 
{"bar-key": "value"} - id String
 - Unique identifier that is immutable on creation.
 - lifecycle
Details String - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
 - name String
 - Project name (case-sensitive).
 - namespace String
 - Namespace associated with the project.
 - notification
Configs List<Property Map> - Notification configuration for the project.
 - project
Id String - state String
 - The current state of the project.
 - Map<String>
 - Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: 
{"orcl-cloud.free-tier-retained": "true"} - time
Created String - Time the project was created. Format defined by RFC3339.
 - time
Updated String - Time the project was updated. Format defined by RFC3339.
 
Supporting Types
GetProjectNotificationConfig   
- Topic
Id string - The topic ID for notifications.
 
- Topic
Id string - The topic ID for notifications.
 
- topic
Id String - The topic ID for notifications.
 
- topic
Id string - The topic ID for notifications.
 
- topic_
id str - The topic ID for notifications.
 
- topic
Id String - The topic ID for notifications.
 
Package Details
- Repository
 - oci pulumi/pulumi-oci
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
ociTerraform Provider.