Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Optimizer.getEnrollmentStatus
Explore with Pulumi AI
This data source provides details about a specific Enrollment Status resource in Oracle Cloud Infrastructure Optimizer service.
Gets the Cloud Advisor enrollment status.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testEnrollmentStatus = oci.Optimizer.getEnrollmentStatus({
    enrollmentStatusId: testEnrollmentStatusOciOptimizerEnrollmentStatus.id,
});
import pulumi
import pulumi_oci as oci
test_enrollment_status = oci.Optimizer.get_enrollment_status(enrollment_status_id=test_enrollment_status_oci_optimizer_enrollment_status["id"])
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.GetEnrollmentStatus(ctx, &optimizer.GetEnrollmentStatusArgs{
			EnrollmentStatusId: testEnrollmentStatusOciOptimizerEnrollmentStatus.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 testEnrollmentStatus = Oci.Optimizer.GetEnrollmentStatus.Invoke(new()
    {
        EnrollmentStatusId = testEnrollmentStatusOciOptimizerEnrollmentStatus.Id,
    });
});
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.GetEnrollmentStatusArgs;
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 testEnrollmentStatus = OptimizerFunctions.getEnrollmentStatus(GetEnrollmentStatusArgs.builder()
            .enrollmentStatusId(testEnrollmentStatusOciOptimizerEnrollmentStatus.id())
            .build());
    }
}
variables:
  testEnrollmentStatus:
    fn::invoke:
      function: oci:Optimizer:getEnrollmentStatus
      arguments:
        enrollmentStatusId: ${testEnrollmentStatusOciOptimizerEnrollmentStatus.id}
Using getEnrollmentStatus
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 getEnrollmentStatus(args: GetEnrollmentStatusArgs, opts?: InvokeOptions): Promise<GetEnrollmentStatusResult>
function getEnrollmentStatusOutput(args: GetEnrollmentStatusOutputArgs, opts?: InvokeOptions): Output<GetEnrollmentStatusResult>def get_enrollment_status(enrollment_status_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetEnrollmentStatusResult
def get_enrollment_status_output(enrollment_status_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetEnrollmentStatusResult]func LookupEnrollmentStatus(ctx *Context, args *LookupEnrollmentStatusArgs, opts ...InvokeOption) (*LookupEnrollmentStatusResult, error)
func LookupEnrollmentStatusOutput(ctx *Context, args *LookupEnrollmentStatusOutputArgs, opts ...InvokeOption) LookupEnrollmentStatusResultOutput> Note: This function is named LookupEnrollmentStatus in the Go SDK.
public static class GetEnrollmentStatus 
{
    public static Task<GetEnrollmentStatusResult> InvokeAsync(GetEnrollmentStatusArgs args, InvokeOptions? opts = null)
    public static Output<GetEnrollmentStatusResult> Invoke(GetEnrollmentStatusInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetEnrollmentStatusResult> getEnrollmentStatus(GetEnrollmentStatusArgs args, InvokeOptions options)
public static Output<GetEnrollmentStatusResult> getEnrollmentStatus(GetEnrollmentStatusArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Optimizer/getEnrollmentStatus:getEnrollmentStatus
  arguments:
    # arguments dictionaryThe following arguments are supported:
- EnrollmentStatus stringId 
- The unique OCID associated with the enrollment status.
- EnrollmentStatus stringId 
- The unique OCID associated with the enrollment status.
- enrollmentStatus StringId 
- The unique OCID associated with the enrollment status.
- enrollmentStatus stringId 
- The unique OCID associated with the enrollment status.
- enrollment_status_ strid 
- The unique OCID associated with the enrollment status.
- enrollmentStatus StringId 
- The unique OCID associated with the enrollment status.
getEnrollmentStatus Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment.
- EnrollmentStatus stringId 
- Id string
- The OCID of the enrollment status.
- State string
- The enrollment status' current state.
- Status string
- The current Cloud Advisor enrollment status.
- 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
- The enrollment status' current state.
- Status string
- The current Cloud Advisor enrollment status.
- 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
- The enrollment status' current state.
- status String
- The current Cloud Advisor enrollment status.
- 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
- The enrollment status' current state.
- status string
- The current Cloud Advisor enrollment status.
- 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
- The enrollment status' current state.
- status str
- The current Cloud Advisor enrollment status.
- 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
- The enrollment status' current state.
- status String
- The current Cloud Advisor enrollment status.
- 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.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.