1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. GenerativeAi
  5. getModel
Oracle Cloud Infrastructure v4.0.0 published on Friday, Feb 20, 2026 by Pulumi
oci logo
Oracle Cloud Infrastructure v4.0.0 published on Friday, Feb 20, 2026 by Pulumi

    This data source provides details about a specific Model resource in Oracle Cloud Infrastructure Generative AI service.

    Gets information about a custom model.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testModel = oci.GenerativeAi.getModel({
        modelId: testModelOciGenerativeAiModel.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_model = oci.GenerativeAi.get_model(model_id=test_model_oci_generative_ai_model["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v4/go/oci/generativeai"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := generativeai.GetModel(ctx, &generativeai.GetModelArgs{
    			ModelId: testModelOciGenerativeAiModel.Id,
    		}, 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 testModel = Oci.GenerativeAi.GetModel.Invoke(new()
        {
            ModelId = testModelOciGenerativeAiModel.Id,
        });
    
    });
    
    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.GetModelArgs;
    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 testModel = GenerativeAiFunctions.getModel(GetModelArgs.builder()
                .modelId(testModelOciGenerativeAiModel.id())
                .build());
    
        }
    }
    
    variables:
      testModel:
        fn::invoke:
          function: oci:GenerativeAi:getModel
          arguments:
            modelId: ${testModelOciGenerativeAiModel.id}
    

    Using getModel

    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 getModel(args: GetModelArgs, opts?: InvokeOptions): Promise<GetModelResult>
    function getModelOutput(args: GetModelOutputArgs, opts?: InvokeOptions): Output<GetModelResult>
    def get_model(model_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetModelResult
    def get_model_output(model_id: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetModelResult]
    func LookupModel(ctx *Context, args *LookupModelArgs, opts ...InvokeOption) (*LookupModelResult, error)
    func LookupModelOutput(ctx *Context, args *LookupModelOutputArgs, opts ...InvokeOption) LookupModelResultOutput

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

    public static class GetModel 
    {
        public static Task<GetModelResult> InvokeAsync(GetModelArgs args, InvokeOptions? opts = null)
        public static Output<GetModelResult> Invoke(GetModelInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetModelResult> getModel(GetModelArgs args, InvokeOptions options)
    public static Output<GetModelResult> getModel(GetModelArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:GenerativeAi/getModel:getModel
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ModelId string
    The model OCID
    ModelId string
    The model OCID
    modelId String
    The model OCID
    modelId string
    The model OCID
    model_id str
    The model OCID
    modelId String
    The model OCID

    getModel Result

    The following output properties are available:

    BaseModelId string
    Capabilities List<string>
    Describes what this model can be used for.
    CompartmentId string
    DefinedTags Dictionary<string, string>
    Description string
    An optional description of the model.
    DisplayName string
    FineTuneDetails List<GetModelFineTuneDetail>
    FreeformTags Dictionary<string, string>
    Id string
    IsLongTermSupported bool
    LifecycleDetails string
    ModelId string
    ModelMetrics List<GetModelModelMetric>
    State string
    The lifecycle state of the model.
    SystemTags Dictionary<string, string>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    TimeDeprecated string
    TimeUpdated string
    Type string
    Vendor string
    The provider of the base model.
    Version string
    The version of the model.
    BaseModelId string
    Capabilities []string
    Describes what this model can be used for.
    CompartmentId string
    DefinedTags map[string]string
    Description string
    An optional description of the model.
    DisplayName string
    FineTuneDetails []GetModelFineTuneDetail
    FreeformTags map[string]string
    Id string
    IsLongTermSupported bool
    LifecycleDetails string
    ModelId string
    ModelMetrics []GetModelModelMetric
    State string
    The lifecycle state of the model.
    SystemTags map[string]string
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    TimeDeprecated string
    TimeUpdated string
    Type string
    Vendor string
    The provider of the base model.
    Version string
    The version of the model.
    baseModelId String
    capabilities List<String>
    Describes what this model can be used for.
    compartmentId String
    definedTags Map<String,String>
    description String
    An optional description of the model.
    displayName String
    fineTuneDetails List<GetModelFineTuneDetail>
    freeformTags Map<String,String>
    id String
    isLongTermSupported Boolean
    lifecycleDetails String
    modelId String
    modelMetrics List<GetModelModelMetric>
    state String
    The lifecycle state of the model.
    systemTags Map<String,String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    timeDeprecated String
    timeUpdated String
    type String
    vendor String
    The provider of the base model.
    version String
    The version of the model.
    baseModelId string
    capabilities string[]
    Describes what this model can be used for.
    compartmentId string
    definedTags {[key: string]: string}
    description string
    An optional description of the model.
    displayName string
    fineTuneDetails GetModelFineTuneDetail[]
    freeformTags {[key: string]: string}
    id string
    isLongTermSupported boolean
    lifecycleDetails string
    modelId string
    modelMetrics GetModelModelMetric[]
    state string
    The lifecycle state of the model.
    systemTags {[key: string]: string}
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    timeDeprecated string
    timeUpdated string
    type string
    vendor string
    The provider of the base model.
    version string
    The version of the model.
    base_model_id str
    capabilities Sequence[str]
    Describes what this model can be used for.
    compartment_id str
    defined_tags Mapping[str, str]
    description str
    An optional description of the model.
    display_name str
    fine_tune_details Sequence[GetModelFineTuneDetail]
    freeform_tags Mapping[str, str]
    id str
    is_long_term_supported bool
    lifecycle_details str
    model_id str
    model_metrics Sequence[GetModelModelMetric]
    state str
    The lifecycle state of the model.
    system_tags Mapping[str, str]
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    time_deprecated str
    time_updated str
    type str
    vendor str
    The provider of the base model.
    version str
    The version of the model.
    baseModelId String
    capabilities List<String>
    Describes what this model can be used for.
    compartmentId String
    definedTags Map<String>
    description String
    An optional description of the model.
    displayName String
    fineTuneDetails List<Property Map>
    freeformTags Map<String>
    id String
    isLongTermSupported Boolean
    lifecycleDetails String
    modelId String
    modelMetrics List<Property Map>
    state String
    The lifecycle state of the model.
    systemTags Map<String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    timeDeprecated String
    timeUpdated String
    type String
    vendor String
    The provider of the base model.
    version String
    The version of the model.

    Supporting Types

    GetModelFineTuneDetail

    GetModelFineTuneDetailTrainingConfig

    GetModelFineTuneDetailTrainingDataset

    Bucket string
    DatasetType string
    Namespace string
    Object string
    Bucket string
    DatasetType string
    Namespace string
    Object string
    bucket String
    datasetType String
    namespace String
    object String
    bucket string
    datasetType string
    namespace string
    object string
    bucket String
    datasetType String
    namespace String
    object String

    GetModelModelMetric

    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 v4.0.0 published on Friday, Feb 20, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate