Download the PHP package huaweicloud/huaweicloud-sdk-php without Composer

On this page you can find all versions of the php package huaweicloud/huaweicloud-sdk-php. 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 huaweicloud-sdk-php

English | 简体中文

Huawei Cloud Php Software Development Kit (Php SDK)

The Huawei Cloud Php SDK allows you to easily work with Huawei Cloud services such as Elastic Compute Service (ECS) and Virtual Private Cloud(VPC) without the need to handle API related tasks.

This document introduces how to obtain and use Huawei Cloud Php SDK.

Requirements

Install Php SDK

The recommended way to install SDK is with Composer.

Composer is a dependency management tool for Php which allows you to declare the dependencies your project needs and installs them into your project.

After installing, you need to require Composer's autoloader:

Code example

Online Debugging

API Explorer provides api retrieval and online debugging, supports full fast retrieval, visual debugging, help document viewing, and online consultation.

Changelog

Detailed changes for each released version are documented in the CHANGELOG.md.

User Manual :top:

1. Client Configuration :top:

1.1 Default Configuration :top:

1.2 Network Proxy :top:

1.3 Timeout Configuration :top:

1.4 SSL Certification :top:

2. Credentials Configuration :top:

There are two types of Huawei Cloud services, regional services and global services.

Global services only contain IAM.

For regional services' authentication, project_id is required.

For global services' authentication, domain_id is required.

Parameter description:

2.1 Use Permanent AK&SK :top:

2.2 Use Temporary AK&SK :top:

It's required to obtain temporary AK&SK and security token first, which could be obtained through permanent AK&SK or through an agency.

3. Client Initialization :top:

3.1 Initialize the {Service}Client with specified Endpoint :top:

where:

4. Send Requests and Handle Responses :top:

4.1 Exceptions :top:

Level 1 Notice Level 2 Notice
ConnectionException Connection error HostUnreachableException Host is not reachable
SslHandShakeException SSL certification error
RequestTimeoutException Request timeout CallTimeoutException timeout for single request
RetryOutageException no response after retrying
ServiceResponseException service response error ServerResponseException server inner error, http status code: [500,]
ClientRequestException invalid request, http status code: [400? 500)

5. Use Asynchronous Client :top:

6. Troubleshooting :top:

SDK supports Access log and Debug log which could be configured manually.

6.1 Access Log :top:

SDK supports print access log which could be enabled by manual configuration, the log could be output to the console or specified files.

For example:

where:

After enabled log, the SDK will print the access log by default, every request will be recorded to the console like:

The format of access log is:

6.2 Original HTTP Listener :top:

In some situation, you may need to debug your http requests, original http request and response information will be needed. The SDK provides a listener function to obtain the original encrypted http request and response information.

:warning: Warning: The original http log information is used in debugging stage only, please do not print the original http header or body in the production environment. These log information is not encrypted and contains sensitive data such as the password of your ECS virtual machine, or the password of your IAM user account, etc. When the response body is binary content, the body will be printed as "***" without detailed information.

where:

HttpHandler supports method addRequestHandlers and addResponseHandlers.


All versions of huaweicloud-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
guzzlehttp/guzzle Version >=6.3.0
guzzlehttp/psr7 Version >=1.4.2
guzzlehttp/promises Version >=1.3.1
psr/http-message Version >=1.0.1
monolog/monolog Version >=2.4.0
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 huaweicloud/huaweicloud-sdk-php contains the following files

Loading the files please wait ....