Azure / autorest.powershell

AutoRest PowerShell Generator
MIT License
112 stars 78 forks source link

MobileNetwork New* commands don't properly work for updating a resource #1114

Closed rafaeldnferreira closed 1 year ago

rafaeldnferreira commented 1 year ago

Description

Take for reference New-AzMobileNetworkPacketCoreControlPlane:

I've created my resource;

Now I will perform an update, so first I perform a Get:

$pccp = Get-AzMobileNetworkPacketCoreControlPlane -ResourceGroup rf4-mobile-network -Name site-msi-cert

Then I update a single property:

$pccp.ControlPlaneAccessInterfaceIpv4Address = "10.0.2.6"

Finally, I send (what I expect to be the Update instruction because the resource already exists):

Notice that is currently a poor experience as I have to re-supply all the mandatory parameters again, as I user I would expect to rely on something like $pccp | New-AzMobileNetworkPacketCoreControlPlane - this will be raised separately.

New-AzMobileNetworkPacketCoreControlPlane -Name $pccp.Name -ResourceGroupName $pccp.ResourceGroupName -LocalDiagnosticAccessAuthenticationType $pccp.LocalDiagnosticAccessAuthenticationType -Location $pccp.Location -PlatformType $pccp.PlatformType -Site $pccp.Site -Sku $pccp.Sku -ControlPlaneAccessInterfaceIpv4Address $pccp.ControlPlaneAccessInterfaceIpv4Address

New-AzMobileNetworkPacketCoreControlPlane_CreateExpanded: Validation failed with multiple errors: ERR011 - Changing value for coreNetworkTechnology is not allowed.
ERR003 - Required field ipv4Subnet not set in '' Interface Properties
ERR029 - Invalid sites value: /subscriptions/2e6a1160-c68f-4298-b9fe-c510912f8b3a/resourceGroups/PLACEHOLDER/providers/Microsoft.MobileNetwork/mobileNetworks/PLACEHOLDER/sites/PLACEHOLDER not found

The problem here is that a single PUT instruction has been generated (see Debug output) instead of a GET, followed by a merge with the properties I've just supplied, hence the Update fails.

Issue script & Debug output

DEBUG: 08:19:35 - GetAzureRMContextCommand end processing.
DEBUG: [CmdletBeginProcessing]: Starting command
DEBUG: CmdletBeginProcessing:
DEBUG: CmdletProcessRecordStart:

Confirm
Are you sure you want to perform this action?
Performing the operation "New-AzMobileNetworkPacketCoreControlPlane_CreateExpanded" on target "Call remote 'PacketCoreControlPlanesCreateOrUpdate'
operation".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: CmdletGetPipeline:
DEBUG: CmdletBeforeAPICall:
DEBUG: URLCreated: /subscriptions/2e6a1160-c68f-4298-b9fe-c510912f8b3a/resourceGroups/rf4-mobile-network/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/site-msi-cert?api-version=2022-11-01
DEBUG: RequestCreated: /subscriptions/2e6a1160-c68f-4298-b9fe-c510912f8b3a/resourceGroups/rf4-mobile-network/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/site-msi-cert?api-version=2022-11-01
DEBUG: HeaderParametersAdded:
DEBUG: BodyContentSet:
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://centralus.api-dogfood.resources.windows-int.net/subscriptions/2e6a1160-c68f-4298-b9fe-c510912f8b3a/resourceGroups/rf4-mobile-network/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/site-msi-cert?api-version=2022-11-01

Headers:
x-ms-unique-id                : 5
x-ms-client-request-id        : cf607f9a-d944-4095-96c5-1901719f2529
CommandName                   : New-AzMobileNetworkPacketCoreControlPlane
FullCommandName               : New-AzMobileNetworkPacketCoreControlPlane_CreateExpanded
ParameterSetName              : __AllParameterSets
User-Agent                    : AzurePowershell/v0.0.0,PSVersion/v7.3.2,Az.MobileNetwork/0.1.0

Body:
{
  "location": "northeurope",
  "properties": {
    "platform": {
      "type": "BaseVM"
    },
    "controlPlaneAccessInterface": {
      "ipv4Address": "10.0.2.6"
    },
    "localDiagnosticsAccess": {
      "authenticationType": "Password"
    },
    "sites": [
      {
        "id": "/subscriptions/2e6a1160-c68f-4298-b9fe-c510912f8b3a/resourceGroups/PLACEHOLDER/providers/Microsoft.MobileNetwork/mobileNetworks/PLACEHOLDER/sites/PLACEHOLDER"
      }
    ],
    "sku": "G0"
  }
}

