Home > Blockchain >  How to use UpdateEventSourceMappingRequest in java?
How to use UpdateEventSourceMappingRequest in java?

Time:02-04

I'm trying to use something like this:

UpdateEventSourceMappingRequest request = new UpdateEventSourceMappingRequest()
        .withFunctionName("arn:aws:lambda:us-east-1:9999999999:function:" functionName)
        .withEnabled(false);

But I received a error because I have to use .withUUID(uuid):

UpdateEventSourceMappingRequest request = new UpdateEventSourceMappingRequest()
        .withUUID(uuid))
        .withFunctionName("arn:aws:lambda:us-east-1:9999999999:function:" functionName)
        .withEnabled(false);

I don't know how to get the value of uuid ( uuid from aws lambda ).

Can you help me with the solution to my problem ?

CodePudding user response:

You need to provide the UUID identifier of the event source mapping to update it (and this field is mandatory). Update-request is not intended to create it. When you create an event source mapping (here) - aws should return a response with a UUID identifier which you then may use in the update request.

  •  Tags:  
  • Related