Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.21k stars 3.81k forks source link

[Feature]: Need a way to set up extendedproperty by Set-AzEnvironment #25823

Open BethanyZhou opened 4 weeks ago

BethanyZhou commented 4 weeks ago

Description of the new feature

PS C:\Azure\upstream\azure-powershell> (Get-AzEnvironment).ExtendedProperties

Key                                       Value
---                                       -----
OperationalInsightsEndpoint               https://api.loganalytics.us/v1
AzureSynapseAnalyticsEndpointSuffix       dev.azuresynapse.usgovcloudapi.net
AzureAnalysisServicesEndpointSuffix       asazure.usgovcloudapi.net
MicrosoftGraphEndpointResourceId          https://graph.microsoft.us/
ManagedHsmServiceEndpointSuffix           managedhsm.usgovcloudapi.net
OperationalInsightsEndpointResourceId     https://api.loganalytics.us
AnalysisServicesEndpointResourceId        https://region.asazure.usgovcloudapi.net
ManagedHsmServiceEndpointResourceId       https://managedhsm.usgovcloudapi.net
AzureSynapseAnalyticsEndpointResourceId   https://dev.azuresynapse.usgovcloudapi.net
MicrosoftGraphUrl                         https://graph.microsoft.us
ContainerRegistryEndpointResourceId       https://management.usgovcloudapi.net
OperationalInsightsEndpoint               https://api.loganalytics.azure.cn/v1
AzureSynapseAnalyticsEndpointSuffix       dev.azuresynapse.azure.cn
AzureAnalysisServicesEndpointSuffix       asazure.chinacloudapi.cn
MicrosoftGraphEndpointResourceId          https://microsoftgraph.chinacloudapi.cn/
ManagedHsmServiceEndpointSuffix           managedhsm.azure.cn
OperationalInsightsEndpointResourceId     https://api.loganalytics.azure.cn
AnalysisServicesEndpointResourceId        https://region.asazure.chinacloudapi.cn
ManagedHsmServiceEndpointResourceId       https://managedhsm.azure.cn
AzureSynapseAnalyticsEndpointResourceId   https://dev.azuresynapse.azure.cn
MicrosoftGraphUrl                         https://microsoftgraph.chinacloudapi.cn
ContainerRegistryEndpointResourceId       https://management.chinacloudapi.cn
ManagedHsmServiceEndpointResourceId       https://managedhsm.azure.net
ContainerRegistryEndpointResourceId       https://management.azure.com
AzureAppConfigurationEndpointResourceId   https://azconfig.io
AzurePurviewEndpointSuffix                purview.azure.net
ManagedHsmServiceEndpointSuffix           managedhsm.azure.net
MicrosoftGraphUrl                         https://graph.microsoft.com
AzureAttestationServiceEndpointSuffix     attest.azure.net
AzureSynapseAnalyticsEndpointSuffix       dev.azuresynapse.net
AzureAnalysisServicesEndpointSuffix       asazure.windows.net
AzureSynapseAnalyticsEndpointResourceId   https://dev.azuresynapse.net
OperationalInsightsEndpointResourceId     https://api.loganalytics.io
AnalysisServicesEndpointResourceId        https://region.asazure.windows.net
AzurePurviewEndpointResourceId            https://purview.azure.net
AzureAppConfigurationEndpointSuffix       azconfig.io
AzureAttestationServiceEndpointResourceId https://attest.azure.net
MicrosoftGraphEndpointResourceId          https://graph.microsoft.com/
OperationalInsightsEndpoint               https://api.loganalytics.io/v1

If I want to change the value of ManagedHsmServiceEndpointSuffix, the only thing I can do is modifying AzureRmContext.json manually.

Proposed implementation details (optional)

Support Set-AzEnvironment -ExtendedProperty -Key xxx -Value xxx

isra-fel commented 4 weeks ago

Whether the property is stored in extended properties is a impmentation detail and should not be exposed to user. We need to expose a dedicated parameter for it.

isra-fel commented 3 weeks ago

Conclusion: let's use the flattern syntax because of (a) better doc support (b) not exposing internal implemetatin