DEBUG: BeforeCall:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-writes: 1198
x-ms-providerhub-traffic      : True
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-request-id               : 163ad0f0-f7a4-4653-b990-8654833526bd
x-ms-build-version            : 1.0.1
x-ms-failure-cause            : gateway
x-ms-correlation-request-id   : 876a3415-c4e4-4647-9ee5-8155f93d4e99
Server                        : Kestrel
x-ms-routing-request-id       : CENTRALUS:20230210T081937Z:876a3415-c4e4-4647-9ee5-8155f93d4e99
X-Content-Type-Options        : nosniff
Date                          : Fri, 10 Feb 2023 08:19:37 GMT

Body:
{
  "error": {
    "code": "ResourceCreationValidateFailed",
    "message": "Validation failed with multiple errors: ERR011 - Changing value for coreNetworkTechnology is not allowed.\r\nERR003 - Required field ipv4Subnet not set in '' Interface Properties\r\nERR029 - Invalid sites value: /subscriptions/2e6a1160-c68f-4298-b9fe-c510912f8b3a/resourceGroups/PLACEHOLDER/providers/Microsoft.MobileNetwork/mobileNetworks/PLACEHOLDER/sites/PLACEHOLDER not found\r\n"
  }
}

DEBUG: ResponseCreated:
DEBUG: BeforeResponseDispatch:
DEBUG: CmdletProcessRecordEnd:
New-AzMobileNetworkPacketCoreControlPlane_CreateExpanded: Validation failed with multiple errors: ERR011 - Changing value for coreNetworkTechnology is not allowed.
ERR003 - Required field ipv4Subnet not set in '' Interface Properties
ERR029 - Invalid sites value: /subscriptions/2e6a1160-c68f-4298-b9fe-c510912f8b3a/resourceGroups/PLACEHOLDER/providers/Microsoft.MobileNetwork/mobileNetworks/PLACEHOLDER/sites/PLACEHOLDER not found

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.2
PSEdition                      Core
GitCommitId                    7.3.2
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

I couldn't get this output , it never returns

Error output

HistoryId: 6

Message        : [ResourceCreationValidateFailed] : Validation failed with multiple errors: ERR011 - Changing value for coreNetworkTechnology is not
                 allowed.
                 ERR003 - Required field ipv4Subnet not set in '' Interface Properties
                 ERR029 - Invalid sites value: /subscriptions/2e6a1160-c68f-4298-b9fe-c510912f8b3a/resourceGroups/PLACEHOLDER/providers/Microsoft.MobileNet
                 work/mobileNetworks/PLACEHOLDER/sites/PLACEHOLDER not found

StackTrace     :
Exception      : System.Exception
InvocationInfo : {New-AzMobileNetworkPacketCoreControlPlane_CreateExpanded}
Line           : New-AzMobileNetworkPacketCoreControlPlane -Name $pccp.Name -ResourceGroupName $pccp.ResourceGroupName
                 -LocalDiagnosticAccessAuthenticationType $pccp.LocalDiagnosticAccessAuthenticationType -Location $pccp.Location -PlatformType
                 $pccp.PlatformType -Site $pccp.Site -Sku $pccp.Sku -ControlPlaneAccessInterfaceIpv4Address $pccp.ControlPlaneAccessInterfaceIpv4Address
                 -Debug
Position       : At line:1 char:1
                 + New-AzMobileNetworkPacketCoreControlPlane -Name $pccp.Name -ResourceG …
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 6
isra-fel commented 1 year ago

This should be a general issue with cmdlets generated by Autorest.powershell. I will transfer it to the proper repo.

dolauli commented 1 year ago

@rafaeldnferreira Our current design is to use new- cmdlets only for resource creating. You should need to use update- for update, which is mapped to the patch API instead of PUT API.

rafaeldnferreira commented 1 year ago

Hi @dolauli ,

I understand your statement, but this isn't what has been reflected in the generated module/documentation:

New-AzMobileNetwork

It makes a promise to create or update the resource:

Creates or updates a packet core control plane.

The Updated commands was only generated to update the Tags Update-AzMobileNetworkPacketCoreControlPlane (which is the only operation supported by PATCH in our Swagger definition)

Updates packet core control planes tags.

Our Swagger clearly exposes that PUT is a Create/Replace verb.

There are two potential solutions here and I would like you/autorest.powershell team to advise on what's best: Fix the New cmdlet to behave as it is documented or change the Update to be based on the PUT action and not PATCH.

dolauli commented 1 year ago

Update-AzMobileNetworkPacketCoreControlPlane can only update the tag is a limitation of the service, and service team should provide full functional patch API actually. PUT is 'replace' (full update) as you said. And we used to generate a set-* cmdlet for PUT to do the full update. But finally we remove it, since feedback from customers feel it is not easy to use. And users have to provide the information they do not need to update when using it. Yes, get->put is a potential solution, which actually should be supported by service in the patch API. To support it in client-side will have some limitations as below.

  1. The response of get and the request of put should use the schema
  2. Some properties are write-only (like password), after you create the resource, you can not get it back from the service any more.

