0
0
Azurecloud~10 mins

Purging CDN cache in Azure - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a CDN endpoint purge request using Azure SDK.

Azure
cdn_client.purge_content(resource_group_name, profile_name, endpoint_name, content_paths=[1])
Drag options to blanks, or click blank then click option'
A['*']
B['/*']
C/*
D'/*'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing a string instead of a list causes a type error.
Using an incorrect wildcard pattern like '*' without slash.
2fill in blank
medium

Complete the code to authenticate with Azure before purging CDN cache.

Azure
from azure.identity import [1]
credential = [1]()
Drag options to blanks, or click blank then click option'
AInteractiveBrowserCredential
BClientSecretCredential
CAzureCliCredential
DDefaultAzureCredential
Attempts:
3 left
💡 Hint
Common Mistakes
Using ClientSecretCredential without providing client ID and secret.
Using AzureCliCredential without Azure CLI installed.
3fill in blank
hard

Fix the error in the purge request code by completing the missing parameter.

Azure
cdn_client.purge_content(resource_group_name, profile_name, [1], content_paths=['/images/*'])
Drag options to blanks, or click blank then click option'
Aendpoint_name
Bcdn_profile
Cresource_name
Dcache_endpoint
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the profile name twice.
Using incorrect parameter names causing runtime errors.
4fill in blank
hard

Fill both blanks to define the Azure CDN purge function with correct parameters.

Azure
def purge_cdn_cache([1], [2]):
    cdn_client.purge_content(resource_group, profile, endpoint, content_paths=['/*'])
Drag options to blanks, or click blank then click option'
Aresource_group
Bprofile
Cendpoint
Dcontent_paths
Attempts:
3 left
💡 Hint
Common Mistakes
Using content_paths as a parameter when it is fixed inside the function.
Mixing up profile and endpoint parameters.
5fill in blank
hard

Fill all three blanks to build a dictionary for CDN purge request with dynamic keys.

Azure
purge_request = {
    [1]: [2],
    'contentPaths': [3]
}
Drag options to blanks, or click blank then click option'
A'endpointName'
Bendpoint_name
C['/*']
D'resourceGroup'
Attempts:
3 left
💡 Hint
Common Mistakes
Using variable names as keys without quotes.
Passing a string instead of a list for contentPaths.