1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Optimizer
  5. getEnrollmentStatuses
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.Optimizer.getEnrollmentStatuses

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

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,
});
Copy
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)
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  testEnrollmentStatuses:
    fn::invoke:
      function: oci:Optimizer:getEnrollmentStatuses
      arguments:
        compartmentId: ${compartmentId}
        state: ${enrollmentStatusState}
        status: ${enrollmentStatusStatus}
Copy

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>
Copy
def get_enrollment_statuses(compartment_id: Optional[str] = None,
                            filters: Optional[Sequence[_optimizer.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[_optimizer.GetEnrollmentStatusesFilterArgs]]]] = None,
                            state: Optional[pulumi.Input[str]] = None,
                            status: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetEnrollmentStatusesResult]
Copy
func GetEnrollmentStatuses(ctx *Context, args *GetEnrollmentStatusesArgs, opts ...InvokeOption) (*GetEnrollmentStatusesResult, error)
func GetEnrollmentStatusesOutput(ctx *Context, args *GetEnrollmentStatusesOutputArgs, opts ...InvokeOption) GetEnrollmentStatusesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetEnrollmentStatusesResult> getEnrollmentStatuses(GetEnrollmentStatusesArgs args, InvokeOptions options)
public static Output<GetEnrollmentStatusesResult> getEnrollmentStatuses(GetEnrollmentStatusesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Optimizer/getEnrollmentStatuses:getEnrollmentStatuses
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
The OCID of the compartment.
Filters Changes to this property will trigger replacement. List<GetEnrollmentStatusesFilter>
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 This property is required. string
The OCID of the compartment.
Filters Changes to this property will trigger replacement. []GetEnrollmentStatusesFilter
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 This property is required. String
The OCID of the compartment.
filters Changes to this property will trigger replacement. List<GetEnrollmentStatusesFilter>
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 This property is required. string
The OCID of the compartment.
filters Changes to this property will trigger replacement. GetEnrollmentStatusesFilter[]
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 This property is required. str
The OCID of the compartment.
filters Changes to this property will trigger replacement. Sequence[optimizer.GetEnrollmentStatusesFilter]
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 This property is required. String
The OCID of the compartment.
filters Changes to this property will trigger replacement. 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.
EnrollmentStatusCollections List<GetEnrollmentStatusesEnrollmentStatusCollection>
The list of enrollment_status_collection.
Id string
The provider-assigned unique ID for this managed resource.
Filters List<GetEnrollmentStatusesFilter>
State string
The enrollment status' current state.
Status string
The current Cloud Advisor enrollment status.
CompartmentId string
The OCID of the compartment.
EnrollmentStatusCollections []GetEnrollmentStatusesEnrollmentStatusCollection
The list of enrollment_status_collection.
Id string
The provider-assigned unique ID for this managed resource.
Filters []GetEnrollmentStatusesFilter
State string
The enrollment status' current state.
Status string
The current Cloud Advisor enrollment status.
compartmentId String
The OCID of the compartment.
enrollmentStatusCollections List<GetEnrollmentStatusesEnrollmentStatusCollection>
The list of enrollment_status_collection.
id String
The provider-assigned unique ID for this managed resource.
filters List<GetEnrollmentStatusesFilter>
state String
The enrollment status' current state.
status String
The current Cloud Advisor enrollment status.
compartmentId string
The OCID of the compartment.
enrollmentStatusCollections GetEnrollmentStatusesEnrollmentStatusCollection[]
The list of enrollment_status_collection.
id string
The provider-assigned unique ID for this managed resource.
filters GetEnrollmentStatusesFilter[]
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_collections Sequence[optimizer.GetEnrollmentStatusesEnrollmentStatusCollection]
The list of enrollment_status_collection.
id str
The provider-assigned unique ID for this managed resource.
filters Sequence[optimizer.GetEnrollmentStatusesFilter]
state str
The enrollment status' current state.
status str
The current Cloud Advisor enrollment status.
compartmentId String
The OCID of the compartment.
enrollmentStatusCollections List<Property Map>
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

items This property is required. List<Property Map>

GetEnrollmentStatusesEnrollmentStatusCollectionItem

CompartmentId This property is required. string
The OCID of the compartment.
EnrollmentStatusId This property is required. string
Id This property is required. string
The OCID of the enrollment status.
State This property is required. string
A filter that returns results that match the lifecycle state specified.
Status This property is required. string
A filter that returns results that match the Cloud Advisor enrollment status specified.
StatusReason This property is required. string
The reason for the enrollment status of the tenancy.
TimeCreated This property is required. string
The date and time the enrollment status was created, in the format defined by RFC3339.
TimeUpdated This property is required. string
The date and time the enrollment status was last updated, in the format defined by RFC3339.
CompartmentId This property is required. string
The OCID of the compartment.
EnrollmentStatusId This property is required. string
Id This property is required. string
The OCID of the enrollment status.
State This property is required. string
A filter that returns results that match the lifecycle state specified.
Status This property is required. string
A filter that returns results that match the Cloud Advisor enrollment status specified.
StatusReason This property is required. string
The reason for the enrollment status of the tenancy.
TimeCreated This property is required. string
The date and time the enrollment status was created, in the format defined by RFC3339.
TimeUpdated This property is required. string
The date and time the enrollment status was last updated, in the format defined by RFC3339.
compartmentId This property is required. String
The OCID of the compartment.
enrollmentStatusId This property is required. String
id This property is required. String
The OCID of the enrollment status.
state This property is required. String
A filter that returns results that match the lifecycle state specified.
status This property is required. String
A filter that returns results that match the Cloud Advisor enrollment status specified.
statusReason This property is required. String
The reason for the enrollment status of the tenancy.
timeCreated This property is required. String
The date and time the enrollment status was created, in the format defined by RFC3339.
timeUpdated This property is required. String
The date and time the enrollment status was last updated, in the format defined by RFC3339.
compartmentId This property is required. string
The OCID of the compartment.
enrollmentStatusId This property is required. string
id This property is required. string
The OCID of the enrollment status.
state This property is required. string
A filter that returns results that match the lifecycle state specified.
status This property is required. string
A filter that returns results that match the Cloud Advisor enrollment status specified.
statusReason This property is required. string
The reason for the enrollment status of the tenancy.
timeCreated This property is required. string
The date and time the enrollment status was created, in the format defined by RFC3339.
timeUpdated This property is required. string
The date and time the enrollment status was last updated, in the format defined by RFC3339.
compartment_id This property is required. str
The OCID of the compartment.
enrollment_status_id This property is required. str
id This property is required. str
The OCID of the enrollment status.
state This property is required. str
A filter that returns results that match the lifecycle state specified.
status This property is required. str
A filter that returns results that match the Cloud Advisor enrollment status specified.
status_reason This property is required. str
The reason for the enrollment status of the tenancy.
time_created This property is required. str
The date and time the enrollment status was created, in the format defined by RFC3339.
time_updated This property is required. str
The date and time the enrollment status was last updated, in the format defined by RFC3339.
compartmentId This property is required. String
The OCID of the compartment.
enrollmentStatusId This property is required. String
id This property is required. String
The OCID of the enrollment status.
state This property is required. String
A filter that returns results that match the lifecycle state specified.
status This property is required. String
A filter that returns results that match the Cloud Advisor enrollment status specified.
statusReason This property is required. String
The reason for the enrollment status of the tenancy.
timeCreated This property is required. String
The date and time the enrollment status was created, in the format defined by RFC3339.
timeUpdated This property is required. String
The date and time the enrollment status was last updated, in the format defined by RFC3339.

GetEnrollmentStatusesFilter

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

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