Code Monkey home page Code Monkey logo

Comments (2)

 avatar commented on May 26, 2024

你好,我在阿里云的API可视化调试面板上使用PHP删除密钥对的时候报了一个莫名其妙的错误,我很郁闷,我觉得我的请求参数没有错,他为什么总说我填的keypairnames参数无效呢.

REQUEST:
`

', '') ->regionId('cn-shenzhen') ->asGlobalClient(); try { $result = AlibabaCloud::rpcRequest() ->product('Ecs') // ->scheme('https') // https | http ->version('2014-05-26') ->action('DeleteKeyPairs') ->method('POST') ->options([ 'query' => [ 'RegionId' => 'cn-shenzhen', 'KeyPairNames' => 'aliyunhongkong', 'SourceRegionId' => 'cn-shenzhen', ], ]) ->request(); print_r($result->toArray()); } catch (ClientException $e) { echo $e->getErrorMessage() . PHP_EOL; } catch (ServerException $e) { echo $e->getErrorMessage() . PHP_EOL; } ', '') ->regionId('cn-shenzhen') ->asGlobalClient(); try { $result = AlibabaCloud::rpcRequest() ->product('Ecs') // ->scheme('https') // https | http ->version('2014-05-26') ->action('DeleteKeyPairs') ->method('POST') ->options([ 'query' => [ 'RegionId' => 'cn-shenzhen', 'KeyPairNames' => 'aliyunhongkong', 'SourceRegionId' => 'cn-shenzhen', ], ]) ->request(); print_r($result->toArray()); } catch (ClientException $e) { echo $e->getErrorMessage() . PHP_EOL; } catch (ServerException $e) { echo $e->getErrorMessage() . PHP_EOL; } ``` ` RESPONSE: `{ "RequestId": "B43E020F-FDF8-4BF2-BC94-910105185959", "HostId": "ecs.aliyuncs.com", "Code": "InvalidKeyPairNames.ValueNotSupported", "Message": "The specified parameter \"KeyPairNames\" is not valid." }`

您好,请根据接口文档的描述传入JSON:https://help.aliyun.com/document_detail/51772.html?spm=5176.10695662.1996646101.searchclickresult.590e1ac5zDhJ46

from openapi-sdk-php.

 avatar commented on May 26, 2024

您好,请根据接口文档的描述传入JSON:https://help.aliyun.com/document_detail/51772.html?spm=5176.10695662.1996646101.searchclickresult.590e1ac5zDhJ46

from openapi-sdk-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.