aliyun / aliyun/openapi-sdk-php

DTS API does not follow the shared region setting defined in DefaultClient

Open
#200 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
530
Forks
110
PR merge metrics
No merged PRs in 30d

Description

  • PHP 版本: 7.4 (via Homebrew)
  • 平台:MacOS
  • 产品名称:Dts
  • 产品版本:1.8.1074
  • APIDts::v20200101()->describeDtsJobs

Received error as following:

↘ Caused by [AlibabaCloud\Client\Exception\ServerException#400] MissingRegion: Region is mandatory for this action. RequestId: B830AAD3-3191-5EF2-A6B3-C44931386BF2 POST "http://dts.aliyuncs.com" 400

Pure Code:

AlibabaCloud::accessKeyClient($getAccessKeyId, $getAccessKeySecret)
                ->regionId($regionId)
                ->asDefaultClient();
// error in next request call!
$response = Dts::v20200101()->describeDtsJobs([])
                ->withJobType('SYNC')
                ->withPageNumber(1)
                ->withPageSize(30)
                ->request();

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the AlibabaCloud::accessKeyClient()->regionId()->asDefaultClient() setup and the Dts::v20200101()->describeDtsJobs() request shown in the report. Trace whether the shared region reaches this API call; done means the request uses the configured region without raising MissingRegion.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.