Complete the code to create a SAS token with read permission.
sas_token = generate_sas(account_name, account_key, permission='[1]')
The SAS token must have 'read' permission to allow reading data.
Complete the code to specify the expiry time for the SAS token.
expiry_time = datetime.utcnow() + timedelta(hours=[1])The SAS token expiry is set to 1 hour from now for security best practice.
Fix the error in the code to generate a SAS token for a blob container.
sas_token = generate_container_sas(account_name, account_key, container_name, permission='[1]')
Only valid permissions like 'read' can be used for container SAS tokens. 'execute' is invalid.
Fill both blanks to create a SAS token with write permission and expiry in 2 hours.
sas_token = generate_sas(account_name, account_key, permission='[1]', expiry=datetime.utcnow() + timedelta(hours=[2]))
The SAS token needs 'write' permission and expiry set to 2 hours from now.
Fill all three blanks to generate a SAS token with read permission, expiry in 4 hours, and resource type 'b'.
sas_token = generate_sas(account_name, account_key, permission='[1]', expiry=datetime.utcnow() + timedelta(hours=[2]), resource='[3]')
The SAS token must have 'read' permission, expire in 4 hours, and target resource type 'b' (blob).