1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. CloudBridge
  5. getInventories
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.CloudBridge.getInventories

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    This data source provides the list of Inventories in Oracle Cloud Infrastructure Cloud Bridge service.

    Returns a list of inventories.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testInventories = oci.CloudBridge.getInventories({
        compartmentId: compartmentId,
        state: inventoryState,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_inventories = oci.CloudBridge.get_inventories(compartment_id=compartment_id,
        state=inventory_state)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/CloudBridge"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := CloudBridge.GetInventories(ctx, &cloudbridge.GetInventoriesArgs{
    			CompartmentId: compartmentId,
    			State:         pulumi.StringRef(inventoryState),
    		}, 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 testInventories = Oci.CloudBridge.GetInventories.Invoke(new()
        {
            CompartmentId = compartmentId,
            State = inventoryState,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.CloudBridge.CloudBridgeFunctions;
    import com.pulumi.oci.CloudBridge.inputs.GetInventoriesArgs;
    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 testInventories = CloudBridgeFunctions.getInventories(GetInventoriesArgs.builder()
                .compartmentId(compartmentId)
                .state(inventoryState)
                .build());
    
        }
    }
    
    variables:
      testInventories:
        fn::invoke:
          Function: oci:CloudBridge:getInventories
          Arguments:
            compartmentId: ${compartmentId}
            state: ${inventoryState}
    

    Using getInventories

    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 getInventories(args: GetInventoriesArgs, opts?: InvokeOptions): Promise<GetInventoriesResult>
    function getInventoriesOutput(args: GetInventoriesOutputArgs, opts?: InvokeOptions): Output<GetInventoriesResult>
    def get_inventories(compartment_id: Optional[str] = None,
                        filters: Optional[Sequence[_cloudbridge.GetInventoriesFilter]] = None,
                        state: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetInventoriesResult
    def get_inventories_output(compartment_id: Optional[pulumi.Input[str]] = None,
                        filters: Optional[pulumi.Input[Sequence[pulumi.Input[_cloudbridge.GetInventoriesFilterArgs]]]] = None,
                        state: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetInventoriesResult]
    func GetInventories(ctx *Context, args *GetInventoriesArgs, opts ...InvokeOption) (*GetInventoriesResult, error)
    func GetInventoriesOutput(ctx *Context, args *GetInventoriesOutputArgs, opts ...InvokeOption) GetInventoriesResultOutput

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

    public static class GetInventories 
    {
        public static Task<GetInventoriesResult> InvokeAsync(GetInventoriesArgs args, InvokeOptions? opts = null)
        public static Output<GetInventoriesResult> Invoke(GetInventoriesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInventoriesResult> getInventories(GetInventoriesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:CloudBridge/getInventories:getInventories
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The ID of the compartment in which to list resources.
    Filters List<GetInventoriesFilter>
    State string
    A filter to return inventory if the lifecycleState matches the given lifecycleState.
    CompartmentId string
    The ID of the compartment in which to list resources.
    Filters []GetInventoriesFilter
    State string
    A filter to return inventory if the lifecycleState matches the given lifecycleState.
    compartmentId String
    The ID of the compartment in which to list resources.
    filters List<GetInventoriesFilter>
    state String
    A filter to return inventory if the lifecycleState matches the given lifecycleState.
    compartmentId string
    The ID of the compartment in which to list resources.
    filters GetInventoriesFilter[]
    state string
    A filter to return inventory if the lifecycleState matches the given lifecycleState.
    compartment_id str
    The ID of the compartment in which to list resources.
    filters Sequence[cloudbridge.GetInventoriesFilter]
    state str
    A filter to return inventory if the lifecycleState matches the given lifecycleState.
    compartmentId String
    The ID of the compartment in which to list resources.
    filters List<Property Map>
    state String
    A filter to return inventory if the lifecycleState matches the given lifecycleState.

    getInventories Result

    The following output properties are available:

    CompartmentId string
    The OCID of the tenantId.
    Id string
    The provider-assigned unique ID for this managed resource.
    InventoryCollections List<GetInventoriesInventoryCollection>
    The list of inventory_collection.
    Filters List<GetInventoriesFilter>
    State string
    The current state of the inventory.
    CompartmentId string
    The OCID of the tenantId.
    Id string
    The provider-assigned unique ID for this managed resource.
    InventoryCollections []GetInventoriesInventoryCollection
    The list of inventory_collection.
    Filters []GetInventoriesFilter
    State string
    The current state of the inventory.
    compartmentId String
    The OCID of the tenantId.
    id String
    The provider-assigned unique ID for this managed resource.
    inventoryCollections List<GetInventoriesInventoryCollection>
    The list of inventory_collection.
    filters List<GetInventoriesFilter>
    state String
    The current state of the inventory.
    compartmentId string
    The OCID of the tenantId.
    id string
    The provider-assigned unique ID for this managed resource.
    inventoryCollections GetInventoriesInventoryCollection[]
    The list of inventory_collection.
    filters GetInventoriesFilter[]
    state string
    The current state of the inventory.
    compartment_id str
    The OCID of the tenantId.
    id str
    The provider-assigned unique ID for this managed resource.
    inventory_collections Sequence[cloudbridge.GetInventoriesInventoryCollection]
    The list of inventory_collection.
    filters Sequence[cloudbridge.GetInventoriesFilter]
    state str
    The current state of the inventory.
    compartmentId String
    The OCID of the tenantId.
    id String
    The provider-assigned unique ID for this managed resource.
    inventoryCollections List<Property Map>
    The list of inventory_collection.
    filters List<Property Map>
    state String
    The current state of the inventory.

    Supporting Types

    GetInventoriesFilter

    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

    GetInventoriesInventoryCollection

    GetInventoriesInventoryCollectionItem

    CompartmentId string
    The ID of the compartment in which to list resources.
    DefinedTags Dictionary<string, string>
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    Inventory display name.
    FreeformTags Dictionary<string, string>
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    Inventory OCID.
    LifecycleDetails string
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
    State string
    A filter to return inventory if the lifecycleState matches the given lifecycleState.
    SystemTags Dictionary<string, string>
    The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {orcl-cloud: {free-tier-retain: true}}
    TimeCreated string
    The time when the inventory was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The time when the inventory was updated. An RFC3339 formatted datetime string.
    CompartmentId string
    The ID of the compartment in which to list resources.
    DefinedTags map[string]string
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    Inventory display name.
    FreeformTags map[string]string
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    Inventory OCID.
    LifecycleDetails string
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
    State string
    A filter to return inventory if the lifecycleState matches the given lifecycleState.
    SystemTags map[string]string
    The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {orcl-cloud: {free-tier-retain: true}}
    TimeCreated string
    The time when the inventory was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The time when the inventory was updated. An RFC3339 formatted datetime string.
    compartmentId String
    The ID of the compartment in which to list resources.
    definedTags Map<String,String>
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    Inventory display name.
    freeformTags Map<String,String>
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    Inventory OCID.
    lifecycleDetails String
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
    state String
    A filter to return inventory if the lifecycleState matches the given lifecycleState.
    systemTags Map<String,String>
    The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {orcl-cloud: {free-tier-retain: true}}
    timeCreated String
    The time when the inventory was created. An RFC3339 formatted datetime string.
    timeUpdated String
    The time when the inventory was updated. An RFC3339 formatted datetime string.
    compartmentId string
    The ID of the compartment in which to list resources.
    definedTags {[key: string]: string}
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    Inventory display name.
    freeformTags {[key: string]: string}
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id string
    Inventory OCID.
    lifecycleDetails string
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
    state string
    A filter to return inventory if the lifecycleState matches the given lifecycleState.
    systemTags {[key: string]: string}
    The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {orcl-cloud: {free-tier-retain: true}}
    timeCreated string
    The time when the inventory was created. An RFC3339 formatted datetime string.
    timeUpdated string
    The time when the inventory was updated. An RFC3339 formatted datetime string.
    compartment_id str
    The ID of the compartment in which to list resources.
    defined_tags Mapping[str, str]
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    Inventory display name.
    freeform_tags Mapping[str, str]
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id str
    Inventory OCID.
    lifecycle_details str
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
    state str
    A filter to return inventory if the lifecycleState matches the given lifecycleState.
    system_tags Mapping[str, str]
    The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {orcl-cloud: {free-tier-retain: true}}
    time_created str
    The time when the inventory was created. An RFC3339 formatted datetime string.
    time_updated str
    The time when the inventory was updated. An RFC3339 formatted datetime string.
    compartmentId String
    The ID of the compartment in which to list resources.
    definedTags Map<String>
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    Inventory display name.
    freeformTags Map<String>
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    Inventory OCID.
    lifecycleDetails String
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
    state String
    A filter to return inventory if the lifecycleState matches the given lifecycleState.
    systemTags Map<String>
    The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {orcl-cloud: {free-tier-retain: true}}
    timeCreated String
    The time when the inventory was created. An RFC3339 formatted datetime string.
    timeUpdated String
    The time when the inventory was updated. An RFC3339 formatted datetime string.

    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 v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi