function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Harish BasthapurHarish Basthapur 

Can we retrieve Folders from Amazon aws S3 as we are retrieving Buckets.

Hi , 

 

can we retrieve Folder which are created in S3 directly to our force.com application as we are retrieving Buckets  created in Amazon AWS S3.

 

We had used  the below web service call to list the buckets from amazon S3

  

/* This method invokes the S3 ListAllMyBuckets web service operation*/
        public S3.ListAllMyBucketsResult ListAllMyBuckets(String AWSAccessKeyId,DateTime Timestamp,String Signature) {
            S3.ListAllMyBuckets_element request_x = new S3.ListAllMyBuckets_element();
            S3.ListAllMyBucketsResponse_element response_x;
            request_x.AWSAccessKeyId = AWSAccessKeyId;
            request_x.Timestamp = Timestamp;
            request_x.Signature = Signature;
            Map<String, S3.ListAllMyBucketsResponse_element> response_map_x = new Map<String, S3.ListAllMyBucketsResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              '',
              'http://s3.amazonaws.com/doc/2006-03-01/',
              'ListAllMyBuckets',
              'http://s3.amazonaws.com/doc/2006-03-01/',
              'ListAllMyBucketsResponse',
              'S3.ListAllMyBucketsResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.ListAllMyBucketsResponse;
        }

 also Some more code 

 

  public class ListAllMyBucketsResult {
        public S3.CanonicalUser Owner;
        public S3.ListAllMyBucketsList Buckets { get; set; }
        private String[] Owner_type_info = new String[]{'Owner','http://s3.amazonaws.com/doc/2006-03-01/','CanonicalUser','1','1','false'};
        private String[] Buckets_type_info = new String[]{'Buckets','http://s3.amazonaws.com/doc/2006-03-01/','ListAllMyBucketsList','1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://s3.amazonaws.com/doc/2006-03-01/','true'};
        private String[] field_order_type_info = new String[]{'Owner','Buckets'};
    }

    public class ListAllMyBucketsResponse_element {
        public S3.ListAllMyBucketsResult ListAllMyBucketsResponse;
        private String[] ListAllMyBucketsResponse_type_info = new String[]{'ListAllMyBucketsResponse','http://s3.amazonaws.com/doc/2006-03-01/','ListAllMyBucketsResult','1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://s3.amazonaws.com/doc/2006-03-01/','true'};
        private String[] field_order_type_info = new String[]{'ListAllMyBucketsResponse'};
    }

 So, As we can select the buckets from our vf page and upload it to amazon S3 from force.com,Similarly can we retrieve and Select the folders. If yes, Please suggest me the way.....

Thanx in Advance!