como alterar o tempo da chave de acesso (generate-sas-token) para o iot hub utilizando o power-shell do azure?

Luciano pai do Miguel 0 Reputation points
2024-03-07T04:42:25.56+00:00

Boa noite! Meu nome é Luciano. Saudações a todas e todos!

Eu gostaria de ajuda para alterar o tempo de duração da chave gerada pelo generate-sas-token, para iot hub, utilizando o power-shell. Eu sou novato na utilização do azure e não estou conseguindo fazer essa alteração, o motivo de querer alterar o tempo da chave se da porque o dispositivo vai ficar instalado em um equipamento no chão de fábrica e fica muito dificil para a manutenção realizar essa operação a cada hora,

Desde já agradeço a ajuda e atenção

Obrigado

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,126 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde 28,796 Reputation points MVP
    2024-03-07T06:51:38.6733333+00:00

    Hello @Luciano pai do Miguel ,

    welcome to this moderated Azure community forum.

    Can you be more specific? Are you interested in generating these SAS tokens?

    Example code is offered in multiple programming languages, C#, Node.Js, Python, and Java:

    enter image description here

    A powershell command example is not offered but you can also generate SAS tokens with the CLI extension command 'az iot hub generate-sas-token'.

    You can set the duration if needed:

    enter image description here


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    1 person found this answer helpful.
    0 comments No comments