Complete the code to create a CDN endpoint purge request using Azure SDK.
cdn_client.purge_content(resource_group_name, profile_name, endpoint_name, content_paths=[1])The purge_content method expects a list of content paths to purge. Using ['/*'] purges all cached content.
Complete the code to authenticate with Azure before purging CDN cache.
from azure.identity import [1] credential = [1]()
DefaultAzureCredential automatically picks the best available authentication method for Azure SDK clients.
Fix the error in the purge request code by completing the missing parameter.
cdn_client.purge_content(resource_group_name, profile_name, [1], content_paths=['/images/*'])
The third parameter must be the endpoint name to specify which CDN endpoint to purge.
Fill both blanks to define the Azure CDN purge function with correct parameters.
def purge_cdn_cache([1], [2]): cdn_client.purge_content(resource_group, profile, endpoint, content_paths=['/*'])
The function needs resource group and endpoint as parameters to identify the CDN endpoint to purge.
Fill all three blanks to build a dictionary for CDN purge request with dynamic keys.
purge_request = {
[1]: [2],
'contentPaths': [3]
}The dictionary keys and values must match the expected purge request format: 'endpointName' key with endpoint_name variable, and 'contentPaths' with list of paths.