1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * Copyright by The HDF Group. *
3 * All rights reserved. *
5 * This file is part of HDF5. The full HDF5 copyright notice, including *
6 * terms governing use, modification, and redistribution, is contained in *
7 * the COPYING file, which can be found at the root of the source code *
8 * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
9 * If you do not have access to either file, you may request a copy from *
10 * help@hdfgroup.org. *
11 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
14 * Read-Only S3 Virtual File Driver (VFD)
16 * Programmer: John Mainzer
19 * Purpose: The public header file for the ros3 driver.
24 #ifdef H5_HAVE_ROS3_VFD
25 #define H5FD_ROS3 (H5FD_ros3_init())
27 #define H5FD_ROS3 (H5I_INVALID_HID)
28 #endif /* H5_HAVE_ROS3_VFD */
30 #ifdef H5_HAVE_ROS3_VFD
32 /****************************************************************************
34 * Structure: H5FD_ros3_fapl_t
38 * H5FD_ros3_fapl_t is a public structure that is used to pass S3
39 * authentication data to the appropriate S3 VFD via the FAPL. A pointer
40 * to an instance of this structure is a parameter to H5Pset_fapl_ros3()
41 * and H5Pget_fapl_ros3().
47 * Version number of the H5FD_ros3_fapl_t structure. Any instance passed
48 * to the above calls must have a recognized version number, or an error
51 * This field should be set to H5FD_CURR_ROS3_FAPL_T_VERSION.
53 * `authenticate` (hbool_t)
55 * Flag TRUE or FALSE whether or not requests are to be authenticated
56 * with the AWS4 algorithm.
57 * If TRUE, `aws_region`, `secret_id`, and `secret_key` must be populated.
58 * If FALSE, those three components are unused.
60 * `aws_region` (char[])
62 * String: name of the AWS "region" of the host, e.g. "us-east-1".
64 * `secret_id` (char[])
66 * String: "Access ID" for the resource.
68 * `secret_key` (char[])
70 * String: "Secret Access Key" associated with the ID and resource.
72 ****************************************************************************/
74 #define H5FD_CURR_ROS3_FAPL_T_VERSION 1
76 #define H5FD_ROS3_MAX_REGION_LEN 32
77 #define H5FD_ROS3_MAX_SECRET_ID_LEN 128
78 #define H5FD_ROS3_MAX_SECRET_KEY_LEN 128
80 typedef struct H5FD_ros3_fapl_t {
83 char aws_region[H5FD_ROS3_MAX_REGION_LEN + 1];
84 char secret_id[H5FD_ROS3_MAX_SECRET_ID_LEN + 1];
85 char secret_key[H5FD_ROS3_MAX_SECRET_KEY_LEN + 1];
93 H5_DLL hid_t H5FD_ros3_init(void);
94 H5_DLL herr_t H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa_out);
95 H5_DLL herr_t H5Pset_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa);
101 #endif /* H5_HAVE_ROS3_VFD */
103 #endif /* ifndef H5FDros3_H */