/** * <p> * If you set this parameter to <code>true</code>, you can't terminate the instance using the Amazon EC2 console, * CLI, or API; otherwise, you can. To change this attribute to <code>false</code> after launch, use * <a>ModifyInstanceAttribute</a>. Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> to * <code>terminate</code>, you can terminate the instance by running the shutdown command from the instance. * </p> * <p> * Default: <code>false</code> * </p> * * @param disableApiTermination * If you set this parameter to <code>true</code>, you can't terminate the instance using the Amazon EC2 * console, CLI, or API; otherwise, you can. To change this attribute to <code>false</code> after launch, use * <a>ModifyInstanceAttribute</a>. Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> * to <code>terminate</code>, you can terminate the instance by running the shutdown command from the * instance.</p> * <p> * Default: <code>false</code> * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withDisableApiTermination(Boolean disableApiTermination) { setDisableApiTermination(disableApiTermination); return this; }
/** * <p> * If you set this parameter to <code>true</code>, you can't terminate the instance using the Amazon EC2 console, * CLI, or API; otherwise, you can. To change this attribute to <code>false</code> after launch, use * <a>ModifyInstanceAttribute</a>. Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> to * <code>terminate</code>, you can terminate the instance by running the shutdown command from the instance. * </p> * <p> * Default: <code>false</code> * </p> * * @param disableApiTermination * If you set this parameter to <code>true</code>, you can't terminate the instance using the Amazon EC2 * console, CLI, or API; otherwise, you can. To change this attribute to <code>false</code> after launch, use * <a>ModifyInstanceAttribute</a>. Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> * to <code>terminate</code>, you can terminate the instance by running the shutdown command from the * instance.</p> * <p> * Default: <code>false</code> * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withDisableApiTermination(Boolean disableApiTermination) { setDisableApiTermination(disableApiTermination); return this; }
rir.setSecurityGroups(getNames(context.getSecurityGroups())); rir.setInstanceType(context.getType()); rir.setDisableApiTermination(context.isPreventTermination()); rir.setEbsOptimized(context.isEbsOptimized()); rir.setMonitoring(context.isEnableMonitoring());