oci.CloudMigrations.Migration
Explore with Pulumi AI
This resource provides the Migration resource in Oracle Cloud Infrastructure Cloud Migrations service.
Creates a migration.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testMigration = new oci.cloudmigrations.Migration("test_migration", {
compartmentId: compartmentId,
displayName: migrationDisplayName,
definedTags: {
"foo-namespace.bar-key": "value",
},
freeformTags: {
"bar-key": "value",
},
isCompleted: migrationIsCompleted,
replicationScheduleId: testReplicationSchedule.id,
});
import pulumi
import pulumi_oci as oci
test_migration = oci.cloud_migrations.Migration("test_migration",
compartment_id=compartment_id,
display_name=migration_display_name,
defined_tags={
"foo-namespace.bar-key": "value",
},
freeform_tags={
"bar-key": "value",
},
is_completed=migration_is_completed,
replication_schedule_id=test_replication_schedule["id"])
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.NewMigration(ctx, "test_migration", &CloudMigrations.MigrationArgs{
CompartmentId: pulumi.Any(compartmentId),
DisplayName: pulumi.Any(migrationDisplayName),
DefinedTags: pulumi.StringMap{
"foo-namespace.bar-key": pulumi.String("value"),
},
FreeformTags: pulumi.StringMap{
"bar-key": pulumi.String("value"),
},
IsCompleted: pulumi.Any(migrationIsCompleted),
ReplicationScheduleId: pulumi.Any(testReplicationSchedule.Id),
})
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 testMigration = new Oci.CloudMigrations.Migration("test_migration", new()
{
CompartmentId = compartmentId,
DisplayName = migrationDisplayName,
DefinedTags =
{
{ "foo-namespace.bar-key", "value" },
},
FreeformTags =
{
{ "bar-key", "value" },
},
IsCompleted = migrationIsCompleted,
ReplicationScheduleId = testReplicationSchedule.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.CloudMigrations.Migration;
import com.pulumi.oci.CloudMigrations.MigrationArgs;
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) {
var testMigration = new Migration("testMigration", MigrationArgs.builder()
.compartmentId(compartmentId)
.displayName(migrationDisplayName)
.definedTags(Map.of("foo-namespace.bar-key", "value"))
.freeformTags(Map.of("bar-key", "value"))
.isCompleted(migrationIsCompleted)
.replicationScheduleId(testReplicationSchedule.id())
.build());
}
}
resources:
testMigration:
type: oci:CloudMigrations:Migration
name: test_migration
properties:
compartmentId: ${compartmentId}
displayName: ${migrationDisplayName}
definedTags:
foo-namespace.bar-key: value
freeformTags:
bar-key: value
isCompleted: ${migrationIsCompleted}
replicationScheduleId: ${testReplicationSchedule.id}
Create Migration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Migration(name: string, args: MigrationArgs, opts?: CustomResourceOptions);
@overload
def Migration(resource_name: str,
args: MigrationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Migration(resource_name: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
is_completed: Optional[bool] = None,
replication_schedule_id: Optional[str] = None)
func NewMigration(ctx *Context, name string, args MigrationArgs, opts ...ResourceOption) (*Migration, error)
public Migration(string name, MigrationArgs args, CustomResourceOptions? opts = null)
public Migration(String name, MigrationArgs args)
public Migration(String name, MigrationArgs args, CustomResourceOptions options)
type: oci:CloudMigrations:Migration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args MigrationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args MigrationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args MigrationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MigrationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MigrationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var migrationResource = new Oci.CloudMigrations.Migration("migrationResource", new()
{
CompartmentId = "string",
DisplayName = "string",
DefinedTags =
{
{ "string", "string" },
},
FreeformTags =
{
{ "string", "string" },
},
IsCompleted = false,
ReplicationScheduleId = "string",
});
example, err := CloudMigrations.NewMigration(ctx, "migrationResource", &CloudMigrations.MigrationArgs{
CompartmentId: pulumi.String("string"),
DisplayName: pulumi.String("string"),
DefinedTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
FreeformTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
IsCompleted: pulumi.Bool(false),
ReplicationScheduleId: pulumi.String("string"),
})
var migrationResource = new Migration("migrationResource", MigrationArgs.builder()
.compartmentId("string")
.displayName("string")
.definedTags(Map.of("string", "string"))
.freeformTags(Map.of("string", "string"))
.isCompleted(false)
.replicationScheduleId("string")
.build());
migration_resource = oci.cloud_migrations.Migration("migrationResource",
compartment_id="string",
display_name="string",
defined_tags={
"string": "string",
},
freeform_tags={
"string": "string",
},
is_completed=False,
replication_schedule_id="string")
const migrationResource = new oci.cloudmigrations.Migration("migrationResource", {
compartmentId: "string",
displayName: "string",
definedTags: {
string: "string",
},
freeformTags: {
string: "string",
},
isCompleted: false,
replicationScheduleId: "string",
});
type: oci:CloudMigrations:Migration
properties:
compartmentId: string
definedTags:
string: string
displayName: string
freeformTags:
string: string
isCompleted: false
replicationScheduleId: string
Migration Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Migration resource accepts the following input properties:
- Compartment
Id string - (Updatable) Compartment identifier
- Display
Name string - (Updatable) Migration identifier
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Dictionary<string, string>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. It exists only for cross-compatibility. Example:
{"bar-key": "value"}
- Is
Completed bool - (Updatable) Indicates whether migration is marked as complete.
- Replication
Schedule stringId (Updatable) Replication schedule identifier
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Compartment
Id string - (Updatable) Compartment identifier
- Display
Name string - (Updatable) Migration identifier
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- map[string]string
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. It exists only for cross-compatibility. Example:
{"bar-key": "value"}
- Is
Completed bool - (Updatable) Indicates whether migration is marked as complete.
- Replication
Schedule stringId (Updatable) Replication schedule identifier
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id String - (Updatable) Compartment identifier
- display
Name String - (Updatable) Migration identifier
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Map<String,String>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. It exists only for cross-compatibility. Example:
{"bar-key": "value"}
- is
Completed Boolean - (Updatable) Indicates whether migration is marked as complete.
- replication
Schedule StringId (Updatable) Replication schedule identifier
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id string - (Updatable) Compartment identifier
- display
Name string - (Updatable) Migration identifier
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- {[key: string]: string}
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. It exists only for cross-compatibility. Example:
{"bar-key": "value"}
- is
Completed boolean - (Updatable) Indicates whether migration is marked as complete.
- replication
Schedule stringId (Updatable) Replication schedule identifier
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment_
id str - (Updatable) Compartment identifier
- display_
name str - (Updatable) Migration identifier
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Mapping[str, str]
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. It exists only for cross-compatibility. Example:
{"bar-key": "value"}
- is_
completed bool - (Updatable) Indicates whether migration is marked as complete.
- replication_
schedule_ strid (Updatable) Replication schedule identifier
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id String - (Updatable) Compartment identifier
- display
Name String - (Updatable) Migration identifier
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Map<String>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. It exists only for cross-compatibility. Example:
{"bar-key": "value"}
- is
Completed Boolean - (Updatable) Indicates whether migration is marked as complete.
- replication
Schedule StringId (Updatable) Replication schedule identifier
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Outputs
All input properties are implicitly available as output properties. Additionally, the Migration resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Details 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.
- State string
- The current state of migration.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The time when the migration project was created. An RFC3339 formatted datetime string
- Time
Updated string - The time when the migration project was updated. An RFC3339 formatted datetime string
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Details 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.
- State string
- The current state of migration.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The time when the migration project was created. An RFC3339 formatted datetime string
- Time
Updated string - The time when the migration project was updated. An RFC3339 formatted datetime string
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details 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.
- state String
- The current state of migration.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The time when the migration project was created. An RFC3339 formatted datetime string
- time
Updated String - The time when the migration project was updated. An RFC3339 formatted datetime string
- id string
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details 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.
- state string
- The current state of migration.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created string - The time when the migration project was created. An RFC3339 formatted datetime string
- time
Updated string - The time when the migration project was updated. An RFC3339 formatted datetime string
- id str
- The provider-assigned unique ID for this managed resource.
- 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.
- state str
- The current state of migration.
- Mapping[str, str]
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time_
created str - The time when the migration project was created. An RFC3339 formatted datetime string
- time_
updated str - The time when the migration project was updated. An RFC3339 formatted datetime string
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details 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.
- state String
- The current state of migration.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The time when the migration project was created. An RFC3339 formatted datetime string
- time
Updated String - The time when the migration project was updated. An RFC3339 formatted datetime string
Look up Existing Migration Resource
Get an existing Migration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: MigrationState, opts?: CustomResourceOptions): Migration
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
display_name: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
is_completed: Optional[bool] = None,
lifecycle_details: Optional[str] = None,
replication_schedule_id: Optional[str] = None,
state: Optional[str] = None,
system_tags: Optional[Mapping[str, str]] = None,
time_created: Optional[str] = None,
time_updated: Optional[str] = None) -> Migration
func GetMigration(ctx *Context, name string, id IDInput, state *MigrationState, opts ...ResourceOption) (*Migration, error)
public static Migration Get(string name, Input<string> id, MigrationState? state, CustomResourceOptions? opts = null)
public static Migration get(String name, Output<String> id, MigrationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Compartment
Id string - (Updatable) Compartment identifier
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Display
Name string - (Updatable) Migration identifier
- Dictionary<string, string>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. It exists only for cross-compatibility. Example:
{"bar-key": "value"}
- Is
Completed bool - (Updatable) Indicates whether migration is marked as complete.
- Lifecycle
Details 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.
- Replication
Schedule stringId (Updatable) Replication schedule identifier
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- State string
- The current state of migration.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The time when the migration project was created. An RFC3339 formatted datetime string
- Time
Updated string - The time when the migration project was updated. An RFC3339 formatted datetime string
- Compartment
Id string - (Updatable) Compartment identifier
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Display
Name string - (Updatable) Migration identifier
- map[string]string
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. It exists only for cross-compatibility. Example:
{"bar-key": "value"}
- Is
Completed bool - (Updatable) Indicates whether migration is marked as complete.
- Lifecycle
Details 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.
- Replication
Schedule stringId (Updatable) Replication schedule identifier
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- State string
- The current state of migration.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The time when the migration project was created. An RFC3339 formatted datetime string
- Time
Updated string - The time when the migration project was updated. An RFC3339 formatted datetime string
- compartment
Id String - (Updatable) Compartment identifier
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display
Name String - (Updatable) Migration identifier
- Map<String,String>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. It exists only for cross-compatibility. Example:
{"bar-key": "value"}
- is
Completed Boolean - (Updatable) Indicates whether migration is marked as complete.
- lifecycle
Details 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.
- replication
Schedule StringId (Updatable) Replication schedule identifier
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- state String
- The current state of migration.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The time when the migration project was created. An RFC3339 formatted datetime string
- time
Updated String - The time when the migration project was updated. An RFC3339 formatted datetime string
- compartment
Id string - (Updatable) Compartment identifier
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display
Name string - (Updatable) Migration identifier
- {[key: string]: string}
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. It exists only for cross-compatibility. Example:
{"bar-key": "value"}
- is
Completed boolean - (Updatable) Indicates whether migration is marked as complete.
- lifecycle
Details 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.
- replication
Schedule stringId (Updatable) Replication schedule identifier
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- state string
- The current state of migration.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created string - The time when the migration project was created. An RFC3339 formatted datetime string
- time
Updated string - The time when the migration project was updated. An RFC3339 formatted datetime string
- compartment_
id str - (Updatable) Compartment identifier
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display_
name str - (Updatable) Migration identifier
- Mapping[str, str]
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. It exists only for cross-compatibility. Example:
{"bar-key": "value"}
- is_
completed bool - (Updatable) Indicates whether migration is marked as complete.
- 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.
- replication_
schedule_ strid (Updatable) Replication schedule identifier
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- state str
- The current state of migration.
- Mapping[str, str]
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time_
created str - The time when the migration project was created. An RFC3339 formatted datetime string
- time_
updated str - The time when the migration project was updated. An RFC3339 formatted datetime string
- compartment
Id String - (Updatable) Compartment identifier
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display
Name String - (Updatable) Migration identifier
- Map<String>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. It exists only for cross-compatibility. Example:
{"bar-key": "value"}
- is
Completed Boolean - (Updatable) Indicates whether migration is marked as complete.
- lifecycle
Details 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.
- replication
Schedule StringId (Updatable) Replication schedule identifier
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- state String
- The current state of migration.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The time when the migration project was created. An RFC3339 formatted datetime string
- time
Updated String - The time when the migration project was updated. An RFC3339 formatted datetime string
Import
Migrations can be imported using the id
, e.g.
$ pulumi import oci:CloudMigrations/migration:Migration test_migration "id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.