diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/customEntityStoreAssignment.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/customEntityStoreAssignment.json new file mode 100644 index 000000000000..ba7ced35df38 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/customEntityStoreAssignment.json @@ -0,0 +1,345 @@ +{ + "swagger": "2.0", + "info": { + "title": "Security Center", + "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", + "version": "2021-07-01-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.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName}": { + "get": { + "summary": "Gets a custom entity store assignment", + "description": "Gets a single custom entity store assignment by name for the provided subscription and resource group.", + "tags": [ + "customEntityStoreAssignments" + ], + "operationId": "CustomEntityStoreAssignments_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/customEntityStoreAssignmentName" + } + ], + "x-ms-examples": { + "Get a custom entity store assignment": { + "$ref": "./examples/CustomEntityStoreAssignments/customEntityStoreAssignmentGet_example.json" + } + }, + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CustomEntityStoreAssignment" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "put": { + "summary": "Creates a custom entity store assignment", + "description": "Creates a custom entity store assignment for the provided subscription, if not already exists.", + "tags": [ + "customEntityStoreAssignments" + ], + "operationId": "CustomEntityStoreAssignments_Create", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/customEntityStoreAssignmentName" + }, + { + "$ref": "#/parameters/customEntityStoreAssignmentRequestBody" + } + ], + "x-ms-examples": { + "Create a custom entity store assignment": { + "$ref": "./examples/CustomEntityStoreAssignments/customEntityStoreAssignmentCreate_example.json" + } + }, + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/CustomEntityStoreAssignment" + } + }, + "200": { + "description": "OK - Updated", + "schema": { + "$ref": "#/definitions/CustomEntityStoreAssignment" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "delete": { + "summary": "Deleted a custom entity store assignment", + "description": "Delete a custom entity store assignment by name for a provided subscription", + "tags": [ + "customEntityStoreAssignments" + ], + "operationId": "CustomEntityStoreAssignments_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/customEntityStoreAssignmentName" + } + ], + "x-ms-examples": { + "Delete a custom entity store assignment": { + "$ref": "./examples/CustomEntityStoreAssignments/customEntityStoreAssignmentDelete_example.json" + } + }, + "responses": { + "200": { + "description": "OK - Custom Entity Store Assignment was deleted" + }, + "204": { + "description": "No Content - Custom Entity Store Assignment does not exist" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments": { + "get": { + "summary": "List custom entity store assignments in a subscription and a resource group", + "description": "List custom entity store assignments by a provided subscription and resource group", + "tags": [ + "customEntityStoreAssignments" + ], + "operationId": "CustomEntityStoreAssignments_ListByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + } + ], + "x-ms-examples": { + "List custom entity store assignments in a subscription and a resource group": { + "$ref": "./examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListByResourceGroup_example.json" + } + }, + "responses": { + "200": { + "description": "OK - Returns a collection of custom entity store assignments", + "schema": { + "$ref": "#/definitions/CustomEntityStoreAssignmentsListResult" + } + }, + "default": { + "description": "Error response that describes why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/customEntityStoreAssignments": { + "get": { + "summary": "List custom entity store assignments in a subscription", + "description": "List custom entity store assignments by provided subscription", + "tags": [ + "customEntityStoreAssignments" + ], + "operationId": "CustomEntityStoreAssignments_ListBySubscription", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + } + ], + "x-ms-examples": { + "List custom entity store assignments in a subscription": { + "$ref": "./examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListBySubscription_example.json" + } + }, + "responses": { + "200": { + "description": "OK - Returns a collection of custom entity store assignments", + "schema": { + "$ref": "#/definitions/CustomEntityStoreAssignmentsListResult" + } + }, + "default": { + "description": "Error response that describes why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "CustomEntityStoreAssignmentsListResult": { + "type": "object", + "description": "A list of custom entity store assignments", + "properties": { + "value": { + "description": "Collection of custom entity store assignments", + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/CustomEntityStoreAssignment" + } + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + } + }, + "CustomEntityStoreAssignment": { + "type": "object", + "description": "Custom entity store assignment", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "describes custom entity store assignment properties.", + "$ref": "#/definitions/CustomEntityStoreAssignmentProperties" + } + }, + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/Resource" + } + ] + }, + "CustomEntityStoreAssignmentProperties": { + "type": "object", + "description": "describes the custom entity store assignment properties", + "properties": { + "principal": { + "description": "The principal assigned with entity store. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]", + "type": "string" + }, + "entityStoreDatabaseLink": { + "description": "The link to entity store database.", + "type": "string" + } + } + }, + "CustomEntityStoreAssignmentRequest": { + "type": "object", + "description": "describes the custom entity store assignment request", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/CustomEntityStoreAssignmentRequestProperties" + } + } + }, + "CustomEntityStoreAssignmentRequestProperties": { + "type": "object", + "description": "describes properties of custom entity store assignment request", + "properties": { + "principal": { + "description": "The principal assigned with entity store. If not provided, will use caller principal. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]", + "type": "string" + } + } + } + }, + "parameters": { + "customEntityStoreAssignmentName": { + "name": "customEntityStoreAssignmentName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the custom entity store assignment. Generated name is GUID.", + "x-ms-parameter-location": "method" + }, + "customEntityStoreAssignmentRequestBody": { + "name": "customEntityStoreAssignmentRequestBody", + "in": "body", + "description": "Custom entity store assignment body", + "required": true, + "schema": { + "$ref": "#/definitions/CustomEntityStoreAssignmentRequest" + }, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentCreate_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentCreate_example.json new file mode 100644 index 000000000000..7bb1740f357d --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentCreate_example.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-07-01-preview", + "subscriptionId": "e5d1b86c-3051-44d5-8802-aa65d45a279b", + "resourceGroupName": "TestResourceGroup", + "customEntityStoreAssignmentName": "33e7cc6e-a139-4723-a0e5-76993aee0771", + "customEntityStoreAssignmentRequestBody": { + "properties": { + "principal": "aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customEntityStoreAssignments/33e7cc6e-a139-4723-a0e5-76993aee0771", + "name": "33e7cc6e-a139-4723-a0e5-76993aee0771", + "type": "Microsoft.Security/customEntityStoreAssignments", + "properties": { + "principal": "aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47", + "entityStoreDatabaseLink": "https://dataexplorer.azure.com/clusters/securitydatastore.centralus/databases/DiscoveryAwsKedamari?query=H4sIAAAAAAAAAwtILC4uzy9KCcjPyUyu5OWqUShJzE5VMAQAlMJzABgAAAA=" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customEntityStoreAssignments/33e7cc6e-a139-4723-a0e5-76993aee0771", + "name": "33e7cc6e-a139-4723-a0e5-76993aee0771", + "type": "Microsoft.Security/customEntityStoreAssignments", + "properties": { + "principal": "aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47", + "entityStoreDatabaseLink": "https://dataexplorer.azure.com/clusters/securitydatastore.centralus/databases/DiscoveryAwsKedamari?query=H4sIAAAAAAAAAwtILC4uzy9KCcjPyUyu5OWqUShJzE5VMAQAlMJzABgAAAA=" + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentDelete_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentDelete_example.json new file mode 100644 index 000000000000..bc98e0c7315a --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentDelete_example.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2021-07-01-preview", + "subscriptionId": "e5d1b86c-3051-44d5-8802-aa65d45a279b", + "resourceGroupName": "TestResourceGroup", + "customEntityStoreAssignmentName": "33e7cc6e-a139-4723-a0e5-76993aee0771" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentGet_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentGet_example.json new file mode 100644 index 000000000000..99ec085883fa --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentGet_example.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2021-07-01-preview", + "subscriptionId": "e5d1b86c-3051-44d5-8802-aa65d45a279b", + "resourceGroupName": "TestResourceGroup", + "customEntityStoreAssignmentName": "33e7cc6e-a139-4723-a0e5-76993aee0771" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customEntityStoreAssignments/33e7cc6e-a139-4723-a0e5-76993aee0771", + "name": "33e7cc6e-a139-4723-a0e5-76993aee0771", + "type": "Microsoft.Security/customEntityStoreAssignments", + "properties": { + "principal": "aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47", + "entityStoreDatabaseLink": "https://dataexplorer.azure.com/clusters/securitydatastore.centralus/databases/DiscoveryAwsKedamari?query=H4sIAAAAAAAAAwtILC4uzy9KCcjPyUyu5OWqUShJzE5VMAQAlMJzABgAAAA=" + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListByResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListByResourceGroup_example.json new file mode 100644 index 000000000000..404f6dd0b6ae --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListByResourceGroup_example.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-07-01-preview", + "subscriptionId": "e5d1b86c-3051-44d5-8802-aa65d45a279b", + "resourceGroupName": "TestResourceGroup" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customEntityStoreAssignments/33e7cc6e-a139-4723-a0e5-76993aee0771", + "name": "33e7cc6e-a139-4723-a0e5-76993aee0771", + "type": "Microsoft.Security/customEntityStoreAssignments", + "properties": { + "principal": "aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47", + "entityStoreDatabaseLink": "https://dataexplorer.azure.com/clusters/securitydatastore.centralus/databases/DiscoveryAwsKedamari?query=H4sIAAAAAAAAAwtILC4uzy9KCcjPyUyu5OWqUShJzE5VMAQAlMJzABgAAAA=" + } + }, + { + "id": "/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customEntityStoreAssignments/a400695c-4728-d5cc-8e19-4b5a76f209df", + "name": "a400695c-4728-d5cc-8e19-4b5a76f209df", + "type": "Microsoft.Security/customEntityStoreAssignments", + "properties": { + "principal": "aaduser=f6e2564c-f34a-9b61-416c-5e5e7e521118;72f988bf-86f1-41af-91ab-2d7cd011db47", + "entityStoreDatabaseLink": "https://dataexplorer.azure.com/clusters/securitydatastore.centralus/databases/DiscoveryAwsKedamari?query=H4sIAAAAAAAAAwvIz8lMrgzKz0nlqlFIrShJzUtR8Cz2SE3MKcmoVLBVUE9LzClOVQcA1IFnficAAAA=" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListBySubscription_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListBySubscription_example.json new file mode 100644 index 000000000000..a37928e26010 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListBySubscription_example.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2021-07-01-preview", + "subscriptionId": "e5d1b86c-3051-44d5-8802-aa65d45a279b" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customEntityStoreAssignments/33e7cc6e-a139-4723-a0e5-76993aee0771", + "name": "33e7cc6e-a139-4723-a0e5-76993aee0771", + "type": "Microsoft.Security/customEntityStoreAssignments", + "properties": { + "principal": "aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47", + "entityStoreDatabaseLink": "https://dataexplorer.azure.com/clusters/securitydatastore.centralus/databases/DiscoveryAwsKedamari?query=H4sIAAAAAAAAAwtILC4uzy9KCcjPyUyu5OWqUShJzE5VMAQAlMJzABgAAAA=" + } + }, + { + "id": "/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customEntityStoreAssignments/a400695c-4728-d5cc-8e19-4b5a76f209df", + "name": "a400695c-4728-d5cc-8e19-4b5a76f209df", + "type": "Microsoft.Security/customEntityStoreAssignments", + "properties": { + "principal": "aaduser=f6e2564c-f34a-9b61-416c-5e5e7e521118;72f988bf-86f1-41af-91ab-2d7cd011db47", + "entityStoreDatabaseLink": "https://dataexplorer.azure.com/clusters/securitydatastore.centralus/databases/DiscoveryAwsKedamari?query=H4sIAAAAAAAAAwvIz8lMrgzKz0nlqlFIrShJzUtR8Cz2SE3MKcmoVLBVUE9LzClOVQcA1IFnficAAAA=" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 3bcaa903b7f2..053e69555b67 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -68,6 +68,7 @@ These settings apply only when `--tag=package-composite-v1` is specified on the ``` yaml $(tag) == 'package-composite-v1' input-file: - Microsoft.Security/preview/2021-07-01-preview/customAssessmentAutomation.json +- Microsoft.Security/preview/2021-07-01-preview/customEntityStoreAssignment.json - Microsoft.Security/preview/2021-05-01-preview/softwareInventories.json - Microsoft.Security/preview/2020-07-01-preview/sqlVulnerabilityAssessmentsScanOperations.json - Microsoft.Security/preview/2020-07-01-preview/sqlVulnerabilityAssessmentsScanResultsOperations.json @@ -112,6 +113,7 @@ These settings apply only when `--tag=package-composite-v2` is specified on the ``` yaml $(tag) == 'package-composite-v2' input-file: - Microsoft.Security/preview/2021-07-01-preview/customAssessmentAutomation.json +- Microsoft.Security/preview/2021-07-01-preview/customEntityStoreAssignment.json - Microsoft.Security/preview/2021-05-01-preview/softwareInventories.json - Microsoft.Security/preview/2020-07-01-preview/sqlVulnerabilityAssessmentsScanOperations.json - Microsoft.Security/preview/2020-07-01-preview/sqlVulnerabilityAssessmentsScanResultsOperations.json @@ -158,6 +160,7 @@ These settings apply only when `--tag=package-composite-v3` is specified on the ``` yaml $(tag) == 'package-composite-v3' input-file: - Microsoft.Security/preview/2021-07-01-preview/customAssessmentAutomation.json +- Microsoft.Security/preview/2021-07-01-preview/customEntityStoreAssignment.json - Microsoft.Security/stable/2017-08-01/complianceResults.json - Microsoft.Security/stable/2018-06-01/pricings.json - Microsoft.Security/stable/2019-01-01/advancedThreatProtectionSettings.json @@ -423,6 +426,7 @@ These settings apply only when `--tag=package-2021-07-preview-only` is specified ```yaml $(tag) == 'package-2021-07-preview-only' input-file: - Microsoft.Security/preview/2021-07-01-preview/customAssessmentAutomation.json + - Microsoft.Security/preview/2021-07-01-preview/customEntityStoreAssignment.json ``` # Needed when there is more than one input file