Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.CloudMigrations.getMigrationAssets
Explore with Pulumi AI
This data source provides the list of Migration Assets in Oracle Cloud Infrastructure Cloud Migrations service.
Returns a list of migration assets.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testMigrationAssets = oci.CloudMigrations.getMigrationAssets({
    displayName: migrationAssetDisplayName,
    migrationAssetId: testMigrationAsset.id,
    migrationId: testMigration.id,
    state: migrationAssetState,
});
import pulumi
import pulumi_oci as oci
test_migration_assets = oci.CloudMigrations.get_migration_assets(display_name=migration_asset_display_name,
    migration_asset_id=test_migration_asset["id"],
    migration_id=test_migration["id"],
    state=migration_asset_state)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/cloudmigrations"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudmigrations.GetMigrationAssets(ctx, &cloudmigrations.GetMigrationAssetsArgs{
			DisplayName:      pulumi.StringRef(migrationAssetDisplayName),
			MigrationAssetId: pulumi.StringRef(testMigrationAsset.Id),
			MigrationId:      pulumi.StringRef(testMigration.Id),
			State:            pulumi.StringRef(migrationAssetState),
		}, 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 testMigrationAssets = Oci.CloudMigrations.GetMigrationAssets.Invoke(new()
    {
        DisplayName = migrationAssetDisplayName,
        MigrationAssetId = testMigrationAsset.Id,
        MigrationId = testMigration.Id,
        State = migrationAssetState,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.CloudMigrations.CloudMigrationsFunctions;
import com.pulumi.oci.CloudMigrations.inputs.GetMigrationAssetsArgs;
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 testMigrationAssets = CloudMigrationsFunctions.getMigrationAssets(GetMigrationAssetsArgs.builder()
            .displayName(migrationAssetDisplayName)
            .migrationAssetId(testMigrationAsset.id())
            .migrationId(testMigration.id())
            .state(migrationAssetState)
            .build());
    }
}
variables:
  testMigrationAssets:
    fn::invoke:
      function: oci:CloudMigrations:getMigrationAssets
      arguments:
        displayName: ${migrationAssetDisplayName}
        migrationAssetId: ${testMigrationAsset.id}
        migrationId: ${testMigration.id}
        state: ${migrationAssetState}
Using getMigrationAssets
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 getMigrationAssets(args: GetMigrationAssetsArgs, opts?: InvokeOptions): Promise<GetMigrationAssetsResult>
function getMigrationAssetsOutput(args: GetMigrationAssetsOutputArgs, opts?: InvokeOptions): Output<GetMigrationAssetsResult>def get_migration_assets(display_name: Optional[str] = None,
                         filters: Optional[Sequence[GetMigrationAssetsFilter]] = None,
                         migration_asset_id: Optional[str] = None,
                         migration_id: Optional[str] = None,
                         state: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetMigrationAssetsResult
def get_migration_assets_output(display_name: Optional[pulumi.Input[str]] = None,
                         filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetMigrationAssetsFilterArgs]]]] = None,
                         migration_asset_id: Optional[pulumi.Input[str]] = None,
                         migration_id: Optional[pulumi.Input[str]] = None,
                         state: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetMigrationAssetsResult]func GetMigrationAssets(ctx *Context, args *GetMigrationAssetsArgs, opts ...InvokeOption) (*GetMigrationAssetsResult, error)
