1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Optimizer
  5. getEnrollmentStatus
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.Optimizer.getEnrollmentStatus

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    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: oci_optimizer_enrollment_status.test_enrollment_status.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_enrollment_status = oci.Optimizer.get_enrollment_status(enrollment_status_id=oci_optimizer_enrollment_status["test_enrollment_status"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/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: oci_optimizer_enrollment_status.Test_enrollment_status.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 = oci_optimizer_enrollment_status.Test_enrollment_status.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(oci_optimizer_enrollment_status.test_enrollment_status().id())
                .build());
    
        }
    }
    
    variables:
      testEnrollmentStatus:
        fn::invoke:
          Function: oci:Optimizer:getEnrollmentStatus
          Arguments:
            enrollmentStatusId: ${oci_optimizer_enrollment_status.test_enrollment_status.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 GetEnrollmentStatus(ctx *Context, args *GetEnrollmentStatusArgs, opts ...InvokeOption) (*GetEnrollmentStatusResult, error)
    func GetEnrollmentStatusOutput(ctx *Context, args *GetEnrollmentStatusOutputArgs, opts ...InvokeOption) GetEnrollmentStatusResultOutput

    > Note: This function is named GetEnrollmentStatus 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Optimizer/getEnrollmentStatus:getEnrollmentStatus
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EnrollmentStatusId string
    The unique OCID associated with the enrollment status.
    EnrollmentStatusId string
    The unique OCID associated with the enrollment status.
    enrollmentStatusId String
    The unique OCID associated with the enrollment status.
    enrollmentStatusId string
    The unique OCID associated with the enrollment status.
    enrollment_status_id str
    The unique OCID associated with the enrollment status.
    enrollmentStatusId String
    The unique OCID associated with the enrollment status.

    getEnrollmentStatus Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment.
    EnrollmentStatusId string
    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.
    EnrollmentStatusId string
    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.
    enrollmentStatusId String
    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.
    enrollmentStatusId string
    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_id str
    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.
    enrollmentStatusId String
    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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi