Setting the description and IPv6 using authorize-security-group-ingress of aws SDK

这一生的挚爱 提交于 2020-01-25 06:47:12

问题


I am using AWS SDK v1 ( old product needs that) to add a rule for a security group. My issue is if add description and IPv6 fields I got the response of:

The parameter Description is not recognized

And

The parameter Ipv6Ranges is not recognized

This is the documentation I followed to construct the request. My code:

$ec2 = new AmazonEC2();
$response = $ec2->authorize_security_group_ingress([
    'GroupId' => $secGrpID,
    'IpPermissions' => [
        [
            'FromPort' => $portNum,
            'IpProtocol' => $protocol,
            'IpRanges' => [
                [
                    'CidrIp' => '124.25.16.14/13',
                    'Description' => 'Description V4',
                ],
            ],
            'Ipv6Ranges' => [
                [
                    'CidrIpv6' => '2001:cdba:0000:0000:0000:0000:3257:9652/128',
                    'Description' => 'Description V6',
                ],
            ],
            'ToPort' => $portNum
        ]
    ]
]
);

echo "<pre>";
print_r( $response );
echo "</pre>";

So where I am doing wrong in the request constructed?

来源:https://stackoverflow.com/questions/58728964/setting-the-description-and-ipv6-using-authorize-security-group-ingress-of-aws-s

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!