From cddb8f03f061c59fe383f21b0095d9f3e08900b8 Mon Sep 17 00:00:00 2001 From: zhaomuzhi Date: Tue, 22 Sep 2020 23:27:58 -0700 Subject: [PATCH] [Do Not Merge][Really To Review] add a new apis (#10756) * Add Identity to createWorkpace example * change for getTransitivePEUsages * update * prettier code * add another new endpoint * address comments --- custom-words.txt | 1 + .../examples/getTransitivePEUsages.json | 26 +++ .../examples/listWorkspaceNotebookKeys.json | 16 ++ .../machineLearningServices.json | 171 ++++++++++++++++++ 4 files changed, 214 insertions(+) create mode 100644 specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/examples/getTransitivePEUsages.json create mode 100644 specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/examples/listWorkspaceNotebookKeys.json diff --git a/custom-words.txt b/custom-words.txt index 6aa19385dc88..85475fa43129 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1684,6 +1684,7 @@ tráfico transcoding transcodes transcriptmoderationresult +transitivepeusages translatortext trendingtopics triggeredwebjobs diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/examples/getTransitivePEUsages.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/examples/getTransitivePEUsages.json new file mode 100644 index 000000000000..b37c57afc17c --- /dev/null +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/examples/getTransitivePEUsages.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "location": "eastus", + "api-version": "2020-09-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "transitivePrivateEndpointsUsage": { + "totalUsage": 0 + }, + "transitivePrivateEndpointsQuota": 0, + "privateDnsZonesUsage": { + "totalUsage": 0 + }, + "privateDnsZonesQuota": 0 + } + ] + } + } + } +} diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/examples/listWorkspaceNotebookKeys.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/examples/listWorkspaceNotebookKeys.json new file mode 100644 index 000000000000..4182751f0f91 --- /dev/null +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/examples/listWorkspaceNotebookKeys.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "resourceGroupName": "testrg123", + "workspaceName": "workspaces123", + "api-version": "2020-09-01-preview" + }, + "responses": { + "200": { + "body": { + "primaryAccessKey": "vBvVhYgAGtUSewVCUv3w95p4/q5Yrsnw", + "secondaryAccessKey": "0KARRQoQHSUq1yViPWg7YFernOS" + } + } + } +} diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/machineLearningServices.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/machineLearningServices.json index 3c283424747c..7154aa1b18b3 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/machineLearningServices.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/machineLearningServices.json @@ -349,6 +349,48 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys": { + "post": { + "tags": [ + "Workspaces" + ], + "description": "Lists notebook keys associated with this workspace. The notebook keys are used for loading notebook components, which a reader should have access to. So make it a Get, not Post call", + "operationId": "Workspaces_ListNotebookKeys", + "x-ms-examples": { + "List Workspace Keys": { + "$ref": "./examples/listWorkspaceNotebookKeys.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/APIVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/NotebookListCredentialsResult" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/MachineLearningServiceError" + } + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys": { "post": { "tags": [ @@ -430,6 +472,53 @@ } } }, + "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/transitivepeusages": { + "get": { + "tags": [ + "TransitivePEUsage" + ], + "operationId": "TransitivePEUsage_Get", + "description": "Gets the current transitive private endpoint usage information as well as limits for AML resources for given subscription and location.", + "parameters": [ + { + "$ref": "#/parameters/APIVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "The location for which resource usage is queried.", + "pattern": "^[-\\w\\._]+$" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListTransitivePEUsagesResult" + } + }, + "default": { + "description": "Error response describing why the request failed.", + "schema": { + "$ref": "#/definitions/MachineLearningServiceError" + } + } + }, + "x-ms-examples": { + "Get Transitive PE Usages": { + "$ref": "./examples/getTransitivePEUsages.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages": { "get": { "tags": [ @@ -2291,6 +2380,77 @@ }, "description": "Describes AML Resource Usage." }, + "TransitivePEUsage": { + "type": "object", + "properties": { + "totalUsage": { + "readOnly": true, + "format": "int32", + "type": "integer" + } + } + }, + "PrivateDNSZoneUsage": { + "type": "object", + "properties": { + "totalUsage": { + "readOnly": true, + "format": "int32", + "type": "integer" + } + } + }, + "TransitivePEUsagesResult": { + "type": "object", + "description": "The transitive private endpoint usage in this location", + "properties": { + "subscriptionId": { + "readOnly": true, + "type": "string", + "description": "Subscription id that the transitive private endpoint usage is measured." + }, + "transitivePrivateEndpointsUsage": { + "readOnly": true, + "description": "Transitive private endpoint usage", + "$ref": "#/definitions/TransitivePEUsage" + }, + "transitivePrivateEndpointsQuota": { + "readOnly": true, + "description": "Transitive private endpoint quota that currently set", + "format": "int32", + "type": "integer" + }, + "privateDnsZonesUsage": { + "readOnly": true, + "description": "Private DNS zone usage", + "$ref": "#/definitions/PrivateDNSZoneUsage" + }, + "privateDnsZonesQuota": { + "readOnly": true, + "description": "Private Dns Zones quota that currently set", + "format": "int32", + "type": "integer" + } + } + }, + "ListTransitivePEUsagesResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/TransitivePEUsagesResult" + }, + "description": "The list of transitive private endpoint usages." + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page of transitive private endpoint usages information. Call ListNext() with this to fetch the next page of AML resource usage information." + } + }, + "description": "The List transitive private endpoint usages operation response." + }, "ListUsagesResult": { "properties": { "value": { @@ -2798,6 +2958,17 @@ "description": "Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet.", "x-ms-azure-resource": true }, + "NotebookListCredentialsResult": { + "type": "object", + "properties": { + "primaryAccessKey": { + "type": "string" + }, + "secondaryAccessKey": { + "type": "string" + } + } + }, "ListWorkspaceKeysResult": { "type": "object", "properties": {