az cdn profile list dont show any information

Anonymous
2022-07-30T17:17:30.253+00:00

Hello.
If i run the command az cdn profile list i dont get any information.:

cesar@Azure:~$ az cdn profile list  
[]  

But if i add the --debug parameter i see the profile information in the API response.:

cesar@Azure:~$ az cdn profile list --debug  
cli.knack.cli: Command arguments: ['cdn', 'profile', 'list', '--debug']  
cli.knack.cli: __init__ debug log:  
Enable color in terminal.  
cli.knack.cli: Event: Cli.PreExecute []  
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f4a884cbbe0>, <function OutputProducer.on_global_arguments at 0x7f4a8822c4c0>, <function CLIQuery.on_global_arguments at 0x7f4a882596c0>]  
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []  
cli.azure.cli.core: Modules found from index for 'cdn': ['azure.cli.command_modules.cdn']  
cli.azure.cli.core: Loading command modules:  
cli.azure.cli.core: Name                  Load Time    Groups  Commands  
cli.azure.cli.core: cdn                       0.006        39       133  
cli.azure.cli.core: Total (1)                 0.006        39       133  
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_next']  
cli.azure.cli.core: Loading extensions:  
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory  
cli.azure.cli.core: ai-examples               0.124         1         1  /opt/az/lib/python3.10/site-packages/azure-cli-extensions/ai-examples  
cli.azure.cli.core: Total (1)                 0.124         1         1    
cli.azure.cli.core: Loaded 40 groups, 134 commands.  
cli.azure.cli.core: Found a match in the command table.  
cli.azure.cli.core: Raw command  : cdn profile list  
cli.azure.cli.core: Command table: cdn profile list  
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f4a8794b400>]  
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/cesar/.azure/commands/2022-07-30.17-14-18.cdn_profile_list.443.log'.  
az_command_data_logger: command args: cdn profile list --debug  
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f4a8775ce50>]  
cli.knack.commands: Configured default 'yyyyy' for arg resource_group_name  
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []  
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f4a878052d0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f4a878053f0>]  
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []  
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []  
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f4a8822c550>, <function CLIQuery.handle_query_parameter at 0x7f4a88259750>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7f4a87805360>]  
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=CdnManagementClient  
urllib3.connectionpool: Starting new HTTP connection (1): localhost:50342  
urllib3.connectionpool: http://localhost:50342 "POST /oauth2/token HTTP/1.1" 200 1925  
msrestazure.azure_active_directory: MSI: Retrieving a token from http://localhost:50342/oauth2/token, with payload {'resource': 'https://management.core.windows.net/'}  
cli.azure.cli.core.auth.adal_authentication: MSIAuthenticationWrapper.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}  
urllib3.connectionpool: Starting new HTTP connection (1): localhost:50342  
urllib3.connectionpool: http://localhost:50342 "POST /oauth2/token HTTP/1.1" 200 1925  
msrestazure.azure_active_directory: MSI: Retrieving a token from http://localhost:50342/oauth2/token, with payload {'resource': 'https://management.core.windows.net/'}  
cli.azure.cli.core.auth.adal_authentication: Normalize expires_on: '1659202132' -> 1659202132  
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/xxxxx/resourceGroups/yyyyy/providers/Microsoft.Cdn/profiles?api-version=2021-06-01'  
cli.azure.cli.core.sdk.policies: Request method: 'GET'  
cli.azure.cli.core.sdk.policies: Request headers:  
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'  
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '0b7c6a8e-102b-11ed-ad5c-fe51a75b4cbf'  
cli.azure.cli.core.sdk.policies:     'CommandName': 'cdn profile list'  
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--debug'  
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.38.0 (DEB) azsdk-python-mgmt-cdn/12.0.0 Python/3.10.5 (Linux-5.4.0-1086-azure-x86_64-with-glibc2.28) cloud-shell/1.0'  
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'  
cli.azure.cli.core.sdk.policies: Request body:  
cli.azure.cli.core.sdk.policies: This request has no body  
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443  
urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/xxxxx/resourceGroups/yyyyy/providers/Microsoft.Cdn/profiles?api-version=2021-06-01 HTTP/1.1" 200 None  
cli.azure.cli.core.sdk.policies: Response status: 200  
cli.azure.cli.core.sdk.policies: Response headers:  
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'  
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'  
cli.azure.cli.core.sdk.policies:     'Transfer-Encoding': 'chunked'  
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'  
cli.azure.cli.core.sdk.policies:     'Content-Encoding': 'gzip'  
cli.azure.cli.core.sdk.policies:     'Expires': '-1'  
cli.azure.cli.core.sdk.policies:     'Vary': 'Accept-Encoding'  
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'  
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'cd61a6a6-1ee8-4679-8aaa-42758365eb2a'  
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '0b7c6a8e-102b-11ed-ad5c-fe51a75b4cbf'  
cli.azure.cli.core.sdk.policies:     'Server': 'Kestrel'  
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-resource-requests': '46'  
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'f4c8f922-8dd7-43b6-b0c1-dd64206c981a'  
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'EASTUS:20220730T171418Z:f4c8f922-8dd7-43b6-b0c1-dd64206c981a'  
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'  
cli.azure.cli.core.sdk.policies:     'Date': 'Sat, 30 Jul 2022 17:14:17 GMT'  
cli.azure.cli.core.sdk.policies: Response content:  
cli.azure.cli.core.sdk.policies: {"value":[{"id":"/subscriptions/xxxxx/resourcegroups/yyyyyy/providers/Microsoft.Cdn/profiles/ppartersgroupcom-prod","type":"Microsoft.Cdn/profiles","name":"ppartersgroupcom-prod","location":"Global","kind":"frontdoor","tags":{},"sku":{"name":"Standard_AzureFrontDoor"},"properties":{"originResponseTimeoutSeconds":60,"frontDoorId":"8788a512-8ab1-41c1-84ef-6e2a57e3245c","resourceState":"Active","provisioningState":"Succeeded"}}]}  
cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7f4a877996c0>, <function _x509_from_base64_to_hex_transform at 0x7f4a87799750>]  
cli.knack.cli: Event: CommandInvoker.OnFilterResult []  
[]  
cli.knack.cli: Event: Cli.SuccessfulExecute []  
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f4a8794b640>]  
az_command_data_logger: exit code: 0  
cli.__main__: Command ran in 0.528 seconds (init: 0.101, invoke: 0.427)  
telemetry.save: Save telemetry record of length 2985 in cache  

Here the specific response:

    cli.azure.cli.core.sdk.policies: Response content:  
    cli.azure.cli.core.sdk.policies: {"value":[{"id":"/subscriptions/xxxxx/resourcegroups/yyyyyy/providers/Microsoft.Cdn/profiles/ppartersgroupcom-prod","type":"Microsoft.Cdn/profiles","name":"ppartersgroupcom-prod","location":"Global","kind":"frontdoor","tags":{},"sku":{"name":"Standard_AzureFrontDoor"},"properties":{"originResponseTimeoutSeconds":60,"frontDoorId":"8788a512-8ab1-41c1-84ef-6e2a57e3245c","resourceState":"Active","provisioningState":"Succeeded"}}]}  
    cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7f4a877996c0>, <function _x509_from_base64_to_hex_transform at 0x7f4a87799750>]  
    cli.knack.cli: Event: CommandInvoker.OnFilterResult []  
    []  
Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
864 questions
Azure Content Delivery Network
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KapilAnanth-MSFT 49,621 Reputation points Microsoft Employee Moderator
    2022-08-01T14:25:01.123+00:00

    Hi @Anonymous ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
    I understand that you are not able to see your CDN profiles in Azure CLI.

    Please note that az cdn works only for Content Delivery Networks
    For Azure Frontdoor, we have two sets of commands based on the SKU.

    For Classic AFD,

    For Standard/Premium AFD,

    Kindly let me know if you have any follow-up queries on this, I shall try my best to address them.

    Cheers,
    Kapil.

    ----------------------------------------------------------------------------------------------------------------

    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.