Last, you still can use create-* cmdlet for full update(replace) though we do not recommend users to do that. Since we pull description from swagger to generate docs, that explains why it is 'Creates or updates a packet core control plane.'. If you think the docs is an problem, we could try to correct it from our side.

rafaeldnferreira commented 1 year ago

Hi @dolauli , thanks for the details,

1) Your statement around PATCH doesn't hold true - there's no business case for our service to provide a synchronous PATCH operation other than the updates of tags, I'm assuming that will be the case for other services that deploy/manage resources beyond the cloud borders (Edge/Arc).

2) We fully understand the limitations on doing GET / PUT, but that's exactly the approach the AZ Cli is doing and it is an acceptable behaviour for our use case:

rafael@RAFAELFERREIRA:~$ az mobile-network pccp update -n site01 -g tp-rg-2022-11-01 --ue-mtu 1290 --debug
cli.knack.cli: Command arguments: ['mobile-network', 'pccp', 'update', '-n', 'site01', '-g', 'tp-rg-2022-11-01', '--ue-mtu', '1290', '--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 0x7fc7882b51b0>, <function OutputProducer.on_global_arguments at 0x7fc7881afc70>, <function CLIQuery.on_global_arguments at 0x7fc7881f8ee0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'mobile-network': ['azext_mobile_network']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: Total (0)                 0.000         0         0
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: mobile-network            0.071        10        23  /home/rafael/.azure/cliextensions/mobile-network
cli.azure.cli.core: Total (1)                 0.071        10        23
cli.azure.cli.core: Loaded 10 groups, 23 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : mobile-network pccp update
cli.azure.cli.core: Command table: mobile-network pccp update
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fc786dc85e0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/rafael/.azure/commands/2023-02-15.08-56-15.mobile-network_pccp_update.917.log'.
az_command_data_logger: command args: mobile-network pccp update -n {} -g {} --ue-mtu {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7fc786de52d0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7fc786e0fbe0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7fc786e0fd00>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fc7881afd00>, <function CLIQuery.handle_query_parameter at 0x7fc7881f8f70>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7fc786e0fc70>]
az_command_data_logger: extension name: mobile-network
az_command_data_logger: extension version: 0.1.0
cli.azure.cli.core.auth.persistence: build_persistence: location='/home/rafael/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /home/rafael/.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: 1deb19c2-a20b-4261-8d66-8e7aa984aba2
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/53c7a82a-bf93-4419-8236-6c242a03f675/resourceGroups/tp-rg-2022-11-01/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/site01?api-version=2022-11-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': '9a8ba9c6-ad0e-11ed-bd4b-00155d48856b'
cli.azure.cli.core.sdk.policies:     'CommandName': 'mobile-network pccp update'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '-n -g --ue-mtu --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.45.0 (DEB) (AAZ) azsdk-python-core/1.24.0 Python/3.10.8 (Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35)'
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/53c7a82a-bf93-4419-8236-6c242a03f675/resourceGroups/tp-rg-2022-11-01/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/site01?api-version=2022-11-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:     'ETag': '"950068f7-0000-0100-0000-6390d3c10000"'
cli.azure.cli.core.sdk.policies:     'Vary': 'Accept-Encoding'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '11999'
cli.azure.cli.core.sdk.policies:     'x-ms-providerhub-traffic': 'True'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'afb7643b-1f02-4e16-8139-b4eea1010ea3'
cli.azure.cli.core.sdk.policies:     'x-ms-build-version': '1.0.1'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '6f762e55-fe5d-4459-a1c1-a6bcbdbf5181'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'UKSOUTH:20230215T085615Z:6f762e55-fe5d-4459-a1c1-a6bcbdbf5181'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 15 Feb 2023 08:56:14 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"id":"/subscriptions/53c7a82a-bf93-4419-8236-6c242a03f675/resourceGroups/tp-rg-2022-11-01/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/site01","name":"site01","type":"microsoft.mobilenetwork/packetcorecontrolplanes","location":"eastus","systemData":{"createdBy":"thomaspretty@microsoft.com","createdByType":"User","createdAt":"2022-12-07T17:56:03.3362824Z","lastModifiedBy":"thomaspretty@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-12-07T17:56:03.3362824Z"},"identity":{"type":"None"},"properties":{"provisioningState":"Succeeded","sites":[{"id":"/subscriptions/53c7a82a-bf93-4419-8236-6c242a03f675/resourceGroups/tp-rg-2022-11-01/providers/Microsoft.MobileNetwork/mobileNetworks/mn/sites/site01"}],"platform":{"type":"BaseVM"},"coreNetworkTechnology":"5GC","version":"pmn-2211-0-3","controlPlaneAccessInterface":{"ipv4Address":"1.1.1.1","ipv4Subnet":"1.1.1.1/24","ipv4Gateway":"1.1.1.1"},"sku":"G1","localDiagnosticsAccess":{"authenticationType":"AAD","httpsServerCertificate":{"certificateUrl":""}}}}
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/53c7a82a-bf93-4419-8236-6c242a03f675/resourceGroups/tp-rg-2022-11-01/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/site01?api-version=2022-11-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': '578'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '9a8ba9c6-ad0e-11ed-bd4b-00155d48856b'
cli.azure.cli.core.sdk.policies:     'CommandName': 'mobile-network pccp update'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '-n -g --ue-mtu --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.45.0 (DEB) (AAZ) azsdk-python-core/1.24.0 Python/3.10.8 (Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"identity": {"type": "None"}, "location": "eastus", "properties": {"controlPlaneAccessInterface": {"ipv4Address": "1.1.1.1", "ipv4Gateway": "1.1.1.1", "ipv4Subnet": "1.1.1.1/24"}, "coreNetworkTechnology": "5GC", "localDiagnosticsAccess": {"authenticationType": "AAD", "httpsServerCertificate": {"certificateUrl": ""}}, "platform": {"type": "BaseVM"}, "sites": [{"id": "/subscriptions/53c7a82a-bf93-4419-8236-6c242a03f675/resourceGroups/tp-rg-2022-11-01/providers/Microsoft.MobileNetwork/mobileNetworks/mn/sites/site01"}], "sku": "G1", "ueMtu": 1290, "version": "pmn-2211-0-3"}}
urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/53c7a82a-bf93-4419-8236-6c242a03f675/resourceGroups/tp-rg-2022-11-01/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/site01?api-version=2022-11-01 HTTP/1.1" 201 1046
cli.azure.cli.core.sdk.policies: Response status: 201
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': '1046'
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:     'ETag': '"1e00fc0c-0000-0100-0000-63ec9e310000"'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-writes': '1199'
cli.azure.cli.core.sdk.policies:     'x-ms-providerhub-traffic': 'True'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '4a370b39-479d-4af4-a541-69c09c31d1e3'
cli.azure.cli.core.sdk.policies:     'x-ms-build-version': '1.0.1'
cli.azure.cli.core.sdk.policies:     'Azure-AsyncOperation': 'https://management.azure.com/providers/Microsoft.MobileNetwork/locations/EASTUS/operationStatuses/890c4efc-a278-4a99-ac36-ab4265431f54*63494DF6D3AA20D4FF3A3E74CF53CC65AD46231E140FFC964937F20B0BC24319?api-version=2022-11-01'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '5f112770-98de-4685-b715-32d071772844'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'UKSOUTH:20230215T085618Z:5f112770-98de-4685-b715-32d071772844'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 15 Feb 2023 08:56:17 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"id":"/subscriptions/53c7a82a-bf93-4419-8236-6c242a03f675/resourceGroups/tp-rg-2022-11-01/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/site01","name":"site01","type":"microsoft.mobilenetwork/packetcorecontrolplanes","location":"eastus","systemData":{"createdBy":"thomaspretty@microsoft.com","createdByType":"User","createdAt":"2022-12-07T17:56:03.3362824Z","lastModifiedBy":"rafaelda@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-15T08:56:16.1707097Z"},"identity":{"type":"None"},"properties":{"provisioningState":"Accepted","controlPlaneAccessInterface":{"ipv4Address":"1.1.1.1","ipv4Gateway":"1.1.1.1","ipv4Subnet":"1.1.1.1/24"},"coreNetworkTechnology":"5GC","localDiagnosticsAccess":{"authenticationType":"AAD","httpsServerCertificate":{"certificateUrl":""}},"platform":{"type":"BaseVM"},"sites":[{"id":"/subscriptions/53c7a82a-bf93-4419-8236-6c242a03f675/resourceGroups/tp-rg-2022-11-01/providers/Microsoft.MobileNetwork/mobileNetworks/mn/sites/site01"}],"sku":"G1","ueMtu":1290,"version":"pmn-2211-0-3"}}
dolauli commented 1 year ago

Currently, you will need to support it through customization. And here is an example for get->put.

rafaeldnferreira commented 1 year ago

Thanks @dolauli I've raised the discussion to the attention of the other stake holders in our original service onboarding mail chain, I believe you are on it.

dolauli commented 1 year ago

Close it since workaround is provided.