Oracle Cloud Infrastructure

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

getInstancePools

This data source provides the list of Instance Pools in Oracle Cloud Infrastructure Core service.

Lists the instance pools in the specified compartment.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var testInstancePools = Oci.Core.GetInstancePools.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        DisplayName = @var.Instance_pool_display_name,
        State = @var.Instance_pool_state,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Core.GetInstancePools(ctx, &core.GetInstancePoolsArgs{
			CompartmentId: _var.Compartment_id,
			DisplayName:   pulumi.StringRef(_var.Instance_pool_display_name),
			State:         pulumi.StringRef(_var.Instance_pool_state),
		}, 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.Core.CoreFunctions;
import com.pulumi.oci.Core.inputs.GetInstancePoolsArgs;
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 testInstancePools = CoreFunctions.getInstancePools(GetInstancePoolsArgs.builder()
            .compartmentId(var_.compartment_id())
            .displayName(var_.instance_pool_display_name())
            .state(var_.instance_pool_state())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_instance_pools = oci.Core.get_instance_pools(compartment_id=var["compartment_id"],
    display_name=var["instance_pool_display_name"],
    state=var["instance_pool_state"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testInstancePools = oci.Core.getInstancePools({
    compartmentId: _var.compartment_id,
    displayName: _var.instance_pool_display_name,
    state: _var.instance_pool_state,
});
variables:
  testInstancePools:
    Fn::Invoke:
      Function: oci:Core:getInstancePools
      Arguments:
        compartmentId: ${var.compartment_id}
        displayName: ${var.instance_pool_display_name}
        state: ${var.instance_pool_state}

Using getInstancePools

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 getInstancePools(args: GetInstancePoolsArgs, opts?: InvokeOptions): Promise<GetInstancePoolsResult>
function getInstancePoolsOutput(args: GetInstancePoolsOutputArgs, opts?: InvokeOptions): Output<GetInstancePoolsResult>
def get_instance_pools(compartment_id: Optional[str] = None,
                       display_name: Optional[str] = None,
                       filters: Optional[Sequence[_core.GetInstancePoolsFilter]] = None,
                       state: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetInstancePoolsResult
def get_instance_pools_output(compartment_id: Optional[pulumi.Input[str]] = None,
                       display_name: Optional[pulumi.Input[str]] = None,
                       filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetInstancePoolsFilterArgs]]]] = None,
                       state: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetInstancePoolsResult]
func GetInstancePools(ctx *Context, args *GetInstancePoolsArgs, opts ...InvokeOption) (*GetInstancePoolsResult, error)
func GetInstancePoolsOutput(ctx *Context, args *GetInstancePoolsOutputArgs, opts ...InvokeOption) GetInstancePoolsResultOutput

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

public static class GetInstancePools 
{
    public static Task<GetInstancePoolsResult> InvokeAsync(GetInstancePoolsArgs args, InvokeOptions? opts = null)
    public static Output<GetInstancePoolsResult> Invoke(GetInstancePoolsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstancePoolsResult> getInstancePools(GetInstancePoolsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:Core/getInstancePools:getInstancePools
  Arguments:
    # Arguments dictionary

The following arguments are supported:

CompartmentId string

The OCID of the compartment.

DisplayName string

A filter to return only resources that match the given display name exactly.

Filters List<GetInstancePoolsFilter>
State string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

CompartmentId string

The OCID of the compartment.

DisplayName string

A filter to return only resources that match the given display name exactly.

Filters []GetInstancePoolsFilter
State string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

compartmentId String

The OCID of the compartment.

displayName String

A filter to return only resources that match the given display name exactly.

filters List<GetInstancePoolsFilter>
state String

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

compartmentId string

The OCID of the compartment.

displayName string

A filter to return only resources that match the given display name exactly.

filters GetInstancePoolsFilter[]
state string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

compartment_id str

The OCID of the compartment.

display_name str

A filter to return only resources that match the given display name exactly.

filters GetInstancePoolsFilter]
state str

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

compartmentId String

The OCID of the compartment.

displayName String

A filter to return only resources that match the given display name exactly.

filters List<Property Map>
state String

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

getInstancePools Result

The following output properties are available:

CompartmentId string

The OCID of the compartment containing the instance pool.

Id string

The provider-assigned unique ID for this managed resource.

InstancePools List<GetInstancePoolsInstancePool>

The list of instance_pools.

DisplayName string

The display name of the VNIC. This is also use to match against the instance configuration defined secondary VNIC.

Filters List<GetInstancePoolsFilter>
State string

The current state of the instance pool.

CompartmentId string

The OCID of the compartment containing the instance pool.

Id string

The provider-assigned unique ID for this managed resource.

InstancePools []GetInstancePoolsInstancePool

The list of instance_pools.

DisplayName string

The display name of the VNIC. This is also use to match against the instance configuration defined secondary VNIC.

Filters []GetInstancePoolsFilter
State string

The current state of the instance pool.

compartmentId String

The OCID of the compartment containing the instance pool.

id String

The provider-assigned unique ID for this managed resource.

instancePools List<GetInstancePoolsInstancePool>

The list of instance_pools.

displayName String

The display name of the VNIC. This is also use to match against the instance configuration defined secondary VNIC.

filters List<GetInstancePoolsFilter>
state String

The current state of the instance pool.

compartmentId string

The OCID of the compartment containing the instance pool.

id string

The provider-assigned unique ID for this managed resource.

instancePools GetInstancePoolsInstancePool[]

The list of instance_pools.

displayName string

The display name of the VNIC. This is also use to match against the instance configuration defined secondary VNIC.

filters GetInstancePoolsFilter[]
state string

The current state of the instance pool.

compartment_id str

The OCID of the compartment containing the instance pool.

id str

The provider-assigned unique ID for this managed resource.

instance_pools GetInstancePoolsInstancePool]

The list of instance_pools.

display_name str

The display name of the VNIC. This is also use to match against the instance configuration defined secondary VNIC.

filters GetInstancePoolsFilter]
state str

The current state of the instance pool.

compartmentId String

The OCID of the compartment containing the instance pool.

id String

The provider-assigned unique ID for this managed resource.

instancePools List<Property Map>

The list of instance_pools.

displayName String

The display name of the VNIC. This is also use to match against the instance configuration defined secondary VNIC.

filters List<Property Map>
state String

The current state of the instance pool.

Supporting Types

GetInstancePoolsFilter

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

GetInstancePoolsInstancePool

ActualSize int
CompartmentId string

The OCID of the compartment.

DefinedTags Dictionary<string, object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

DisplayName string

A filter to return only resources that match the given display name exactly.

FreeformTags Dictionary<string, object>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Id string

The OCID of the load balancer attachment.

InstanceConfigurationId string

The OCID of the instance configuration associated with the instance pool.

LoadBalancers List<GetInstancePoolsInstancePoolLoadBalancer>

The load balancers attached to the instance pool.

PlacementConfigurations List<GetInstancePoolsInstancePoolPlacementConfiguration>

The placement configurations for the instance pool.

Size int

The number of actual instances in the instance pool on the cloud. This attribute will be different when instance pool is used along with autoScaling Configuration.

State string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

TimeCreated string

The date and time the instance pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

ActualSize int
CompartmentId string

The OCID of the compartment.

DefinedTags map[string]interface{}

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

DisplayName string

A filter to return only resources that match the given display name exactly.

FreeformTags map[string]interface{}

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Id string

The OCID of the load balancer attachment.

InstanceConfigurationId string

The OCID of the instance configuration associated with the instance pool.

LoadBalancers []GetInstancePoolsInstancePoolLoadBalancer

The load balancers attached to the instance pool.

PlacementConfigurations []GetInstancePoolsInstancePoolPlacementConfiguration

The placement configurations for the instance pool.

Size int

The number of actual instances in the instance pool on the cloud. This attribute will be different when instance pool is used along with autoScaling Configuration.

State string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

TimeCreated string

The date and time the instance pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

actualSize Integer
compartmentId String

The OCID of the compartment.

definedTags Map<String,Object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName String

A filter to return only resources that match the given display name exactly.

freeformTags Map<String,Object>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id String

The OCID of the load balancer attachment.

instanceConfigurationId String

The OCID of the instance configuration associated with the instance pool.

loadBalancers List<GetInstancePoolsInstancePoolLoadBalancer>

The load balancers attached to the instance pool.

placementConfigurations List<GetInstancePoolsInstancePoolPlacementConfiguration>

The placement configurations for the instance pool.

size Integer

The number of actual instances in the instance pool on the cloud. This attribute will be different when instance pool is used along with autoScaling Configuration.

state String

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

timeCreated String

The date and time the instance pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

actualSize number
compartmentId string

The OCID of the compartment.

definedTags {[key: string]: any}

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName string

A filter to return only resources that match the given display name exactly.

freeformTags {[key: string]: any}

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id string

The OCID of the load balancer attachment.

instanceConfigurationId string

The OCID of the instance configuration associated with the instance pool.

loadBalancers GetInstancePoolsInstancePoolLoadBalancer[]

The load balancers attached to the instance pool.

placementConfigurations GetInstancePoolsInstancePoolPlacementConfiguration[]

The placement configurations for the instance pool.

size number

The number of actual instances in the instance pool on the cloud. This attribute will be different when instance pool is used along with autoScaling Configuration.

state string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

timeCreated string

The date and time the instance pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

actual_size int
compartment_id str

The OCID of the compartment.

defined_tags Mapping[str, Any]

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

display_name str

A filter to return only resources that match the given display name exactly.

freeform_tags Mapping[str, Any]

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id str

The OCID of the load balancer attachment.

instance_configuration_id str

The OCID of the instance configuration associated with the instance pool.

load_balancers GetInstancePoolsInstancePoolLoadBalancer]

