/** * <p> * One or more security group IDs. You can create a security group using <a>CreateSecurityGroup</a>. * </p> * <p> * Default: Amazon EC2 uses the default security group. * </p> * * @param securityGroupIds * One or more security group IDs. You can create a security group using <a>CreateSecurityGroup</a>.</p> * <p> * Default: Amazon EC2 uses the default security group. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withSecurityGroupIds(java.util.Collection<String> securityGroupIds) { setSecurityGroupIds(securityGroupIds); return this; }
/** * <p> * One or more security group IDs. You can create a security group using <a>CreateSecurityGroup</a>. * </p> * <p> * Default: Amazon EC2 uses the default security group. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setSecurityGroupIds(java.util.Collection)} or {@link #withSecurityGroupIds(java.util.Collection)} if you * want to override the existing values. * </p> * * @param securityGroupIds * One or more security group IDs. You can create a security group using <a>CreateSecurityGroup</a>.</p> * <p> * Default: Amazon EC2 uses the default security group. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withSecurityGroupIds(String... securityGroupIds) { if (this.securityGroupIds == null) { setSecurityGroupIds(new com.amazonaws.internal.SdkInternalList<String>(securityGroupIds.length)); } for (String ele : securityGroupIds) { this.securityGroupIds.add(ele); } return this; }
/** * One or more security group IDs. You can create a security group using * <a>CreateSecurityGroup</a>. <p>Default: Amazon EC2 uses the default * security group. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param securityGroupIds One or more security group IDs. You can create a security group using * <a>CreateSecurityGroup</a>. <p>Default: Amazon EC2 uses the default * security group. * * @return A reference to this updated object so that method calls can be chained * together. */ public RunInstancesRequest withSecurityGroupIds(String... securityGroupIds) { if (getSecurityGroupIds() == null) setSecurityGroupIds(new java.util.ArrayList<String>(securityGroupIds.length)); for (String value : securityGroupIds) { getSecurityGroupIds().add(value); } return this; }
/** * <p> * One or more security group IDs. You can create a security group using <a>CreateSecurityGroup</a>. * </p> * <p> * Default: Amazon EC2 uses the default security group. * </p> * * @param securityGroupIds * One or more security group IDs. You can create a security group using <a>CreateSecurityGroup</a>.</p> * <p> * Default: Amazon EC2 uses the default security group. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withSecurityGroupIds(java.util.Collection<String> securityGroupIds) { setSecurityGroupIds(securityGroupIds); return this; }
/** * <p> * One or more security group IDs. You can create a security group using <a>CreateSecurityGroup</a>. * </p> * <p> * Default: Amazon EC2 uses the default security group. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setSecurityGroupIds(java.util.Collection)} or {@link #withSecurityGroupIds(java.util.Collection)} if you * want to override the existing values. * </p> * * @param securityGroupIds * One or more security group IDs. You can create a security group using <a>CreateSecurityGroup</a>.</p> * <p> * Default: Amazon EC2 uses the default security group. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withSecurityGroupIds(String... securityGroupIds) { if (this.securityGroupIds == null) { setSecurityGroupIds(new com.amazonaws.internal.SdkInternalList<String>(securityGroupIds.length)); } for (String ele : securityGroupIds) { this.securityGroupIds.add(ele); } return this; }
securityGroupIdsAryLst.add(splitSecurityGroupdIds[i]); runRequest.setSecurityGroupIds(securityGroupIdsAryLst);
net.setGroups(group_ids); }else{ riRequest.setSecurityGroupIds(group_ids);
net.setGroups(groupIds); } else { riRequest.setSecurityGroupIds(groupIds);