How do I set the Lock Duration on a service bus topic through the service bus trigger code?

Solution for How do I set the Lock Duration on a service bus topic through the service bus trigger code?
is Given Below:

I have found a bunch of information here explaining the options – LockDuration, AutoRenew, etc – but what I cannot figure out is how to set it through code?

We create the service bus topics through code. Where can I set the LockDuration during create?
This is the service bus trigger azure function:

public static async Task Run(
                     [ServiceBusTrigger(SB_TOPIC_NAME, SB_MONITOR_SUBSCRIPTION_NAME, AccessRights.Manage, Connection = APP_SETTING_SERVICE_BUS_CONNECTION_STRING)]
                        BrokeredMessage sbMessage,
                      ILogger log) {

I tried adding this to the host.json, but it didn’t change anything:

“serviceBus”: {
“maxConcurrentCalls”: 1,
“MaxLockDuration”: “00:05:00”,
“autoRenewTimeout”: “00:30:00”,
“autoComplete”: true
}

This is our topic/subscription create functions:

    public async Task<ITopicClient> GetTopicClient(string connectionString, string topicName)
    {
        var m = new ManagementClient(connectionString);
        var exists = await m.TopicExistsAsync(topicName);
        if (!exists)
        {
            await m.CreateTopicAsync(new TopicDescription(topicName));
        }
        var topicClient = new TopicClient(connectionString, topicName);
        return topicClient;
    }

    public async Task CreateSubscription(string connectionString, string topicName, string subsciptionName)
    {
        var m = new ManagementClient(connectionString);

        var exists = await m.SubscriptionExistsAsync(topicName, subsciptionName);
        if (!exists)
        {
            await m.CreateSubscriptionAsync(new SubscriptionDescription(topicName, subsciptionName));
        }
    }

Any help is much appreciated!

FYI – I found that I had to use the SubscriptionDescription class and set the lock when CREATING the service bus topic/subscription – it doesn’t update it later

https://docs.microsoft.com/en-us/dotnet/api/microsoft.servicebus.messaging.subscriptiondescription