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?
RegisterTaskDefinitionRequest
type usingJackson ObjectMapper
and send the object toregisterTaskDefinition
method. Let me know if this helps.