diff --git a/custom-words.txt b/custom-words.txt index eb4647086741..d0bddb6aed9f 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1509,6 +1509,7 @@ ODBC oeverify offboard offboards +offboarding officedocument OLTP OIDC diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/apiCollections.json b/specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/apiCollections.json new file mode 100644 index 000000000000..dfb7f13aacd6 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/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/preview/2022-11-20-preview/examples/ApiCollections/APICollectionOffboarding_Delete_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/examples/ApiCollections/APICollectionOffboarding_Delete_example.json new file mode 100644 index 000000000000..9883243c4c18 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/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/preview/2022-11-20-preview/examples/ApiCollections/APICollectionOnboarding_Create_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/examples/ApiCollections/APICollectionOnboarding_Create_example.json new file mode 100644 index 000000000000..73a69b63b821 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/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/preview/2022-11-20-preview/examples/ApiCollections/APICollection_Get_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/examples/ApiCollections/APICollection_Get_example.json new file mode 100644 index 000000000000..73a69b63b821 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/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/preview/2022-11-20-preview/examples/ApiCollections/APICollection_List_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/examples/ApiCollections/APICollection_List_example.json new file mode 100644 index 000000000000..b4b3f27096d1 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2022-11-20-preview/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" + } + } + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 00fde07a1260..b066496780bb 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -86,14 +86,23 @@ tag: package-composite-v3 The following packages may be composed from multiple api-versions. +### Tag: package-preview-2022-11 + +These settings apply only when `--tag=package-preview-2022-11` is specified on the command line. + +```yaml $(tag) == 'package-preview-2022-11' +input-file: + - Microsoft.Security/preview/2022-11-20-preview/apiCollections.json +``` ### Tag: package-preview-2022-08 These settings apply only when `--tag=package-preview-2022-08` is specified on the command line. -```yaml $(tag) == 'package-preview-2022-08' +``` yaml $(tag) == 'package-preview-2022-08' input-file: - Microsoft.Security/preview/2022-08-01-preview/securityConnectors.json ``` + ### Tag: package-preview-2022-07 These settings apply only when `--tag=package-preview-2022-07` is specified on the command line. @@ -310,6 +319,8 @@ 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 + # Needed when there is more than one input file override-info: