Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AmazonEC2Client.DryRun() isn't defined in IAmazonEC2 #3594

Closed
1 task
sstragier-prosperops opened this issue Dec 31, 2024 · 2 comments
Closed
1 task

AmazonEC2Client.DryRun() isn't defined in IAmazonEC2 #3594

sstragier-prosperops opened this issue Dec 31, 2024 · 2 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@sstragier-prosperops
Copy link

Describe the bug

Using the IAmazonEC2 interface does not have access to the DryRun method defined in AmazonEC2Client.

This means that dry run operations (e.g. start instances) cannot be executed with the interface and must be cast down to the AmazonEC2Client, which impacts mocking in unit tests.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

I expected that all methods in the AmazonEC2Client are defined on the IAmazonEC2 interface, especially functionality that is described in the AWS docs

Current Behavior

IAmazonEC2.DryRun() does not exist

Reproduction Steps

// This compiles
var ec2Client = new AmazonEC2Client();
ec2Client.DryRun(new StartInstancesRequest { InstanceIds = new() { "i-xxxxxxx" } });

// This does not compile
IAmazonEC2 ec2Interface = ec2Client;
ec2Interface.DryRun(new StartInstancesRequest { InstanceIds = new() { "i-xxxxxxx" } });

Possible Solution

Add DryRunResponse DryRun(AmazonEC2Request request) to IAmazonEC2

I'm more than happy to open a PR with this fix

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

AWSSDK.EC2 3.7.405.7 (this issue still applies to the latest version)

Targeted .NET Platform

.NET 6

Operating System and version

Windows 10

@sstragier-prosperops sstragier-prosperops added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 31, 2024
@sstragier-prosperops
Copy link
Author

After doing some more investigation, it appears that the DryRun method no longer works, so I've opened #3595 instead

Copy link

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant