aws / aws-tools-for-powershell

The AWS Tools for PowerShell lets developers and administrators manage their AWS services from the PowerShell scripting environment.
Apache License 2.0
235 stars 78 forks source link

TaskDefinition JSON argument for Register-ECSTaskDefinition-Cmdlet.cs #184

Closed TheWix closed 1 year ago

TheWix commented 3 years ago

Looking at the docs for https://docs.aws.amazon.com/cli/latest/reference/ecs/register-task-definition.html it takes a string argument representing a TaskDefinition Json. From there you can specify parameters to override. I can't find an equivalent for the Powershell cmdlet. I've looked around online and can't find much on it and don't see it in the source code. Am I missing something or is this functionality not available via the Powershell APIs?

ashishdhingra commented 3 years ago

Hi @TheWix,

Good morning.

The page AWS Tools for PowerShell - Amazon EC2 Container Service documents all the available ECS CmdLets. The closest PowerShell CmdLet for your use case is Register-ECSTaskDefinition.

The AWS CLI might have custom implementation which takes input in the form of JSON file via --cli-input-json command. I don't think the Register-ECSTaskDefinition CmdLet supports input JSON file as parameter and it simply matches closely with the end service API call.

Please review and let me know if we could close this issue.

Thanks, Ashish

TheWix commented 3 years ago

That appears to be the case, @ashishdhingra.

Would it be worth it to submit it as a feature request? It is very limiting to be forced to programmatically construct a Task Definition. It would be much nicer to be able to provide JSON and only programmatically change those fields that aren't static.

Unless there is a simple workaround that I am not aware of?

ashishdhingra commented 3 years ago

@TheWix I have added feature-request label to mark it as new feature request.

TheWix commented 3 years ago

@ashishdhingra Thank you. This feature would do a lot to simplify updating a Task Definition.

github-actions[bot] commented 1 year ago

We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.