AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Starts a code generation job to convert network migration mappings into infrastructure-as-code templates.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to StartNetworkMigrationCodeGenerationAsync.

Namespace: Amazon.Mgn
Assembly: AWSSDK.Mgn.dll
Version: 3.x.y.z

Syntax

C#
public virtual StartNetworkMigrationCodeGenerationResponse StartNetworkMigrationCodeGeneration(
         StartNetworkMigrationCodeGenerationRequest request
)

Parameters

request
Type: Amazon.Mgn.Model.StartNetworkMigrationCodeGenerationRequest

Container for the necessary parameters to execute the StartNetworkMigrationCodeGeneration service method.

Return Value


The response from the StartNetworkMigrationCodeGeneration service method, as returned by Mgn.

Exceptions

ExceptionCondition
AccessDeniedException Operating denied due to a file permission or access check error.
ConflictException The request could not be completed due to a conflict with the current state of the target resource.
ResourceNotFoundException Resource not found exception.
ServiceQuotaExceededException The request could not be completed because its exceeded the service quota.
ThrottlingException Reached throttling quota exception.
ValidationException Validate exception.

Examples

Sample StartNetworkMigrationCodeGeneration call


var client = new AmazonMgnClient();
var response = client.CreateNetworkMigrationDefinition(new CreateNetworkMigrationDefinitionRequest 
{
    Name = "network1",
    Description = "network 1 description",
    SourceConfigurations = new List<SourceConfiguration> {
        new SourceConfiguration {
            SourceEnvironment = "NSX",
            SourceS3Configuration = new SourceS3Configuration {
                S3Bucket = "source_bucket",
                S3BucketOwner = "012345678901",
                S3Key = "source_key"
            }
        }
    },
    TargetDeployment = "SINGLE_ACCOUNT",
    TargetNetwork = new TargetNetwork {
        InboundCidr = "192.168.1.0/24",
        Topology = "ISOLATED_VPC"
    },
    TargetS3Configuration = new TargetS3Configuration {
        S3Bucket = "target_bucket",
        S3BucketOwner = "012345678901"
    }
});

string name = response.Name;
DateTime createdAt = response.CreatedAt;
string description = response.Description;
string networkMigrationDefinitionID = response.NetworkMigrationDefinitionID;
List<SourceConfiguration> sourceConfigurations = response.SourceConfigurations;
Dictionary<string, string> tags = response.Tags;
TargetNetwork targetNetwork = response.TargetNetwork;
TargetS3Configuration targets3Configuration = response.TargetS3Configuration;
DateTime updatedAt = response.UpdatedAt;

            

Version Information

.NET Framework:
Supported in: 4.7.2 and newer

See Also