ServiceProvider Property
The S3 service provider to use.
Syntax
s3client.getServiceProvider([callback]) s3client.setServiceProvider( serviceProvider, [callback])
Possible Values
0 (spAmazonS3), 1 (spDigitalOcean), 2 (spGoogleStorage), 3 (spWasabi), 4 (spBackblazeB2), 5 (spHuawei), 6 (spAlibaba), 7 (spIBM), 8 (spOracle), 9 (spLinode), 255 (spCustom)
Default Value
0
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for the getServiceProvider([callback]) method is defined as:
function(err, data){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'data' is the value returned by the method.
The callback for the setServiceProvider([callback]) method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This property specifies the S3 service provider that the class should use. Possible values are:
spAmazonS3 (0) (default) | Amazon S3 |
spDigitalOcean (1) | Digital Ocean Spaces |
spGoogleStorage (2) | Google Cloud Storage |
spWasabi (3) | Wasabi |
spBackblazeB2 (4) | Backblaze B2 |
spHuawei (5) | Huawei Cloud Object Storage |
spAlibaba (6) | Alibaba Cloud Object Storage |
spIBM (7) | IBM Cloud Object Storage |
spOracle (8) | Oracle Cloud Object Storage |
spLinode (9) | Linode Object Storage |
spCustom (255) | Custom service provider |
Note that the following providers require additional configuration before requests can be made:
- spOracle (8): An "Object Storage Namespace" must be specified using the OracleNamespace configuration setting.
- spCustom (255): A base URL must be specified using the URL configuration setting.
Changing this property will automatically:
- Set the Region property to the default region for the provider (empty string for spCustom (255)).
- Reset the UseSSL property to true.
- Reset the StartByte property to 0.
- Clear the ObjectMarker, PartMarker, and VersionMarker properties, as well as the StorageClass and ResumableUploadState configuration settings.
This property is not available at design time.
Data Type
Integer