Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getImportableComputeEntities

This data source provides the list of Importable Compute Entities in Oracle Cloud Infrastructure Opsi service.

Gets a list of available compute intances running cloud agent to add a new hostInsight. An Compute entity is “available” and will be shown if all the following conditions are true:

  1. Compute is running OCA
  2. Oracle Cloud Infrastructure Management Agent is not enabled or If Oracle Cloud Infrastructure Management Agent is enabled 2.1 The agent OCID is not already being used for an existing hostInsight. 2.2 The agent availabilityStatus = ‘ACTIVE’ 2.3 The agent lifecycleState = ‘ACTIVE’

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testImportableComputeEntities = Oci.Opsi.GetImportableComputeEntities.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/Opsi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Opsi.GetImportableComputeEntities(ctx, &opsi.GetImportableComputeEntitiesArgs{
			CompartmentId: _var.Compartment_id,
		}, 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.Opsi.OpsiFunctions;
import com.pulumi.oci.Opsi.inputs.GetImportableComputeEntitiesArgs;
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 testImportableComputeEntities = OpsiFunctions.getImportableComputeEntities(GetImportableComputeEntitiesArgs.builder()
            .compartmentId(var_.compartment_id())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_importable_compute_entities = oci.Opsi.get_importable_compute_entities(compartment_id=var["compartment_id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testImportableComputeEntities = oci.Opsi.getImportableComputeEntities({
    compartmentId: _var.compartment_id,
});
variables:
  testImportableComputeEntities:
    Fn::Invoke:
      Function: oci:Opsi:getImportableComputeEntities
      Arguments:
        compartmentId: ${var.compartment_id}

Using getImportableComputeEntities

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 getImportableComputeEntities(args: GetImportableComputeEntitiesArgs, opts?: InvokeOptions): Promise<GetImportableComputeEntitiesResult>
function getImportableComputeEntitiesOutput(args: GetImportableComputeEntitiesOutputArgs, opts?: InvokeOptions): Output<GetImportableComputeEntitiesResult>
def get_importable_compute_entities(compartment_id: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetImportableComputeEntitiesResult
def get_importable_compute_entities_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetImportableComputeEntitiesResult]
func GetImportableComputeEntities(ctx *Context, args *GetImportableComputeEntitiesArgs, opts ...InvokeOption) (*GetImportableComputeEntitiesResult, error)
func GetImportableComputeEntitiesOutput(ctx *Context, args *GetImportableComputeEntitiesOutputArgs, opts ...InvokeOption) GetImportableComputeEntitiesResultOutput

> Note: This function is named GetImportableComputeEntities in the Go SDK.

public static class GetImportableComputeEntities 
{
    public static Task<GetImportableComputeEntitiesResult> InvokeAsync(GetImportableComputeEntitiesArgs args, InvokeOptions? opts = null)
    public static Output<GetImportableComputeEntitiesResult> Invoke(GetImportableComputeEntitiesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetImportableComputeEntitiesResult> getImportableComputeEntities(GetImportableComputeEntitiesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:Opsi/getImportableComputeEntities:getImportableComputeEntities
  Arguments:
    # Arguments dictionary

The following arguments are supported:

CompartmentId string

The OCID of the compartment.

CompartmentId string

The OCID of the compartment.

compartmentId String

The OCID of the compartment.

compartmentId string

The OCID of the compartment.

compartment_id str

The OCID of the compartment.

compartmentId String

The OCID of the compartment.

getImportableComputeEntities Result

The following output properties are available:

CompartmentId string

The OCID of the compartment.

Id string

The provider-assigned unique ID for this managed resource.

Items List<GetImportableComputeEntitiesItem>

Array of importable compute entity objects.

CompartmentId string

The OCID of the compartment.

Id string

The provider-assigned unique ID for this managed resource.

Items []GetImportableComputeEntitiesItem

Array of importable compute entity objects.

compartmentId String

The OCID of the compartment.

id String

The provider-assigned unique ID for this managed resource.

items List<GetImportableComputeEntitiesItem>

Array of importable compute entity objects.

compartmentId string

The OCID of the compartment.

id string

The provider-assigned unique ID for this managed resource.

items GetImportableComputeEntitiesItem[]

Array of importable compute entity objects.

compartment_id str

The OCID of the compartment.

id str

The provider-assigned unique ID for this managed resource.

items GetImportableComputeEntitiesItem]

Array of importable compute entity objects.

compartmentId String

The OCID of the compartment.

id String

The provider-assigned unique ID for this managed resource.

items List<Property Map>

Array of importable compute entity objects.

Supporting Types

GetImportableComputeEntitiesItem

CompartmentId string

The OCID of the compartment.

ComputeDisplayName string

The Display Name of the Compute Instance

ComputeId string

The OCID of the Compute Instance

EntitySource string

Source of the importable agent entity.

HostName string

The host name. The host name is unique amongst the hosts managed by the same management agent.

PlatformType string

Platform type. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX].

CompartmentId string

The OCID of the compartment.

ComputeDisplayName string

The Display Name of the Compute Instance

ComputeId string

The OCID of the Compute Instance

EntitySource string

Source of the importable agent entity.

HostName string

The host name. The host name is unique amongst the hosts managed by the same management agent.

PlatformType string

Platform type. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX].

compartmentId String

The OCID of the compartment.

computeDisplayName String

The Display Name of the Compute Instance

computeId String

The OCID of the Compute Instance

entitySource String

Source of the importable agent entity.

hostName String

The host name. The host name is unique amongst the hosts managed by the same management agent.

platformType String

Platform type. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX].

compartmentId string

The OCID of the compartment.

computeDisplayName string

The Display Name of the Compute Instance

computeId string

The OCID of the Compute Instance

entitySource string

Source of the importable agent entity.

hostName string

The host name. The host name is unique amongst the hosts managed by the same management agent.

platformType string

Platform type. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX].

compartment_id str

The OCID of the compartment.

compute_display_name str

The Display Name of the Compute Instance

compute_id str

The OCID of the Compute Instance

entity_source str

Source of the importable agent entity.

host_name str

The host name. The host name is unique amongst the hosts managed by the same management agent.

platform_type str

Platform type. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX].

compartmentId String

The OCID of the compartment.

computeDisplayName String

The Display Name of the Compute Instance

computeId String

The OCID of the Compute Instance

entitySource String

Source of the importable agent entity.

hostName String

The host name. The host name is unique amongst the hosts managed by the same management agent.

platformType String

Platform type. Supported platformType(s) for MACS-managed external host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX].

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.