I have to add a condition in gcp workflow to delete a stoarge object file(csv )if it exist. Please suggest on this.
I am using below but it's giving error
checkfileexist:
call: http.get
args:
url: https://storage.cloud.google.com/abc/file.csv
- evaluate:
switch:
- condition: "{{ checkfileexist.statusCode == 200 }}"
next: deleteobject
next: finish
- deleteobject:
call: http.delete
args:
url: https://storage.cloud.google.com/abc/file.csv
next: finish
error - which is coming on line - condition: "{{ checkfileexist.statusCode == 200 }}"
source: "main.evaluate, line: 42"
exception: "TypeError: in conditional predicate: expected boolean, got str
in step "evaluate", routine "main", line: 42: {"message":"TypeError:
in conditional predicate: expected boolean, got str","tags":["TypeError"]}"
}}