VorNet.SessionManagerSharp
0.0.1-wip-2
This is a prerelease version of VorNet.SessionManagerSharp.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package VorNet.SessionManagerSharp --version 0.0.1-wip-2
NuGet\Install-Package VorNet.SessionManagerSharp -Version 0.0.1-wip-2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VorNet.SessionManagerSharp" Version="0.0.1-wip-2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VorNet.SessionManagerSharp --version 0.0.1-wip-2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: VorNet.SessionManagerSharp, 0.0.1-wip-2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install VorNet.SessionManagerSharp as a Cake Addin #addin nuget:?package=VorNet.SessionManagerSharp&version=0.0.1-wip-2&prerelease // Install VorNet.SessionManagerSharp as a Cake Tool #tool nuget:?package=VorNet.SessionManagerSharp&version=0.0.1-wip-2&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SessionManagerSharp
An unofficial AWS Systems Managers' Session Manager client for C#/.NET based on https://github.com/aws/session-manager-plugin.
The primary motivation and use-case is to enable automation.
Two methods are supported:
Task<string> SendStdOutAsync(string commandText)
sends a command over standard input and returns the response from it.Task SendTextFileStreamAsync(Stream stream, string destFilename)
streams a text file over standard input to a destination filename. This is experimental.
Example Usage
using Microsoft.Extensions.Configuration;
using VorNet.SessionManagerSharp;
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false);
IConfiguration config = builder.Build();
ISessionManagerClientFactory factory = new SessionManagerClientFactory(config);
ISessionManagerClient client = factory.Create("i-0a42f2bd61658a835");
// Run a command.
Console.WriteLine(await client.SendStdOutAsync("sudo ls /home/ubuntu"));
// Send a text file.
using var fileStream = new FileStream("example.txt", FileMode.Open, FileAccess.Read);
await client.SendTextFileStreamAsync(fileStream, "/home/ubuntu/example.txt");
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- AWSSDK.Extensions.NETCore.Setup (>= 3.7.7)
- AWSSDK.SimpleSystemsManagement (>= 3.7.200.9)
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.0.1-wip-4 | 219 | 8/9/2023 |
0.0.1-wip-3 | 80 | 8/7/2023 |
0.0.1-wip-2 | 85 | 8/4/2023 |
0.0.1-wip-1 | 91 | 8/3/2023 |
0.0.1-test-1 | 89 | 8/2/2023 |