Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Optimizer.getEnrollmentStatuses
Explore with Pulumi AI
This data source provides the list of Enrollment Statuses in Oracle Cloud Infrastructure Optimizer service.
Lists the Cloud Advisor enrollment statuses.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testEnrollmentStatuses = oci.Optimizer.getEnrollmentStatuses({
    compartmentId: compartmentId,
    state: enrollmentStatusState,
    status: enrollmentStatusStatus,
});
import pulumi
import pulumi_oci as oci
test_enrollment_statuses = oci.Optimizer.get_enrollment_statuses(compartment_id=compartment_id,
    state=enrollment_status_state,
    status=enrollment_status_status)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/optimizer"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := optimizer.GetEnrollmentStatuses(ctx, &optimizer.GetEnrollmentStatusesArgs{
			CompartmentId: compartmentId,
			State:         pulumi.StringRef(enrollmentStatusState),
			Status:        pulumi.StringRef(enrollmentStatusStatus),
		}, 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 testEnrollmentStatuses = Oci.Optimizer.GetEnrollmentStatuses.Invoke(new()
    {
        CompartmentId = compartmentId,
        State = enrollmentStatusState,
        Status = enrollmentStatusStatus,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Optimizer.OptimizerFunctions;
import com.pulumi.oci.Optimizer.inputs.GetEnrollmentStatusesArgs;
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 testEnrollmentStatuses = OptimizerFunctions.getEnrollmentStatuses(GetEnrollmentStatusesArgs.builder()
            .compartmentId(compartmentId)
            .state(enrollmentStatusState)
            .status(enrollmentStatusStatus)
            .build());
    }
}
variables:
  testEnrollmentStatuses:
    fn::invoke:
      function: oci:Optimizer:getEnrollmentStatuses
      arguments:
        compartmentId: ${compartmentId}
        state: ${enrollmentStatusState}
        status: ${enrollmentStatusStatus}
Using getEnrollmentStatuses
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 getEnrollmentStatuses(args: GetEnrollmentStatusesArgs, opts?: InvokeOptions): Promise<GetEnrollmentStatusesResult>
function getEnrollmentStatusesOutput(args: GetEnrollmentStatusesOutputArgs, opts?: InvokeOptions): Output<GetEnrollmentStatusesResult>def get_enrollment_statuses(compartment_id: Optional[str] = None,
                            filters: Optional[Sequence[GetEnrollmentStatusesFilter]] = None,
                            state: Optional[str] = None,
                            status: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetEnrollmentStatusesResult
def get_enrollment_statuses_output(compartment_id: Optional[pulumi.Input[str]] = None,
                            filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetEnrollmentStatusesFilterArgs]]]] = None,
                            state: Optional[pulumi.Input[str]] = None,
                            status: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetEnrollmentStatusesResult]func GetEnrollmentStatuses(ctx *Context, args *GetEnrollmentStatusesArgs, opts ...InvokeOption) (*GetEnrollmentStatusesResult, error)
