About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
LISTCOSBUCKETS stored procedure
Last updated: Mar 17, 2025
Returns the list of buckets in a Cloud Object Storage (COS).
Input parameters
- ENDPOINT
- The type of this required parameter is VARCHAR(32672). The endpoint in the COS to list from.
- ACCESSID
- The type of this required parameter is VARCHAR(2000). The access identifier to list with.
- SECRETKEY
- The type of this required parameter is VARCHAR(2000). Specifies the secret key that allows access to the Cloud Object Storage.
- OPTIONSCSV
- The type of this optional parameter is VARCHAR(32672). A comma-separated list of strings that
denote extra options including:
- BUCKNAME: The name of the specific bucket to list. The default value is NULL.
- MAXATMPS: The maximum number of listings to attempt. The default value is 2. The maximum value is 20. If you provide a negative number, then up to 20 listings are attempted.
- MAXBUCKS: The maximum number of objects to list. The default value is 100. If you provide a negative number, then all buckets are listed.
Output parameters
- DIAGS
- The output parameter providing diagnostics in the case of a failure. The type is VARCHAR(32672).
Syntax
Use the following syntax and replace the parameters for this stored
procedure:
CALL DVSYS.LISTCOSBUCKETS('<ENDPOINT>', '<ACCESSID>', '<SECRETKEY>', '<OPTIONSCSV>', ?);
Example
CALL DVSYS.LISTCOSBUCKETS('http://9.30.194.210:9199', '1N8N77W8FKk5G280TN53', 'JbXoyGg5XhvN+bohZc+42WdU33am3+hXcE9e6XMa', 'MAXBUCKS=20', ?);
The output might look like the following text:
+--------------+ | BUCKET | +--------------+ | bigsql-local | +--------------+ 1 row in results(first row: 0.144s; total: 0.154s) +-------------+----------+ | Return Code | Param #2 | +-------------+----------+ | -1992425446 | [NULL] | +-------------+----------+
Was the topic helpful?
0/1000