"InvalidParameterValue" for an api request with CreateSecurityGroupRule
I want to create a security rule in a security group:
osc-cli api CreateSecurityGroupRule --IpProtocol "tcp" --FromPortRange "3387" --ToPortRange "3387" --SecurityGroupId "sg-d1b578ad" --SecurityGroupNameToLink "sg-9831d787" --Flow "Inbound" --SecurityGroupAccountIdToLink "120287286635"
But the value in the field SecurityGroupAccountIdToLink isn't sent to the api as a string:
Generic Http information extracted: method: POST, path: /api/latest/CreateSecurityGroupRule, body: {"IpProtocol": "tcp", "FromPortRange": 3387, "ToPortRange": 3387, "SecurityGroupId": "sg-d1b578ad", "SecurityGroupNameToLink": "sg-9831d787", "Flow": "Inbound", "SecurityGroupAccountIdToLink": 120287286635}, query-string: {"version":"0.17.1","commit":"983a042","name":"Public Gateway","region":"eu-west-2","request_id":"38437024-e5f1-4154-8baf-df2a639f931c"}
So the API reject my request:
Wrong type. 'SecurityGroupAccountIdToLink is 120287286635', must be 'string' type. {"version":"0.17.1","commit":"983a042","name":"Public Gateway","region":"eu-west-2","request_id":"38437024-e5f1-4154-8baf-df2a639f931c"}
And I have an error:
osc_sdk.sdk.OscApiException: Error --> status = 400, code = 4110, Reason = InvalidParameterValue, request_id = 38437024-e5f1-4154-8baf-df2a639f931c