1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. CloudMigrations
  5. getMigrationAssets
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

oci.CloudMigrations.getMigrationAssets

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

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,
});
Copy
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)
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  testMigrationAssets:
    fn::invoke:
      function: oci:CloudMigrations:getMigrationAssets
      arguments:
        displayName: ${migrationAssetDisplayName}
        migrationAssetId: ${testMigrationAsset.id}
        migrationId: ${testMigration.id}
        state: ${migrationAssetState}
Copy

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>
Copy
def get_migration_assets(display_name: Optional[str] = None,
                         filters: Optional[Sequence[_cloudmigrations.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[_cloudmigrations.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]
Copy
func GetMigrationAssets(ctx *Context, args *GetMigrationAssetsArgs, opts ...InvokeOption) (*GetMigrationAssetsResult, error)
func GetMigrationAssetsOutput(ctx *Context, args *GetMigrationAssetsOutputArgs, opts ...InvokeOption) GetMigrationAssetsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetMigrationAssetsResult> getMigrationAssets(GetMigrationAssetsArgs args, InvokeOptions options)
public static Output<GetMigrationAssetsResult> getMigrationAssets(GetMigrationAssetsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:CloudMigrations/getMigrationAssets:getMigrationAssets
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DisplayName string
A filter to return only resources that match the entire given display name.
Filters Changes to this property will trigger replacement. List<GetMigrationAssetsFilter>
MigrationAssetId string
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 Changes to this property will trigger replacement. []GetMigrationAssetsFilter
MigrationAssetId string
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 Changes to this property will trigger replacement. List<GetMigrationAssetsFilter>
migrationAssetId String
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 Changes to this property will trigger replacement. GetMigrationAssetsFilter[]
migrationAssetId string
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 Changes to this property will trigger replacement. Sequence[cloudmigrations.GetMigrationAssetsFilter]
migration_asset_id str
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 Changes to this property will trigger replacement. List<Property Map>
migrationAssetId String
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.
MigrationAssetCollections List<GetMigrationAssetsMigrationAssetCollection>
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<GetMigrationAssetsFilter>
MigrationAssetId string
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.
MigrationAssetCollections []GetMigrationAssetsMigrationAssetCollection
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 []GetMigrationAssetsFilter
MigrationAssetId string
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.
migrationAssetCollections List<GetMigrationAssetsMigrationAssetCollection>
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<GetMigrationAssetsFilter>
migrationAssetId String
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.
migrationAssetCollections GetMigrationAssetsMigrationAssetCollection[]
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 GetMigrationAssetsFilter[]
migrationAssetId string
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_collections Sequence[cloudmigrations.GetMigrationAssetsMigrationAssetCollection]
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[cloudmigrations.GetMigrationAssetsFilter]
migration_asset_id str
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.
migrationAssetCollections List<Property Map>
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>
migrationAssetId String
migrationId String
OCID of the associated migration.
state String
The current state of the migration asset.

Supporting Types

GetMigrationAssetsFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

GetMigrationAssetsMigrationAssetCollection

items This property is required. List<Property Map>

GetMigrationAssetsMigrationAssetCollectionItem

AvailabilityDomain This property is required. string
Availability domain
CompartmentId This property is required. string
Compartment Identifier
DependedOnBies This property is required. List<string>
List of migration assets that depend on the asset.
DisplayName This property is required. string
A filter to return only resources that match the entire given display name.
Id This property is required. string
Asset ID generated by mirgration service. It is used in the mirgration service pipeline.
InventoryAssetId This property is required. string
LifecycleDetails This property is required. 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.
MigrationAssetDependsOns This property is required. List<string>
MigrationId This property is required. string
Unique migration identifier
Notifications This property is required. List<string>
List of notifications
ParentSnapshot This property is required. string
The parent snapshot of the migration asset to be used by the replication task.
ReplicationCompartmentId This property is required. string
Replication compartment identifier
ReplicationScheduleId This property is required. string
Replication schedule identifier
SnapShotBucketName This property is required. string
Name of snapshot bucket
Snapshots This property is required. Dictionary<string, string>
Key-value pair representing disks ID mapped to the OCIDs of replicated or hydration server volume snapshots. Example: {"bar-key": "value"}
SourceAssetId This property is required. string
OCID that is referenced to an asset for an inventory.
State This property is required. string
The current state of the migration asset.
TenancyId This property is required. string
Tenancy identifier
TimeCreated This property is required. string
The time when the migration asset was created. An RFC3339 formatted datetime string.
TimeUpdated This property is required. string
The time when the migration asset was updated. An RFC3339 formatted datetime string.
Type This property is required. string
The type of asset referenced for inventory.
AvailabilityDomain This property is required. string
Availability domain
CompartmentId This property is required. string
Compartment Identifier
DependedOnBies This property is required. []string
List of migration assets that depend on the asset.
DisplayName This property is required. string
A filter to return only resources that match the entire given display name.
Id This property is required. string
Asset ID generated by mirgration service. It is used in the mirgration service pipeline.
InventoryAssetId This property is required. string
LifecycleDetails This property is required. 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.
MigrationAssetDependsOns This property is required. []string
MigrationId This property is required. string
Unique migration identifier
Notifications This property is required. []string
List of notifications
ParentSnapshot This property is required. string
The parent snapshot of the migration asset to be used by the replication task.
ReplicationCompartmentId This property is required. string
Replication compartment identifier
ReplicationScheduleId This property is required. string
Replication schedule identifier
SnapShotBucketName This property is required. string
Name of snapshot bucket
Snapshots This property is required. map[string]string
Key-value pair representing disks ID mapped to the OCIDs of replicated or hydration server volume snapshots. Example: {"bar-key": "value"}
SourceAssetId This property is required. string
OCID that is referenced to an asset for an inventory.
State This property is required. string
The current state of the migration asset.
TenancyId This property is required. string
Tenancy identifier
TimeCreated This property is required. string
The time when the migration asset was created. An RFC3339 formatted datetime string.
TimeUpdated This property is required. string
The time when the migration asset was updated. An RFC3339 formatted datetime string.
Type This property is required. string
The type of asset referenced for inventory.
availabilityDomain This property is required. String
Availability domain
compartmentId This property is required. String
Compartment Identifier
dependedOnBies This property is required. List<String>
List of migration assets that depend on the asset.
displayName This property is required. String
A filter to return only resources that match the entire given display name.
id This property is required. String
Asset ID generated by mirgration service. It is used in the mirgration service pipeline.
inventoryAssetId This property is required. String
lifecycleDetails This property is required. 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.
migrationAssetDependsOns This property is required. List<String>
migrationId This property is required. String
Unique migration identifier
notifications This property is required. List<String>
List of notifications
parentSnapshot This property is required. String
The parent snapshot of the migration asset to be used by the replication task.
replicationCompartmentId This property is required. String
Replication compartment identifier
replicationScheduleId This property is required. String
Replication schedule identifier
snapShotBucketName This property is required. String
Name of snapshot bucket
snapshots This property is required. Map<String,String>
Key-value pair representing disks ID mapped to the OCIDs of replicated or hydration server volume snapshots. Example: {"bar-key": "value"}
sourceAssetId This property is required. String
OCID that is referenced to an asset for an inventory.
state This property is required. String
The current state of the migration asset.
tenancyId This property is required. String
Tenancy identifier
timeCreated This property is required. String
The time when the migration asset was created. An RFC3339 formatted datetime string.
timeUpdated This property is required. String
The time when the migration asset was updated. An RFC3339 formatted datetime string.
type This property is required. String
The type of asset referenced for inventory.
availabilityDomain This property is required. string
Availability domain
compartmentId This property is required. string
Compartment Identifier
dependedOnBies This property is required. string[]
List of migration assets that depend on the asset.
displayName This property is required. string
A filter to return only resources that match the entire given display name.
id This property is required. string
Asset ID generated by mirgration service. It is used in the mirgration service pipeline.
inventoryAssetId This property is required. string
lifecycleDetails This property is required. 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.
migrationAssetDependsOns This property is required. string[]
migrationId This property is required. string
Unique migration identifier
notifications This property is required. string[]
List of notifications
parentSnapshot This property is required. string
The parent snapshot of the migration asset to be used by the replication task.
replicationCompartmentId This property is required. string
Replication compartment identifier
replicationScheduleId This property is required. string
Replication schedule identifier
snapShotBucketName This property is required. string
Name of snapshot bucket
snapshots This property is required. {[key: string]: string}
Key-value pair representing disks ID mapped to the OCIDs of replicated or hydration server volume snapshots. Example: {"bar-key": "value"}
sourceAssetId This property is required. string
OCID that is referenced to an asset for an inventory.
state This property is required. string
The current state of the migration asset.
tenancyId This property is required. string
Tenancy identifier
timeCreated This property is required. string
The time when the migration asset was created. An RFC3339 formatted datetime string.
timeUpdated This property is required. string
The time when the migration asset was updated. An RFC3339 formatted datetime string.
type This property is required. string
The type of asset referenced for inventory.
availability_domain This property is required. str
Availability domain
compartment_id This property is required. str
Compartment Identifier
depended_on_bies This property is required. Sequence[str]
List of migration assets that depend on the asset.
display_name This property is required. str
A filter to return only resources that match the entire given display name.
id This property is required. str
Asset ID generated by mirgration service. It is used in the mirgration service pipeline.
inventory_asset_id This property is required. str
lifecycle_details This property is required. 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_depends_ons This property is required. Sequence[str]
migration_id This property is required. str
Unique migration identifier
notifications This property is required. Sequence[str]
List of notifications
parent_snapshot This property is required. str
The parent snapshot of the migration asset to be used by the replication task.
replication_compartment_id This property is required. str
Replication compartment identifier
replication_schedule_id This property is required. str
Replication schedule identifier
snap_shot_bucket_name This property is required. str
Name of snapshot bucket
snapshots This property is required. 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_id This property is required. str
OCID that is referenced to an asset for an inventory.
state This property is required. str
The current state of the migration asset.
tenancy_id This property is required. str
Tenancy identifier
time_created This property is required. str
The time when the migration asset was created. An RFC3339 formatted datetime string.
time_updated This property is required. str
The time when the migration asset was updated. An RFC3339 formatted datetime string.
type This property is required. str
The type of asset referenced for inventory.
availabilityDomain This property is required. String
Availability domain
compartmentId This property is required. String
Compartment Identifier
dependedOnBies This property is required. List<String>
List of migration assets that depend on the asset.
displayName This property is required. String
A filter to return only resources that match the entire given display name.
id This property is required. String
Asset ID generated by mirgration service. It is used in the mirgration service pipeline.
inventoryAssetId This property is required. String
lifecycleDetails This property is required. 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.
migrationAssetDependsOns This property is required. List<String>
migrationId This property is required. String
Unique migration identifier
notifications This property is required. List<String>
List of notifications
parentSnapshot This property is required. String
The parent snapshot of the migration asset to be used by the replication task.
replicationCompartmentId This property is required. String
Replication compartment identifier
replicationScheduleId This property is required. String
Replication schedule identifier
snapShotBucketName This property is required. String
Name of snapshot bucket
snapshots This property is required. Map<String>
Key-value pair representing disks ID mapped to the OCIDs of replicated or hydration server volume snapshots. Example: {"bar-key": "value"}
sourceAssetId This property is required. String
OCID that is referenced to an asset for an inventory.
state This property is required. String
The current state of the migration asset.
tenancyId This property is required. String
Tenancy identifier
timeCreated This property is required. String
The time when the migration asset was created. An RFC3339 formatted datetime string.
timeUpdated This property is required. String
The time when the migration asset was updated. An RFC3339 formatted datetime string.
type This property is required. 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 oci Terraform Provider.
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi