开发安全组控制的时候调用ecs安全组的sdk,根据openAPI生成的实例代码进行运行测试,一直报错,默认的代码报错信息:
AH01071: Got error 'PHP message: PHP Fatal error: Cannot access protected property CommonRpcAcsRequest::$queryParameters in
$iClientProfile = DefaultProfile::getProfile("cn-qingdao", $accessKeyId, $accessSecret);
$client = new DefaultAcsClient($iClientProfile);
class CommonRpcAcsRequest extends \RpcAcsRequest{
function __construct() {
parent::__construct("Ecs", "2014-05-26", "AuthorizeSecurityGroup");
$this->setMethod("POST");
}
}
$request = new CommonRpcAcsRequest();
$request->setRegionId("cn-qingdao");
$request->queryParameters["SecurityGroupId"] = "xx";
//$request->setSecurityGroupId("xx");
//$request->queryParameters["IpProtocol"] = "tcp";
$request->setIpProtocol('tcp');
//$request->queryParameters["PortRange"] = "80/80";
$request->setPortRange("80/80");
//$request->queryParameters["SourceCidrIp"] = "0.0.0.0/0";
$request->setSourceCidrIp("0.0.0.0/0");
//$request->queryParameters["Priority"] = "100";
$request->setPriority("100");
//$request->queryParameters["Description"] = "http";
$request->setDescription("http");
各位能不能给些解答,谢谢!