Add imageDeprecationStatus properties to "az vm image show" CLI command output #25313
Labels
Auto-Assign
Auto assign by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
Compute
az vm/vmss/image/disk/snapshot
feature-request
Milestone
When customers use the existing CLI command "az vm image show", it should display imageDeprecationStatus properties in the output, when available.
The imageDeprecationStatus properties can be seen today in the REST API response using --debug switch but not in the actual CLI command output as below:
C:\Users\raswamin>az vm image show --location eastus --publisher MicrosoftWindowsDesktop --offer Windows-10 --sku 20h2-pro-g2 --version 19042.1645.220403 --debug
cli.knack.cli: Command arguments: ['vm', 'image', 'show', '--location', 'eastus', '--publisher', 'MicrosoftWindowsDesktop', '--offer', 'Windows-10', '--sku', '20h2-pro-g2', '--version', '19042.1645.220403', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x03D59340>, <function OutputProducer.on_global_arguments at 0x03F3C610>, <function CLIQuery.on_global_arguments at 0x03F50268>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'vm': ['azure.cli.command_modules.vm']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: vm 0.211 56 292
cli.azure.cli.core: Total (1) 0.211 56 292
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 56 groups, 292 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : vm image show
cli.azure.cli.core: Command table: vm image show
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x05017A48>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\raswamin.azure\commands\2023-02-01.12-40-31.vm_image_show.22408.log'.
az_command_data_logger: command args: vm image show --location {} --publisher {} --offer {} --sku {} --version {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x05038DA8>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x05038E80>, <function register_cache_arguments..add_cache_arguments at 0x05062418>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x03F3C658>, <function CLIQuery.handle_query_parameter at 0x03F502B0>, <function register_ids_argument..parse_ids_arguments at 0x050623D0>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ComputeManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\raswamin\.azure\msal_token_cache.bin', encrypt=True
cli.azure.cli.core.auth.binary_cache: load: C:\Users\raswamin.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/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/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/72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/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/72f988bf-86f1-41af-91ab-2d7cd011db47/kerberos', 'tenant_region_scope': 'WW', '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? False
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: 613f40ef-f982-4265-a1b3-7a11cc2187c7
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/8a995259-e06e-4e20-9286-025e0b331dfe/providers/Microsoft.Compute/locations/eastus/publishers/MicrosoftWindowsDesktop/artifacttypes/vmimage/offers/Windows-10/skus/20h2-pro-g2/versions/19042.1645.220403?api-version=2022-08-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': '837ab239-a1ff-11ed-9a91-38142838cd36'
cli.azure.cli.core.sdk.policies: 'CommandName': 'vm image show'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--location --publisher --offer --sku --version --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.41.0 (MSI) azsdk-python-azure-mgmt-compute/28.0.0 Python/3.10.5 (Windows-10-10.0.22621-SP0)'
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/8a995259-e06e-4e20-9286-025e0b331dfe/providers/Microsoft.Compute/locations/eastus/publishers/MicrosoftWindowsDesktop/artifacttypes/vmimage/offers/Windows-10/skus/20h2-pro-g2/versions/19042.1645.220403?api-version=2022-08-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: 'x-ms-ratelimit-remaining-resource': 'Microsoft.Compute/GetVMImageFromLocation3Min;12998,Microsoft.Compute/GetVMImageFromLocation30Min;73998'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'x-ms-served-by': 'ea53b42c-4086-44d3-88ec-d14961d9cf20_133116515323493580'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '1935801b-d51c-4589-bda1-bf6c0f099b61'
cli.azure.cli.core.sdk.policies: 'Server': 'Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-reads': '11998'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'b825baf6-1b50-423c-b70a-fcf1498771c4'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'SOUTHINDIA:20230201T071032Z:b825baf6-1b50-423c-b70a-fcf1498771c4'
cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies: 'Date': 'Wed, 01 Feb 2023 07:10:32 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {
"properties": {
"hyperVGeneration": "V2",
"architecture": "x64",
"replicaType": "Managed",
"replicaCount": 10,
"disallowed": {
"vmDiskType": "Unmanaged"
},
"automaticOSUpgradeProperties": {
"automaticOSUpgradeSupported": false
},
"imageDeprecationStatus": {
"imageState": "ScheduledForDeprecation",
"scheduledDeprecationTime": "2023-02-20T00:00:00+00:00"
},
"features": [
{
"name": "SecurityType",
"value": "TrustedLaunchSupported"
},
{
"name": "IsAcceleratedNetworkSupported",
"value": "True"
},
{
"name": "DiskControllerTypes",
"value": "SCSI"
},
{
"name": "IsHibernateSupported",
"value": "False"
}
],
"osDiskImage": {
"operatingSystem": "Windows",
"sizeInGb": 127
},
"dataDiskImages": []
},
"location": "eastus",
"name": "19042.1645.220403",
"id": "/Subscriptions/8a995259-e06e-4e20-9286-025e0b331dfe/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsDesktop/ArtifactTypes/VMImage/Offers/Windows-10/Skus/20h2-pro-g2/Versions/19042.1645.220403"
}
cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x050382B0>, <function _x509_from_base64_to_hex_transform at 0x050382F8>]
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
{
"architecture": "x64",
"automaticOsUpgradeProperties": {
"automaticOsUpgradeSupported": false
},
"dataDiskImages": [],
"disallowed": {
"vmDiskType": "Unmanaged"
},
"extendedLocation": null,
"features": [
{
"name": "SecurityType",
"value": "TrustedLaunchSupported"
},
{
"name": "IsAcceleratedNetworkSupported",
"value": "True"
},
{
"name": "DiskControllerTypes",
"value": "SCSI"
},
{
"name": "IsHibernateSupported",
"value": "False"
}
],
"hyperVGeneration": "V2",
"id": "/Subscriptions/8a995259-e06e-4e20-9286-025e0b331dfe/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsDesktop/ArtifactTypes/VMImage/Offers/Windows-10/Skus/20h2-pro-g2/Versions/19042.1645.220403",
"location": "eastus",
"name": "19042.1645.220403",
"osDiskImage": {
"operatingSystem": "Windows",
"sizeInGb": 127
},
"plan": null,
"tags": null
}
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x05017B68>]
az_command_data_logger: exit code: 0
cli.main: Command ran in 1.918 seconds (init: 0.637, invoke: 1.281)
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 3120 in cache
telemetry.check: Negative: The C:\Users\raswamin.azure\telemetry.txt was modified at 2023-02-01 12:37:01.364096, which in less than 600.000000 s
The text was updated successfully, but these errors were encountered: