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

Add NSP API to multiple services under Microsoft.Insights RP #28680

Merged
merged 41 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c47b0a8
Add API and examples for NSP in ScheduledQueryRules
Apr 10, 2024
ff4639a
Add API and examples for NSP in DataCollectionEndpoints
Apr 10, 2024
df55908
Minor fixes for the api specs for ScheduledQueryRules and DCE
Apr 12, 2024
fd5ed18
Add NSP API for Action Groups
Apr 12, 2024
6cb1e10
Add new API to README.md
Apr 12, 2024
7bdb5ea
Merge branch 'main' into akshitgoyal/add-nsp-api
akshitgoyal Apr 12, 2024
4fbe858
Fix examples to include right param names
Apr 12, 2024
bb7a44d
Merge branch 'akshitgoyal/add-nsp-api' of https://github.com/Azure/az…
Apr 12, 2024
539a7da
Fix styling errors
Apr 15, 2024
c429f4c
Include old version in default package tag
Apr 15, 2024
7b5ee1a
Fix Swagger LintDiff validation issues
Apr 15, 2024
7c6ef92
Resolve resource name pattern restriction for configName in NSP
Apr 15, 2024
8504ff2
Fix typo in param name
Apr 15, 2024
efc9dc6
Fix LintDiff warnings and errors
Apr 16, 2024
c817946
Update spec title
Apr 16, 2024
93172d2
Update README with the correct package ver
Apr 16, 2024
44f9cc8
Rever back to original NSP swagger model
Apr 16, 2024
67ead15
Update README
Apr 16, 2024
d229b69
Replace 200 with 202 for reconcile
Apr 16, 2024
f2254cd
Update reconcile examples with 202 response
Apr 16, 2024
469f8d6
Fix 202 response headers for reconcile
Apr 16, 2024
4e23f9d
Update error object ref for LintDiff validation
Apr 16, 2024
af4df59
Fix LintDiff Warnings: Update swagger to use v5 types
Apr 22, 2024
308c9a9
Fix LintDiff warnings
Apr 23, 2024
276d74b
Fix LintDiff warnings
Apr 23, 2024
830def1
Fix Prettier check
Apr 23, 2024
c88e025
Resolve comments and update Data models
Apr 24, 2024
e5f35a9
Resolve merge conflicts for README
Apr 26, 2024
d80972c
Fix README
Apr 26, 2024
4044433
Merge branch 'main' into akshitgoyal/add-nsp-api
akshitgoyal Apr 26, 2024
faafd85
Create sdk-suppressions.yaml
kazrael2119 Apr 30, 2024
fa3bc13
Refactor NSP definitions into a common file
May 2, 2024
10e66b0
Merge branch 'akshitgoyal/add-nsp-api' of https://github.com/Azure/az…
May 2, 2024
2226536
Resolve merge conflicts, merge main into feature branch
May 20, 2024
8e751a3
Resolve merge conflicts
May 20, 2024
40bbcfe
Refactor code to use NSP Common types
May 20, 2024
abde781
Merge branch 'main' into akshitgoyal/add-nsp-api
akshitgoyal May 20, 2024
254e5c2
update API paths with nsp param name
May 20, 2024
6bea9e7
Merge branch 'akshitgoyal/add-nsp-api' of https://github.com/Azure/az…
May 20, 2024
e7d7ae6
Fix param declaration in paths and add parameter definition
May 30, 2024
607d0bb
Change str to int accross all API examples for accessRule ver property
May 30, 2024
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,205 @@
{
"swagger": "2.0",
"info": {
"title": "Azure Action Groups Network Security Perimeter APIs",
"x-ms-code-generation-settings": {
"name": "MonitorManagementClient"
},
"version": "2021-10-01"
},
"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.Insights/actionGroups/{actionGroupName}/networkSecurityPerimeterConfigurations": {
"get": {
"tags": [
"NetworkSecurityPerimeterConfigurations"
],
"description": "Gets a list of NSP configurations for specified action group.",
"operationId": "ActionGroups_ListNSP",
"x-ms-examples": {
"Get an action group": {
"$ref": "./examples/NSPForActionGroups_List.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ActionGroupNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved the list of configs.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v5/networksecurityperimeter.json#/definitions/NetworkSecurityPerimeterConfigurationListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}": {
"get": {
"tags": [
"NetworkSecurityPerimeterConfigurations"
],
"description": "Gets a specified NSP configuration for specified action group.",
"operationId": "ActionGroups_GetNSP",
"x-ms-examples": {
"Get NSP config by name for an action group": {
"$ref": "./examples/NSPForActionGroups_Get.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ActionGroupNameParameter"
},
{
"$ref": "#/parameters/NetworkSecurityPerimeterConfigurationNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved the NSP config.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v5/networksecurityperimeter.json#/definitions/NetworkSecurityPerimeterConfiguration"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile": {
"post": {
"tags": [
"NetworkSecurityPerimeterConfigurations"
],
"description": "Reconciles a specified NSP configuration for specified action group.",
"operationId": "ActionGroups_ReconcileNSP",
"x-ms-examples": {
"Reconcile NSP config by name for an action group": {
"$ref": "./examples/NSPForActionGroups_Reconcile.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ActionGroupNameParameter"
},
{
"$ref": "#/parameters/NetworkSecurityPerimeterConfigurationNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

responses

will there be a case of post responding with 200, meaning that the reconcile on the configurationName is completed or when the Location header responds with a successful terminal state ?

here and in other files having POST calls.

"202": {
"description": "Request to reconcile the association accepted.",
"headers": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider adding a retry-after?

here and in other files having POST calls.

"Location": {
"type": "string"
}
}
},
"default": {
"description": "BadRequest",
"schema": {
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
}
}
},
"definitions": {},
"parameters": {
"ActionGroupNameParameter": {
"name": "actionGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the action group.",
"x-ms-parameter-location": "method",
"pattern": "^.*$",
"maxLength": 43
},
"NetworkSecurityPerimeterConfigurationNameParameter": {
"name": "networkSecurityPerimeterConfigurationName",
"in": "path",
"required": true,
"type": "string",
"pattern": "^.*$",
"minLength": 1,
"maxLength": 512,
"x-ms-parameter-location": "method",
"description": "The name for a network security perimeter configuration"
}
}
}
Loading