public void authorizeSecurityGroupRule(SecurityGroupRuleOperateRequest request) {
        checkNotNull(request, "request should not be null.");
        checkStringNotEmpty(request.getSecurityGroupId(), "securityGroupId should not be empty.");
        if (Strings.isNullOrEmpty(request.getClientToken())) {
            request.setClientToken(this.generateClientToken());
        }
        if (null == request.getRule()) {
            throw new IllegalArgumentException("request rule should not be null");
        }
        InternalRequest internalRequest = this.createRequest(request, HttpMethodName.PUT, SECURITYGROUP_PREFIX,
                request.getSecurityGroupId());
        internalRequest.addParameter("authorizeRule", null);
        internalRequest.addParameter("clientToken", request.getClientToken());
        fillPayload(internalRequest, request);
        invokeHttpClient(internalRequest, AbstractBceResponse.class);
    }
public void authorizeSecurityGroupRule ( SecurityGroupRuleOperateRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getSecurityGroupId ( ) , "securityGroupId should not be empty." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( this . generateClientToken ( ) ) ; } if ( null == request . getRule ( ) ) { throw new IllegalArgumentException ( "request rule should not be null" ) ; } InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . PUT , SECURITYGROUP_PREFIX , request . getSecurityGroupId ( ) ) ; internalRequest . addParameter ( "authorizeRule" , null ) ; internalRequest . addParameter ( "clientToken" , request . getClientToken ( ) ) ; fillPayload ( internalRequest , request ) ; invokeHttpClient ( internalRequest , AbstractBceResponse . class ) ; }
authorizing a security group rule to a specified security group
@param request The request containing all options for authorizing security group rule