简体   繁体   中英

Attach to a domain when running EC2 instance

I try to attach a new instance with my Domain with the .Net AWS SDK like we can do with the Web interface.

Today I use this code:

       var launchRequest = new RunInstancesRequest()
            {
                ImageId = amiID,
                InstanceType = InstanceType.G4dn2xlarge,
                MinCount = 1,
                MaxCount = 1,
                KeyName = keyPairName,
                SecurityGroupIds = groups,
                
                IamInstanceProfile = instanceProfile,
                
            };

            var launchResponse = ec2Client.RunInstancesAsync(launchRequest).Result;

But I don't find any fields about domain into RunInstancesRequest class.

Do you have any idea to join domain when we create instance with .net SDK?

I'm assuming you are referring to a DNS domain. DNS domains are managed by Route53 . So if you are using the .NET SDK you have to use the Route53 client.

An example is described in the docs .

my question concerns the use of this field progammaticly with the SDK

带接口的域加入

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM