Download the PHP package qcloud_sts/qcloud-sts-sdk without Composer

On this page you can find all versions of the php package qcloud_sts/qcloud-sts-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package qcloud-sts-sdk

获取 SDK

查看示例

请查看 demo 示例,里面描述了如何调用SDK。

接口说明

getTempKeys

获取临时密钥接口

参数说明

字段 类型 描述
secretId string 云 API 密钥 Id
secretKey string 云 API 密钥 key
durationSeconds long 要申请的临时密钥最长有效时间,单位秒,默认 1800,最大可设置 7200
bucket string 存储桶名称:bucketName-appid, 如 test-125000000
region string 存储桶所属地域,如 ap-guangzhou
allowPrefix string 资源的前缀,如授予操作所有资源,则为*;如授予操作某个路径a下的所有资源,则为 a/*,如授予只能操作特定的文件a/test.jpg, 则为a/test.jpg
allowActions array 授予 COS API 权限集合, 如简单上传操作:name/cos:PutObject
allowCiSource boolean 是否使用万象资源 true: 是,不传或false则无法使用万象资源
policy array 策略:由 allowActions、bucket、region、allowPrefix字段组成的描述授权的具体信息

返回值说明

字段 类型 描述
credentials string 临时密钥信息
tmpSecretId string 临时密钥 Id,可用于计算签名
tmpSecretKey string 临时密钥 Key,可用于计算签名
sessionToken string 请求时需要用的 token 字符串,最终请求 COS API 时,需要放在 Header 的 x-cos-security-token 字段
startTime string 密钥的起始时间,是 UNIX 时间戳
expiredTime string 密钥的失效时间,是 UNIX 时间戳

返回数据示例

getRoleCredential

申请扮演角色

参数说明

字段 类型 描述 必选
roleArn string 角色的资源描述,可在 访问管理 点击角色名获取。
secretId string 云 API 密钥 Id
secretKey string 云 API 密钥 key
endpoint string 接入点,内网填写"internal.tencentcloudapi.com",外网填写"tencentcloudapi.com"
durationSeconds long 要申请的临时密钥最长有效时间,单位秒,默认 1800,最大可设置 7200
bucket string 存储桶名称:bucketName-appid, 如 test-125000000
region string 存储桶所属地域,如 ap-guangzhou
allowPrefix string 资源的前缀,如授予操作所有资源,则为*;如授予操作某个路径a下的所有资源,则为 a/*,如授予只能操作特定的文件a/test.jpg, 则为a/test.jpg
allowActions array 授予 COS API 权限集合, 如简单上传操作:name/cos:PutObject
policy array 策略:由 allowActions、bucket、region、allowPrefix字段组成的描述授权的具体信息
externalId string 角色外部ID

返回值说明

字段 类型 描述
credentials string 临时密钥信息
tmpSecretId string 临时密钥 Id,可用于计算签名
tmpSecretKey string 临时密钥 Key,可用于计算签名
sessionToken string 请求时需要用的 token 字符串,最终请求 COS API 时,需要放在 Header 的 x-cos-security-token 字段
startTime string 密钥的起始时间,是 UNIX 时间戳
expiredTime string 密钥的失效时间,是 UNIX 时间戳

返回数据示例


All versions of qcloud-sts-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package qcloud_sts/qcloud-sts-sdk contains the following files

Loading the files please wait ....