code: public void bindInstanceToSecurityGroup(String instanceId, String securityGroupId) {
          this.bindInstanceToSecurityGroup(new BindSecurityGroupRequest()
                  .withInstanceId(instanceId).withSecurityGroupId(securityGroupId));
      }
docs: Binding the instance to specified securitygroup.
  
  @param instanceId The id of the instance.
  @param securityGroupId The id of the securitygroup.