注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > 聚石塔

聚石塔OpenApi使用说明

更新时间:2022/10/11 访问次数:1582
  • 只支持SDK调试,不支持OpenApi Explorer上页面调试
  • 与阿里云容器服务的API不是一回事

 

DefaultProfile.addEndpoint("cn-hangzhou", "retailcloud", "retailcloud.aliyuncs.com")

注意这里是api的region,和聚石塔应用或者云产品的地域不一样,这里一定要设置cn-hangzhou

 

SDK:

Python

https://pypi.org/project/alibabacloud-retailcloud20180313/

python源码地址:https://github.com/aliyun/alibabacloud-python-sdk/tree/master/retailcloud-20180313

 

Java

<!-- https://s01.oss.sonatype.org/?spm=openapi-amp.sdkpublish.0.0.3c39281fDcklC8#nexus-search;quick~alibabacloud-retailcloud20180313 -->
<dependency>
  <groupId>com.aliyun</groupId>
  <artifactId>alibabacloud-retailcloud20180313</artifactId>
  <version>${retialcloud.latest.version}</version>
</dependency>

 

以JAVA SDK为例,在maven仓库中看sdk的最新版本:

https://s01.oss.sonatype.org/?spm=openapi-amp.sdkpublish.0.0.3c39281fDcklC8#nexus-search;quick~alibabacloud-retailcloud20180313

 

附件:API文档

20220615 更新内容(SDK version:2.0.22)

  • RestartAppInstance(应用实例重启,仅支持轻容器应用)
  • UpdateNormalDeployConfig(更新非Yaml的部署配置,目前仅支持CPU内存配置)

文档下载地址

 

20220509 更新内容(SDK version: 2.0.21)

  • OfflineAppEnvironment(下线应用环境)

文档下载地址

 

 

聚石塔ak sk获取

随便找一个应用-查看-设置

 

Java SDK示例

设置Maven依赖

<dependency>
      <groupId>com.aliyun</groupId>
      <artifactId>aliyun-java-sdk-core</artifactId>
      <version>4.5.0</version>
</dependency>

<dependency>
  <groupId>com.aliyun</groupId>
  <artifactId>alibabacloud-retailcloud20180313</artifactId>
  <version>2.0.22</version>
</dependency>

 

代码示例

//设置client
DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", ak, sk);
DefaultProfile.addEndpoint("cn-hangzhou", "retailcloud", "retailcloud.aliyuncs.com");
IAcsClient client = new DefaultAcsClient(profile);

//构造请求,这里以查询集群详情为例
DescribeClusterDetailRequest describeClusterDetailRequest = new DescribeClusterDetailRequest();
describeClusterDetailRequest.setClusterInstanceId("xxxxxxxx");

//发起调用
DescribeClusterDetailResponse describeClusterDetailResponse = client.getAcsResponse(describeClusterDetailRequest);

 

Python SDK示例

安装SDK核心库依赖

如果您使用Python 2.x,执行以下命令
pip install aliyun-python-sdk-cs

如果您使用Python 3.x,执行以下命令
pip install aliyun-python-sdk-core-v3

 

安装聚石塔零售云库依赖

# Python 2
pip install alibabacloud_retailcloud20180313_py2

# python 3
pip install alibabacloud-retailcloud20180313

 

代码示例:

参考官方sdk使用示例:https://github.com/aliyun/alibabacloud-python-sdk/blob/master/docs/0-Usage-EN.md#quick-examples

 

Go SDK示例

代码地址:https://github.com/alibabacloud-go/retailcloud-20180313/blob/master/README-CN.md

 

安装Go SDK

使用govendor
执行以下命令,安装阿里云Go SDK:
go get github.com/alibabacloud-go/retailcloud-20180313/v2

 

代码示例:

参观官方文档:https://github.com/aliyun/alibabacloud-go-sdk/blob/master/docs/Usage-CN.md#%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B

FAQ

关于此文档暂时还没有FAQ
返回
顶部