aliyun / aliyun/aliyun-openapi-java-sdk
CreateRepositoryRequest 需要必填InstanceId,公共服务没有这个参数
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
- 产品和接口: 容器服务ACR 公共版 CreateRepositoryRequest
- 平台: win10
- 最小代码:

创建容器镜像仓库接口需要必填InstanceId,公共服务的这个InstanceId参数是哪里看呢?感谢.
代码:
CreateRepositoryRequest createRepoRequest = new CreateRepositoryRequest();
createRepoRequest.setRepoNamespaceName("lan-k8s");
createRepoRequest.setRepoName("prometheus-operator");
createRepoRequest.setSummary("1");
createRepoRequest.setRepoType("PUBLIC");
HttpResponse response2 = client.doAction(createRepoRequest);
// 处理结果
System.out.println(new String(response2.getHttpContent()));
得到:
{"RequestId":"09965506-6DBB-4562-B816-10F4E0F6434A","Message":"InstanceId is mandatory for this action.","Recommend":"https://error-center.aliyun.com/status/search?Keyword=MissingInstanceId&source=PopGw","HostId":"cr.cn-shenzhen.aliyuncs.com","Code":"MissingInstanceId"}
Disconnected from the target VM, address: '127.0.0.1:61841', transport: 'socket'
其他: maven依赖
<!-- https://mvnrepository.com/artifact/com.aliyun/aliyun-java-sdk-cr -->
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-cr</artifactId>
<version>4.1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.aliyun/aliyun-java-sdk-core -->
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>4.5.18</version>
</dependency>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the CreateRepositoryRequest usage and the Maven dependencies shown in the issue, then trace the request sent to the ACR public CreateRepository API. Confirm whether InstanceId is required for public repositories and document or correct the request behavior so the reported MissingInstanceId response is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100