Using Console
Using CLI
<subscription-name>
with the name of the chosen subscription and <duration>
with the duration for which you want to set the expiration time for messages. The duration should be in the format of n[d|h|m|s]
where n
is the number of days, hours, minutes or seconds.
For example, to set the expiration time for messages in a subscription named my-subscription
to 7 days, run the following command:
<subscription-name>
with the name of the chosen subscription. The output should display the expiration time for messages in the subscription.
Using Python
<PROJECT_ID>
and <SUBSCRIPTION_NAME>
with your project ID and subscription name respectively.