The load balancers attached to the instance pool.

placement_configurations GetInstancePoolsInstancePoolPlacementConfiguration]

The placement configurations for the instance pool.

size int

The number of actual instances in the instance pool on the cloud. This attribute will be different when instance pool is used along with autoScaling Configuration.

state str

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

time_created str

The date and time the instance pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

actualSize Number
compartmentId String

The OCID of the compartment.

definedTags Map<Any>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName String

A filter to return only resources that match the given display name exactly.

freeformTags Map<Any>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id String

The OCID of the load balancer attachment.

instanceConfigurationId String

The OCID of the instance configuration associated with the instance pool.

loadBalancers List<Property Map>

The load balancers attached to the instance pool.

placementConfigurations List<Property Map>

The placement configurations for the instance pool.

size Number

The number of actual instances in the instance pool on the cloud. This attribute will be different when instance pool is used along with autoScaling Configuration.

state String

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

timeCreated String

The date and time the instance pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

GetInstancePoolsInstancePoolLoadBalancer

BackendSetName string

The name of the backend set on the load balancer.

Id string

The OCID of the load balancer attachment.

InstancePoolId string

The OCID of the instance pool of the load balancer attachment.

LoadBalancerId string

The OCID of the load balancer attached to the instance pool.

Port int

The port value used for the backends.

