boto / boto3

AWS SDK for Python
https://aws.amazon.com/sdk-for-python/
Apache License 2.0
9.08k stars 1.87k forks source link

mgn list_source_servers #4348

Closed jlosito closed 2 weeks ago

jlosito commented 2 weeks ago

Describe the feature

I would like the ability to list all of the source servers.

Currently, you can list applicatoins, waves, and more, but not source servers.

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/mgn.html

Use Case

I am creating an automation script to help manage applications and source servers that I am migrating. The script will help me associate source servers to an application within MGN. I want the script to use the source server name instead of the ID. The logic would be to perform a lookup of the source server ID by listing all of the source servers and returning the source server ID if the name matches.

I want to do something along these lines.

my_server = "friendly_server_name"
for server in mgn.list_source_servers():
    if my_server == server['name']:
        mgn.associate_source_server(
            sourceServerIDs=[server['id']],
            applicationID='myAppID',
        )

Proposed Solution

No response

Other Information

No response

Acknowledgements

SDK version used

1.35.59

Environment details (OS name and version, etc.)

macOS 14.7.1

Gi0rgi0s commented 2 weeks ago

Yes the server ID does not provide much context the way the server name can; there's no useful way to filter it. This proposed feature would make automation of large migrations much easier.

bradwatsonaws commented 2 weeks ago

Please prioritize this request for customers doing large migrations to AWS.

tim-finnigan commented 2 weeks ago

Thanks for reaching out. There is a describe_source_servers command — does that meet your use case?

The Application Migration service team owns the API actions that the Boto3 commands call, so feature requests for new functionality would need to go to the service team rather than the SDK team. We can forward feature requests to the service team on your behalf.

jlosito commented 2 weeks ago

I might be able to use the hostname from describe_source_servers response. In my case, they should both match.

jlosito commented 2 weeks ago

In my opinion, I think it's still worth adding another API action though for list_source_servers.

tim-finnigan commented 2 weeks ago

In my opinion, I think it's still worth adding another API action though for list_source_servers.

Thanks for following up. I went ahead and created a feature request for the Application Migration team to review and track internally. We can't guarantee if or when service API requests like these would be implemented, but please refer to the blog and CHANGELOG for updates going forward. I'm going to close this as not planned since this is a service API feature request and not something the SDKs like Boto3 would directly implement support for.

github-actions[bot] commented 2 weeks ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.