Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NetAppFiles] Add missing features, quotaLimits and Rotterdam networkFeatures to API version 2021-06-02 #15850

Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"subscriptionId": "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9",
"location": "eastus",
"quotaLimitName": "totalCoolAccessVolumesPerSubscription",
"api-version": "2021-06-01"
},
"responses": {
"200": {
"body": {
"name": "totalCoolAccessVolumesPerSubscription",
"current": 10,
"default": 10
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"parameters": {
"subscriptionId": "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9",
"location": "eastus",
"api-version": "2021-06-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "accountsPerSubscription",
"current": 10,
"default": 10
},
{
"name": "poolsPerAccount",
"current": 25,
"default": 25
},
{
"name": "volumesPerPool",
"current": 500,
"default": 500
},
{
"name": "snapshotsPerVolume",
"current": 255,
"default": 255
},
{
"name": "totalTiBsPerSubscription",
"current": 1000,
"default": 25
},
{
"name": "totalDPVolumesPerSubscription",
"current": 10,
"default": 10
},
{
"name": "totalVolumesPerSubscription",
"current": 500,
"default": 500
},
{
"name": "totalCoolAccessVolumesPerSubscription",
"current": 10,
"default": 10
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
"serviceLevel": "Premium",
"provisioningState": "Succeeded",
"throughputMibps": 128,
"subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"
"subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
"networkFeatures": "Standard",
"networkSiblingSetId": "0f434a03-ce0b-4935-81af-d98652ffb1c4",
"storageToNetworkProximity": "T2"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"serviceLevel": "Premium",
"provisioningState": "Succeeded",
"throughputMibps": 128,
"subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"
"subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
"networkFeatures": "Standard",
"networkSiblingSetId": "0f434a03-ce0b-4935-81af-d98652ffb1c4",
"storageToNetworkProximity": "T2"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"provisioningState": "Succeeded",
"throughputMibps": 128,
"subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
"networkFeatures": "Standard",
"networkSiblingSetId": "0f434a03-ce0b-4935-81af-d98652ffb1c4",
"storageToNetworkProximity": "T2",
"dataProtection": {
"snapshot": {
"snapshotPolicyId": "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRP/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,86 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quotaLimits

Per API contract this API must return a collection GET and expose another API to return a single item (singleton), see here: https://github.com/Azure/azure-resource-manager-rpc/blob/770933ab2af1ece1eba2835f7a03bbfde47bb793/v1.0/common-api-contracts.md#singleton-resources

Copy link
Member Author

@audunn audunn Aug 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this will require a service side change. As that would likely delay the release of SDK's, Azure CLI, Powershell etc. is is possible to add collection GET in the new api version ? Or perhaps change this API to return collection as noted and add the single GET in next api-version as that would include more work presumably (additional manifest change).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorgecotillo We have updated the spec with proposed implementation to address this. Can you take another look?

"get": {
"tags": [
"NetApp Resource"
],
"summary": "Get quota limits",
"description": "Get the default and current limits for quotas",
"operationId": "NetAppResourceQuotaLimits_List",
"parameters": [
{
"$ref": "#/parameters/SubscriptionId"
},
{
"$ref": "#/parameters/location"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SubscriptionQuotaItemList"
}
},
"x-ms-pageable": {
"nextLinkName": null
},
"default": {
"description": "Error response describing why the operation failed."
}
},
"x-ms-examples": {
"QuotaLimits": {
"$ref": "examples/QuotaLimits_List.json"
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits/{quotaLimitName}": {
"get": {
"tags": [
"NetApp Resource"
],
"summary": "Get quota limits",
"description": "Get the default and current subscription quota limit",
"operationId": "NetAppResourceQuotaLimits_Get",
"parameters": [
{
"$ref": "#/parameters/SubscriptionId"
},
{
"$ref": "#/parameters/location"
},
{
"$ref": "#/parameters/QuotaLimitName"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SubscriptionQuotaItem"
}
},
"default": {
"description": "Error response describing why the operation failed."
}
},
"x-ms-examples": {
"QuotaLimits": {
"$ref": "examples/QuotaLimits_Get.json"
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/netAppAccounts": {
"get": {
"summary": "Describe all NetApp Accounts in a subscription",
Expand Down Expand Up @@ -2836,6 +2916,12 @@
"items": {
"$ref": "#/definitions/MetricSpecification"
}
},
"logSpecifications": {
"type": "array",
"items": {
"$ref": "#/definitions/LogSpecification"
}
}
}
},
Expand Down Expand Up @@ -2884,6 +2970,10 @@
"type": "string",
"description": "The internal metric name."
},
"enableRegionalMdmAccount": {
"description": "Whether or not the service is using regional MDM accounts.",
"type": "boolean"
},
"sourceMdmAccount": {
"type": "string",
"description": "The source MDM account."
Expand Down Expand Up @@ -2914,6 +3004,22 @@
"resourceIdDimensionNameOverride": {
"type": "string",
"description": "Account Resource Id."
},
"isInternal": {
"description": "Whether the metric is internal.",
"type": "boolean"
}
}
},
"LogSpecification": {
"description": "Log Definition of a single resource metric.",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"displayName": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -3040,6 +3146,42 @@
}
}
},
"SubscriptionQuotaItemList": {
audunn marked this conversation as resolved.
Show resolved Hide resolved
"description": "List of Subscription Quota Items",
"type": "object",
"properties": {
"value": {
"description": "A list of SubscriptionQuotaItems",
"type": "array",
"items": {
"$ref": "#/definitions/SubscriptionQuotaItem"
}
}
}
},
"SubscriptionQuotaItem": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SubscriptionQuotaItem

Why isn't this a standard ARM resource payload. You should have id, name, type properties and a properties property at a minimum.

Copy link
Member Author

@audunn audunn Sep 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is why I am wondering as this is not strictly a "resource" if a POST to list the quota values would be a better fit here?

"/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits": {
   "post": {
      "tags": [
        "NetApp Resource"
      ],
      "summary": "Get quota limits",
      "description": "Get the default and current limits for quotas",
      "operationId": "NetAppResourceQuotaLimits_List",
      "parameters": [
        {
          "$ref": "#/parameters/SubscriptionId"
        },
        {
          "$ref": "#/parameters/location"
        },
        {
          "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
        }
      ],
      "responses": {
        "200": {
          "description": "OK",
          "schema": {
            "$ref": "#/definitions/SubscriptionQuotaItemList"
          }
        },
        "default": {
          "description": "Error response describing why the operation failed."
        }
      },
      "x-ms-examples": {
        "QuotaLimits": {
          "$ref": "examples/QuotaLimits_List.json"
        }
      }
    }
  },

If that does not fit this scenario I will make those changes you suggest.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @majastrz can you take another look?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with POST is that identities with Reader role aren't able to invoke them, which causes some frustration. It's also harder to discover POST actions like that. My suggestion would be to stick with GET and just adjust the payloads to match ARM resources. It should be a pretty minor change.

Copy link
Member Author

@audunn audunn Sep 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@majastrz , @jorgecotillo yes I was thinking it used along with authorizationActionMappings.
Note we have updated GET in the spec with regards to your comment.

"description": "Information regarding Subscription Quota Item",
"type": "object",
"properties": {
"name": {
"type": "string",
"readOnly": true,
"description": "Quota Item name"
},
"current": {
"description": "The current quota value.",
"readOnly": true,
"type": "integer",
"format": "int32"
},
"default": {
"description": "The default quota value.",
"readOnly": true,
"type": "integer",
"format": "int32"
}
}
},
"netAppAccountList": {
"description": "List of NetApp account resources",
"type": "object",
Expand Down Expand Up @@ -3783,6 +3925,71 @@
"type": "string",
"description": "The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes"
},
"networkFeatures": {
"title": "Network features",
"description": "Basic network, or Standard features available to the volume.",
"type": "string",
"enum": [
"Basic",
"Standard"
],
"x-ms-enum": {
"name": "NetworkFeatures",
"modelAsString": true,
"values": [
{
"value": "Basic",
"description": "Basic network feature."
},
{
"value": "Standard",
"description": "Standard network feature."
}
]
},
"example": "Standard",
"default": "Basic"
},
"networkSiblingSetId": {
"title": "Network Sibling Set ID",
"description": "Network Sibling Set ID for the the group of volumes sharing networking resources.",
"type": "string",
"readOnly": true,
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
"maxLength": 36,
"minLength": 36,
"example": "9760acf5-4638-11e7-9bdb-020073ca3333"
},
"storageToNetworkProximity": {
"title": "Storage to Network Proximity",
"description": "Provides storage to network proximity information for the volume.",
"type": "string",
"enum": [
"Default",
"T1",
"T2"
],
"readOnly": true,
"x-ms-enum": {
"name": "VolumeStorageToNetworkProximity",
"modelAsString": true,
"values": [
{
"value": "Default",
"description": "Basic storage to network connectivity."
},
{
"value": "T1",
"description": "Standard T1 storage to network connectivity."
},
{
"value": "T2",
"description": "Standard T2 storage to network connectivity."
}
]
},
"example": "T1"
},
"mountTargets": {
"title": "mountTargets",
"type": "array",
Expand All @@ -3794,7 +4001,7 @@
},
"volumeType": {
"type": "string",
"description": "What type of volume is this",
"description": "What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection",
"example": "DataProtection"
},
"dataProtection": {
Expand Down Expand Up @@ -5490,6 +5697,14 @@
"type": "string",
"description": "Backup policy Name which uniquely identify backup policy.",
"x-ms-parameter-location": "method"
},
"QuotaLimitName": {
"name": "quotaLimitName",
"type": "string",
"in": "path",
"required": true,
"description": "The name of the Quota Limit",
"x-ms-parameter-location": "method"
}
}
}