How to set TTL on a Blob in Google Cloud Storage using Java?

It is not currently possible to set a per-object TTL, you can only configure a bucket-wide TTL that applies to all objects in the bucket by setting the buckets LifeCycle configuration. https://cloud.google.com/storage/docs/lifecycle

Setting a TTL of 14 days on the bucket via LifeCycle will not cause the bucket itself to be deleted after 14 days, instead it will cause each object uploaded to that bucket to be deleted 14 days after it was created.