1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. oci
  5. getIotDigitalTwinModels
Oracle Cloud Infrastructure v3.11.1 published on Friday, Nov 14, 2025 by Pulumi
oci logo
Oracle Cloud Infrastructure v3.11.1 published on Friday, Nov 14, 2025 by Pulumi

    This data source provides the list of Digital Twin Models in Oracle Cloud Infrastructure Iot service.

    Retrieves a list of digital twin models within the specified IoT domain.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDigitalTwinModels = oci.oci.getIotDigitalTwinModels({
        iotDomainId: testIotDomain.id,
        displayName: digitalTwinModelDisplayName,
        id: digitalTwinModelId,
        specUriStartsWith: digitalTwinModelSpecUriStartsWith,
        state: digitalTwinModelState,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_digital_twin_models = oci.oci.get_iot_digital_twin_models(iot_domain_id=test_iot_domain["id"],
        display_name=digital_twin_model_display_name,
        id=digital_twin_model_id,
        spec_uri_starts_with=digital_twin_model_spec_uri_starts_with,
        state=digital_twin_model_state)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/oci"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := oci.GetIotDigitalTwinModels(ctx, &oci.GetIotDigitalTwinModelsArgs{
    			IotDomainId:       testIotDomain.Id,
    			DisplayName:       pulumi.StringRef(digitalTwinModelDisplayName),
    			Id:                pulumi.StringRef(digitalTwinModelId),
    			SpecUriStartsWith: pulumi.StringRef(digitalTwinModelSpecUriStartsWith),
    			State:             pulumi.StringRef(digitalTwinModelState),
    		}, 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 testDigitalTwinModels = Oci.Oci.GetIotDigitalTwinModels.Invoke(new()
        {
            IotDomainId = testIotDomain.Id,
            DisplayName = digitalTwinModelDisplayName,
            Id = digitalTwinModelId,
            SpecUriStartsWith = digitalTwinModelSpecUriStartsWith,
            State = digitalTwinModelState,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.oci.OciFunctions;
    import com.pulumi.oci.oci.inputs.GetIotDigitalTwinModelsArgs;
    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 testDigitalTwinModels = OciFunctions.getIotDigitalTwinModels(GetIotDigitalTwinModelsArgs.builder()
                .iotDomainId(testIotDomain.id())
                .displayName(digitalTwinModelDisplayName)
                .id(digitalTwinModelId)
                .specUriStartsWith(digitalTwinModelSpecUriStartsWith)
                .state(digitalTwinModelState)
                .build());
    
        }
    }
    
    variables:
      testDigitalTwinModels:
        fn::invoke:
          function: oci:oci:getIotDigitalTwinModels
          arguments:
            iotDomainId: ${testIotDomain.id}
            displayName: ${digitalTwinModelDisplayName}
            id: ${digitalTwinModelId}
            specUriStartsWith: ${digitalTwinModelSpecUriStartsWith}
            state: ${digitalTwinModelState}
    

    Using getIotDigitalTwinModels

    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 getIotDigitalTwinModels(args: GetIotDigitalTwinModelsArgs, opts?: InvokeOptions): Promise<GetIotDigitalTwinModelsResult>
    function getIotDigitalTwinModelsOutput(args: GetIotDigitalTwinModelsOutputArgs, opts?: InvokeOptions): Output<GetIotDigitalTwinModelsResult>
    def get_iot_digital_twin_models(display_name: Optional[str] = None,
                                    filters: Optional[Sequence[GetIotDigitalTwinModelsFilter]] = None,
                                    id: Optional[str] = None,
                                    iot_domain_id: Optional[str] = None,
                                    spec_uri_starts_with: Optional[str] = None,
                                    state: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetIotDigitalTwinModelsResult
    def get_iot_digital_twin_models_output(display_name: Optional[pulumi.Input[str]] = None,
                                    filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetIotDigitalTwinModelsFilterArgs]]]] = None,
                                    id: Optional[pulumi.Input[str]] = None,
                                    iot_domain_id: Optional[pulumi.Input[str]] = None,
                                    spec_uri_starts_with: Optional[pulumi.Input[str]] = None,
                                    state: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetIotDigitalTwinModelsResult]
    func GetIotDigitalTwinModels(ctx *Context, args *GetIotDigitalTwinModelsArgs, opts ...InvokeOption) (*GetIotDigitalTwinModelsResult, error)
    func GetIotDigitalTwinModelsOutput(ctx *Context, args *GetIotDigitalTwinModelsOutputArgs, opts ...InvokeOption) GetIotDigitalTwinModelsResultOutput

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

    public static class GetIotDigitalTwinModels 
    {
        public static Task<GetIotDigitalTwinModelsResult> InvokeAsync(GetIotDigitalTwinModelsArgs args, InvokeOptions? opts = null)
        public static Output<GetIotDigitalTwinModelsResult> Invoke(GetIotDigitalTwinModelsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIotDigitalTwinModelsResult> getIotDigitalTwinModels(GetIotDigitalTwinModelsArgs args, InvokeOptions options)
    public static Output<GetIotDigitalTwinModelsResult> getIotDigitalTwinModels(GetIotDigitalTwinModelsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:oci/getIotDigitalTwinModels:getIotDigitalTwinModels
      arguments:
        # arguments dictionary

    The following arguments are supported:

    IotDomainId string
    The OCID of the IoT domain in which to list digital twin resources.
    DisplayName string
    Filter resources whose display name matches the specified value.
    Filters List<GetIotDigitalTwinModelsFilter>
    Id string
    Filter resources by OCID. Must be a valid OCID of the resource type.
    SpecUriStartsWith string
    Filters resources by spec URI prefix. For example, to search all versions of the dtmi:example:device;1 model, pass the prefix without the version: dtmi:example:device.
    State string
    Filter resources whose lifecycleState matches the specified value.
    IotDomainId string
    The OCID of the IoT domain in which to list digital twin resources.
    DisplayName string
    Filter resources whose display name matches the specified value.
    Filters []GetIotDigitalTwinModelsFilter
    Id string
    Filter resources by OCID. Must be a valid OCID of the resource type.
    SpecUriStartsWith string
    Filters resources by spec URI prefix. For example, to search all versions of the dtmi:example:device;1 model, pass the prefix without the version: dtmi:example:device.
    State string
    Filter resources whose lifecycleState matches the specified value.
    iotDomainId String
    The OCID of the IoT domain in which to list digital twin resources.
    displayName String
    Filter resources whose display name matches the specified value.
    filters List<GetIotDigitalTwinModelsFilter>
    id String
    Filter resources by OCID. Must be a valid OCID of the resource type.
    specUriStartsWith String
    Filters resources by spec URI prefix. For example, to search all versions of the dtmi:example:device;1 model, pass the prefix without the version: dtmi:example:device.
    state String
    Filter resources whose lifecycleState matches the specified value.
    iotDomainId string
    The OCID of the IoT domain in which to list digital twin resources.
    displayName string
    Filter resources whose display name matches the specified value.
    filters GetIotDigitalTwinModelsFilter[]
    id string
    Filter resources by OCID. Must be a valid OCID of the resource type.
    specUriStartsWith string
    Filters resources by spec URI prefix. For example, to search all versions of the dtmi:example:device;1 model, pass the prefix without the version: dtmi:example:device.
    state string
    Filter resources whose lifecycleState matches the specified value.
    iot_domain_id str
    The OCID of the IoT domain in which to list digital twin resources.
    display_name str
    Filter resources whose display name matches the specified value.
    filters Sequence[GetIotDigitalTwinModelsFilter]
    id str
    Filter resources by OCID. Must be a valid OCID of the resource type.
    spec_uri_starts_with str
    Filters resources by spec URI prefix. For example, to search all versions of the dtmi:example:device;1 model, pass the prefix without the version: dtmi:example:device.
    state str
    Filter resources whose lifecycleState matches the specified value.
    iotDomainId String
    The OCID of the IoT domain in which to list digital twin resources.
    displayName String
    Filter resources whose display name matches the specified value.
    filters List<Property Map>
    id String
    Filter resources by OCID. Must be a valid OCID of the resource type.
    specUriStartsWith String
    Filters resources by spec URI prefix. For example, to search all versions of the dtmi:example:device;1 model, pass the prefix without the version: dtmi:example:device.
    state String
    Filter resources whose lifecycleState matches the specified value.

    getIotDigitalTwinModels Result

    The following output properties are available:

    DigitalTwinModelCollections List<GetIotDigitalTwinModelsDigitalTwinModelCollection>
    The list of digital_twin_model_collection.
    IotDomainId string
    The OCID of the IoT domain.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. If left blank, the display name will be derived from the spec.
    Filters List<GetIotDigitalTwinModelsFilter>
    Id string
    The OCID of the resource.
    SpecUriStartsWith string
    State string
    The current state of the digital twin model.
    DigitalTwinModelCollections []GetIotDigitalTwinModelsDigitalTwinModelCollection
    The list of digital_twin_model_collection.
    IotDomainId string
    The OCID of the IoT domain.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. If left blank, the display name will be derived from the spec.
    Filters []GetIotDigitalTwinModelsFilter
    Id string
    The OCID of the resource.
    SpecUriStartsWith string
    State string
    The current state of the digital twin model.
    digitalTwinModelCollections List<GetIotDigitalTwinModelsDigitalTwinModelCollection>
    The list of digital_twin_model_collection.
    iotDomainId String
    The OCID of the IoT domain.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. If left blank, the display name will be derived from the spec.
    filters List<GetIotDigitalTwinModelsFilter>
    id String
    The OCID of the resource.
    specUriStartsWith String
    state String
    The current state of the digital twin model.
    digitalTwinModelCollections GetIotDigitalTwinModelsDigitalTwinModelCollection[]
    The list of digital_twin_model_collection.
    iotDomainId string
    The OCID of the IoT domain.
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. If left blank, the display name will be derived from the spec.
    filters GetIotDigitalTwinModelsFilter[]
    id string
    The OCID of the resource.
    specUriStartsWith string
    state string
    The current state of the digital twin model.
    digital_twin_model_collections Sequence[GetIotDigitalTwinModelsDigitalTwinModelCollection]
    The list of digital_twin_model_collection.
    iot_domain_id str
    The OCID of the IoT domain.
    display_name str
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. If left blank, the display name will be derived from the spec.
    filters Sequence[GetIotDigitalTwinModelsFilter]
    id str
    The OCID of the resource.
    spec_uri_starts_with str
    state str
    The current state of the digital twin model.
    digitalTwinModelCollections List<Property Map>
    The list of digital_twin_model_collection.
    iotDomainId String
    The OCID of the IoT domain.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. If left blank, the display name will be derived from the spec.
    filters List<Property Map>
    id String
    The OCID of the resource.
    specUriStartsWith String
    state String
    The current state of the digital twin model.

    Supporting Types

    GetIotDigitalTwinModelsDigitalTwinModelCollection

    GetIotDigitalTwinModelsDigitalTwinModelCollectionItem

    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    A short description of the resource. If left blank, the description will be derived from the spec.
    DisplayName string
    Filter resources whose display name matches the specified value.
    FreeformTags Dictionary<string, string>
    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
    Filter resources by OCID. Must be a valid OCID of the resource type.
    IotDomainId string
    The OCID of the IoT domain in which to list digital twin resources.
    Spec string
    SpecUri string
    This is the DTMI (Digital Twin Model Identifier) of the digital twin model as defined in DTDL specification.
    State string
    Filter resources whose lifecycleState matches the specified value.
    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
    The date and time when the resource was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The date and time when the resource was last updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    A short description of the resource. If left blank, the description will be derived from the spec.
    DisplayName string
    Filter resources whose display name matches the specified value.
    FreeformTags map[string]string
    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
    Filter resources by OCID. Must be a valid OCID of the resource type.
    IotDomainId string
    The OCID of the IoT domain in which to list digital twin resources.
    Spec string
    SpecUri string
    This is the DTMI (Digital Twin Model Identifier) of the digital twin model as defined in DTDL specification.
    State string
    Filter resources whose lifecycleState matches the specified value.
    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
    The date and time when the resource was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The date and time when the resource was last updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    A short description of the resource. If left blank, the description will be derived from the spec.
    displayName String
    Filter resources whose display name matches the specified value.
    freeformTags Map<String,String>
    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
    Filter resources by OCID. Must be a valid OCID of the resource type.
    iotDomainId String
    The OCID of the IoT domain in which to list digital twin resources.
    spec String
    specUri String
    This is the DTMI (Digital Twin Model Identifier) of the digital twin model as defined in DTDL specification.
    state String
    Filter resources whose lifecycleState matches the specified value.
    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
    The date and time when the resource was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated String
    The date and time when the resource was last updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description string
    A short description of the resource. If left blank, the description will be derived from the spec.
    displayName string
    Filter resources whose display name matches the specified value.
    freeformTags {[key: string]: string}
    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
    Filter resources by OCID. Must be a valid OCID of the resource type.
    iotDomainId string
    The OCID of the IoT domain in which to list digital twin resources.
    spec string
    specUri string
    This is the DTMI (Digital Twin Model Identifier) of the digital twin model as defined in DTDL specification.
    state string
    Filter resources whose lifecycleState matches the specified value.
    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
    The date and time when the resource was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated string
    The date and time when the resource was last updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description str
    A short description of the resource. If left blank, the description will be derived from the spec.
    display_name str
    Filter resources whose display name matches the specified value.
    freeform_tags Mapping[str, str]
    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
    Filter resources by OCID. Must be a valid OCID of the resource type.
    iot_domain_id str
    The OCID of the IoT domain in which to list digital twin resources.
    spec str
    spec_uri str
    This is the DTMI (Digital Twin Model Identifier) of the digital twin model as defined in DTDL specification.
    state str
    Filter resources whose lifecycleState matches the specified value.
    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
    The date and time when the resource was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    time_updated str
    The date and time when the resource was last updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    A short description of the resource. If left blank, the description will be derived from the spec.
    displayName String
    Filter resources whose display name matches the specified value.
    freeformTags Map<String>
    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
    Filter resources by OCID. Must be a valid OCID of the resource type.
    iotDomainId String
    The OCID of the IoT domain in which to list digital twin resources.
    spec String
    specUri String
    This is the DTMI (Digital Twin Model Identifier) of the digital twin model as defined in DTDL specification.
    state String
    Filter resources whose lifecycleState matches the specified value.
    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
    The date and time when the resource was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated String
    The date and time when the resource was last updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z

    GetIotDigitalTwinModelsFilter

    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

    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.11.1 published on Friday, Nov 14, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate