oci.Optimizer.getEnrollmentStatuses
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 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=var["compartment_id"],
state=var["enrollment_status_state"],
status=var["enrollment_status_status"])
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:
- Compartment
Id string The OCID of the compartment.
- Filters
List<Get
Enrollment 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 string The OCID of the compartment.
- Filters
[]Get
Enrollment 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 String The OCID of the compartment.
- filters
List<Get
Enrollment 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 string The OCID of the compartment.
- filters
Get
Enrollment 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
Get
Enrollment 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.
- compartment
Id 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:
- Compartment
Id string The OCID of the compartment.
- Enrollment
Status 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<Get
Enrollment Statuses Filter> - State string
The enrollment status' current state.
- Status string
The current Cloud Advisor enrollment status.
- Compartment
Id string The OCID of the compartment.
- Enrollment
Status []GetCollections Enrollment Statuses Enrollment Status Collection The list of enrollment_status_collection.
- Id string
The provider-assigned unique ID for this managed resource.
- Filters
[]Get
Enrollment Statuses Filter - State string
The enrollment status' current state.
- Status string
The current Cloud Advisor enrollment status.
- compartment
Id String The OCID of the compartment.
- enrollment
Status 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<Get
Enrollment Statuses Filter> - state String
The enrollment status' current state.
- status String
The current Cloud Advisor enrollment status.
- compartment
Id string The OCID of the compartment.
- enrollment
Status GetCollections Enrollment Statuses Enrollment Status Collection[] The list of enrollment_status_collection.
- id string
The provider-assigned unique ID for this managed resource.
- filters
Get
Enrollment 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_ Getcollections Enrollment Statuses Enrollment Status Collection] The list of enrollment_status_collection.
- id str
The provider-assigned unique ID for this managed resource.
- filters
Get
Enrollment Statuses Filter] - state str
The enrollment status' current state.
- status str
The current Cloud Advisor enrollment status.
- compartment
Id String The OCID of the compartment.
- enrollment
Status 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
- Compartment
Id string The OCID of the compartment.
- Enrollment
Status 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.
- Status
Reason string The reason for the enrollment status of the tenancy.
- Time
Created string The date and time the enrollment status was created, in the format defined by RFC3339.
- Time
Updated string The date and time the enrollment status was last updated, in the format defined by RFC3339.
- Compartment
Id string The OCID of the compartment.
- Enrollment
Status 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.
- Status
Reason string The reason for the enrollment status of the tenancy.
- Time
Created string The date and time the enrollment status was created, in the format defined by RFC3339.
- Time
Updated string The date and time the enrollment status was last updated, in the format defined by RFC3339.
- compartment
Id String The OCID of the compartment.
- enrollment
Status 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.
- status
Reason String The reason for the enrollment status of the tenancy.
- time
Created String The date and time the enrollment status was created, in the format defined by RFC3339.
- time
Updated String The date and time the enrollment status was last updated, in the format defined by RFC3339.
- compartment
Id string The OCID of the compartment.
- enrollment
Status 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.
- status
Reason string The reason for the enrollment status of the tenancy.
- time
Created string The date and time the enrollment status was created, in the format defined by RFC3339.
- time
Updated 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.
- compartment
Id String The OCID of the compartment.
- enrollment
Status 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.
- status
Reason String The reason for the enrollment status of the tenancy.
- time
Created String The date and time the enrollment status was created, in the format defined by RFC3339.
- time
Updated 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
oci
Terraform Provider.