private void CreateRdsDatabase(AwsClientDetails clientDetails) { using (var helper = new RDSHelper(clientDetails)) { throw new NotImplementedException(""); } }
public void SetAcl_Should_Succeed() { // Get the client details from the stored client details (rather than embed secret keys in the test). // Ensure that your AWS/Secret keys have been stored before running. var store = new ClientDetailsStore(); AwsClientDetails clientDetails = store.Load(Container); S3Helper helper = new S3Helper(clientDetails); const string bucketName = "ExampleTestBucket"; const string key = "ExampleObject"; // Put a simple text object into the bucket to delete. helper.CreateBucket(bucketName); helper.PutTextObject(bucketName, key, "Example text to store in the object"); try { helper.SetAcl(bucketName, "AuthenticatedRead", key); } finally { helper.DeleteObject(bucketName, key); helper.DeleteBucket(bucketName); } }
protected override bool Execute(AwsClientDetails clientDetails) { using (AmazonSQS client = GetClient(clientDetails)) { return(Execute(client)); } }
public void PutFileObjectTest() { // Get the client details from the stored client details (rather than embed secret keys in the test). // Ensure that your AWS/Secret keys have been stored before running. var store = new ClientDetailsStore(); AwsClientDetails clientDetails = store.Load(Container); S3Helper helper = new S3Helper(clientDetails); const string bucketName = "ExampleTestBucket"; const string key = "ExampleObject"; // Put a simple text object into the bucket to delete. helper.CreateBucket(bucketName); try { helper.PutFileObject(bucketName, key, @"C:\Temp\IMD.WebSite.zip"); } catch (Exception ex) { } finally { //helper.DeleteObject(bucketName, key); //helper.DeleteBucket(bucketName); } }
protected override bool Execute(AwsClientDetails clientDetails) { using (AmazonIdentityManagementService client = GetService(clientDetails)) { return(Execute(client)); } }
virtual protected AwsClientDetails GetClientDetails() { if (string.IsNullOrEmpty(EncryptionContainerName)) { throw new Exception("EncryptionContainerName not set"); } var clientDetailsStore = new ClientDetailsStore(); AwsClientDetails clientDetails = clientDetailsStore.Load(EncryptionContainerName); clientDetails.AmazonS3Config = new AmazonS3Config(); var http = Amazon.S3.Model.Protocol.HTTP.ToString(); switch (Protocol.ToUpper()) { case "HTTP": clientDetails.AmazonS3Config.CommunicationProtocol = Amazon.S3.Model.Protocol.HTTP; break; default: clientDetails.AmazonS3Config.CommunicationProtocol = Amazon.S3.Model.Protocol.HTTPS; break; } Logger.LogMessage(MessageImportance.Normal, "Connecting to AWS using AwsAccessKeyId: {0}", clientDetails.AwsAccessKeyId); return(clientDetails); }
private void CreateVolume(AwsClientDetails clientDetails) { using (var helper = new EC2Helper(clientDetails)) { VolumeId = helper.CreateVolumeFromSnapshot(AvailabilityZone, SnapShotId); Log.LogMessage(MessageImportance.Normal, "Created volume {0} from SnapShot {1}", VolumeId, SnapShotId); } }
private void TerminateInstances(AwsClientDetails clientDetails) { using (var helper = new EC2Helper(clientDetails)) { helper.TerminateInstance(InstanceIds); Log.LogMessage(MessageImportance.Normal, "Terminiated Instances {0}", Join(InstanceIds)); } }
private void SetAcl(AwsClientDetails clientDetails) { using (var helper = new S3Helper(clientDetails)) { helper.SetAcl(BucketName, CannedAcl, Key); Log.LogMessage(MessageImportance.High, "Setting Acl {0} on object {0} in bucket {1}", CannedAcl, Key, BucketName); } }
private void RebootInstances(AwsClientDetails clientDetails) { using (var helper = new EC2Helper(clientDetails)) { helper.RebootInstance(InstanceIds); Log.LogMessage(MessageImportance.Normal, "Stopped Instances {0}", Join(InstanceIds)); } }
private void PutTextObject(AwsClientDetails clientDetails) { using (var helper = new S3Helper(clientDetails)) { helper.PutTextObject(BucketName, Key, Text); Log.LogMessage(MessageImportance.Normal, "Put object {0} into bucket {1}", Key, BucketName); } }
private void PublishFiles(AwsClientDetails clientDetails) { using (var helper = new S3Helper(clientDetails)) { helper.Publish(SourceFiles, DestinationBucket, DestinationFolder, PublicRead); Log.LogMessage(MessageImportance.Normal, "Published {0} files to S3", SourceFiles.Length); } }
private void DisassociateIpAddress(AwsClientDetails clientDetails) { using (var helper = new EC2Helper(clientDetails)) { helper.DisassociateIpAddress(IpAddress); Log.LogMessage(MessageImportance.Normal, "Disassiociated IPAddress {0}", IpAddress); } }
private void CreateBucket(AwsClientDetails clientDetails) { using (var helper = new S3Helper(clientDetails)) { helper.DeleteObject(BucketName, Key); Log.LogMessage(MessageImportance.High, "Deleted AWS S3 Object {0} from bucket {1} ", Key, BucketName); } }
private void AssociateIpAddress(AwsClientDetails clientDetails) { using (var helper = new EC2Helper(clientDetails)) { helper.AssociateIpAddress(InstanceId, IpAddress); Log.LogMessage(MessageImportance.Normal, "Associated IP Address {0} with InstanceId {1}", IpAddress, InstanceId); } }
private void CreateBucket(AwsClientDetails clientDetails) { using (var helper = new S3Helper(clientDetails)) { helper.CreateBucket(BucketName); Log.LogMessage(MessageImportance.Normal, "Created S3 Bucket {0}", BucketName); } }
private void DeleteAttributes(AwsClientDetails clientDetails) { using (var helper = new SimpleDBHelper(clientDetails)) { helper.DeleteAttributes(DomainName, ItemName, AttributeNames); Log.LogMessage(MessageImportance.Normal, "Deleted Attributes {0} for Item {1}", Join(AttributeNames), ItemName); } }
private void PublishNotifiation(AwsClientDetails clientDetails) { using (var helper = new SNSHelper(clientDetails)) { MessageId = helper.Publish(TopicArn, Subject, Message); Log.LogMessage(MessageImportance.Normal, "Published SNS Notification {0}", Subject); } }
private void WaitForInstances(AwsClientDetails clientDetails) { using (var helper = new EC2Helper(clientDetails)) { helper.WaitForInstances(InstanceIds, DesiredState.ToLower(), TimeOutSeconds, PollIntervalSeconds); Log.LogMessage(MessageImportance.Normal, "All Instances {0} in the state {1}", Join(InstanceIds), DesiredState); } }
private void CreateTopic(AwsClientDetails clientDetails) { using (var helper = new SNSHelper(clientDetails)) { TopicArn = helper.CreateTopic(TopicName); Log.LogMessage(MessageImportance.Normal, "Created Sns TopicAssociated {0}, Topic Arn {1}", TopicName, TopicArn); } }
private void AddPermissions(AwsClientDetails clientDetails) { using (var helper = new SNSHelper(clientDetails)) { helper.AddPermission(ActionNames, AwsAccountIds, Label, TopicArn); Log.LogMessage(MessageImportance.Normal, "Set permissiosn for AWS Accounts {0} to Topic Arn {1}", Join(AwsAccountIds), TopicArn); } }
private void DetachVolume(AwsClientDetails clientDetails) { using (var helper = new EC2Helper(clientDetails)) { helper.DetachVolume(Device, InstanceId, VolumeId, Force); Log.LogMessage(MessageImportance.Normal, "Detached volume"); } }
private void DeleteSnapShot(AwsClientDetails clientDetails) { using (var helper = new EC2Helper(clientDetails)) { helper.DeleteSnapShot(SnapShotId); Log.LogMessage(MessageImportance.Normal, "Deleted SnapShot {0}", SnapShotId); } }
private void CreateDomain(AwsClientDetails clientDetails) { using (var helper = new SimpleDBHelper(clientDetails)) { helper.CreateDomain(DomainName); Log.LogMessage(MessageImportance.Normal, "Created SimpleDB Domain {0}", DomainName); } }
private void Subscribe(AwsClientDetails clientDetails) { using (var helper = new SNSHelper(clientDetails)) { SubscriptionArn = helper.Subscribe(TopicArn, Protocol, Endpoint); Log.LogMessage(MessageImportance.Normal, "Subscribed to Topic {0}, SubscriptionArn {1}", TopicArn, SubscriptionArn); } }
private void DeleteDomain(AwsClientDetails clientDetails) { using (var helper = new SimpleDBHelper(clientDetails)) { helper.DeleteDomain(DomainName); Log.LogMessage(MessageImportance.High, "Deleted SimpleDB Domain {0}", DomainName); } }
private void PutAttribute(AwsClientDetails clientDetails) { using (var helper = new SimpleDBHelper(clientDetails)) { helper.PutAttribute(DomainName, ItemName, AttributeName, Replace, AttributeValue); Log.LogMessage(MessageImportance.Normal, "Stored Attribute {0} for Item {1}", AttributeName, ItemName); } }
private void CreateVolume(AwsClientDetails clientDetails) { using (var helper = new EC2Helper(clientDetails)) { VolumeId = helper.CreateNewVolume(AvailabilityZone, Size); Log.LogMessage(MessageImportance.Normal, "Created volume of size {0}MiB with VolumeId {1}", Size, VolumeId); } }
private void Unsubscribe(AwsClientDetails clientDetails) { using (var helper = new SNSHelper(clientDetails)) { helper.Unsubscribe(SubscriptionArn); Log.LogMessage(MessageImportance.Normal, "Unsubscribed from SubscriptionArn {0}", SubscriptionArn); } }
private void DeleteTopic(AwsClientDetails clientDetails) { using (var helper = new SNSHelper(clientDetails)) { helper.DeleteTopic(TopicArn); Log.LogMessage(MessageImportance.Normal, "Deleted SNS Topic {0}", TopicArn); } }