Azure / azure-cli

Azure Command-Line Interface
MIT License
3.88k stars 2.84k forks source link

az cdn profile create does not work #28824

Closed smereczynski closed 3 days ago

smereczynski commented 1 month ago

Describe the bug

It is not possible to succeed with command az cdn profile create. The documentation is saying that we need to run it as follows: az afd profile create -g group --profile-name profile --sku Standard_AzureFrontDoor (without --location parameter). But when running, it is throwing an error The provided location 'polandcentral' is not available for resource type 'Microsoft.Cdn/profiles'. List of available regions for the resource type is 'global,australiaeast,australiasoutheast,brazilsouth,canadacentral,canadaeast,centralindia,centralus,eastasia,eastus,eastus2,japaneast,japanwest,northcentralus,northeurope,southcentralus,southindia,southeastasia,westeurope,westindia,westus,westcentralus'. (from debug I know that the location is taken from resource group). If I put the --location global parameter (which is not documented and not emphasized as required), I'm getting error like this: unrecognized arguments: --location global.

Related command

az cdn profile create

Errors

unrecognized arguments: --location global

Issue script & Debug output

cli.knack.cli: Command arguments: ['cdn', 'profile', 'create', '--resource-group', 'rg-frontend-nonprod-plc', '--name', 'cdn-name', '--sku', 'Standard_Microsoft', '--subscription', 'id', '--location', 'global', '--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 0x1012e5620>, <function OutputProducer.on_global_arguments at 0x10138c7c0>, <function CLIQuery.on_global_arguments at 0x1013ba2a0>] 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 2.328 14 51 cli.azure.cli.core: Total (1) 2.328 14 51 cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next'] cli.azure.cli.core: Loading extensions: cli.azure.cli.core: Name Load Time Groups Commands Directory cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 14 groups, 51 commands. cli.azure.cli.core: Found a match in the command table. cli.azure.cli.core: Raw command : cdn profile create cli.azure.cli.core: Command table: cdn profile create cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x1020e3060>] cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/michal/.azure/commands/2024-04-24.17-08-50.cdn_profile_create.86532.log'. az_command_data_logger: command args: cdn profile create --resource-group {} --name {} --sku {} --subscription {} --location {} --debug cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x102133ec0>] cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x102133f60>, <function register_cache_arguments..add_cache_arguments at 0x10215c0e0>] cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [] cli.azure.cli.core.command_recommender: "--location" is an invalid parameter for command "cdn profile create". urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443 urllib3.connectionpool: https://app.aladdin.microsoft.com:443 "GET /api/v1.0/suggestions?query=%7B%22command%22%3A+%22cdn+profile+create%22%2C+%22parameters%22%3A+%22%22%7D&clientType=AzureCli&context=%7B%22versionNumber%22%3A+%222.59.0%22%2C+%22errorType%22%3A+%22UnrecognizedArguments%22%2C+%22correlationId%22%3A+%229522d614-01e9-4ac2-83e0-74c0cc884b5c%22%2C+%22subscriptionId%22%3A+%2206ee7b2a-5b29-4157-812e-42f98d1b2cbe%22%2C+%22eventId%22%3A+%22b301c087-b63e-463e-b3fa-561c87b8edf1%22%7D HTTP/1.1" 200 None cli.azure.cli.core.command_recommender: "--location" is an invalid parameter for command "cdn profile create". cli.azure.cli.core.command_recommender: "--location" is an invalid parameter for command "cdn profile create". cli.azure.cli.core.azclierror: NoneType: None

cli.azure.cli.core.azclierror: unrecognized arguments: --location global az_command_data_logger: unrecognized arguments: --location global

Examples from AI knowledge base: az cdn profile create --resource-group group --name profile --sku Premium_Verizon Create a CDN profile using Verizon premium CDN.

az cdn profile create --location westus2 --name profile --resource-group group --sku Standard_Verizon Create a new CDN profile. (autogenerated)

https://docs.microsoft.com/en-US/cli/azure/cdn/profile#az_cdn_profile_create Read more about the command in reference docs cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x1020e32e0>] az_command_data_logger: exit code: 2 cli.main: Command ran in 3.832 seconds (init: 1.018, invoke: 2.814) telemetry.main: Begin splitting cli events and extra events, total events: 1 telemetry.client: Accumulated 0 events. Flush the clients. telemetry.main: Finish splitting cli events and extra events, cli events: 1 telemetry.save: Save telemetry record of length 4004 in cache telemetry.main: Begin creating telemetry upload process. telemetry.process: Creating upload process: "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/bin/python /opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/telemetry/init.py /Users/michal/.azure" telemetry.process: Return from creating process telemetry.main: Finish creating telemetry upload process.

Expected behavior

It should create a CDN profile like when using REST API:

az rest --method put --uri "https://management.azure.com/subscriptions/id/resourceGroups/rg-frontend-nonprod-plc/providers/Microsoft.Cdn/profiles/cdn-name?api-version=2023-05-01" --body '{"location": "global","sku": {"name": "Standard_Microsoft"}}'

where this az rest command works (with location parameter).

Environment Summary

azure-cli 2.59.0

core 2.59.0 telemetry 1.1.0

Extensions: account 0.2.5 azure-devops 0.26.0 azure-firewall 1.0.1 bastion 0.2.4 connectedk8s 1.3.16 dataprotection 0.10.0 managementpartner 0.1.3 ml 2.15.1 resource-graph 2.1.0 ssh 1.1.6

Dependencies: msal 1.27.0 azure-mgmt-resource 23.1.0b2

Python (Darwin) 3.11.9 (main, Apr 2 2024, 08:25:04) [Clang 15.0.0 (clang-1500.3.9.4)]

Additional context

When running command without --location parameter, then error is a little bit longer:


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 0x101e21620>, <function OutputProducer.on_global_arguments at 0x101ecc7c0>, <function CLIQuery.on_global_arguments at 0x101efa2a0>]
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.192        14        51
cli.azure.cli.core: Total (1)                 0.192        14        51
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: Total (0)                 0.000         0         0  
cli.azure.cli.core: Loaded 14 groups, 51 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : cdn profile create
cli.azure.cli.core: Command table: cdn profile create
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x102c23060>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/michal/.azure/commands/2024-04-24.13-25-46.cdn_profile_create.60346.log'.
az_command_data_logger: command args: cdn profile create --resource-group {} --name {} --sku {} --subscription {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x102c73ec0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x102c73f60>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x102c9c0e0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x101ecc860>, <function CLIQuery.handle_query_parameter at 0x101efa340>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x102c9c040>]
Command group 'afd' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ResourceManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='/Users/michal/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /Users/michal/.azure/msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? None
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: bf9d5ee1-c90d-4ab5-9818-aeddf4983d14
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/c56ad7ab-e71e-4d4b-ac2f-711622a88630/resourcegroups/rg-frontend-nonprod-plc?api-version=2022-09-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': '64e3babe-022d-11ef-b351-922fa84798ba'
cli.azure.cli.core.sdk.policies:     'CommandName': 'cdn profile create'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--resource-group --name --sku --subscription --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.59.0 (HOMEBREW) azsdk-python-core/1.28.0 Python/3.11.9 (macOS-14.4.1-arm64-arm-64bit)'
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/c56ad7ab-e71e-4d4b-ac2f-711622a88630/resourcegroups/rg-frontend-nonprod-plc?api-version=2022-09-01 HTTP/1.1" 200 250
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:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '11999'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'f5fb3e9a-50e4-435e-840d-218acc09ad14'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'f5fb3e9a-50e4-435e-840d-218acc09ad14'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'POLANDCENTRAL:20240424T112546Z:f5fb3e9a-50e4-435e-840d-218acc09ad14'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 24 Apr 2024 11:25:46 GMT'
cli.azure.cli.core.sdk.policies:     'Content-Length': '250'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"id":"/subscriptions/c56ad7ab-e71e-4d4b-ac2f-711622a88630/resourceGroups/rg-frontend-nonprod-plc","name":"rg-frontend-nonprod-plc","type":"Microsoft.Resources/resourceGroups","location":"polandcentral","properties":{"provisioningState":"Succeeded"}}
cli.azure.cli.core.aaz._arg_fmt: using location 'polandcentral' from resource group 'rg-frontend-nonprod-plc'
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/0479d1b8-c68d-42cb-9a43-fdd307d5aab6/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? None
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: ea26efb2-3480-4a2b-a9a1-8f5872fd2b6b
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/id/resourceGroups/rg-frontend-nonprod-plc/providers/Microsoft.Cdn/profiles/cdn-name?api-version=2023-05-01'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'Content-Length': '68'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '64e3babe-022d-11ef-b351-922fa84798ba'
cli.azure.cli.core.sdk.policies:     'CommandName': 'cdn profile create'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--resource-group --name --sku --subscription --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.59.0 (HOMEBREW) azsdk-python-core/1.28.0 Python/3.11.9 (macOS-14.4.1-arm64-arm-64bit)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"location": "polandcentral", "sku": {"name": "Standard_Microsoft"}}
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/id/resourceGroups/rg-frontend-nonprod-plc/providers/Microsoft.Cdn/profiles/cdn-name?api-version=2023-05-01 HTTP/1.1" 400 474
cli.azure.cli.core.sdk.policies: Response status: 400
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:     'Content-Length': '474'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'x-ms-failure-cause': 'gateway'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '7dd5ae85-d752-445b-810a-86c11aa8df84'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '7dd5ae85-d752-445b-810a-86c11aa8df84'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'POLANDCENTRAL:20240424T112547Z:7dd5ae85-d752-445b-810a-86c11aa8df84'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 24 Apr 2024 11:25:47 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"error":{"code":"LocationNotAvailableForResourceType","message":"The provided location 'polandcentral' is not available for resource type 'Microsoft.Cdn/profiles'. List of available regions for the resource type is 'global,australiaeast,australiasoutheast,brazilsouth,canadacentral,canadaeast,centralindia,centralus,eastasia,eastus,eastus2,japaneast,japanwest,northcentralus,northeurope,southcentralus,southindia,southeastasia,westeurope,westindia,westus,westcentralus'."}}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 664, in execute
    raise ex
  File "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 731, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 712, in _run_job
    result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 1048, in __call__
    raise exception
  File "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 1035, in __call__
    result = poller.result()
             ^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/core/aaz/_poller.py", line 108, in result
    self.wait(timeout)
  File "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/core/aaz/_poller.py", line 130, in wait
    raise self._exception
  File "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/core/aaz/_poller.py", line 83, in _start
    for polling_method in self._polling_generator:
  File "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/cdn/aaz/latest/afd/profile/_create.py", line 124, in _execute_operations
    yield self.ProfilesCreate(ctx=self.ctx)()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/cdn/aaz/latest/afd/profile/_create.py", line 164, in __call__
    return self.on_error(session.http_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/core/aaz/_operation.py", line 332, in on_error
    raise HttpResponseError(response=response, error_format=error_format)
azure.core.exceptions.HttpResponseError: (LocationNotAvailableForResourceType) The provided location 'polandcentral' is not available for resource type 'Microsoft.Cdn/profiles'. List of available regions for the resource type is 'global,australiaeast,australiasoutheast,brazilsouth,canadacentral,canadaeast,centralindia,centralus,eastasia,eastus,eastus2,japaneast,japanwest,northcentralus,northeurope,southcentralus,southindia,southeastasia,westeurope,westindia,westus,westcentralus'.
Code: LocationNotAvailableForResourceType
Message: The provided location 'polandcentral' is not available for resource type 'Microsoft.Cdn/profiles'. List of available regions for the resource type is 'global,australiaeast,australiasoutheast,brazilsouth,canadacentral,canadaeast,centralindia,centralus,eastasia,eastus,eastus2,japaneast,japanwest,northcentralus,northeurope,southcentralus,southindia,southeastasia,westeurope,westindia,westus,westcentralus'.

cli.azure.cli.core.azclierror: (LocationNotAvailableForResourceType) The provided location 'polandcentral' is not available for resource type 'Microsoft.Cdn/profiles'. List of available regions for the resource type is 'global,australiaeast,australiasoutheast,brazilsouth,canadacentral,canadaeast,centralindia,centralus,eastasia,eastus,eastus2,japaneast,japanwest,northcentralus,northeurope,southcentralus,southindia,southeastasia,westeurope,westindia,westus,westcentralus'.
Code: LocationNotAvailableForResourceType
Message: The provided location 'polandcentral' is not available for resource type 'Microsoft.Cdn/profiles'. List of available regions for the resource type is 'global,australiaeast,australiasoutheast,brazilsouth,canadacentral,canadaeast,centralindia,centralus,eastasia,eastus,eastus2,japaneast,japanwest,northcentralus,northeurope,southcentralus,southindia,southeastasia,westeurope,westindia,westus,westcentralus'.
az_command_data_logger: (LocationNotAvailableForResourceType) The provided location 'polandcentral' is not available for resource type 'Microsoft.Cdn/profiles'. List of available regions for the resource type is 'global,australiaeast,australiasoutheast,brazilsouth,canadacentral,canadaeast,centralindia,centralus,eastasia,eastus,eastus2,japaneast,japanwest,northcentralus,northeurope,southcentralus,southindia,southeastasia,westeurope,westindia,westus,westcentralus'.
Code: LocationNotAvailableForResourceType
Message: The provided location 'polandcentral' is not available for resource type 'Microsoft.Cdn/profiles'. List of available regions for the resource type is 'global,australiaeast,australiasoutheast,brazilsouth,canadacentral,canadaeast,centralindia,centralus,eastasia,eastus,eastus2,japaneast,japanwest,northcentralus,northeurope,southcentralus,southindia,southeastasia,westeurope,westindia,westus,westcentralus'.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x102c232e0>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 1.799 seconds (init: 0.084, invoke: 1.715)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 4779 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/bin/python /opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/telemetry/__init__.py /Users/michal/.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.```
yonzhan commented 1 month ago

Thank you for opening this issue, we will look into it.

t-bzhan commented 5 days ago

Add @Ptnan7 to take a look.