2-- MinIO Haskell SDK, (C) 2023 MinIO, Inc.
4-- Licensed under the Apache License, Version 2.0 (the "License");
5-- you may not use this file except in compliance with the License.
6-- You may obtain a copy of the License at
8-- http://www.apache.org/licenses/LICENSE-2.0
10-- Unless required by applicable law or agreed to in writing, software
11-- distributed under the License is distributed on an "AS IS" BASIS,
12-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-- See the License for the specific language governing permissions and
14-- limitations under the License.
16{-# LANGUAGE OverloadedStrings #-}
18import Control.Monad.IO.Class (liftIO)
24 -- Use play credentials for example.
28 "Q3AM3UQ867SPQQA43P2F"
29 "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
32 $ defaultSTSAssumeRoleOptions
33 { saroLocation = Just "us-east-1",
34 saroEndpoint = Just "https://play.min.io:9000"
37 -- Retrieve temporary credentials and print them.
38 cv <- requestSTSCredential assumeRole
39 print $ "Temporary credentials" ++ show (credentialValueText $ fst cv)
40 print $ "Expiry" ++ show (snd cv)
42 -- Configure 'ConnectInfo' to request temporary credentials on demand.
43 ci <- setSTSCredential assumeRole "https://play.min.io"
44 res <- runMinio ci $ do
45 buckets <- listBuckets
46 liftIO $ print $ "Top 5 buckets: " ++ show (take 5 buckets)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list