code: public CreateSecurityGroupResponse createSecurityGroup(CreateSecurityGroupRequest request) {
          checkNotNull(request, "request should not be null.");
          if (Strings.isNullOrEmpty(request.getClientToken())) {
              request.setClientToken(this.generateClientToken());
          }
          checkStringNotEmpty(request.getName(), "request name should not be empty.");
          if (null == request.getRules() || request.getRules().isEmpty()) {
              throw new IllegalArgumentException("request rules should not be empty");
          }
          InternalRequest internalRequest = this.createRequest(request, HttpMethodName.POST, SECURITYGROUP_PREFIX);
          internalRequest.addParameter("clientToken", request.getClientToken());
          fillPayload(internalRequest, request);
          return invokeHttpClient(internalRequest, CreateSecurityGroupResponse.class);
      }
docs: Creating a newly SecurityGroup with specified rules.
  
  @param request The request containing all options for creating a new SecurityGroup.
  @return The response with the id of SecurityGroup that was created newly.