1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. GenerativeAi
  5. getImportedModels
Oracle Cloud Infrastructure v3.15.0 published on Thursday, Jan 22, 2026 by Pulumi
oci logo
Oracle Cloud Infrastructure v3.15.0 published on Thursday, Jan 22, 2026 by Pulumi

    This data source provides the list of Imported Models in Oracle Cloud Infrastructure Generative AI service.

    Lists imported models in a specific compartment.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testImportedModels = oci.GenerativeAi.getImportedModels({
        compartmentId: compartmentId,
        capabilities: importedModelCapability,
        displayName: importedModelDisplayName,
        id: importedModelId,
        state: importedModelState,
        vendor: importedModelVendor,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_imported_models = oci.GenerativeAi.get_imported_models(compartment_id=compartment_id,
        capabilities=imported_model_capability,
        display_name=imported_model_display_name,
        id=imported_model_id,
        state=imported_model_state,
        vendor=imported_model_vendor)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/generativeai"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := generativeai.GetImportedModels(ctx, &generativeai.GetImportedModelsArgs{
    			CompartmentId: compartmentId,
    			Capabilities:  importedModelCapability,
    			DisplayName:   pulumi.StringRef(importedModelDisplayName),
    			Id:            pulumi.StringRef(importedModelId),
    			State:         pulumi.StringRef(importedModelState),
    			Vendor:        pulumi.StringRef(importedModelVendor),
    		}, 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 testImportedModels = Oci.GenerativeAi.GetImportedModels.Invoke(new()
        {
            CompartmentId = compartmentId,
            Capabilities = importedModelCapability,
            DisplayName = importedModelDisplayName,
            Id = importedModelId,
            State = importedModelState,
            Vendor = importedModelVendor,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.GenerativeAi.GenerativeAiFunctions;
    import com.pulumi.oci.GenerativeAi.inputs.GetImportedModelsArgs;
    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 testImportedModels = GenerativeAiFunctions.getImportedModels(GetImportedModelsArgs.builder()
                .compartmentId(compartmentId)
                .capabilities(importedModelCapability)
                .displayName(importedModelDisplayName)
                .id(importedModelId)
                .state(importedModelState)
                .vendor(importedModelVendor)
                .build());
    
        }
    }
    
    variables:
      testImportedModels:
        fn::invoke:
          function: oci:GenerativeAi:getImportedModels
          arguments:
            compartmentId: ${compartmentId}
            capabilities: ${importedModelCapability}
            displayName: ${importedModelDisplayName}
            id: ${importedModelId}
            state: ${importedModelState}
            vendor: ${importedModelVendor}
    

    Using getImportedModels

    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 getImportedModels(args: GetImportedModelsArgs, opts?: InvokeOptions): Promise<GetImportedModelsResult>
    function getImportedModelsOutput(args: GetImportedModelsOutputArgs, opts?: InvokeOptions): Output<GetImportedModelsResult>
    def get_imported_models(capabilities: Optional[Sequence[str]] = None,
                            compartment_id: Optional[str] = None,
                            display_name: Optional[str] = None,
                            filters: Optional[Sequence[GetImportedModelsFilter]] = None,
                            id: Optional[str] = None,
                            state: Optional[str] = None,
                            vendor: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetImportedModelsResult
    def get_imported_models_output(capabilities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                            compartment_id: Optional[pulumi.Input[str]] = None,
                            display_name: Optional[pulumi.Input[str]] = None,
                            filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetImportedModelsFilterArgs]]]] = None,
                            id: Optional[pulumi.Input[str]] = None,
                            state: Optional[pulumi.Input[str]] = None,
                            vendor: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetImportedModelsResult]
    func GetImportedModels(ctx *Context, args *GetImportedModelsArgs, opts ...InvokeOption) (*GetImportedModelsResult, error)
    func GetImportedModelsOutput(ctx *Context, args *GetImportedModelsOutputArgs, opts ...InvokeOption) GetImportedModelsResultOutput

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

    public static class GetImportedModels 
    {
        public static Task<GetImportedModelsResult> InvokeAsync(GetImportedModelsArgs args, InvokeOptions? opts = null)
        public static Output<GetImportedModelsResult> Invoke(GetImportedModelsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetImportedModelsResult> getImportedModels(GetImportedModelsArgs args, InvokeOptions options)
    public static Output<GetImportedModelsResult> getImportedModels(GetImportedModelsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:GenerativeAi/getImportedModels:getImportedModels
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment in which to list resources.
    Capabilities List<string>
    A filter to return only resources their capability matches the given capability.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    Filters List<GetImportedModelsFilter>
    Id string
    The ID of the importedModel.
    State string
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    Vendor string
    A filter to return only resources that match the entire vendor given.
    CompartmentId string
    The OCID of the compartment in which to list resources.
    Capabilities []string
    A filter to return only resources their capability matches the given capability.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    Filters []GetImportedModelsFilter
    Id string
    The ID of the importedModel.
    State string
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    Vendor string
    A filter to return only resources that match the entire vendor given.
    compartmentId String
    The OCID of the compartment in which to list resources.
    capabilities List<String>
    A filter to return only resources their capability matches the given capability.
    displayName String
    A filter to return only resources that match the given display name exactly.
    filters List<GetImportedModelsFilter>
    id String
    The ID of the importedModel.
    state String
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    vendor String
    A filter to return only resources that match the entire vendor given.
    compartmentId string
    The OCID of the compartment in which to list resources.
    capabilities string[]
    A filter to return only resources their capability matches the given capability.
    displayName string
    A filter to return only resources that match the given display name exactly.
    filters GetImportedModelsFilter[]
    id string
    The ID of the importedModel.
    state string
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    vendor string
    A filter to return only resources that match the entire vendor given.
    compartment_id str
    The OCID of the compartment in which to list resources.
    capabilities Sequence[str]
    A filter to return only resources their capability matches the given capability.
    display_name str
    A filter to return only resources that match the given display name exactly.
    filters Sequence[GetImportedModelsFilter]
    id str
    The ID of the importedModel.
    state str
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    vendor str
    A filter to return only resources that match the entire vendor given.
    compartmentId String
    The OCID of the compartment in which to list resources.
    capabilities List<String>
    A filter to return only resources their capability matches the given capability.
    displayName String
    A filter to return only resources that match the given display name exactly.
    filters List<Property Map>
    id String
    The ID of the importedModel.
    state String
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    vendor String
    A filter to return only resources that match the entire vendor given.

    getImportedModels Result

    The following output properties are available:

    compartmentId String
    importedModelCollections List<Property Map>
    The list of imported_model_collection.
    capabilities List<String>
    displayName String
    filters List<Property Map>
    id String
    state String
    vendor String

    Supporting Types

    GetImportedModelsFilter

    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

    GetImportedModelsImportedModelCollection

    GetImportedModelsImportedModelCollectionItem

    Capabilities List<string>
    CompartmentId string
    The OCID of the compartment in which to list resources.
    DataSources List<GetImportedModelsImportedModelCollectionItemDataSource>
    DefinedTags Dictionary<string, string>
    Description string
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    FreeformTags Dictionary<string, string>
    Id string
    The ID of the importedModel.
    LifecycleDetails string
    PreviousState string
    State string
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    SystemTags Dictionary<string, string>
    TimeCreated string
    TimeUpdated string
    Vendor string
    A filter to return only resources that match the entire vendor given.
    Version string
    Capabilities []string
    CompartmentId string
    The OCID of the compartment in which to list resources.
    DataSources []GetImportedModelsImportedModelCollectionItemDataSource
    DefinedTags map[string]string
    Description string
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    FreeformTags map[string]string
    Id string
    The ID of the importedModel.
    LifecycleDetails string
    PreviousState string
    State string
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    SystemTags map[string]string
    TimeCreated string
    TimeUpdated string
    Vendor string
    A filter to return only resources that match the entire vendor given.
    Version string
    capabilities List<String>
    compartmentId String
    The OCID of the compartment in which to list resources.
    dataSources List<GetImportedModelsImportedModelCollectionItemDataSource>
    definedTags Map<String,String>
    description String
    displayName String
    A filter to return only resources that match the given display name exactly.
    freeformTags Map<String,String>
    id String
    The ID of the importedModel.
    lifecycleDetails String
    previousState String
    state String
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    systemTags Map<String,String>
    timeCreated String
    timeUpdated String
    vendor String
    A filter to return only resources that match the entire vendor given.
    version String
    capabilities string[]
    compartmentId string
    The OCID of the compartment in which to list resources.
    dataSources GetImportedModelsImportedModelCollectionItemDataSource[]
    definedTags {[key: string]: string}
    description string
    displayName string
    A filter to return only resources that match the given display name exactly.
    freeformTags {[key: string]: string}
    id string
    The ID of the importedModel.
    lifecycleDetails string
    previousState string
    state string
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    systemTags {[key: string]: string}
    timeCreated string
    timeUpdated string
    vendor string
    A filter to return only resources that match the entire vendor given.
    version string
    capabilities Sequence[str]
    compartment_id str
    The OCID of the compartment in which to list resources.
    data_sources Sequence[GetImportedModelsImportedModelCollectionItemDataSource]
    defined_tags Mapping[str, str]
    description str
    display_name str
    A filter to return only resources that match the given display name exactly.
    freeform_tags Mapping[str, str]
    id str
    The ID of the importedModel.
    lifecycle_details str
    previous_state str
    state str
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    system_tags Mapping[str, str]
    time_created str
    time_updated str
    vendor str
    A filter to return only resources that match the entire vendor given.
    version str
    capabilities List<String>
    compartmentId String
    The OCID of the compartment in which to list resources.
    dataSources List<Property Map>
    definedTags Map<String>
    description String
    displayName String
    A filter to return only resources that match the given display name exactly.
    freeformTags Map<String>
    id String
    The ID of the importedModel.
    lifecycleDetails String
    previousState String
    state String
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    systemTags Map<String>
    timeCreated String
    timeUpdated String
    vendor String
    A filter to return only resources that match the entire vendor given.
    version String

    GetImportedModelsImportedModelCollectionItemDataSource

    AccessToken string
    Branch string
    Bucket string
    Commit string
    ModelId string
    Namespace string
    PrefixName string
    Region string
    SourceType string
    AccessToken string
    Branch string
    Bucket string
    Commit string
    ModelId string
    Namespace string
    PrefixName string
    Region string
    SourceType string
    accessToken String
    branch String
    bucket String
    commit String
    modelId String
    namespace String
    prefixName String
    region String
    sourceType String
    accessToken string
    branch string
    bucket string
    commit string
    modelId string
    namespace string
    prefixName string
    region string
    sourceType string
    accessToken String
    branch String
    bucket String
    commit String
    modelId String
    namespace String
    prefixName String
    region String
    sourceType 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 v3.15.0 published on Thursday, Jan 22, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate