Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.26k stars 3.86k forks source link

Pipeline operation breaks in MySql Flexible server #13785

Open msJinLei opened 3 years ago

msJinLei commented 3 years ago

Description

Resource provider name is different between path (DBForMySql) and resource Id(DBforMySQL), which causes piping operations such as Get-AzMySqlFlexiblerServer | Remove-AzMySqlFlexibleServer not to work. Please see the following http request and response for details

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/yemingtemp/providers/Microsoft.DBForMySql/flexibleServers?api-version=2020-07-01-preview

Headers:

Body:

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

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
X-Content-Type-Options        : nosniff
x-ms-request-id               : 00e390a6-a188-4913-a999-aa9c86561868
Server                        : Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11995
x-ms-correlation-request-id   : 70e7c07a-eccf-4581-8537-29c7c3ebba81
x-ms-routing-request-id       : SOUTHEASTASIA:20201217T111831Z:70e7c07a-eccf-4581-8537-29c7c3ebba81
Strict-Transport-Security     : max-age=31536000; includeSubDomains
Date                          : Thu, 17 Dec 2020 11:18:30 GMT

Body:
{
  "value": [
    {
      "sku": {
        "name": "Standard_B1ms",
        "tier": "Burstable",
        "capacity": 0
      },
      "properties": {
        "administratorLogin": "mysql_test",
        "storageProfile": {
          "storageMB": 10240,
          "storageIops": 0,
          "backupRetentionDays": 7,
          "storageAutogrow": "Disabled",
          "fileStorageSkuName": "Premium_LRS"
        },
        "version": "5.7",
        "state": "Ready",
        "haState": "NotEnabled",
        "fullyQualifiedDomainName": "mysql-test-100.mysql.database.azure.com",
        "sourceServerId": "",
        "publicNetworkAccess": "Disabled",
        "sslEnforcement": "Disabled",
        "haEnabled": "Disabled",
        "earliestRestoreDate": "2020-12-17T18:49:40.7766824+08:00",
        "replicationRole": "None",
        "replicaCapacity": 10,
        "delegatedSubnetArguments": {
          "subnetArmResourceId": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/yemingtemp/providers/Microsoft.Network/virtualNetworks/VNETmysql-test-100/subnets/Subnetmysql-test-100"
        },
        "byokEnforcement": "Disabled"
      },
      "location": "West US 2",
      "id": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/yemingtemp/providers/Microsoft.DBforMySQL/flexibleServers/mysql-test-100",
      "name": "mysql-test-100",
      "type": "Microsoft.DBforMySQL/flexibleServers"
    }
  ]
}

The PosrgreSql have the same issue.

Cost

ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ambhatna, @savjani.

Issue Details
## Description Resource provider name is different between path (DBForMySql) and resource Id(DBforMySQL). Please see the following http request and response for details ``` DEBUG: ============================ HTTP REQUEST ============================ HTTP Method: GET Absolute Uri: https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/yemingtemp/providers/Microsoft.DBForMySql/flexibleServers?api-version=2020-07-01-preview Headers: Body: DEBUG: BeforeCall: DEBUG: ============================ HTTP RESPONSE ============================ Status Code: OK Headers: Cache-Control : no-cache Pragma : no-cache X-Content-Type-Options : nosniff x-ms-request-id : 00e390a6-a188-4913-a999-aa9c86561868 Server : Microsoft-HTTPAPI/2.0 x-ms-ratelimit-remaining-subscription-reads: 11995 x-ms-correlation-request-id : 70e7c07a-eccf-4581-8537-29c7c3ebba81 x-ms-routing-request-id : SOUTHEASTASIA:20201217T111831Z:70e7c07a-eccf-4581-8537-29c7c3ebba81 Strict-Transport-Security : max-age=31536000; includeSubDomains Date : Thu, 17 Dec 2020 11:18:30 GMT Body: { "value": [ { "sku": { "name": "Standard_B1ms", "tier": "Burstable", "capacity": 0 }, "properties": { "administratorLogin": "mysql_test", "storageProfile": { "storageMB": 10240, "storageIops": 0, "backupRetentionDays": 7, "storageAutogrow": "Disabled", "fileStorageSkuName": "Premium_LRS" }, "version": "5.7", "state": "Ready", "haState": "NotEnabled", "fullyQualifiedDomainName": "mysql-test-100.mysql.database.azure.com", "sourceServerId": "", "publicNetworkAccess": "Disabled", "sslEnforcement": "Disabled", "haEnabled": "Disabled", "earliestRestoreDate": "2020-12-17T18:49:40.7766824+08:00", "replicationRole": "None", "replicaCapacity": 10, "delegatedSubnetArguments": { "subnetArmResourceId": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/yemingtemp/providers/Microsoft.Network/virtualNetworks/VNETmysql-test-100/subnets/Subnetmysql-test-100" }, "byokEnforcement": "Disabled" }, "location": "West US 2", "id": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/yemingtemp/providers/Microsoft.DBforMySQL/flexibleServers/mysql-test-100", "name": "mysql-test-100", "type": "Microsoft.DBforMySQL/flexibleServers" } ] } ``` ## Cost
Author: msJinLei
Assignees: -
Labels: `MySQL`, `Service Attention`
Milestone: -