createNetworkMigrationDefinition method

Future<NetworkMigrationDefinition> createNetworkMigrationDefinition({
  1. required String name,
  2. required TargetNetwork targetNetwork,
  3. required TargetS3Configuration targetS3Configuration,
  4. String? description,
  5. Map<String, String>? scopeTags,
  6. List<SourceConfiguration>? sourceConfigurations,
  7. Map<String, String>? tags,
  8. TargetDeployment? targetDeployment,
})

Creates a new network migration definition that specifies the source and target network configuration for a migration.

May throw ServiceQuotaExceededException. May throw ValidationException.

Parameter name : The name of the network migration definition.

Parameter targetNetwork : The target network configuration including topology and CIDR ranges.

Parameter targetS3Configuration : The S3 configuration for storing the target network artifacts.

Parameter description : A description of the network migration definition.

Parameter scopeTags : Scope tags for the network migration definition to control access and organization.

Parameter sourceConfigurations : A list of source configurations for the network migration.

Parameter tags : Tags to assign to the network migration definition.

Parameter targetDeployment : The target deployment configuration for the migrated network.

Implementation

Future<NetworkMigrationDefinition> createNetworkMigrationDefinition({
  required String name,
  required TargetNetwork targetNetwork,
  required TargetS3Configuration targetS3Configuration,
  String? description,
  Map<String, String>? scopeTags,
  List<SourceConfiguration>? sourceConfigurations,
  Map<String, String>? tags,
  TargetDeployment? targetDeployment,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    'targetNetwork': targetNetwork,
    'targetS3Configuration': targetS3Configuration,
    if (description != null) 'description': description,
    if (scopeTags != null) 'scopeTags': scopeTags,
    if (sourceConfigurations != null)
      'sourceConfigurations': sourceConfigurations,
    if (tags != null) 'tags': tags,
    if (targetDeployment != null) 'targetDeployment': targetDeployment.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/network-migration/CreateNetworkMigrationDefinition',
    exceptionFnMap: _exceptionFns,
  );
  return NetworkMigrationDefinition.fromJson(response);
}