oci logo
Oracle Cloud Infrastructure v0.20.0, May 31 23

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

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 = @var.Compartment_id,
        State = @var.Enrollment_status_state,
        Status = @var.Enrollment_status_status,
    });

});
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.GetEnrollmentStatuses(ctx, &optimizer.GetEnrollmentStatusesArgs{
			CompartmentId: _var.Compartment_id,
			State:         pulumi.StringRef(_var.Enrollment_status_state),
			Status:        pulumi.StringRef(_var.Enrollment_status_status),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(var_.compartment_id())
            .state(var_.enrollment_status_state())
            .status(var_.enrollment_status_status())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_enrollment_statuses = oci.Optimizer.get_enrollment_statuses(compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    state=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    status=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testEnrollmentStatuses = oci.Optimizer.getEnrollmentStatuses({
    compartmentId: _var.compartment_id,
    state: _var.enrollment_status_state,
    status: _var.enrollment_status_status,
});
variables:
  testEnrollmentStatuses:
    fn::invoke:
      Function: oci:Optimizer:getEnrollmentStatuses
      Arguments:
        compartmentId: ${var.compartment_id}
        state: ${var.enrollment_status_state}
        status: ${var.enrollment_status_status}

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[_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]
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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: oci:Optimizer/getEnrollmentStatuses:getEnrollmentStatuses
  arguments:
    # arguments dictionary

The following arguments are supported:

CompartmentId string

The OCID of the compartment.

Filters 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 string

The OCID of the compartment.

Filters []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 String

The OCID of the compartment.

filters 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 string

The OCID of the compartment.

filters 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 str

The OCID of the compartment.

filters 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 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.

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 GetEnrollmentStatusesEnrollmentStatusCollection]

The list of enrollment_status_collection.

id str

The provider-assigned unique ID for this managed resource.

filters 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

GetEnrollmentStatusesEnrollmentStatusCollectionItem

CompartmentId string

The OCID of the compartment.

EnrollmentStatusId string
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.

EnrollmentStatusId string
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.

enrollmentStatusId String
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.

enrollmentStatusId string
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_id str
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.

enrollmentStatusId String
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

Name string
Values List<string>
Regex bool
Name string
Values []string
Regex bool
name String
values List<String>
regex Boolean
name string
values string[]
regex boolean
name str
values Sequence[str]
regex bool
name String
values 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.