Blame view

vendor/alibabacloud/client/src/Credentials/Requests/GenerateSessionAccessKey.php 1.08 KB
310f6425   曹明   1.完善短信提示“提取码”功能。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php

namespace AlibabaCloud\Client\Credentials\Requests;

use AlibabaCloud\Client\Credentials\Providers\Provider;
use AlibabaCloud\Client\Exception\ClientException;
use AlibabaCloud\Client\Request\RpcRequest;

/**
 * Use the RSA key pair to complete the authentication (supported only on Japanese site)
 *
 * @package   AlibabaCloud\Client\Credentials\Requests
 */
class GenerateSessionAccessKey extends RpcRequest
{

    /**
     * GenerateSessionAccessKey constructor.
     *
     * @param string $publicKeyId
     *
     * @throws ClientException
     */
    public function __construct($publicKeyId)
    {
        parent::__construct();
        $this->product('Sts');
        $this->version('2015-04-01');
        $this->action('GenerateSessionAccessKey');
        $this->host('sts.ap-northeast-1.aliyuncs.com');
        $this->scheme('https');
        $this->regionId('cn-hangzhou');
        $this->options['verify']                   = false;
        $this->options['query']['PublicKeyId']     = $publicKeyId;
        $this->options['query']['DurationSeconds'] = Provider::DURATION_SECONDS;
    }
}