Azure / Azure/azure-rest-api-specs

Storage Share Mgmt API `GET` doesn't return some set properties

Open
#16,782 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Storage
Dominant language
TypeSpec
Stars
3.1k
Forks
6k
Avg merge
2d 21h
Merged PRs (30d)
432

Description

Using the 2021-04-01 storage share mgmt API to create a share, a follow up GET doesn't return all the set properties.

Missing enabledProtocols when set to SMB

The PUT request payload specifies the enabledProtocols to be SMB, while the follow up GET response doesn't contain the enabledProtocols at all. On the other hand, the data plane GET returns it.

The PUT request:

PUT https://management.azure.com/subscriptions/xxx/resourceGroups/acctestRG-211117135426017553/providers/Microsoft.Storage/storageAccounts/acctestaccw8dz2/fileServices/default/shares/testsharew8dz2?api-version=2021-04-01 

{
  "properties": {
    "enabledProtocols": "SMB",
    "metadata": {},
    "shareQuota": 5120
  }
}

The GET response:

GET https://management.azure.com/subscriptions/xxx/resourceGroups/acctestRG-211117135426017553/providers/Microsoft.Storage/storageAccounts/acctestaccw8dz2/fileServices/default/shares/testsharew8dz2?api-version=2021-04-01 

{
  "etag": "\"0x8D9A98EE403362D\"",
  "id": "/subscriptions/xxx/resourceGroups/acctestRG-211117135426017553/providers/Microsoft.Storage/storageAccounts/acctestaccw8dz2/fileServices/default/shares/testsharew8dz2",
  "name": "testsharew8dz2",
  "properties": {
    "accessTier": "TransactionOptimized",
    "accessTierChangeTime": "2021-11-17T05:55:41.0000000Z",
    "lastModifiedTime": "2021-11-17T05:55:42.0000000Z",
    "leaseState": "available",
    "leaseStatus": "unlocked",
    "shareQuota": 5120,
    "signedIdentifiers": []
  },
  "type": "Microsoft.Storage/storageAccounts/fileServices/shares"
}

Missing the start and expiry for the accessPolicy

The PATCH has set the start, expiry and the permission for the accessPolicy, while the follow up GET only returns the permission. While, the data plane API returns all of them.

The PATCH request:

PATCH https://management.azure.com/subscriptions/xxx/resourceGroups/acctestRG-211117144101410558/providers/Microsoft.Storage/storageAccounts/acctestacc00e99/fileServices/default/shares/testshare00e99?api-version=2021-04-01

{
  "properties": {
    "signedIdentifiers": [
      {
        "accessPolicy": {
          "expiry": "2019-07-02T10:38:21Z",
          "permission": "rwd",
          "start": "2019-07-02T09:38:21Z"
        },
        "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"
      }
    ]
  }
}

The GET response:

GET https://management.azure.com/subscriptions/xxx/resourceGroups/acctestRG-211117144101410558/providers/Microsoft.Storage/storageAccounts/acctestacc00e99/fileServices/default/shares/testshare00e99?api-version=2021-04-01

{
  "etag": "\"0x8D9A99566A0F73A\"",
  "id": "/subscriptions/67a9759d-d099-4aa8-8675-e6cfd669c3f4/resourceGroups/acctestRG-211117144101410558/providers/Microsoft.Storage/storageAccounts/acctestacc00e99/fileServices/default/shares/testshare00e99",
  "name": "testshare00e99",
  "properties": {
    "accessTier": "TransactionOptimized",
    "accessTierChangeTime": "2021-11-17T06:42:17.0000000Z",
    "lastModifiedTime": "2021-11-17T06:42:18.0000000Z",
    "leaseState": "available",
    "leaseStatus": "unlocked",
    "shareQuota": 5120,
    "signedIdentifiers": [
      {
        "accessPolicy": { "permission": "rwd" },
        "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"
      }
    ]
  },
  "type": "Microsoft.Storage/storageAccounts/fileServices/shares"
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the 2021-04-01 Azure Storage Share Management API definitions for the storage share PUT, PATCH, and GET operations, using the request and response examples in the issue as the comparison point. Done means the management API GET response preserves enabledProtocols and the accessPolicy start and expiry values set by PUT or PATCH, matching the reported data-plane behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.