Initializing help system before first use

s3init

Purpose
Initializing an S3 bucket from JSON configuration or within DMP
Synopsis
procedure s3init(bucket:s3bucket, cfgid:text)
procedure s3init(bucket:s3bucket, type:text, env:text)
Arguments
bucket 
S3 bucket to be configured
cfgid 
The ID of the bucket configuration to use. When used within DMP, this may be one of the constants S3_DMP_SOLUTIONDATA and S3_DMP_TENANTSHARED, or the return value from the s3solutiondata or s3solutionrevision functions.
type 
Within DMP, the type of the folder you want to use; the only supported value is the constant S3_DMP_SOLUTIONDATA
env 
Within DMP, the lifecycle stage to access; one of the constants S3_DMP_DESIGN, S3_DMP_STAGING, S3_DMP_PRODUCTION.
Example
Example of initializing an s3bucket to use the DMP solutionData folder.
declarations
  mybucket: s3bucket
end-declarations
s3init(mybucket,S3_DMP_SOLUTIONDATA)
if s3status(mybucket)<>S3_OK then
  writeln("Error returned by S3: ",s3getlasterror(mybucket))
  exit(1)
end-if 
Further information
1. After calling, check the value of s3status for any errors.
2. If the supplied s3bucket has already been initialized, the previous configuration will be overwritten.
3. After a s3bucket has been initialized using s3init, it will not be possible to change the url or region field directly.
4. When used within DMP, this function allows you to access S3 folders provided by the platform. You will pass the constant S3_DMP_SOLUTIONDATA or S3_DMP_TENANTSHARED to access the default solution-data or tenant-global folders respectively, or the return value of the functions s3solutiondata or s3solutionrevision to access solution data of a specific environment or assets of a solution revision.
5. The 3-argument version of this function is deprecated since version 0.1.0 of the S3 module. It was previously used to specify the environment of the solution data folder to access; new code should use the 2-argument s3init procedure with the return value from s3solutiondata instead.
6. When the model is running in Xpress Workbench within DMP, only the S3_DMP_SOLUTIONDATA folder type is supported and the third parameter must not be specified (ie only access to the "solution data" folder for the current lifecycle stage is supported).
Related topics

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.