func GetMigrationAssetsOutput(ctx *Context, args *GetMigrationAssetsOutputArgs, opts ...InvokeOption) GetMigrationAssetsResultOutput> Note: This function is named GetMigrationAssets in the Go SDK.
public static class GetMigrationAssets 
{
    public static Task<GetMigrationAssetsResult> InvokeAsync(GetMigrationAssetsArgs args, InvokeOptions? opts = null)
    public static Output<GetMigrationAssetsResult> Invoke(GetMigrationAssetsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMigrationAssetsResult> getMigrationAssets(GetMigrationAssetsArgs args, InvokeOptions options)
public static Output<GetMigrationAssetsResult> getMigrationAssets(GetMigrationAssetsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:CloudMigrations/getMigrationAssets:getMigrationAssets
  arguments:
    # arguments dictionaryThe following arguments are supported:
- DisplayName string
- A filter to return only resources that match the entire given display name.
- Filters
List<GetMigration Assets Filter> 
- MigrationAsset stringId 
- Unique migration asset identifier
- MigrationId string
- Unique migration identifier
- State string
- The current state of the migration asset.
- DisplayName string
- A filter to return only resources that match the entire given display name.
- Filters
[]GetMigration Assets Filter 
- MigrationAsset stringId 
- Unique migration asset identifier
- MigrationId string
- Unique migration identifier
- State string
- The current state of the migration asset.
- displayName String
- A filter to return only resources that match the entire given display name.
- filters
List<GetMigration Assets Filter> 
- migrationAsset StringId 
- Unique migration asset identifier
- migrationId String
- Unique migration identifier
- state String
- The current state of the migration asset.
- displayName string
- A filter to return only resources that match the entire given display name.
- filters
GetMigration Assets Filter[] 
- migrationAsset stringId 
- Unique migration asset identifier
- migrationId string
- Unique migration identifier
- state string
- The current state of the migration asset.
- display_name str
- A filter to return only resources that match the entire given display name.
- filters
Sequence[GetMigration Assets Filter] 
- migration_asset_ strid 
- Unique migration asset identifier
- migration_id str
- Unique migration identifier
- state str
- The current state of the migration asset.
- displayName String
- A filter to return only resources that match the entire given display name.
- filters List<Property Map>
- migrationAsset StringId 
- Unique migration asset identifier
- migrationId String
- Unique migration identifier
- state String
- The current state of the migration asset.
getMigrationAssets Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- MigrationAsset List<GetCollections Migration Assets Migration Asset Collection> 
- The list of migration_asset_collection.
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Filters
List<GetMigration Assets Filter> 
- MigrationAsset stringId 
- MigrationId string
- OCID of the associated migration.
- State string
- The current state of the migration asset.
- Id string
- The provider-assigned unique ID for this managed resource.
- MigrationAsset []GetCollections Migration Assets Migration Asset Collection 
- The list of migration_asset_collection.
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Filters
[]GetMigration Assets Filter 
- MigrationAsset stringId 
- MigrationId string
- OCID of the associated migration.
- State string
- The current state of the migration asset.
- id String
- The provider-assigned unique ID for this managed resource.
- migrationAsset List<GetCollections Migration Assets Migration Asset Collection> 
- The list of migration_asset_collection.
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters
List<GetMigration Assets Filter> 
- migrationAsset StringId 
- migrationId String
- OCID of the associated migration.
- state String
- The current state of the migration asset.
- id string
- The provider-assigned unique ID for this managed resource.
- migrationAsset GetCollections Migration Assets Migration Asset Collection[] 
- The list of migration_asset_collection.
- displayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters
GetMigration Assets Filter[] 
- migrationAsset stringId 
- migrationId string
- OCID of the associated migration.
- state string
- The current state of the migration asset.
- id str
- The provider-assigned unique ID for this managed resource.
- migration_asset_ Sequence[Getcollections Migration Assets Migration Asset Collection] 
- The list of migration_asset_collection.
- display_name str
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters
Sequence[GetMigration Assets Filter] 
- migration_asset_ strid 
- migration_id str
- OCID of the associated migration.
- state str
- The current state of the migration asset.
- id String
- The provider-assigned unique ID for this managed resource.
- migrationAsset List<Property Map>Collections 
- The list of migration_asset_collection.
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters List<Property Map>
- migrationAsset StringId 
- migrationId String
- OCID of the associated migration.
- state String
- The current state of the migration asset.
Supporting Types
GetMigrationAssetsFilter   
GetMigrationAssetsMigrationAssetCollection     
GetMigrationAssetsMigrationAssetCollectionItem      
- AvailabilityDomain string
- Availability domain
- CompartmentId string
- Compartment Identifier
- DependedOn List<string>Bies 
- List of migration assets that depend on the asset.
- DisplayName string
- A filter to return only resources that match the entire given display name.
- Id string
- Asset ID generated by mirgration service. It is used in the mirgration service pipeline.
- InventoryAsset stringId 
- 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.
- MigrationAsset List<string>Depends Ons 
- MigrationId string
- Unique migration identifier
- Notifications List<string>
- List of notifications
- ParentSnapshot string
- The parent snapshot of the migration asset to be used by the replication task.
- ReplicationCompartment stringId 
- Replication compartment identifier
- ReplicationSchedule stringId 
- Replication schedule identifier
- SnapShot stringBucket Name 
- Name of snapshot bucket
- Snapshots Dictionary<string, string>
- Key-value pair representing disks ID mapped to the OCIDs of replicated or hydration server volume snapshots. Example: {"bar-key": "value"}
- SourceAsset stringId 
- OCID that is referenced to an asset for an inventory.
- State string
- The current state of the migration asset.
- TenancyId string
- Tenancy identifier
- TimeCreated string
- The time when the migration asset was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time when the migration asset was updated. An RFC3339 formatted datetime string.
- Type string
- The type of asset referenced for inventory.
- AvailabilityDomain string
- Availability domain
- CompartmentId string
- Compartment Identifier
- DependedOn []stringBies 
- List of migration assets that depend on the asset.
- DisplayName string
- A filter to return only resources that match the entire given display name.
- Id string
- Asset ID generated by mirgration service. It is used in the mirgration service pipeline.
- InventoryAsset stringId 
- 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.
- MigrationAsset []stringDepends Ons 
- MigrationId string
- Unique migration identifier
- Notifications []string
- List of notifications
- ParentSnapshot string
- The parent snapshot of the migration asset to be used by the replication task.
- ReplicationCompartment stringId 
- Replication compartment identifier
- ReplicationSchedule stringId 
- Replication schedule identifier
- SnapShot stringBucket Name 
- Name of snapshot bucket
- Snapshots map[string]string
- Key-value pair representing disks ID mapped to the OCIDs of replicated or hydration server volume snapshots. Example: {"bar-key": "value"}
- SourceAsset stringId 
- OCID that is referenced to an asset for an inventory.
- State string
- The current state of the migration asset.
- TenancyId string
- Tenancy identifier
- TimeCreated string
- The time when the migration asset was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time when the migration asset was updated. An RFC3339 formatted datetime string.
- Type string
- The type of asset referenced for inventory.
- availabilityDomain String
- Availability domain
- compartmentId String
- Compartment Identifier
- dependedOn List<String>Bies 
- List of migration assets that depend on the asset.
- displayName String
- A filter to return only resources that match the entire given display name.
- id String
- Asset ID generated by mirgration service. It is used in the mirgration service pipeline.
- inventoryAsset StringId 
- 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.
- migrationAsset List<String>Depends Ons 
- migrationId String
- Unique migration identifier
- notifications List<String>
- List of notifications
- parentSnapshot String
- The parent snapshot of the migration asset to be used by the replication task.
- replicationCompartment StringId 
- Replication compartment identifier
- replicationSchedule StringId 
- Replication schedule identifier
- snapShot StringBucket Name 
- Name of snapshot bucket
- snapshots Map<String,String>
- Key-value pair representing disks ID mapped to the OCIDs of replicated or hydration server volume snapshots. Example: {"bar-key": "value"}
- sourceAsset StringId 
- OCID that is referenced to an asset for an inventory.
- state String
- The current state of the migration asset.
- tenancyId String
- Tenancy identifier
- timeCreated String
- The time when the migration asset was created. An RFC3339 formatted datetime string.
- timeUpdated String
- The time when the migration asset was updated. An RFC3339 formatted datetime string.
- type String
- The type of asset referenced for inventory.
- availabilityDomain string
- Availability domain
- compartmentId string
- Compartment Identifier
- dependedOn string[]Bies 
- List of migration assets that depend on the asset.
- displayName string
- A filter to return only resources that match the entire given display name.
- id string
- Asset ID generated by mirgration service. It is used in the mirgration service pipeline.
- inventoryAsset stringId 
- 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.
- migrationAsset string[]Depends Ons 
- migrationId string
- Unique migration identifier
- notifications string[]
- List of notifications
- parentSnapshot string
- The parent snapshot of the migration asset to be used by the replication task.
- replicationCompartment stringId 
- Replication compartment identifier
- replicationSchedule stringId 
- Replication schedule identifier
- snapShot stringBucket Name 
- Name of snapshot bucket
- snapshots {[key: string]: string}
- Key-value pair representing disks ID mapped to the OCIDs of replicated or hydration server volume snapshots. Example: {"bar-key": "value"}
- sourceAsset stringId 
- OCID that is referenced to an asset for an inventory.
- state string
- The current state of the migration asset.
- tenancyId string
- Tenancy identifier
- timeCreated string
- The time when the migration asset was created. An RFC3339 formatted datetime string.
- timeUpdated string
- The time when the migration asset was updated. An RFC3339 formatted datetime string.
- type string
- The type of asset referenced for inventory.
- availability_domain str
- Availability domain
- compartment_id str
- Compartment Identifier
- depended_on_ Sequence[str]bies 
- List of migration assets that depend on the asset.
- display_name str
- A filter to return only resources that match the entire given display name.
- id str
- Asset ID generated by mirgration service. It is used in the mirgration service pipeline.
- inventory_asset_ strid 
- 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.
- migration_asset_ Sequence[str]depends_ ons 
- migration_id str
- Unique migration identifier
- notifications Sequence[str]
- List of notifications
- parent_snapshot str
- The parent snapshot of the migration asset to be used by the replication task.
- replication_compartment_ strid 
- Replication compartment identifier
- replication_schedule_ strid 
- Replication schedule identifier
- snap_shot_ strbucket_ name 
- Name of snapshot bucket
- snapshots Mapping[str, str]
- Key-value pair representing disks ID mapped to the OCIDs of replicated or hydration server volume snapshots. Example: {"bar-key": "value"}
- source_asset_ strid 
- OCID that is referenced to an asset for an inventory.
- state str
- The current state of the migration asset.
- tenancy_id str
- Tenancy identifier
- time_created str
- The time when the migration asset was created. An RFC3339 formatted datetime string.
- time_updated str
- The time when the migration asset was updated. An RFC3339 formatted datetime string.
- type str
- The type of asset referenced for inventory.
- availabilityDomain String
- Availability domain
- compartmentId String
- Compartment Identifier
- dependedOn List<String>Bies 
- List of migration assets that depend on the asset.
- displayName String
- A filter to return only resources that match the entire given display name.
- id String
- Asset ID generated by mirgration service. It is used in the mirgration service pipeline.
- inventoryAsset StringId 
- 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.
- migrationAsset List<String>Depends Ons 
- migrationId String
- Unique migration identifier
- notifications List<String>
- List of notifications
- parentSnapshot String
- The parent snapshot of the migration asset to be used by the replication task.
- replicationCompartment StringId 
- Replication compartment identifier
- replicationSchedule StringId 
- Replication schedule identifier
- snapShot StringBucket Name 
- Name of snapshot bucket
- snapshots Map<String>
- Key-value pair representing disks ID mapped to the OCIDs of replicated or hydration server volume snapshots. Example: {"bar-key": "value"}
- sourceAsset StringId 
- OCID that is referenced to an asset for an inventory.
- state String
- The current state of the migration asset.
- tenancyId String
- Tenancy identifier
- timeCreated String
- The time when the migration asset was created. An RFC3339 formatted datetime string.
- timeUpdated String
- The time when the migration asset was updated. An RFC3339 formatted datetime string.
- type String
- The type of asset referenced for inventory.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.