1

I have a key stored as value in aws system manager(ssm). Is it possible to update the value using aws APIs?

For storing the key I am using the following API:

SsmClient ssmClientEUWest1 = SsmClient.builder().region(Region.EU_WEST_1).build();
ssmClientEUWest1.putParameter(PutParameterRequest.builder().value(key).name(<some constant name>).type("String").build());

As I store the key the first time it does create successfully. However as I call it again, it fails as <some constant name> is constant and hence it can't create duplicate names.

What I need is to update the key. I get this key as an input to my method and I just need to update the key in the store under the given constant name store.

I tried going through aws docs but couldn't find a solution. Docs suggest to use tier but that didn't prove useful either.

1 Answer 1

1

Explored more and found out this can be done by setting overwrite(true)

So

PutParameterRequest.builder().value(key).name(<some constant name>).type("String").overwrite(true).build()

will do the job

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.