Before getting started Skill Level: Beginner Assumptions: You have completed Part 1 of Managing Amazon AWS with C# – EC2 Additional Information: I sometimes cover small sub-topics in a post. Along with AWS, you will also be exposed to: .NET Core 2.0 – If you use .NET Framework, the steps will be slightly different, but as this is a beginner level tutorial, it should be simple. Rhyous.SimpleArgs Step 1 – Edit InstanceManager.cs file We've created InstanceManager.cs in Part 1. Let's edit it. Add a method to delete the key pair. public static async Task DeleteKeyPair(AmazonEC2Client ec2Client, string keyName) { await ec2Client.DeleteKeyPairAsync(new DeleteKeyPairRequest { KeyName = keyName }); } Step 5 – Configure command line Arguments. We already have an Actions arguments to edit. Add DeleteKeyPair as a valid action to the Action argument. . . . new Argument { Name = "Action", ShortName = "a", Description = "The action to run.", Example = "{name}=default", DefaultValue = "Default", AllowedValues = new ObservableCollection { "CreateKeyPair", "DeleteKeyPair" }, IsRequired = true, Action = (value) = { Console.
I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.
Stay tuned to my blog, twitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.
Stay tuned to my blog, twitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.
This article is related to
Development
Development
No comments:
Post a Comment