/// <summary>
        /// Starts the instances that are identified by the given bootstrap id.
        /// </summary>
        /// <param name="ec2"></param>
        /// <param name="bootstrapId">Unique, case-sensitive identifier you provide to identify the instances to start.
        /// In AWS this is refered to as the Client Token.</param>
        /// <returns></returns>
        public static Result StartInstances(this IOfferAwsEc2Operations ec2, string bootstrapId)
        {
            var ec2Builder = ec2 as AwsEc2OperationsBuilder;

            var options           = new AwsStartOptionsValues(bootstrapId);
            var awsStartOperation = new AwsStartOperation(options);

            OperationExecutor.Execute((LocalBuilder)ec2, awsStartOperation);

            return(ec2Builder.Result);
        }
Exemple #2
0
        public Ec2Starter(AwsStartOptionsValues options, ConDepSettings settings)
        {
            _options  = options;
            _settings = settings;
            var config = new AmazonEC2Config {
                RegionEndpoint = _options.RegionEndpoint
            };

            _client          = new AmazonEC2Client(_options.Credentials, config);
            _instanceHandler = new Ec2InstanceHandler(_client);
            _passwordHandler = new Ec2InstancePasswordHandler(_client);
        }
Exemple #3
0
 public AwsStartOperation(AwsStartOptionsValues options) : base(options)
 {
     this._options = options;
 }