State string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

VnicSelection string

Indicates which VNIC on each instance in the instance pool should be used to associate with the load balancer. Possible values are "PrimaryVnic" or the displayName of one of the secondary VNICs on the instance configuration that is associated with the instance pool.

BackendSetName string

The name of the backend set on the load balancer.

Id string

The OCID of the load balancer attachment.

InstancePoolId string

The OCID of the instance pool of the load balancer attachment.

LoadBalancerId string

The OCID of the load balancer attached to the instance pool.

Port int

The port value used for the backends.

State string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

VnicSelection string

Indicates which VNIC on each instance in the instance pool should be used to associate with the load balancer. Possible values are "PrimaryVnic" or the displayName of one of the secondary VNICs on the instance configuration that is associated with the instance pool.

backendSetName String

The name of the backend set on the load balancer.

id String

The OCID of the load balancer attachment.

instancePoolId String

The OCID of the instance pool of the load balancer attachment.

loadBalancerId String

The OCID of the load balancer attached to the instance pool.

port Integer

The port value used for the backends.

state String

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

vnicSelection String

Indicates which VNIC on each instance in the instance pool should be used to associate with the load balancer. Possible values are "PrimaryVnic" or the displayName of one of the secondary VNICs on the instance configuration that is associated with the instance pool.

backendSetName string

The name of the backend set on the load balancer.

id string

The OCID of the load balancer attachment.

instancePoolId string

The OCID of the instance pool of the load balancer attachment.

loadBalancerId string

The OCID of the load balancer attached to the instance pool.

port number

The port value used for the backends.

state string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

vnicSelection string

Indicates which VNIC on each instance in the instance pool should be used to associate with the load balancer. Possible values are "PrimaryVnic" or the displayName of one of the secondary VNICs on the instance configuration that is associated with the instance pool.

backend_set_name str

The name of the backend set on the load balancer.

id str

The OCID of the load balancer attachment.

instance_pool_id str

The OCID of the instance pool of the load balancer attachment.

load_balancer_id str

The OCID of the load balancer attached to the instance pool.

port int

The port value used for the backends.

state str

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

vnic_selection str

Indicates which VNIC on each instance in the instance pool should be used to associate with the load balancer. Possible values are "PrimaryVnic" or the displayName of one of the secondary VNICs on the instance configuration that is associated with the instance pool.

backendSetName String

The name of the backend set on the load balancer.

id String

The OCID of the load balancer attachment.

instancePoolId String

The OCID of the instance pool of the load balancer attachment.

loadBalancerId String

The OCID of the load balancer attached to the instance pool.

port Number

The port value used for the backends.

state String

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

vnicSelection String

Indicates which VNIC on each instance in the instance pool should be used to associate with the load balancer. Possible values are "PrimaryVnic" or the displayName of one of the secondary VNICs on the instance configuration that is associated with the instance pool.

GetInstancePoolsInstancePoolPlacementConfiguration

AvailabilityDomain string

The availability domain to place instances. Example: Uocm:PHX-AD-1

FaultDomains List<string>

The fault domains to place instances.

PrimarySubnetId string

The OCID of the primary subnet to place instances.

SecondaryVnicSubnets List<GetInstancePoolsInstancePoolPlacementConfigurationSecondaryVnicSubnet>

The set of secondary VNIC data for instances in the pool.

AvailabilityDomain string

The availability domain to place instances. Example: Uocm:PHX-AD-1

FaultDomains []string

The fault domains to place instances.

PrimarySubnetId string

The OCID of the primary subnet to place instances.

SecondaryVnicSubnets []GetInstancePoolsInstancePoolPlacementConfigurationSecondaryVnicSubnet

The set of secondary VNIC data for instances in the pool.

availabilityDomain String

The availability domain to place instances. Example: Uocm:PHX-AD-1

faultDomains List<String>

The fault domains to place instances.

primarySubnetId String

The OCID of the primary subnet to place instances.

secondaryVnicSubnets List<GetInstancePoolsInstancePoolPlacementConfigurationSecondaryVnicSubnet>

The set of secondary VNIC data for instances in the pool.

availabilityDomain string

The availability domain to place instances. Example: Uocm:PHX-AD-1

faultDomains string[]

The fault domains to place instances.

primarySubnetId string

The OCID of the primary subnet to place instances.

secondaryVnicSubnets GetInstancePoolsInstancePoolPlacementConfigurationSecondaryVnicSubnet[]

The set of secondary VNIC data for instances in the pool.

availability_domain str

The availability domain to place instances. Example: Uocm:PHX-AD-1

fault_domains Sequence[str]

The fault domains to place instances.

primary_subnet_id str

The OCID of the primary subnet to place instances.

secondary_vnic_subnets GetInstancePoolsInstancePoolPlacementConfigurationSecondaryVnicSubnet]

The set of secondary VNIC data for instances in the pool.

availabilityDomain String

The availability domain to place instances. Example: Uocm:PHX-AD-1

faultDomains List<String>

The fault domains to place instances.

primarySubnetId String

The OCID of the primary subnet to place instances.

secondaryVnicSubnets List<Property Map>

The set of secondary VNIC data for instances in the pool.

GetInstancePoolsInstancePoolPlacementConfigurationSecondaryVnicSubnet

DisplayName string

A filter to return only resources that match the given display name exactly.

SubnetId string

The subnet OCID for the secondary VNIC.

DisplayName string

A filter to return only resources that match the given display name exactly.

SubnetId string

The subnet OCID for the secondary VNIC.

displayName String

A filter to return only resources that match the given display name exactly.

subnetId String

The subnet OCID for the secondary VNIC.

displayName string

A filter to return only resources that match the given display name exactly.

subnetId string

The subnet OCID for the secondary VNIC.

display_name str

A filter to return only resources that match the given display name exactly.

subnet_id str

The subnet OCID for the secondary VNIC.

displayName String

A filter to return only resources that match the given display name exactly.

subnetId String

The subnet OCID for the secondary VNIC.

Package Details

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

This Pulumi package is based on the oci Terraform Provider.