Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Hub Generated] Review request for Microsoft.Security to add version preview/2021-08-01-preview #16096

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9678550
Adds base for updating Microsoft.Security from version stable/2021-07…
dochollidayxx Aug 19, 2021
affd393
Updates readme
dochollidayxx Aug 19, 2021
149a360
Updates API version in new specs and examples
dochollidayxx Aug 19, 2021
f7ded94
First pass at Microsoft.Security/standards for review/preview
Aug 20, 2021
d75f361
Addressing Round-1 feedback, adding missing descriptions and changing…
Aug 23, 2021
551900c
First pass for Microsoft.Security\standardComponents
Aug 23, 2021
8e32e2d
Changes to fix a typo in an example spec
Aug 23, 2021
255431d
Added Microsoft.Security/standardAssignments
Aug 31, 2021
05a3e96
Fix naming convention issue
Aug 31, 2021
e8cb807
Removed types based on Hila's feedback
Sep 2, 2021
fd9ca41
Changes to data model for both API calls
Sep 2, 2021
fa893f9
Fix example errors and typos
Sep 2, 2021
06a8c3b
Add systemData to Microsoft.Security/standards
Sep 2, 2021
7c7155c
Changes to fix systemData linting
Sep 2, 2021
13975c3
un-nest systemData fields in examples
Sep 2, 2021
b1077b5
More systemData placement
Sep 2, 2021
f285029
Naming convention name to assignments from standardAssignment
Sep 9, 2021
a1732f3
Additional example added
Sep 14, 2021
2ca2b27
Changes to address descriptive comments on field types
Sep 20, 2021
a5aa447
Add systemData readOnly
Sep 20, 2021
7438ad1
prettier-fix against examples
Sep 20, 2021
31272af
Cleaned types to ref standard v2 common-types entry similar to securi…
Sep 20, 2021
ace846d
Re-added v2 folder?
Sep 20, 2021
6fb1c83
Missed a change here?
Sep 20, 2021
96db7d0
Cleanup of v2 type completely, updated readme.md
Sep 20, 2021
51a82a6
Adds suppression to readme
dochollidayxx Sep 20, 2021
96c068c
Adds suppression to readme
dochollidayxx Sep 20, 2021
3e27570
Change modification to suppress operations linting
Sep 20, 2021
6c14dd0
Merge branch 'main' into dev-security-Microsoft.Security-2021-08-01-p…
dochollidayxx Sep 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,382 @@
{
"swagger": "2.0",
"info": {
"title": "Security Center",
"description": "API spec for Microsoft.Security (Azure Security Center) resource provider",
"version": "2021-08-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}/providers/Microsoft.Security/assignments": {
"get": {
"x-ms-examples": {
"List security standardAssignments by subscription level scope": {
"$ref": "./examples/Assignments/ListBySubscriptionAssignments_example.json"
}
},
"tags": [
"Assignments"
],
"description": "Get a list of all relevant standardAssignments over a subscription level scope",
"operationId": "Assignments_ListBySubscription",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/AssignmentList"
}
},
"default": {
"description": "Error response describing why the operation failed",
"schema": {
"$ref": "../../../common/v1/types.json#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/assignments": {
"get": {
"x-ms-examples": {
"List security standardAssignments by subscriptionId and resourceGroup scope": {
"$ref": "./examples/Assignments/ListAssignments_example.json"
}
},
"tags": [
"Assignments"
],
"description": "Get a list of all relevant standardAssignments available for scope",
"operationId": "Assignments_List",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/AssignmentList"
}
},
"default": {
"description": "Error response describing why the operation failed",
"schema": {
"$ref": "../../../common/v1/types.json#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/assignments/{assignmentId}": {
"get": {
"x-ms-examples": {
"Get security standardAssignments by by specific standardAssignmentId": {
"$ref": "./examples/Assignments/GetAssignment_example.json"
}
},
"tags": [
"Assignments"
],
"description": "Get a specific standard assignment for the requested scope by resourceId",
"operationId": "Assignments_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/AssignmentId"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Assignment"
}
},
"default": {
"description": "Error response describing why the operation failed",
"schema": {
"$ref": "../../../common/v1/types.json#/definitions/CloudError"
}
}
}
},
"put": {
"x-ms-examples": {
"Exempt Recommendation From standard and resource": {
"$ref": "./examples/Assignments/PutAssignment_example.json"
},
"Define a default standard assignment": {
"$ref": "./examples/Assignments/PutDefaultAssignment_example.json"
}
},
"tags": [
"Assignments"
],
"description": "Create a security assignment on the given scope. Will create/update the required standard assignment. ",
"operationId": "Assignments_CreateOrUpdate",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/AssignmentId"
},
{
"$ref": "#/parameters/AssignmentBody"
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/Assignment"
}
},
"200": {
"description": "OK - Updated",
"schema": {
"$ref": "#/definitions/Assignment"
}
},
"default": {
"description": "Error response describing why the operation failed",
"schema": {
"$ref": "../../../common/v1/types.json#/definitions/CloudError"
}
}
}
},
"delete": {
"x-ms-examples": {
"Delete security assignment": {
"$ref": "./examples/Assignments/DeleteAssignment_example.json"
}
},
"tags": [
"Assignments"
],
"description": "Delete a standard assignment over a given scope",
"operationId": "Assignments_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/AssignmentId"
}
],
"responses": {
"200": {
"description": "OK - Standard was deleted"
},
"204": {
"description": "No Content - Standard does not exist"
},
"default": {
"description": "Error response describing why the operation failed"
}
}
}
}
},
"definitions": {
"AssignmentList": {
"type": "object",
"description": "Page of a standard assignment list",
"properties": {
"value": {
"description": "Collection of standardAssignments in this page",
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/definitions/Assignment"
}
},
"nextLink": {
"readOnly": true,
"type": "string",
"description": "The URI to fetch the next page"
}
}
},
"Assignment": {
"type": "object",
"description": "Security Assignment on a resource group over a given scope",
"properties": {
"properties": {
"description": "Properties of a security assignment",
"x-ms-client-flatten": true,
"$ref": "#/definitions/AssignmentProperties"
},
"systemData": {
"readOnly": true,
"type": "object",
"description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData"
}
},
"allOf": [
{
"$ref": "../../../common/v1/types.json#/definitions/TrackedResource"
}
]
},
"AssignmentProperties": {
"type": "object",
"description": "Describes the properties of a standardAssignment",
"properties": {
"displayName": {
"description": "display name of the standardAssignment",
"type": "string"
},
"description": {
"description": "description of the standardAssignment",
"type": "string"
},
"assignedStandard": {
"description": "Standard item with key as applied to this standard assignment over the given scope",
"$ref": "#/definitions/AssignedStandardItem"
},
"assignedComponent": {
"description": "Component item with key as applied to this standard assignment over the given scope",
"$ref": "#/definitions/AssignedComponentItem"
},
"scope": {
"description": "Scope to which the standardAssignment applies - can be a subscription path or a resource group under that subscription",
"type": "string"
},
"effect": {
"description": "expected effect of this assignment (Disable/Exempt/etc)",
"type": "string"
},
"expiresOn": {
"description": "Expiration date of this assignment as a full ISO date",
"type": "string",
"format": "date-time"
},
"additionalData": {
"description": "Additional data about the assignment",
"type": "object",
"properties": {
"exemptionCategory": {
"description": "Exemption category of this assignment",
"type": "string"
}
}
},
"metadata": {
"description": "The assignment metadata. Metadata is an open ended object and is typically a collection of key value pairs.",
"type": "object"
}
}
},
"AssignedStandardItem": {
"type": "object",
"description": "describe the properties of a of a security standard object reference",
"properties": {
"id": {
"description": "full resourceId of the Microsoft.Security/standard object",
"type": "string"
}
}
},
"AssignedComponentItem": {
"type": "object",
"description": "describe the properties of a security assessment object reference (by key)",
"properties": {
"key": {
"description": "unique key to a security assessment object",
"type": "string"
}
}
}
},
"parameters": {
"AssignmentId": {
"name": "assignmentId",
"in": "path",
"required": true,
"type": "string",
"description": "The security assignment key - unique key for the standard assignment",
"x-ms-parameter-location": "method"
},
"AssignmentBody": {
"name": "assignment",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Assignment"
},
"description": "Custom standard assignment over a pre-defined scope",
"x-ms-parameter-location": "method"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"api-version": "2021-08-01-preview",
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
"resourceGroupName": "myResourceGroup",
"assignmentId": "8bb8be0a-6010-4789-812f-e4d661c4ed0e"
},
"responses": {
"200": {},
"204": {}
}
}
Loading