public void Execute(Arguments arguments) { try { S3Settings.GetInstance().awsS3.CreateBucket(arguments.bucketName.Value); } catch (Exception exc) { throw new ApplicationException(exc.Message); } }
public void Execute(Arguments arguments) { try { S3Settings.GetInstance().awsS3.WritingObjectContent(arguments.bucketName.Value, arguments.keyName.Value, arguments.content.Value, null); } catch (Exception exc) { throw new ApplicationException(exc.Message); } }
public void Execute(Arguments arguments) { try { S3Settings.GetInstance().awsS3 = new AmazonS3Operations(arguments.profileName.Value, arguments.credentialFileName.Value, arguments.regionEndpoint.Value); } catch (Exception exc) { throw new ApplicationException($"Error occured while connecting to AWS S3", exc); } }
public void Execute(Arguments arguments) { try { S3Settings.GetInstance().awsS3.ReadingObject(arguments.bucketName.Value, arguments.keyName.Value, arguments.localFileName.Value); } catch (Exception exc) { throw new ApplicationException(exc.Message); } }
public void Execute(Arguments arguments) { try { List <String> keys = S3Settings.GetInstance().awsS3.ListingObjects(arguments.bucketName.Value); ListStructure result = new ListStructure(new List <object>()); if (keys != null) { foreach (string key in keys) { result.AddItem(new TextStructure(key)); } } //String flatStr = string.Join(";", keys.ToArray()); Scripter.Variables.SetVariableValue(arguments.Result.Value, result); } catch (Exception exc) { throw new ApplicationException(exc.Message); } }
static S3Settings() { instance = new S3Settings(); }