func GetEnrollmentStatusesOutput(ctx *Context, args *GetEnrollmentStatusesOutputArgs, opts ...InvokeOption) GetEnrollmentStatusesResultOutput> Note: This function is named GetEnrollmentStatuses in the Go SDK.
public static class GetEnrollmentStatuses 
{
    public static Task<GetEnrollmentStatusesResult> InvokeAsync(GetEnrollmentStatusesArgs args, InvokeOptions? opts = null)
    public static Output<GetEnrollmentStatusesResult> Invoke(GetEnrollmentStatusesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetEnrollmentStatusesResult> getEnrollmentStatuses(GetEnrollmentStatusesArgs args, InvokeOptions options)
public static Output<GetEnrollmentStatusesResult> getEnrollmentStatuses(GetEnrollmentStatusesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Optimizer/getEnrollmentStatuses:getEnrollmentStatuses
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment.
- Filters
List<GetEnrollment Statuses Filter> 
- State string
- A filter that returns results that match the lifecycle state specified.
- Status string
- A filter that returns results that match the Cloud Advisor enrollment status specified.
- CompartmentId string
- The OCID of the compartment.
- Filters
[]GetEnrollment Statuses Filter 
- State string
- A filter that returns results that match the lifecycle state specified.
- Status string
- A filter that returns results that match the Cloud Advisor enrollment status specified.
- compartmentId String
- The OCID of the compartment.
- filters
List<GetEnrollment Statuses Filter> 
- state String
- A filter that returns results that match the lifecycle state specified.
- status String
- A filter that returns results that match the Cloud Advisor enrollment status specified.
- compartmentId string
- The OCID of the compartment.
- filters
GetEnrollment Statuses Filter[] 
- state string
- A filter that returns results that match the lifecycle state specified.
- status string
- A filter that returns results that match the Cloud Advisor enrollment status specified.
- compartment_id str
- The OCID of the compartment.
- filters
Sequence[GetEnrollment Statuses Filter] 
- state str
- A filter that returns results that match the lifecycle state specified.
- status str
- A filter that returns results that match the Cloud Advisor enrollment status specified.
- compartmentId String
- The OCID of the compartment.
- filters List<Property Map>
- state String
- A filter that returns results that match the lifecycle state specified.
- status String
- A filter that returns results that match the Cloud Advisor enrollment status specified.
getEnrollmentStatuses Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment.
- EnrollmentStatus List<GetCollections Enrollment Statuses Enrollment Status Collection> 
- The list of enrollment_status_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
List<GetEnrollment Statuses Filter> 
- State string
- The enrollment status' current state.
- Status string
- The current Cloud Advisor enrollment status.
- CompartmentId string
- The OCID of the compartment.
- EnrollmentStatus []GetCollections Enrollment Statuses Enrollment Status Collection 
- The list of enrollment_status_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
[]GetEnrollment Statuses Filter 
- State string
- The enrollment status' current state.
- Status string
- The current Cloud Advisor enrollment status.
- compartmentId String
- The OCID of the compartment.
- enrollmentStatus List<GetCollections Enrollment Statuses Enrollment Status Collection> 
- The list of enrollment_status_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- filters
List<GetEnrollment Statuses Filter> 
- state String
- The enrollment status' current state.
- status String
- The current Cloud Advisor enrollment status.
- compartmentId string
- The OCID of the compartment.
- enrollmentStatus GetCollections Enrollment Statuses Enrollment Status Collection[] 
- The list of enrollment_status_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- filters
GetEnrollment Statuses Filter[] 
- state string
- The enrollment status' current state.
- status string
- The current Cloud Advisor enrollment status.
- compartment_id str
- The OCID of the compartment.
- enrollment_status_ Sequence[Getcollections Enrollment Statuses Enrollment Status Collection] 
- The list of enrollment_status_collection.
- id str
- The provider-assigned unique ID for this managed resource.
- filters
Sequence[GetEnrollment Statuses Filter] 
- state str
- The enrollment status' current state.
- status str
- The current Cloud Advisor enrollment status.
- compartmentId String
- The OCID of the compartment.
- enrollmentStatus List<Property Map>Collections 
- The list of enrollment_status_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- filters List<Property Map>
- state String
- The enrollment status' current state.
- status String
- The current Cloud Advisor enrollment status.
Supporting Types
GetEnrollmentStatusesEnrollmentStatusCollection     
GetEnrollmentStatusesEnrollmentStatusCollectionItem      
- CompartmentId string
- The OCID of the compartment.
- EnrollmentStatus stringId 
- Id string
- The OCID of the enrollment status.
- State string
- A filter that returns results that match the lifecycle state specified.
- Status string
- A filter that returns results that match the Cloud Advisor enrollment status specified.
- StatusReason string
- The reason for the enrollment status of the tenancy.
- TimeCreated string
- The date and time the enrollment status was created, in the format defined by RFC3339.
- TimeUpdated string
- The date and time the enrollment status was last updated, in the format defined by RFC3339.
- CompartmentId string
- The OCID of the compartment.
- EnrollmentStatus stringId 
- Id string
- The OCID of the enrollment status.
- State string
- A filter that returns results that match the lifecycle state specified.
- Status string
- A filter that returns results that match the Cloud Advisor enrollment status specified.
- StatusReason string
- The reason for the enrollment status of the tenancy.
- TimeCreated string
- The date and time the enrollment status was created, in the format defined by RFC3339.
- TimeUpdated string
- The date and time the enrollment status was last updated, in the format defined by RFC3339.
- compartmentId String
- The OCID of the compartment.
- enrollmentStatus StringId 
- id String
- The OCID of the enrollment status.
- state String
- A filter that returns results that match the lifecycle state specified.
- status String
- A filter that returns results that match the Cloud Advisor enrollment status specified.
- statusReason String
- The reason for the enrollment status of the tenancy.
- timeCreated String
- The date and time the enrollment status was created, in the format defined by RFC3339.
- timeUpdated String
- The date and time the enrollment status was last updated, in the format defined by RFC3339.
- compartmentId string
- The OCID of the compartment.
- enrollmentStatus stringId 
- id string
- The OCID of the enrollment status.
- state string
- A filter that returns results that match the lifecycle state specified.
- status string
- A filter that returns results that match the Cloud Advisor enrollment status specified.
- statusReason string
- The reason for the enrollment status of the tenancy.
- timeCreated string
- The date and time the enrollment status was created, in the format defined by RFC3339.
- timeUpdated string
- The date and time the enrollment status was last updated, in the format defined by RFC3339.
- compartment_id str
- The OCID of the compartment.
- enrollment_status_ strid 
- id str
- The OCID of the enrollment status.
- state str
- A filter that returns results that match the lifecycle state specified.
- status str
- A filter that returns results that match the Cloud Advisor enrollment status specified.
- status_reason str
- The reason for the enrollment status of the tenancy.
- time_created str
- The date and time the enrollment status was created, in the format defined by RFC3339.
- time_updated str
- The date and time the enrollment status was last updated, in the format defined by RFC3339.
- compartmentId String
- The OCID of the compartment.
- enrollmentStatus StringId 
- id String
- The OCID of the enrollment status.
- state String
- A filter that returns results that match the lifecycle state specified.
- status String
- A filter that returns results that match the Cloud Advisor enrollment status specified.
- statusReason String
- The reason for the enrollment status of the tenancy.
- timeCreated String
- The date and time the enrollment status was created, in the format defined by RFC3339.
- timeUpdated String
- The date and time the enrollment status was last updated, in the format defined by RFC3339.
GetEnrollmentStatusesFilter   
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.