1

I am rewriting a CLI based deployment process in Java, the CLI version uses a template for a task definition which (after interpolating variables) it registers by passing to

aws ecs register-task-definition --cli-input-json file

I can't see any way to do the same thing from the Java SDK; for policies I was able to make this work by calling

String policyDocument = processTemplate();

new CreatePolicyRequest().withPolicyDocument(policyDocument)...

Is there any way to do a similar thing with RegisterTaskDefinitionRequest ?

It seems likely that under the covers the Java API is constructing this document from the input parameters, is there a way to call a lower level API directly?

2
  • Probably, you can parse the JSON file to RegisterTaskDefinitionRequest type using Jackson ObjectMapper and send the object to registerTaskDefinition method. Let me know if this helps.
    – Imran
    Commented Aug 24, 2018 at 2:22
  • Well yes I could, but that's not what I asked. Thanks anyway. Commented Aug 25, 2018 at 6:27

0

Browse other questions tagged or ask your own question.