From 99c84dafa4fdef8fac407a87576f8b32067a9b0f Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Fri, 4 Aug 2023 14:59:45 -0700 Subject: [PATCH 01/29] Initial commit --- .../stable/2023-11-15/apiCollections.json | 298 ++++++++++++++++++ ...ICollectionOffboarding_Delete_example.json | 13 + ...PICollectionOnboarding_Create_example.json | 24 ++ .../APICollection_Get_example.json | 24 ++ .../APICollection_List_example.json | 27 ++ 5 files changed, 386 insertions(+) create mode 100644 specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json create mode 100644 specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOffboarding_Delete_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOnboarding_Create_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_Get_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_List_example.json diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json new file mode 100644 index 000000000000..dfb7f13aacd6 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -0,0 +1,298 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft Defender for Cloud", + "description": "API spec for Microsoft.Security (Microsoft Defender for Cloud) resource provider", + "version": "2022-11-20-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections": { + "get": { + "x-ms-examples": { + "Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs": { + "$ref": "./examples/ApiCollections/APICollection_List_example.json" + } + }, + "tags": [ + "D4APICollectionList", + "APIMConfig" + ], + "description": "Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.", + "summary": "Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs", + "operationId": "APICollection_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiManagementServiceNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ApiCollectionResponseList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiCollectionId}": { + "get": { + "x-ms-examples": { + "Gets an Azure API Management API if it has been onboarded to Defender for APIs": { + "$ref": "./examples/ApiCollections/APICollection_Get_example.json" + } + }, + "tags": [ + "D4APICollection", + "APIMConfig" + ], + "description": "Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.", + "summary": "Gets an Azure API Management API if it has been onboarded to Defender for APIs", + "operationId": "APICollection_Get", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiManagementServiceNameParameter" + }, + { + "$ref": "#/parameters/ApiCollectionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ApiCollectionResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "x-ms-examples": { + "Onboard an Azure API Management API to Defender for APIs": { + "$ref": "./examples/ApiCollections/APICollectionOnboarding_Create_example.json" + } + }, + "tags": [ + "OnboardToD4API", + "APIMConfig" + ], + "description": "Onboard an Azure API Management API to Defender for APIs. The system will start monitoring the operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected.", + "summary": "Onboard an Azure API Management API to Defender for APIs", + "operationId": "APICollectionOnboarding_Create", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiManagementServiceNameParameter" + }, + { + "$ref": "#/parameters/ApiCollectionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ApiCollectionResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "x-ms-examples": { + "Delete a security recommendation task on a resource": { + "$ref": "./examples/ApiCollections/APICollectionOffboarding_Delete_example.json" + } + }, + "tags": [ + "OffboardFromD4API", + "APIMConfig" + ], + "description": "Offboard an Azure API Management API from Defender for APIs. The system will stop monitoring the operations within the Azure API Management API for intrusive behaviors.", + "summary": "Offboard an Azure API Management API from Defender for APIs", + "operationId": "APICollectionOffboarding_Delete", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiManagementServiceNameParameter" + }, + { + "$ref": "#/parameters/ApiCollectionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "ApiCollectionResponseList": { + "type": "object", + "description": "Page of a list of API collections as represented by Defender for APIs.", + "properties": { + "value": { + "description": "API collections in this page.", + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ApiCollectionResponse" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page." + } + } + }, + "ApiCollectionResponse": { + "type": "object", + "description": "An API collection as represented by Defender for APIs.", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ApiCollectionProperties" + } + }, + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/Resource" + } + ] + }, + "ApiCollectionProperties": { + "type": "object", + "description": "Describes the properties of an API collection.", + "properties": { + "displayName": { + "type": "string", + "description": "The display name of the Azure API Management API." + }, + "additionalData": { + "type": "object", + "description": "Additional data regarding the API collection.", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "parameters": { + "ApiManagementServiceNameParameter": { + "name": "serviceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the API Management service.", + "minLength": 1, + "maxLength": 50, + "pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + "x-ms-parameter-location": "method" + }, + "ApiCollectionIdParameter": { + "name": "apiCollectionId", + "in": "path", + "required": true, + "type": "string", + "description": "A string representing the apiCollections resource within the Microsoft.Security provider namespace. This string matches the Azure API Management API name.", + "minLength": 1, + "maxLength": 256, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOffboarding_Delete_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOffboarding_Delete_example.json new file mode 100644 index 000000000000..9883243c4c18 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOffboarding_Delete_example.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "apiCollectionId": "echo-api", + "api-version": "2022-11-20-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOnboarding_Create_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOnboarding_Create_example.json new file mode 100644 index 000000000000..73a69b63b821 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOnboarding_Create_example.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "apiCollectionId": "echo-api", + "api-version": "2022-11-20-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api", + "name": "echo-api", + "type": "Microsoft.Security/apiCollections", + "properties": { + "displayName": "echo-api", + "additionalData": { + "apiManagementApiId": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" + } + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_Get_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_Get_example.json new file mode 100644 index 000000000000..73a69b63b821 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_Get_example.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "apiCollectionId": "echo-api", + "api-version": "2022-11-20-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api", + "name": "echo-api", + "type": "Microsoft.Security/apiCollections", + "properties": { + "displayName": "echo-api", + "additionalData": { + "apiManagementApiId": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" + } + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_List_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_List_example.json new file mode 100644 index 000000000000..b4b3f27096d1 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_List_example.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "api-version": "2022-11-20-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api", + "name": "echo-api", + "type": "Microsoft.Security/apiCollections", + "properties": { + "displayName": "echo-api", + "additionalData": { + "apiManagementApiId": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" + } + } + } + ] + } + } + } +} From def807acea1e66925973eb6201403312f67fc8ed Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Fri, 4 Aug 2023 15:00:49 -0700 Subject: [PATCH 02/29] Update api-version to GA and set displayName to read-only --- .../Microsoft.Security/stable/2023-11-15/apiCollections.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index dfb7f13aacd6..993ac559eff3 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -3,7 +3,7 @@ "info": { "title": "Microsoft Defender for Cloud", "description": "API spec for Microsoft.Security (Microsoft Defender for Cloud) resource provider", - "version": "2022-11-20-preview" + "version": "2023-11-15" }, "host": "management.azure.com", "schemes": [ @@ -259,6 +259,7 @@ "description": "Describes the properties of an API collection.", "properties": { "displayName": { + "readOnly": true, "type": "string", "description": "The display name of the Azure API Management API." }, From 7897ffa0ee20e5d556417da38d6ef84354ec611a Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Mon, 7 Aug 2023 17:44:27 -0700 Subject: [PATCH 03/29] Fix validation errors --- .../APICollectionOffboarding_Delete_example.json | 2 +- .../APICollectionOnboarding_Create_example.json | 2 +- .../ApiCollections/APICollection_Get_example.json | 2 +- .../ApiCollections/APICollection_List_example.json | 2 +- specification/security/resource-manager/readme.md | 12 +++++++++++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOffboarding_Delete_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOffboarding_Delete_example.json index 9883243c4c18..3ae13671a794 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOffboarding_Delete_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOffboarding_Delete_example.json @@ -4,7 +4,7 @@ "resourceGroupName": "rg1", "serviceName": "apimService1", "apiCollectionId": "echo-api", - "api-version": "2022-11-20-preview" + "api-version": "2023-11-15" }, "responses": { "200": {}, diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOnboarding_Create_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOnboarding_Create_example.json index 73a69b63b821..285d5a82c25a 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOnboarding_Create_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOnboarding_Create_example.json @@ -4,7 +4,7 @@ "resourceGroupName": "rg1", "serviceName": "apimService1", "apiCollectionId": "echo-api", - "api-version": "2022-11-20-preview" + "api-version": "2023-11-15" }, "responses": { "200": { diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_Get_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_Get_example.json index 73a69b63b821..285d5a82c25a 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_Get_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_Get_example.json @@ -4,7 +4,7 @@ "resourceGroupName": "rg1", "serviceName": "apimService1", "apiCollectionId": "echo-api", - "api-version": "2022-11-20-preview" + "api-version": "2023-11-15" }, "responses": { "200": { diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_List_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_List_example.json index b4b3f27096d1..f4e69918519c 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_List_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_List_example.json @@ -3,7 +3,7 @@ "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "resourceGroupName": "rg1", "serviceName": "apimService1", - "api-version": "2022-11-20-preview" + "api-version": "2023-11-15" }, "responses": { "200": { diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 2085fe72bace..df78325fd5eb 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -86,6 +86,16 @@ tag: package-composite-v3 The following packages may be composed from multiple api-versions. +### Tag: package-2023-11-15 + +These settings apply only when `--tag=package-2023-11-15` is specified on the command line. + +``` yaml $(tag) == 'package-2023-11-15' +input-file: + - Microsoft.Security/stable/2023-11-15/apiCollections.json +``` + + ### Tag: package-preview-2023-05 These settings apply only when `--tag=package-preview-2023-05` is specified on the command line. @@ -395,7 +405,7 @@ input-file: - Microsoft.Security/preview/2022-01-01-preview/governanceRules.json - Microsoft.Security/preview/2022-01-01-preview/governanceAssignments.json - Microsoft.Security/preview/2022-07-01-preview/applications.json -- Microsoft.Security/preview/2022-11-20-preview/apiCollections.json +- Microsoft.Security/stable/2023-11-15/apiCollections.json - Microsoft.Security/preview/2023-02-01-preview/sqlVulnerabilityAssessmentsScanOperations.json - Microsoft.Security/preview/2023-02-01-preview/sqlVulnerabilityAssessmentsScanResultsOperations.json - Microsoft.Security/preview/2023-02-01-preview/sqlVulnerabilityAssessmentsBaselineRuleOperations.json From 5bf103a38ca0fe82faa2cdc154e3d626ab3f4745 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Wed, 9 Aug 2023 10:30:54 -0700 Subject: [PATCH 04/29] More APIs and changes to operationIds --- .../stable/2023-11-15/apiCollections.json | 129 ++++++++++++++---- ...tByAzureApiManagementService_example.json} | 5 +- ...tByAzureApiManagementService_example.json} | 5 +- ...ollection_ListByResourceGroup_example.json | 24 ++++ ...Collection_ListBySubscription_example.json | 23 ++++ ...ffboardAzureApiManagementApi_example.json} | 0 ...OnboardAzureApiManagementApi_example.json} | 5 +- 7 files changed, 156 insertions(+), 35 deletions(-) rename specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/{APICollectionOnboarding_Create_example.json => APICollection_GetByAzureApiManagementService_example.json} (70%) rename specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/{APICollection_List_example.json => APICollection_ListByAzureApiManagementService_example.json} (70%) create mode 100644 specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json rename specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/{APICollectionOffboarding_Delete_example.json => APICollection_OffboardAzureApiManagementApi_example.json} (100%) rename specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/{APICollection_Get_example.json => APICollection_OnboardAzureApiManagementApi_example.json} (70%) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index 993ac559eff3..fb78a9138f89 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -34,20 +34,103 @@ } }, "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/apiCollections": { + "get": { + "x-ms-examples": { + "Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs": { + "$ref": "./examples/ApiCollections/APICollection_ListBySubscription_example.json" + } + }, + "tags": [ + "D4APICollectionList" + ], + "description": "Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs.", + "summary": "Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs", + "operationId": "APICollection_ListBySubscription", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ApiCollectionResponseList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/apiCollections": { + "get": { + "x-ms-examples": { + "Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs": { + "$ref": "./examples/ApiCollections/APICollection_ListByResourceGroup_example.json" + } + }, + "tags": [ + "D4APICollectionList" + ], + "description": "Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs.", + "summary": "Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs", + "operationId": "APICollection_ListByResourceGroup", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ApiCollectionResponseList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections": { "get": { "x-ms-examples": { - "Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs": { - "$ref": "./examples/ApiCollections/APICollection_List_example.json" + "Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs": { + "$ref": "./examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json" } }, "tags": [ "D4APICollectionList", "APIMConfig" ], - "description": "Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.", - "summary": "Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs", - "operationId": "APICollection_List", + "description": "Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.", + "summary": "Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs", + "operationId": "APICollection_ListByAzureApiManagementService", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -84,17 +167,17 @@ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiCollectionId}": { "get": { "x-ms-examples": { - "Gets an Azure API Management API if it has been onboarded to Defender for APIs": { - "$ref": "./examples/ApiCollections/APICollection_Get_example.json" + "Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs": { + "$ref": "./examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json" } }, "tags": [ "D4APICollection", "APIMConfig" ], - "description": "Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.", - "summary": "Gets an Azure API Management API if it has been onboarded to Defender for APIs", - "operationId": "APICollection_Get", + "description": "Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.", + "summary": "Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs", + "operationId": "APICollection_GetByAzureApiManagementService", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -129,17 +212,17 @@ }, "put": { "x-ms-examples": { - "Onboard an Azure API Management API to Defender for APIs": { - "$ref": "./examples/ApiCollections/APICollectionOnboarding_Create_example.json" + "Onboard an Azure API Management API to Microsoft Defender for APIs": { + "$ref": "./examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json" } }, "tags": [ "OnboardToD4API", "APIMConfig" ], - "description": "Onboard an Azure API Management API to Defender for APIs. The system will start monitoring the operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected.", - "summary": "Onboard an Azure API Management API to Defender for APIs", - "operationId": "APICollectionOnboarding_Create", + "description": "Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected.", + "summary": "Onboard an Azure API Management API to Microsoft Defender for APIs", + "operationId": "APICollection_OnboardAzureApiManagementApi", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -174,17 +257,17 @@ }, "delete": { "x-ms-examples": { - "Delete a security recommendation task on a resource": { - "$ref": "./examples/ApiCollections/APICollectionOffboarding_Delete_example.json" + "Offboard an Azure API Management API from Microsoft Defender for APIs": { + "$ref": "./examples/ApiCollections/APICollection_OffboardAzureApiManagementApi_example.json" } }, "tags": [ "OffboardFromD4API", "APIMConfig" ], - "description": "Offboard an Azure API Management API from Defender for APIs. The system will stop monitoring the operations within the Azure API Management API for intrusive behaviors.", - "summary": "Offboard an Azure API Management API from Defender for APIs", - "operationId": "APICollectionOffboarding_Delete", + "description": "Offboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the operations within the Azure API Management API for intrusive behaviors.", + "summary": "Offboard an Azure API Management API from Microsoft Defender for APIs", + "operationId": "APICollection_OffboardAzureApiManagementApi", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -222,7 +305,7 @@ "definitions": { "ApiCollectionResponseList": { "type": "object", - "description": "Page of a list of API collections as represented by Defender for APIs.", + "description": "Page of a list of API collections as represented by Microsoft Defender for APIs.", "properties": { "value": { "description": "API collections in this page.", @@ -241,7 +324,7 @@ }, "ApiCollectionResponse": { "type": "object", - "description": "An API collection as represented by Defender for APIs.", + "description": "An API collection as represented by Microsoft Defender for APIs.", "properties": { "properties": { "x-ms-client-flatten": true, @@ -261,7 +344,7 @@ "displayName": { "readOnly": true, "type": "string", - "description": "The display name of the Azure API Management API." + "description": "The display name of the API collection." }, "additionalData": { "type": "object", diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOnboarding_Create_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json similarity index 70% rename from specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOnboarding_Create_example.json rename to specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json index 285d5a82c25a..ded59ba512b6 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOnboarding_Create_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json @@ -13,10 +13,7 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { - "displayName": "echo-api", - "additionalData": { - "apiManagementApiId": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" - } + "displayName": "Echo API" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_List_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json similarity index 70% rename from specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_List_example.json rename to specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json index f4e69918519c..386f1f70c239 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_List_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json @@ -14,10 +14,7 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { - "displayName": "echo-api", - "additionalData": { - "apiManagementApiId": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" - } + "displayName": "Echo API" } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json new file mode 100644 index 000000000000..259716cb0958 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "resourceGroupName": "rg1", + "api-version": "2023-11-15" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api", + "name": "echo-api", + "type": "Microsoft.Security/apiCollections", + "properties": { + "displayName": "Echo API" + } + } + ] + } + } + } + } + \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json new file mode 100644 index 000000000000..3275ebe64e36 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "api-version": "2023-11-15" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api", + "name": "echo-api", + "type": "Microsoft.Security/apiCollections", + "properties": { + "displayName": "Echo API" + } + } + ] + } + } + } + } + \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOffboarding_Delete_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OffboardAzureApiManagementApi_example.json similarity index 100% rename from specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollectionOffboarding_Delete_example.json rename to specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OffboardAzureApiManagementApi_example.json diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_Get_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json similarity index 70% rename from specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_Get_example.json rename to specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json index 285d5a82c25a..ded59ba512b6 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_Get_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json @@ -13,10 +13,7 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { - "displayName": "echo-api", - "additionalData": { - "apiManagementApiId": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" - } + "displayName": "Echo API" } } } From 7c2e1c8fcde577b24a8df6d7ff4815848664f000 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Wed, 9 Aug 2023 10:38:26 -0700 Subject: [PATCH 05/29] Fix prettier failures --- ...ollection_ListByResourceGroup_example.json | 37 +++++++++---------- ...Collection_ListBySubscription_example.json | 35 +++++++++--------- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json index 259716cb0958..4b2708acf6ee 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json @@ -1,24 +1,23 @@ { - "parameters": { - "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "resourceGroupName": "rg1", - "api-version": "2023-11-15" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api", - "name": "echo-api", - "type": "Microsoft.Security/apiCollections", - "properties": { - "displayName": "Echo API" - } + "parameters": { + "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "resourceGroupName": "rg1", + "api-version": "2023-11-15" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api", + "name": "echo-api", + "type": "Microsoft.Security/apiCollections", + "properties": { + "displayName": "Echo API" } - ] - } + } + ] } } } - \ No newline at end of file +} \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json index 3275ebe64e36..f43267c7fc05 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json @@ -1,23 +1,22 @@ { - "parameters": { - "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "api-version": "2023-11-15" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api", - "name": "echo-api", - "type": "Microsoft.Security/apiCollections", - "properties": { - "displayName": "Echo API" - } + "parameters": { + "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "api-version": "2023-11-15" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api", + "name": "echo-api", + "type": "Microsoft.Security/apiCollections", + "properties": { + "displayName": "Echo API" } - ] - } + } + ] } } } - \ No newline at end of file +} \ No newline at end of file From 3ae01aacd4a118d357d9531747c2249170556790 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Wed, 9 Aug 2023 10:47:21 -0700 Subject: [PATCH 06/29] Try fixing Prettier again --- .../APICollection_ListByResourceGroup_example.json | 2 +- .../APICollection_ListBySubscription_example.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json index 4b2708acf6ee..ab74a26f5582 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json @@ -20,4 +20,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json index f43267c7fc05..36d1a6452a79 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json @@ -19,4 +19,4 @@ } } } -} \ No newline at end of file +} From 11a04f6e99f12c0dd4707c80837d655577aa2f46 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Wed, 9 Aug 2023 15:10:01 -0700 Subject: [PATCH 07/29] Add more properties to the response --- .../stable/2023-11-15/apiCollections.json | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index fb78a9138f89..30a6c96c9749 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -346,6 +346,41 @@ "type": "string", "description": "The display name of the API collection." }, + "discoveredVia": { + "readOnly": true, + "type": "string", + "description": "The resource Id of the resource from where this API collection was discovered." + }, + "baseUrl": { + "readOnly": true, + "type": "string", + "description": "The base URL for this API collection. All endpoints of this API collection extend this base URL." + }, + "numberOfApiEndpoints": { + "readOnly": true, + "type": "int", + "description": "The number of API endpoints discovered in this API collection." + }, + "numberOfInactiveApiEndpoints": { + "readOnly": true, + "type": "int", + "description": "The number of API endpoints in this API collection that have not received any API traffic in the last 30 days." + }, + "numberOfUnauthenticatedApiEndpoints": { + "readOnly": true, + "type": "int", + "description": "The number of API endpoints in this API collection that are unauthenticated." + }, + "numberOfExternalApiEndpoints": { + "readOnly": true, + "type": "int", + "description": "The number of API endpoints in this API collection for which API traffic from the internet was observed." + }, + "numberOfApiEndpointsWithSensitiveDataExposed": { + "readOnly": true, + "type": "int", + "description": "The number of API endpoints in this API collection which are exposing sensitive data in their requests and/or responses." + }, "additionalData": { "type": "object", "description": "Additional data regarding the API collection.", From 61cf0b7c7a83ada584299978abf2e5c90dbcae9a Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Wed, 9 Aug 2023 15:44:19 -0700 Subject: [PATCH 08/29] Fix semantic validation --- .../stable/2023-11-15/apiCollections.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index 30a6c96c9749..cd2a953d3b9d 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -358,27 +358,27 @@ }, "numberOfApiEndpoints": { "readOnly": true, - "type": "int", + "type": "integer", "description": "The number of API endpoints discovered in this API collection." }, "numberOfInactiveApiEndpoints": { "readOnly": true, - "type": "int", + "type": "integer", "description": "The number of API endpoints in this API collection that have not received any API traffic in the last 30 days." }, "numberOfUnauthenticatedApiEndpoints": { "readOnly": true, - "type": "int", + "type": "integer", "description": "The number of API endpoints in this API collection that are unauthenticated." }, "numberOfExternalApiEndpoints": { "readOnly": true, - "type": "int", + "type": "integer", "description": "The number of API endpoints in this API collection for which API traffic from the internet was observed." }, "numberOfApiEndpointsWithSensitiveDataExposed": { "readOnly": true, - "type": "int", + "type": "integer", "description": "The number of API endpoints in this API collection which are exposing sensitive data in their requests and/or responses." }, "additionalData": { From 5533a89da88f1f34d1d743c72f2d943d12b913fe Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Wed, 9 Aug 2023 16:44:20 -0700 Subject: [PATCH 09/29] Update examples --- ...ollection_GetByAzureApiManagementService_example.json | 9 ++++++++- ...llection_ListByAzureApiManagementService_example.json | 9 ++++++++- .../APICollection_ListByResourceGroup_example.json | 9 ++++++++- .../APICollection_ListBySubscription_example.json | 9 ++++++++- ...ICollection_OnboardAzureApiManagementApi_example.json | 9 ++++++++- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json index ded59ba512b6..f39eeb0c992e 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json @@ -13,7 +13,14 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { - "displayName": "Echo API" + "displayName": "Echo API", + "discoveredVia": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "baseUrl": "https://apimservice1.azure-api.net/echo", + "numberOfApiEndpoints": 6, + "numberOfInactiveApiEndpoints": 3, + "numberOfUnauthenticatedApiEndpoints": 1, + "numberOfExternalApiEndpoints": 3, + "numberOfApiEndpointsWithSensitiveDataExposed": 0 } } } diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json index 386f1f70c239..70fe94c77e9b 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json @@ -14,7 +14,14 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { - "displayName": "Echo API" + "displayName": "Echo API", + "discoveredVia": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "baseUrl": "https://apimservice1.azure-api.net/echo", + "numberOfApiEndpoints": 6, + "numberOfInactiveApiEndpoints": 3, + "numberOfUnauthenticatedApiEndpoints": 1, + "numberOfExternalApiEndpoints": 3, + "numberOfApiEndpointsWithSensitiveDataExposed": 0 } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json index ab74a26f5582..fab522dac72f 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json @@ -13,7 +13,14 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { - "displayName": "Echo API" + "displayName": "Echo API", + "discoveredVia": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "baseUrl": "https://apimservice1.azure-api.net/echo", + "numberOfApiEndpoints": 6, + "numberOfInactiveApiEndpoints": 3, + "numberOfUnauthenticatedApiEndpoints": 1, + "numberOfExternalApiEndpoints": 3, + "numberOfApiEndpointsWithSensitiveDataExposed": 0 } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json index 36d1a6452a79..dc6b44b4a0e2 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json @@ -12,7 +12,14 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { - "displayName": "Echo API" + "displayName": "Echo API", + "discoveredVia": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "baseUrl": "https://apimservice1.azure-api.net/echo", + "numberOfApiEndpoints": 6, + "numberOfInactiveApiEndpoints": 3, + "numberOfUnauthenticatedApiEndpoints": 1, + "numberOfExternalApiEndpoints": 3, + "numberOfApiEndpointsWithSensitiveDataExposed": 0 } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json index ded59ba512b6..f39eeb0c992e 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json @@ -13,7 +13,14 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { - "displayName": "Echo API" + "displayName": "Echo API", + "discoveredVia": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "baseUrl": "https://apimservice1.azure-api.net/echo", + "numberOfApiEndpoints": 6, + "numberOfInactiveApiEndpoints": 3, + "numberOfUnauthenticatedApiEndpoints": 1, + "numberOfExternalApiEndpoints": 3, + "numberOfApiEndpointsWithSensitiveDataExposed": 0 } } } From c699cd7b159d352a6bc8fddd39d633fc92a5172a Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Thu, 10 Aug 2023 18:29:46 -0700 Subject: [PATCH 10/29] Add 202 Accepted as a response in onboarding --- .../stable/2023-11-15/apiCollections.json | 17 ++++++++++------- ...on_OnboardAzureApiManagementApi_example.json | 5 +++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index cd2a953d3b9d..a2e5b6dec161 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -57,7 +57,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "This indicates a successful response. The response contains the list of API collections.", "schema": { "$ref": "#/definitions/ApiCollectionResponseList" } @@ -100,7 +100,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "This indicates a successful response. The response contains the list of API collections.", "schema": { "$ref": "#/definitions/ApiCollectionResponseList" } @@ -147,7 +147,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "This indicates a successful response. The response contains the list of API collections.", "schema": { "$ref": "#/definitions/ApiCollectionResponseList" } @@ -197,7 +197,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "This indicates a successful response. The response contains the properties of the API collection.", "schema": { "$ref": "#/definitions/ApiCollectionResponse" } @@ -242,11 +242,14 @@ ], "responses": { "200": { - "description": "OK", + "description": "This indicates a successful response. The response contains the properties of the API collection.", "schema": { "$ref": "#/definitions/ApiCollectionResponse" } }, + "202": { + "description": "This indicates a successful response. The Location header contains the URL where the onboarding statuc can be checked." + }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -287,10 +290,10 @@ ], "responses": { "200": { - "description": "OK" + "description": "This indicates a successful response. The API collection was successfully offboarded." }, "204": { - "description": "NoContent" + "description": "This indicates a successful response. The API collection was successfully offboarded." }, "default": { "description": "Error response describing why the operation failed.", diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json index f39eeb0c992e..54b97bb88c80 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json @@ -23,6 +23,11 @@ "numberOfApiEndpointsWithSensitiveDataExposed": 0 } } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15&$retryUntil=538273328447205766" + } } } } From 4769e64ab0ab7b6ddf87de4cd711bde8b0c39574 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Fri, 11 Aug 2023 08:12:54 -0700 Subject: [PATCH 11/29] Add x-ms-long-running-operation --- .../stable/2023-11-15/apiCollections.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index a2e5b6dec161..2170cd492625 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -248,7 +248,7 @@ } }, "202": { - "description": "This indicates a successful response. The Location header contains the URL where the onboarding statuc can be checked." + "description": "This indicates a successful response. The Location header contains the URL where the operation status can be checked." }, "default": { "description": "Error response describing why the operation failed.", @@ -256,6 +256,10 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" } }, "delete": { @@ -290,10 +294,10 @@ ], "responses": { "200": { - "description": "This indicates a successful response. The API collection was successfully offboarded." + "description": "This operation completed successfully." }, "204": { - "description": "This indicates a successful response. The API collection was successfully offboarded." + "description": "This operation completed successfully." }, "default": { "description": "Error response describing why the operation failed.", From c9fc1b762ca7383ac44167456f99b61bb55747d0 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Fri, 11 Aug 2023 09:33:45 -0700 Subject: [PATCH 12/29] Fix more linting issues --- .../stable/2023-11-15/apiCollections.json | 7 ++++++- ...APICollection_OnboardAzureApiManagementApi_example.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index 2170cd492625..eaafde8261c5 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -248,7 +248,12 @@ } }, "202": { - "description": "This indicates a successful response. The Location header contains the URL where the operation status can be checked." + "description": "This indicates a successful response. The Location header contains the URL where the operation status can be checked.", + "headers": { + "Location": { + "type": "string" + } + } }, "default": { "description": "Error response describing why the operation failed.", diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json index 54b97bb88c80..30c074c244f4 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json @@ -26,7 +26,7 @@ }, "202": { "headers": { - "location": "https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15&$retryUntil=538273328447205766" + "Location": "https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15&$retryUntil=538273328447205766" } } } From b208a73d3be06f65046c9bb54251da83fefead31 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Fri, 11 Aug 2023 09:35:00 -0700 Subject: [PATCH 13/29] Fix more linting issues --- .../Microsoft.Security/stable/2023-11-15/apiCollections.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index eaafde8261c5..86fd9ea5ec14 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -371,26 +371,31 @@ "numberOfApiEndpoints": { "readOnly": true, "type": "integer", + "format": "int64", "description": "The number of API endpoints discovered in this API collection." }, "numberOfInactiveApiEndpoints": { "readOnly": true, "type": "integer", + "format": "int64", "description": "The number of API endpoints in this API collection that have not received any API traffic in the last 30 days." }, "numberOfUnauthenticatedApiEndpoints": { "readOnly": true, "type": "integer", + "format": "int64", "description": "The number of API endpoints in this API collection that are unauthenticated." }, "numberOfExternalApiEndpoints": { "readOnly": true, "type": "integer", + "format": "int64", "description": "The number of API endpoints in this API collection for which API traffic from the internet was observed." }, "numberOfApiEndpointsWithSensitiveDataExposed": { "readOnly": true, "type": "integer", + "format": "int64", "description": "The number of API endpoints in this API collection which are exposing sensitive data in their requests and/or responses." }, "additionalData": { From 5c1b1905ca3c64951b3a25431b32e94a8fd49acd Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Fri, 11 Aug 2023 09:49:34 -0700 Subject: [PATCH 14/29] Remove 202 for now to see if pipeline runs --- .../stable/2023-11-15/apiCollections.json | 12 ------------ ...lection_OnboardAzureApiManagementApi_example.json | 5 ----- 2 files changed, 17 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index 86fd9ea5ec14..7ae8adbc805a 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -247,24 +247,12 @@ "$ref": "#/definitions/ApiCollectionResponse" } }, - "202": { - "description": "This indicates a successful response. The Location header contains the URL where the operation status can be checked.", - "headers": { - "Location": { - "type": "string" - } - } - }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" } }, "delete": { diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json index 30c074c244f4..f39eeb0c992e 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json @@ -23,11 +23,6 @@ "numberOfApiEndpointsWithSensitiveDataExposed": 0 } } - }, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15&$retryUntil=538273328447205766" - } } } } From 57fb554ce9ac228cc8865fb22524ec21c0f39ba3 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Fri, 11 Aug 2023 09:52:21 -0700 Subject: [PATCH 15/29] Put 202 back --- .../stable/2023-11-15/apiCollections.json | 12 ++++++++++++ ...lection_OnboardAzureApiManagementApi_example.json | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index 7ae8adbc805a..86fd9ea5ec14 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -247,12 +247,24 @@ "$ref": "#/definitions/ApiCollectionResponse" } }, + "202": { + "description": "This indicates a successful response. The Location header contains the URL where the operation status can be checked.", + "headers": { + "Location": { + "type": "string" + } + } + }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" } }, "delete": { diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json index f39eeb0c992e..30c074c244f4 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json @@ -23,6 +23,11 @@ "numberOfApiEndpointsWithSensitiveDataExposed": 0 } } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15&$retryUntil=538273328447205766" + } } } } From d07042c9ec259d830a8a270ea2df7fa75d3c6911 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Sun, 13 Aug 2023 09:29:12 -0700 Subject: [PATCH 16/29] Add provisioning state --- .../Microsoft.Security/stable/2023-11-15/apiCollections.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index 86fd9ea5ec14..a36cd5102d8a 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -353,6 +353,11 @@ "type": "object", "description": "Describes the properties of an API collection.", "properties": { + "provisioningState": { + "type": "string", + "readOnly": true, + "description": "Gets the provisioning state of the API collection." + }, "displayName": { "readOnly": true, "type": "string", From b39b7bf35485af6de6e71ccbfedeb1f4fcdb73e5 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Sun, 13 Aug 2023 14:35:28 -0700 Subject: [PATCH 17/29] Add 201 response --- .../stable/2023-11-15/apiCollections.json | 6 ++++++ ...etByAzureApiManagementService_example.json | 1 + ...stByAzureApiManagementService_example.json | 1 + ...ollection_ListByResourceGroup_example.json | 1 + ...Collection_ListBySubscription_example.json | 1 + ..._OnboardAzureApiManagementApi_example.json | 19 +++++++++++++++++++ 6 files changed, 29 insertions(+) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index a36cd5102d8a..c68d373d1787 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -247,6 +247,12 @@ "$ref": "#/definitions/ApiCollectionResponse" } }, + "201": { + "description": "This indicates a successful response. The response contains the properties of the API collection.", + "schema": { + "$ref": "#/definitions/ApiCollectionResponse" + } + }, "202": { "description": "This indicates a successful response. The Location header contains the URL where the operation status can be checked.", "headers": { diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json index f39eeb0c992e..bad9c04ef111 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json @@ -13,6 +13,7 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { + "provisioningState": "Succeeded", "displayName": "Echo API", "discoveredVia": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", "baseUrl": "https://apimservice1.azure-api.net/echo", diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json index 70fe94c77e9b..37f0934ac5dc 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json @@ -14,6 +14,7 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { + "provisioningState": "Succeeded", "displayName": "Echo API", "discoveredVia": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", "baseUrl": "https://apimservice1.azure-api.net/echo", diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json index fab522dac72f..f19b07c885c7 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json @@ -13,6 +13,7 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { + "provisioningState": "Succeeded", "displayName": "Echo API", "discoveredVia": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", "baseUrl": "https://apimservice1.azure-api.net/echo", diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json index dc6b44b4a0e2..90a04f366bd6 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json @@ -12,6 +12,7 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { + "provisioningState": "Succeeded", "displayName": "Echo API", "discoveredVia": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", "baseUrl": "https://apimservice1.azure-api.net/echo", diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json index 30c074c244f4..befc256fe694 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json @@ -13,6 +13,25 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { + "provisioningState": "Succeeded", + "displayName": "Echo API", + "discoveredVia": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "baseUrl": "https://apimservice1.azure-api.net/echo", + "numberOfApiEndpoints": 6, + "numberOfInactiveApiEndpoints": 3, + "numberOfUnauthenticatedApiEndpoints": 1, + "numberOfExternalApiEndpoints": 3, + "numberOfApiEndpointsWithSensitiveDataExposed": 0 + } + } + }, + "201": { + "body": { + "id": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api", + "name": "echo-api", + "type": "Microsoft.Security/apiCollections", + "properties": { + "provisioningState": "Accepted", "displayName": "Echo API", "discoveredVia": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", "baseUrl": "https://apimservice1.azure-api.net/echo", From b0b0b15a5c65b4c22b06f5781809ecd0b8dabe26 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Sun, 13 Aug 2023 14:46:23 -0700 Subject: [PATCH 18/29] Update descriptions --- .../stable/2023-11-15/apiCollections.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index c68d373d1787..83a338d1ebfb 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -45,7 +45,7 @@ "D4APICollectionList" ], "description": "Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs.", - "summary": "Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs", + "summary": "Gets a list of API collections within a subscription", "operationId": "APICollection_ListBySubscription", "parameters": [ { @@ -85,7 +85,7 @@ "D4APICollectionList" ], "description": "Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs.", - "summary": "Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs", + "summary": "Gets a list of API collections within a resource group", "operationId": "APICollection_ListByResourceGroup", "parameters": [ { @@ -129,7 +129,7 @@ "APIMConfig" ], "description": "Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.", - "summary": "Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs", + "summary": "Gets a list of onboarded Azure API Management APIs", "operationId": "APICollection_ListByAzureApiManagementService", "parameters": [ { @@ -176,7 +176,7 @@ "APIMConfig" ], "description": "Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.", - "summary": "Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs", + "summary": "Gets an onboarded Azure API Management API", "operationId": "APICollection_GetByAzureApiManagementService", "parameters": [ { @@ -242,19 +242,19 @@ ], "responses": { "200": { - "description": "This indicates a successful response. The response contains the properties of the API collection.", + "description": "This indicates a successful response for the create or update operation. The response contains the properties of the API collection.", "schema": { "$ref": "#/definitions/ApiCollectionResponse" } }, "201": { - "description": "This indicates a successful response. The response contains the properties of the API collection.", + "description": "This indicates a successful response for the create or update operation. The response contains the properties of the API collection.", "schema": { "$ref": "#/definitions/ApiCollectionResponse" } }, "202": { - "description": "This indicates a successful response. The Location header contains the URL where the operation status can be checked.", + "description": "This indicates a successful response for the create or update operation. The Location header contains the URL where the operation status can be checked.", "headers": { "Location": { "type": "string" @@ -305,10 +305,10 @@ ], "responses": { "200": { - "description": "This operation completed successfully." + "description": "This indicates a successful response for the delete operation." }, "204": { - "description": "This operation completed successfully." + "description": "This indicates a successful response for the delete operation." }, "default": { "description": "Error response describing why the operation failed.", From 3ee9c992b831c1708b30b00539c45e9e50dd972f Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Sun, 13 Aug 2023 15:02:40 -0700 Subject: [PATCH 19/29] Update example --- ...ollection_OnboardAzureApiManagementApi_example.json | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json index befc256fe694..9e9498bff032 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json @@ -31,15 +31,7 @@ "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { - "provisioningState": "Accepted", - "displayName": "Echo API", - "discoveredVia": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", - "baseUrl": "https://apimservice1.azure-api.net/echo", - "numberOfApiEndpoints": 6, - "numberOfInactiveApiEndpoints": 3, - "numberOfUnauthenticatedApiEndpoints": 1, - "numberOfExternalApiEndpoints": 3, - "numberOfApiEndpointsWithSensitiveDataExposed": 0 + "provisioningState": "Accepted" } } }, From 562888ed772cea54ec1a2c97b2f9750b0c116789 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Wed, 16 Aug 2023 15:02:51 -0700 Subject: [PATCH 20/29] Modifications based on feedback from PMs, designers and NDA customers --- .../stable/2023-11-15/apiCollections.json | 44 +++++++++++-------- ...tByAzureApiManagementService_example.json} | 3 +- ...tByAzureApiManagementService_example.json} | 3 +- ...lections_ListByResourceGroup_example.json} | 3 +- ...llections_ListBySubscription_example.json} | 3 +- ...ffboardAzureApiManagementApi_example.json} | 0 ...OnboardAzureApiManagementApi_example.json} | 3 +- 7 files changed, 35 insertions(+), 24 deletions(-) rename specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/{APICollection_GetByAzureApiManagementService_example.json => APICollections_GetByAzureApiManagementService_example.json} (90%) rename specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/{APICollection_ListByAzureApiManagementService_example.json => APICollections_ListByAzureApiManagementService_example.json} (90%) rename specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/{APICollection_ListByResourceGroup_example.json => APICollections_ListByResourceGroup_example.json} (90%) rename specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/{APICollection_ListBySubscription_example.json => APICollections_ListBySubscription_example.json} (89%) rename specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/{APICollection_OffboardAzureApiManagementApi_example.json => APICollections_OffboardAzureApiManagementApi_example.json} (100%) rename specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/{APICollection_OnboardAzureApiManagementApi_example.json => APICollections_OnboardAzureApiManagementApi_example.json} (94%) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index 83a338d1ebfb..f177781c78cc 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -38,7 +38,7 @@ "get": { "x-ms-examples": { "Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs": { - "$ref": "./examples/ApiCollections/APICollection_ListBySubscription_example.json" + "$ref": "./examples/ApiCollections/APICollections_ListBySubscription_example.json" } }, "tags": [ @@ -46,7 +46,7 @@ ], "description": "Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs.", "summary": "Gets a list of API collections within a subscription", - "operationId": "APICollection_ListBySubscription", + "operationId": "APICollections_ListBySubscription", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -78,7 +78,7 @@ "get": { "x-ms-examples": { "Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs": { - "$ref": "./examples/ApiCollections/APICollection_ListByResourceGroup_example.json" + "$ref": "./examples/ApiCollections/APICollections_ListByResourceGroup_example.json" } }, "tags": [ @@ -86,7 +86,7 @@ ], "description": "Gets a list of API collections within a resource group that have been onboarded to Microsoft Defender for APIs.", "summary": "Gets a list of API collections within a resource group", - "operationId": "APICollection_ListByResourceGroup", + "operationId": "APICollections_ListByResourceGroup", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -121,7 +121,7 @@ "get": { "x-ms-examples": { "Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs": { - "$ref": "./examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json" + "$ref": "./examples/ApiCollections/APICollections_ListByAzureApiManagementService_example.json" } }, "tags": [ @@ -130,7 +130,7 @@ ], "description": "Gets a list of Azure API Management APIs that have been onboarded to Microsoft Defender for APIs. If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.", "summary": "Gets a list of onboarded Azure API Management APIs", - "operationId": "APICollection_ListByAzureApiManagementService", + "operationId": "APICollections_ListByAzureApiManagementService", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -164,11 +164,11 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiCollectionId}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiId}": { "get": { "x-ms-examples": { "Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs": { - "$ref": "./examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json" + "$ref": "./examples/ApiCollections/APICollections_GetByAzureApiManagementService_example.json" } }, "tags": [ @@ -177,7 +177,7 @@ ], "description": "Gets an Azure API Management API if it has been onboarded to Microsoft Defender for APIs. If an Azure API Management API is onboarded to Microsoft Defender for APIs, the system will monitor the operations within the Azure API Management API for intrusive behaviors and provide alerts for attacks that have been detected.", "summary": "Gets an onboarded Azure API Management API", - "operationId": "APICollection_GetByAzureApiManagementService", + "operationId": "APICollections_GetByAzureApiManagementService", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -189,7 +189,7 @@ "$ref": "#/parameters/ApiManagementServiceNameParameter" }, { - "$ref": "#/parameters/ApiCollectionIdParameter" + "$ref": "#/parameters/ApiManagementApiIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -213,7 +213,7 @@ "put": { "x-ms-examples": { "Onboard an Azure API Management API to Microsoft Defender for APIs": { - "$ref": "./examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json" + "$ref": "./examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json" } }, "tags": [ @@ -222,7 +222,7 @@ ], "description": "Onboard an Azure API Management API to Microsoft Defender for APIs. The system will start monitoring the operations within the Azure Management API for intrusive behaviors and provide alerts for attacks that have been detected.", "summary": "Onboard an Azure API Management API to Microsoft Defender for APIs", - "operationId": "APICollection_OnboardAzureApiManagementApi", + "operationId": "APICollections_OnboardAzureApiManagementApi", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -234,7 +234,7 @@ "$ref": "#/parameters/ApiManagementServiceNameParameter" }, { - "$ref": "#/parameters/ApiCollectionIdParameter" + "$ref": "#/parameters/ApiManagementApiIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -276,7 +276,7 @@ "delete": { "x-ms-examples": { "Offboard an Azure API Management API from Microsoft Defender for APIs": { - "$ref": "./examples/ApiCollections/APICollection_OffboardAzureApiManagementApi_example.json" + "$ref": "./examples/ApiCollections/APICollections_OffboardAzureApiManagementApi_example.json" } }, "tags": [ @@ -285,7 +285,7 @@ ], "description": "Offboard an Azure API Management API from Microsoft Defender for APIs. The system will stop monitoring the operations within the Azure API Management API for intrusive behaviors.", "summary": "Offboard an Azure API Management API from Microsoft Defender for APIs", - "operationId": "APICollection_OffboardAzureApiManagementApi", + "operationId": "APICollections_OffboardAzureApiManagementApi", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -297,7 +297,7 @@ "$ref": "#/parameters/ApiManagementServiceNameParameter" }, { - "$ref": "#/parameters/ApiCollectionIdParameter" + "$ref": "#/parameters/ApiManagementApiIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -409,6 +409,11 @@ "format": "int64", "description": "The number of API endpoints in this API collection which are exposing sensitive data in their requests and/or responses." }, + "sensitivityLabel": { + "readOnly": true, + "type": "string", + "description": "The highest sensitivity label of all API endpoints in this API collection." + }, "additionalData": { "type": "object", "description": "Additional data regarding the API collection.", @@ -431,14 +436,15 @@ "pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", "x-ms-parameter-location": "method" }, - "ApiCollectionIdParameter": { - "name": "apiCollectionId", + "ApiManagementApiIdParameter": { + "name": "apiId", "in": "path", "required": true, "type": "string", - "description": "A string representing the apiCollections resource within the Microsoft.Security provider namespace. This string matches the Azure API Management API name.", + "description": "API revision identifier. Must be unique in the API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.", "minLength": 1, "maxLength": 256, + "pattern": "^[^*#&+:<>?]+$", "x-ms-parameter-location": "method" } } diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_GetByAzureApiManagementService_example.json similarity index 90% rename from specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json rename to specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_GetByAzureApiManagementService_example.json index bad9c04ef111..77b980e2fc73 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_GetByAzureApiManagementService_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_GetByAzureApiManagementService_example.json @@ -21,7 +21,8 @@ "numberOfInactiveApiEndpoints": 3, "numberOfUnauthenticatedApiEndpoints": 1, "numberOfExternalApiEndpoints": 3, - "numberOfApiEndpointsWithSensitiveDataExposed": 0 + "numberOfApiEndpointsWithSensitiveDataExposed": 1, + "sensitivityLabel": "Highly Confidential" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByAzureApiManagementService_example.json similarity index 90% rename from specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json rename to specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByAzureApiManagementService_example.json index 37f0934ac5dc..8ab460e0c33a 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByAzureApiManagementService_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByAzureApiManagementService_example.json @@ -22,7 +22,8 @@ "numberOfInactiveApiEndpoints": 3, "numberOfUnauthenticatedApiEndpoints": 1, "numberOfExternalApiEndpoints": 3, - "numberOfApiEndpointsWithSensitiveDataExposed": 0 + "numberOfApiEndpointsWithSensitiveDataExposed": 1, + "sensitivityLabel": "Highly Confidential" } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByResourceGroup_example.json similarity index 90% rename from specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json rename to specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByResourceGroup_example.json index f19b07c885c7..8e934fcfd551 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListByResourceGroup_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByResourceGroup_example.json @@ -21,7 +21,8 @@ "numberOfInactiveApiEndpoints": 3, "numberOfUnauthenticatedApiEndpoints": 1, "numberOfExternalApiEndpoints": 3, - "numberOfApiEndpointsWithSensitiveDataExposed": 0 + "numberOfApiEndpointsWithSensitiveDataExposed": 1, + "sensitivityLabel": "Highly Confidential" } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListBySubscription_example.json similarity index 89% rename from specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json rename to specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListBySubscription_example.json index 90a04f366bd6..6f39256e6572 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_ListBySubscription_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListBySubscription_example.json @@ -20,7 +20,8 @@ "numberOfInactiveApiEndpoints": 3, "numberOfUnauthenticatedApiEndpoints": 1, "numberOfExternalApiEndpoints": 3, - "numberOfApiEndpointsWithSensitiveDataExposed": 0 + "numberOfApiEndpointsWithSensitiveDataExposed": 1, + "sensitivityLabel": "Highly Confidential" } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OffboardAzureApiManagementApi_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OffboardAzureApiManagementApi_example.json similarity index 100% rename from specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OffboardAzureApiManagementApi_example.json rename to specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OffboardAzureApiManagementApi_example.json diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json similarity index 94% rename from specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json rename to specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json index 9e9498bff032..12ac4aab74a3 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollection_OnboardAzureApiManagementApi_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json @@ -21,7 +21,8 @@ "numberOfInactiveApiEndpoints": 3, "numberOfUnauthenticatedApiEndpoints": 1, "numberOfExternalApiEndpoints": 3, - "numberOfApiEndpointsWithSensitiveDataExposed": 0 + "numberOfApiEndpointsWithSensitiveDataExposed": 1, + "sensitivityLabel": "Highly Confidential" } } }, From 95a80092e82050bd20ed620ea854570dafa9bd6e Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Wed, 16 Aug 2023 15:38:33 -0700 Subject: [PATCH 21/29] Fix model validation --- .../APICollections_GetByAzureApiManagementService_example.json | 2 +- .../APICollections_OffboardAzureApiManagementApi_example.json | 2 +- .../APICollections_OnboardAzureApiManagementApi_example.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_GetByAzureApiManagementService_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_GetByAzureApiManagementService_example.json index 77b980e2fc73..9ddca514ed72 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_GetByAzureApiManagementService_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_GetByAzureApiManagementService_example.json @@ -3,7 +3,7 @@ "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "resourceGroupName": "rg1", "serviceName": "apimService1", - "apiCollectionId": "echo-api", + "apiId": "echo-api", "api-version": "2023-11-15" }, "responses": { diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OffboardAzureApiManagementApi_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OffboardAzureApiManagementApi_example.json index 3ae13671a794..e0d78f02ec40 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OffboardAzureApiManagementApi_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OffboardAzureApiManagementApi_example.json @@ -3,7 +3,7 @@ "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "resourceGroupName": "rg1", "serviceName": "apimService1", - "apiCollectionId": "echo-api", + "apiId": "echo-api", "api-version": "2023-11-15" }, "responses": { diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json index 12ac4aab74a3..6550f3883021 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json @@ -3,7 +3,7 @@ "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "resourceGroupName": "rg1", "serviceName": "apimService1", - "apiCollectionId": "echo-api", + "apiId": "echo-api", "api-version": "2023-11-15" }, "responses": { From 561d7dd1251a61976810c9f0e65dd012eb6d7625 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Wed, 16 Aug 2023 16:42:39 -0700 Subject: [PATCH 22/29] Update PR based on https://github.com/Azure/azure-rest-api-specs/pull/24938 --- .../stable/2023-11-15/apiCollections.json | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index f177781c78cc..2d7fdee4b029 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -49,7 +49,7 @@ "operationId": "APICollections_ListBySubscription", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../common-types/v2/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -59,13 +59,13 @@ "200": { "description": "This indicates a successful response. The response contains the list of API collections.", "schema": { - "$ref": "#/definitions/ApiCollectionResponseList" + "$ref": "#/definitions/ApiCollectionList" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../common-types/v2/types.json#/definitions/ErrorResponse" } } }, @@ -89,10 +89,10 @@ "operationId": "APICollections_ListByResourceGroup", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../common-types/v2/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../common-types/v2/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -102,13 +102,13 @@ "200": { "description": "This indicates a successful response. The response contains the list of API collections.", "schema": { - "$ref": "#/definitions/ApiCollectionResponseList" + "$ref": "#/definitions/ApiCollectionList" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../common-types/v2/types.json#/definitions/ErrorResponse" } } }, @@ -133,10 +133,10 @@ "operationId": "APICollections_ListByAzureApiManagementService", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../common-types/v2/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../common-types/v2/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiManagementServiceNameParameter" @@ -149,13 +149,13 @@ "200": { "description": "This indicates a successful response. The response contains the list of API collections.", "schema": { - "$ref": "#/definitions/ApiCollectionResponseList" + "$ref": "#/definitions/ApiCollectionList" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../common-types/v2/types.json#/definitions/ErrorResponse" } } }, @@ -180,10 +180,10 @@ "operationId": "APICollections_GetByAzureApiManagementService", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../common-types/v2/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../common-types/v2/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiManagementServiceNameParameter" @@ -199,13 +199,13 @@ "200": { "description": "This indicates a successful response. The response contains the properties of the API collection.", "schema": { - "$ref": "#/definitions/ApiCollectionResponse" + "$ref": "#/definitions/ApiCollection" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../common-types/v2/types.json#/definitions/ErrorResponse" } } } @@ -225,10 +225,10 @@ "operationId": "APICollections_OnboardAzureApiManagementApi", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../common-types/v2/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../common-types/v2/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiManagementServiceNameParameter" @@ -244,13 +244,13 @@ "200": { "description": "This indicates a successful response for the create or update operation. The response contains the properties of the API collection.", "schema": { - "$ref": "#/definitions/ApiCollectionResponse" + "$ref": "#/definitions/ApiCollection" } }, "201": { "description": "This indicates a successful response for the create or update operation. The response contains the properties of the API collection.", "schema": { - "$ref": "#/definitions/ApiCollectionResponse" + "$ref": "#/definitions/ApiCollection" } }, "202": { @@ -264,7 +264,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../common-types/v2/types.json#/definitions/ErrorResponse" } } }, @@ -288,10 +288,10 @@ "operationId": "APICollections_OffboardAzureApiManagementApi", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../common-types/v2/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../common-types/v2/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiManagementServiceNameParameter" @@ -313,7 +313,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../common-types/v2/types.json#/definitions/ErrorResponse" } } } @@ -321,7 +321,7 @@ } }, "definitions": { - "ApiCollectionResponseList": { + "ApiCollectionList": { "type": "object", "description": "Page of a list of API collections as represented by Microsoft Defender for APIs.", "properties": { @@ -330,7 +330,7 @@ "readOnly": true, "type": "array", "items": { - "$ref": "#/definitions/ApiCollectionResponse" + "$ref": "#/definitions/ApiCollection" } }, "nextLink": { @@ -340,7 +340,7 @@ } } }, - "ApiCollectionResponse": { + "ApiCollection": { "type": "object", "description": "An API collection as represented by Microsoft Defender for APIs.", "properties": { From 536e4e327754d5cc096d36fedcbce6904c62e296 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Wed, 16 Aug 2023 16:58:26 -0700 Subject: [PATCH 23/29] Fix build errors --- .../stable/2023-11-15/apiCollections.json | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index 2d7fdee4b029..eb68fb332e1f 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -49,7 +49,7 @@ "operationId": "APICollections_ListBySubscription", "parameters": [ { - "$ref": "../../../common-types/v2/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -65,7 +65,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../common-types/v2/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -89,10 +89,10 @@ "operationId": "APICollections_ListByResourceGroup", "parameters": [ { - "$ref": "../../../common-types/v2/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../common-types/v2/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -108,7 +108,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../common-types/v2/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -133,10 +133,10 @@ "operationId": "APICollections_ListByAzureApiManagementService", "parameters": [ { - "$ref": "../../../common-types/v2/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../common-types/v2/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiManagementServiceNameParameter" @@ -155,7 +155,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../common-types/v2/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -180,10 +180,10 @@ "operationId": "APICollections_GetByAzureApiManagementService", "parameters": [ { - "$ref": "../../../common-types/v2/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../common-types/v2/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiManagementServiceNameParameter" @@ -205,7 +205,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../common-types/v2/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } } @@ -225,10 +225,10 @@ "operationId": "APICollections_OnboardAzureApiManagementApi", "parameters": [ { - "$ref": "../../../common-types/v2/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../common-types/v2/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiManagementServiceNameParameter" @@ -264,7 +264,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../common-types/v2/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -288,10 +288,10 @@ "operationId": "APICollections_OffboardAzureApiManagementApi", "parameters": [ { - "$ref": "../../../common-types/v2/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../common-types/v2/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiManagementServiceNameParameter" @@ -313,7 +313,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../common-types/v2/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } } @@ -412,7 +412,7 @@ "sensitivityLabel": { "readOnly": true, "type": "string", - "description": "The highest sensitivity label of all API endpoints in this API collection." + "description": "The highest priority sensitivity label from Microsoft Purview in this API collection." }, "additionalData": { "type": "object", From 91f5eb2ac87b51d87f40032d56447f3d8d971ec6 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Fri, 18 Aug 2023 13:18:21 -0700 Subject: [PATCH 24/29] Address feedback from ARM reviewer --- .../stable/2023-11-15/apiCollections.json | 86 ++++++++++++------- ...stByAzureApiManagementService_example.json | 3 +- ...llections_ListByResourceGroup_example.json | 3 +- ...ollections_ListBySubscription_example.json | 3 +- ..._OnboardAzureApiManagementApi_example.json | 10 +-- 5 files changed, 64 insertions(+), 41 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index eb68fb332e1f..e7dfeec94077 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -49,10 +49,10 @@ "operationId": "APICollections_ListBySubscription", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersion" } ], "responses": { @@ -89,13 +89,13 @@ "operationId": "APICollections_ListByResourceGroup", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersion" } ], "responses": { @@ -133,16 +133,16 @@ "operationId": "APICollections_ListByAzureApiManagementService", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiManagementServiceNameParameter" }, { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersion" } ], "responses": { @@ -180,10 +180,10 @@ "operationId": "APICollections_GetByAzureApiManagementService", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiManagementServiceNameParameter" @@ -192,7 +192,7 @@ "$ref": "#/parameters/ApiManagementApiIdParameter" }, { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersion" } ], "responses": { @@ -225,10 +225,10 @@ "operationId": "APICollections_OnboardAzureApiManagementApi", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiManagementServiceNameParameter" @@ -237,7 +237,7 @@ "$ref": "#/parameters/ApiManagementApiIdParameter" }, { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersion" } ], "responses": { @@ -249,16 +249,13 @@ }, "201": { "description": "This indicates a successful response for the create or update operation. The response contains the properties of the API collection.", - "schema": { - "$ref": "#/definitions/ApiCollection" - } - }, - "202": { - "description": "This indicates a successful response for the create or update operation. The Location header contains the URL where the operation status can be checked.", "headers": { "Location": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/ApiCollection" } }, "default": { @@ -288,10 +285,10 @@ "operationId": "APICollections_OffboardAzureApiManagementApi", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiManagementServiceNameParameter" @@ -300,7 +297,7 @@ "$ref": "#/parameters/ApiManagementApiIdParameter" }, { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersion" } ], "responses": { @@ -362,7 +359,31 @@ "provisioningState": { "type": "string", "readOnly": true, - "description": "Gets the provisioning state of the API collection." + "description": "Gets the provisioning state of the API collection.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "InProgress" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true, + "values": [ + { + "value": "Succeeded" + }, + { + "value": "Failed" + }, + { + "value": "Canceled" + }, + { + "value": "InProgress" + } + ] + } }, "displayName": { "readOnly": true, @@ -372,7 +393,15 @@ "discoveredVia": { "readOnly": true, "type": "string", - "description": "The resource Id of the resource from where this API collection was discovered." + "description": "The resource Id of the resource from where this API collection was discovered.", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.ApiManagement/service" + } + ] + } }, "baseUrl": { "readOnly": true, @@ -413,13 +442,6 @@ "readOnly": true, "type": "string", "description": "The highest priority sensitivity label from Microsoft Purview in this API collection." - }, - "additionalData": { - "type": "object", - "description": "Additional data regarding the API collection.", - "additionalProperties": { - "type": "string" - } } } } diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByAzureApiManagementService_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByAzureApiManagementService_example.json index 8ab460e0c33a..cf33297d96cb 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByAzureApiManagementService_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByAzureApiManagementService_example.json @@ -26,7 +26,8 @@ "sensitivityLabel": "Highly Confidential" } } - ] + ], + "nextLink": "https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections?api-version=2023-11-15&$skipToken=ac943fd6a934" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByResourceGroup_example.json index 8e934fcfd551..e83a81e44a43 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByResourceGroup_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListByResourceGroup_example.json @@ -25,7 +25,8 @@ "sensitivityLabel": "Highly Confidential" } } - ] + ], + "nextLink": "https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.Security/apiCollections?api-version=2023-11-15&$skipToken=ac943fd6a934" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListBySubscription_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListBySubscription_example.json index 6f39256e6572..b831497e431a 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListBySubscription_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_ListBySubscription_example.json @@ -24,7 +24,8 @@ "sensitivityLabel": "Highly Confidential" } } - ] + ], + "nextLink": "https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/providers/Microsoft.Security/apiCollections?api-version=2023-11-15&$skipToken=ac943fd6a934" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json index 6550f3883021..714a4e354215 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json @@ -27,19 +27,17 @@ } }, "201": { + "headers": { + "Location": "https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15&$retryUntil=538273328447205766" + }, "body": { "id": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api", "name": "echo-api", "type": "Microsoft.Security/apiCollections", "properties": { - "provisioningState": "Accepted" + "provisioningState": "InProgress" } } - }, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15&$retryUntil=538273328447205766" - } } } } From a2603b05fc992805f0400dec99049b1b53e8c2c9 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Fri, 18 Aug 2023 13:22:53 -0700 Subject: [PATCH 25/29] Fix reference --- .../stable/2023-11-15/apiCollections.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index e7dfeec94077..8710bab1fca0 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -52,7 +52,7 @@ "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersion" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { @@ -95,7 +95,7 @@ "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersion" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { @@ -142,7 +142,7 @@ "$ref": "#/parameters/ApiManagementServiceNameParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersion" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { @@ -192,7 +192,7 @@ "$ref": "#/parameters/ApiManagementApiIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersion" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { @@ -237,7 +237,7 @@ "$ref": "#/parameters/ApiManagementApiIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersion" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { @@ -297,7 +297,7 @@ "$ref": "#/parameters/ApiManagementApiIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersion" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { From 99296da5cad49194a8ec01c3c71f4852629744de Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Wed, 23 Aug 2023 09:38:03 +0800 Subject: [PATCH 26/29] fix readme.python.md --- specification/security/resource-manager/readme.python.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/security/resource-manager/readme.python.md b/specification/security/resource-manager/readme.python.md index ca3630bcabfd..c6440dc024d6 100644 --- a/specification/security/resource-manager/readme.python.md +++ b/specification/security/resource-manager/readme.python.md @@ -40,7 +40,7 @@ default-api-version: "2023-01-01" multiapi: true batch: - tag: package-preview-2023-03-only - - tag: package-preview-2023-02 + - tag: package-preview-2023-02-only - tag: package-preview-2023-01-only - tag: package-2023-01 - tag: package-preview-2022-08 @@ -86,12 +86,12 @@ namespace: azure.mgmt.security.v2023_03_01_preview output-folder: $(python-sdks-folder)/security/azure-mgmt-security/azure/mgmt/security/v2023_03_01_preview ``` -### Tag: package-preview-2023-02 and python +### Tag: package-preview-2023-02-only and python -These settings apply only when `--tag=package-preview-2023-02 --python` is specified on the command line. +These settings apply only when `--tag=package-preview-2023-02-only --python` is specified on the command line. Please also specify `--python-sdks-folder=`. -``` yaml $(tag) == 'package-preview-2023-02' && $(python) +``` yaml $(tag) == 'package-preview-2023-02-only' && $(python) namespace: azure.mgmt.security.v2023_02_01_preview output-folder: $(python-sdks-folder)/security/azure-mgmt-security/azure/mgmt/security/v2023_02_01_preview ``` From 335c7d598539d122560c41f36f15d1187a494150 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Thu, 24 Aug 2023 13:42:12 -0700 Subject: [PATCH 27/29] Update example header value --- .../APICollections_OnboardAzureApiManagementApi_example.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json index 714a4e354215..3eedbb61c44f 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/examples/ApiCollections/APICollections_OnboardAzureApiManagementApi_example.json @@ -28,7 +28,7 @@ }, "201": { "headers": { - "Location": "https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15&$retryUntil=538273328447205766" + "Location": "https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15&$asyncScope=eyJydSI6NTM4MjczMzI4NDQ3MjA1NzY2fQ==" }, "body": { "id": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api", From d13ffe79c2090db8e307322fcd9482d4f788c585 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Fri, 8 Sep 2023 09:22:56 -0700 Subject: [PATCH 28/29] Address PR feedback --- .../stable/2023-11-15/apiCollections.json | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index 8710bab1fca0..83c66dc4e03c 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -65,7 +65,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -108,7 +108,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -155,7 +155,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -205,7 +205,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } @@ -261,7 +261,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -310,7 +310,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } @@ -406,6 +406,7 @@ "baseUrl": { "readOnly": true, "type": "string", + "format": "uri", "description": "The base URL for this API collection. All endpoints of this API collection extend this base URL." }, "numberOfApiEndpoints": { From a1b7543d78fac529914494184aa623f2148a9cc8 Mon Sep 17 00:00:00 2001 From: Adit Dalvi Date: Sun, 10 Sep 2023 23:43:54 -0700 Subject: [PATCH 29/29] Update description based on PR feedback --- .../Microsoft.Security/stable/2023-11-15/apiCollections.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json index 83c66dc4e03c..a4f66294c456 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2023-11-15/apiCollections.json @@ -407,7 +407,7 @@ "readOnly": true, "type": "string", "format": "uri", - "description": "The base URL for this API collection. All endpoints of this API collection extend this base URL." + "description": "The base URI for this API collection. All endpoints of this API collection extend this base URI." }, "numberOfApiEndpoints": { "readOnly": true,