From b553402ba8562bdce45e38f61deb8b6323383e3e Mon Sep 17 00:00:00 2001 From: Ben Oberhaus Date: Tue, 7 Mar 2023 11:58:40 -0800 Subject: [PATCH 1/6] Add NetworkSecurityPerimeterConfigurations Swagger --- ...etworkSecurityPerimeterConfigurations.json | 331 ++++++++++++++++++ ...orkSecurityPerimeterConfigurationsGet.json | 51 +++ ...tyPerimeterConfigurationsListByServer.json | 50 +++ ...urityPerimeterConfigurationsReconcile.json | 91 +++++ 4 files changed, 523 insertions(+) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json new file mode 100644 index 000000000000..e978669a73f5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json @@ -0,0 +1,331 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-11-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/networkSecurityPerimeterConfigurations": { + "get": { + "tags": [ + "NetworkSecurityPerimeterConfigurations" + ], + "description": "Gets a list of NSP configurations for a server.", + "operationId": "NetworkSecurityPerimeterConfigurations_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of configs.", + "schema": { + "$ref": "#/definitions/NetworkSecurityPerimeterConfigurationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 NullResource - Request body is empty\n\n * 400 NullProperties - Properties collection is not included in request body\n\n * 400 NullNSP - NetworkSecurityPerimeter property is not present in request body\n\n * 400 NullNSPId - NetworkSecurityPerimeter is missing the ID property\n\n * 400 MalformedNSPId - NetworkSecurityPerimeter ID is not correctly formatted\n\n * 400 NullNSPImmutableId - NetworkSecurityPerimeter is missing the ImmutableId property\n\n * 400 MalformedNSPImmutableId - NetworkSecurityPerimeter Immutable ID is not a GUID\n\n * 400 NullLocation - NetworkSecurityPerimeter is missing the location property\n\n * 400 NullNetworkProfile - NetworkProfile is not present in the request body\n\n * 400 NullNetworkProfileName - NetworkProfile is missing the Name property\n\n * 400 NullAccessMode - Access Mode is not present in the request body\n\n * 400 InvalidAccessMode - Supported Access Modes are enforced, audit and learning\n\n * 400 InvalidClient - Client with id '{0}' is not allowed to interact with this resource\n\n * 400 TooManyAssociations - A SQL Server may only be associated with one NSP\n\n * 400 MalformedAssociationProxyName - AssociationProxy name is not formed like {perimeterGuid}.{associationName}\n\n * 400 OnlyOneAssociationPerServer - A SQL Server may only be associated with one NSP\n\n * 404 AssociationNotFound - This SQL Server is not associated with any NSP\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List NSP configs by server": { + "$ref": "./examples/NetworkSecurityPerimeterConfigurationsListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/networkSecurityPerimeterConfigurations/{nspConfigName}": { + "get": { + "tags": [ + "NetworkSecurityPerimeterConfigurations" + ], + "description": "Gets a network security perimeter configuration.", + "operationId": "NetworkSecurityPerimeterConfigurations_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "nspConfigName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the config.", + "schema": { + "$ref": "#/definitions/NetworkSecurityPerimeterConfiguration" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 NullResource - Request body is empty\n\n * 400 NullProperties - Properties collection is not included in request body\n\n * 400 NullNSP - NetworkSecurityPerimeter property is not present in request body\n\n * 400 NullNSPId - NetworkSecurityPerimeter is missing the ID property\n\n * 400 MalformedNSPId - NetworkSecurityPerimeter ID is not correctly formatted\n\n * 400 NullNSPImmutableId - NetworkSecurityPerimeter is missing the ImmutableId property\n\n * 400 MalformedNSPImmutableId - NetworkSecurityPerimeter Immutable ID is not a GUID\n\n * 400 NullLocation - NetworkSecurityPerimeter is missing the location property\n\n * 400 NullNetworkProfile - NetworkProfile is not present in the request body\n\n * 400 NullNetworkProfileName - NetworkProfile is missing the Name property\n\n * 400 NullAccessMode - Access Mode is not present in the request body\n\n * 400 InvalidAccessMode - Supported Access Modes are enforced, audit and learning\n\n * 400 InvalidClient - Client with id '{0}' is not allowed to interact with this resource\n\n * 400 TooManyAssociations - A SQL Server may only be associated with one NSP\n\n * 400 MalformedAssociationProxyName - AssociationProxy name is not formed like {perimeterGuid}.{associationName}\n\n * 400 OnlyOneAssociationPerServer - A SQL Server may only be associated with one NSP\n\n * 404 AssociationNotFound - This SQL Server is not associated with any NSP\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get an NSP config by name": { + "$ref": "./examples/NetworkSecurityPerimeterConfigurationsGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/networkSecurityPerimeterConfigurations/{nspConfigName}/reconcile": { + "post": { + "tags": [ + "NetworkSecurityPerimeterConfigurations" + ], + "description": "Reconcile network security perimeter configuration for SQL Resource Provider", + "operationId": "NetworkSecurityPerimeterConfigurations_Reconcile", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "nspConfigName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Reconcile NSP Configurations operation successfully accepted" + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 OnlyOneAssociationPerServer - A SQL Server may only be associated with one NSP\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 AssociationNotFound - This SQL Server is not associated with any NSP\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Reconcile NSP Configurations operation successfully accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "ReconcileNSPConfigurations": { + "$ref": "./examples/NetworkSecurityPerimeterConfigurationsReconcile.json" + } + } + } + } + }, + "definitions": { + "NetworkSecurityPerimeterConfiguration": { + "description": "NSP Configuration for a server.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/NetworkSecurityPerimeterConfigurationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "NetworkSecurityPerimeterConfigurationListResult": { + "description": "A list of NSP configurations for a server.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/NetworkSecurityPerimeterConfiguration" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "NetworkSecurityPerimeterConfigurationProperties": { + "description": "The properties of an NSP config.", + "type": "object", + "properties": { + "provisioningState": { + "type": "string" + }, + "perimeter": { + "$ref": "#/definitions/NSPConfigPerimeter" + }, + "resourceAssociation": { + "$ref": "#/definitions/NSPConfigAssociation" + }, + "profile": { + "$ref": "#/definitions/NSPConfigProfile" + } + } + }, + "NSPConfigAccessRule": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "properties": { + "$ref": "#/definitions/NSPConfigAccessRuleProperties" + } + } + }, + "NSPConfigAccessRuleProperties": { + "type": "object", + "properties": { + "direction": { + "type": "string" + }, + "addressPrefixes": { + "type": "array", + "items": { + "type": "string" + } + }, + "fullyQualifiedDomainNames": { + "type": "array", + "items": { + "type": "string" + } + }, + "subscriptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "networkSecurityPerimeters": { + "type": "array", + "items": { + "$ref": "#/definitions/NSPConfigNetworkSecurityPerimeterRule" + } + } + } + }, + "NSPConfigAssociation": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "accessMode": { + "type": "string" + } + } + }, + "NSPConfigNetworkSecurityPerimeterRule": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "perimeterGuid": { + "type": "string" + }, + "location": { + "type": "string" + } + } + }, + "NSPConfigPerimeter": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "perimeterGuid": { + "type": "string" + }, + "location": { + "type": "string" + } + } + }, + "NSPConfigProfile": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "accessRulesVersion": { + "type": "string" + }, + "accessRules": { + "type": "array", + "items": { + "$ref": "#/definitions/NSPConfigAccessRule" + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json new file mode 100644 index 000000000000..2710eb6a9325 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-7398", + "nspConfigName": "00000001-2222-3333-4444-111144444444.assoc1", + "api-version": "2022-11-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", + "name": "00000001-2222-3333-4444-111144444444.assoc1", + "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", + "location": "japaneast", + "properties": { + "provisioningState": "Accepted", + "provisioningIssues": "None", + "networkSecurityPerimeter": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", + "location": "japaneast" + }, + "resourceAssociation": { + "name": "assoc1", + "accessMode": "Enforced" + }, + "profile": { + "name": "profile1", + "accessRulesVersion": "0", + "accessRules": [ + { + "name": "rule1", + "properties": { + "direction": "Inbound", + "addressPrefixes": [ + "148.0.0.0/8", + "152.4.6.0/24" + ] + } + } + ] + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByServer.json new file mode 100644 index 000000000000..164c63c5bcae --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByServer.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-7398", + "api-version": "2022-11-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", + "name": "00000001-2222-3333-4444-111144444444.assoc1", + "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", + "location": "japaneast", + "properties": { + "provisioningState": "Accepted", + "provisioningIssues": "None", + "networkSecurityPerimeter": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", + "location": "japaneast" + }, + "resourceAssociation": { + "name": "assoc1", + "accessMode": "Enforced" + }, + "profile": { + "name": "profile1", + "accessRulesVersion": "0", + "accessRules": [ + { + "name": "rule1", + "properties": { + "direction": "Inbound", + "addressPrefixes": [ + "148.0.0.0/8", + "152.4.6.0/24" + ] + } + } + ] + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json new file mode 100644 index 000000000000..aa6b6c599d5c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-7398", + "api-version": "2022-11-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", + "name": "00000001-2222-3333-4444-111144444444.assoc1", + "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", + "location": "japaneast", + "properties": { + "provisioningState": "Accepted", + "provisioningIssues": "None", + "networkSecurityPerimeter": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", + "location": "japaneast" + }, + "resourceAssociation": { + "name": "assoc1", + "accessMode": "Enforced" + }, + "profile": { + "name": "profile1", + "accessRulesVersion": "0", + "accessRules": [ + { + "name": "rule1", + "properties": { + "direction": "Inbound", + "addressPrefixes": [ + "148.0.0.0/8", + "152.4.6.0/24" + ] + } + } + ] + } + } + } + ] + } + }, + "201": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", + "name": "00000001-2222-3333-4444-111144444444.assoc1", + "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", + "location": "japaneast", + "properties": { + "provisioningState": "Accepted", + "provisioningIssues": "None", + "networkSecurityPerimeter": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", + "location": "japaneast" + }, + "resourceAssociation": { + "name": "assoc1", + "accessMode": "Enforced" + }, + "profile": { + "name": "profile1", + "accessRulesVersion": "0", + "accessRules": [ + { + "name": "rule1", + "properties": { + "direction": "Inbound", + "addressPrefixes": [ + "148.0.0.0/8", + "152.4.6.0/24" + ] + } + } + ] + } + } + } + ] + } + }, + "202": {} + } +} From 17b66f0540d8b5083bf3efe2fdf55d19e414216f Mon Sep 17 00:00:00 2001 From: Ben Oberhaus Date: Tue, 7 Mar 2023 13:23:32 -0800 Subject: [PATCH 2/6] Fixes round 1 --- ...etworkSecurityPerimeterConfigurations.json | 45 ++++++- ...orkSecurityPerimeterConfigurationsGet.json | 62 ++++----- ...tyPerimeterConfigurationsListByServer.json | 2 - ...urityPerimeterConfigurationsReconcile.json | 124 ++++++++---------- specification/sql/resource-manager/readme.md | 1 + 5 files changed, 129 insertions(+), 105 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json index e978669a73f5..4e8c372e3529 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json @@ -196,7 +196,7 @@ "provisioningState": { "type": "string" }, - "perimeter": { + "networkSecurityPerimeter": { "$ref": "#/definitions/NSPConfigPerimeter" }, "resourceAssociation": { @@ -204,6 +204,12 @@ }, "profile": { "$ref": "#/definitions/NSPConfigProfile" + }, + "provisioningIssues": { + "type": "array", + "items": { + "$ref": "#/definitions/NSPProvisioningIssue" + } } } }, @@ -305,6 +311,43 @@ } } } + }, + "NSPProvisioningIssue": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "properties": { + "$ref": "#/definitions/NSPProvisioningIssueProperties" + } + } + }, + "NSPProvisioningIssueProperties": { + "type": "object", + "properties": { + "issueType": { + "type": "string" + }, + "severity": { + "type": "string" + }, + "description": { + "type": "string" + }, + "suggestedResourceIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "suggestedAccessRules": { + "type": "array", + "items": { + "type": "string" + } + } + } } }, "parameters": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json index 2710eb6a9325..c883a86f3894 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json @@ -9,42 +9,36 @@ "responses": { "200": { "body": { - "value": [ - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", - "name": "00000001-2222-3333-4444-111144444444.assoc1", - "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", - "location": "japaneast", - "properties": { - "provisioningState": "Accepted", - "provisioningIssues": "None", - "networkSecurityPerimeter": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", - "location": "japaneast" - }, - "resourceAssociation": { - "name": "assoc1", - "accessMode": "Enforced" - }, - "profile": { - "name": "profile1", - "accessRulesVersion": "0", - "accessRules": [ - { - "name": "rule1", - "properties": { - "direction": "Inbound", - "addressPrefixes": [ - "148.0.0.0/8", - "152.4.6.0/24" - ] - } - } - ] + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", + "name": "00000001-2222-3333-4444-111144444444.assoc1", + "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", + "properties": { + "provisioningState": "Accepted", + "networkSecurityPerimeter": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", + "location": "japaneast" + }, + "resourceAssociation": { + "name": "assoc1", + "accessMode": "Enforced" + }, + "profile": { + "name": "profile1", + "accessRulesVersion": "0", + "accessRules": [ + { + "name": "rule1", + "properties": { + "direction": "Inbound", + "addressPrefixes": [ + "148.0.0.0/8", + "152.4.6.0/24" + ] + } } - } + ] } - ] + } } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByServer.json index 164c63c5bcae..1a9f81613fdb 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByServer.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByServer.json @@ -13,10 +13,8 @@ "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", "name": "00000001-2222-3333-4444-111144444444.assoc1", "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", - "location": "japaneast", "properties": { "provisioningState": "Accepted", - "provisioningIssues": "None", "networkSecurityPerimeter": { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", "location": "japaneast" diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json index aa6b6c599d5c..6b57fd3e6e1c 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json @@ -8,82 +8,70 @@ "responses": { "200": { "body": { - "value": [ - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", - "name": "00000001-2222-3333-4444-111144444444.assoc1", - "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", - "location": "japaneast", - "properties": { - "provisioningState": "Accepted", - "provisioningIssues": "None", - "networkSecurityPerimeter": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", - "location": "japaneast" - }, - "resourceAssociation": { - "name": "assoc1", - "accessMode": "Enforced" - }, - "profile": { - "name": "profile1", - "accessRulesVersion": "0", - "accessRules": [ - { - "name": "rule1", - "properties": { - "direction": "Inbound", - "addressPrefixes": [ - "148.0.0.0/8", - "152.4.6.0/24" - ] - } - } - ] + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", + "name": "00000001-2222-3333-4444-111144444444.assoc1", + "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", + "properties": { + "provisioningState": "Accepted", + "networkSecurityPerimeter": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", + "location": "japaneast" + }, + "resourceAssociation": { + "name": "assoc1", + "accessMode": "Enforced" + }, + "profile": { + "name": "profile1", + "accessRulesVersion": "0", + "accessRules": [ + { + "name": "rule1", + "properties": { + "direction": "Inbound", + "addressPrefixes": [ + "148.0.0.0/8", + "152.4.6.0/24" + ] + } } - } + ] } - ] + } } }, "201": { "body": { - "value": [ - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", - "name": "00000001-2222-3333-4444-111144444444.assoc1", - "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", - "location": "japaneast", - "properties": { - "provisioningState": "Accepted", - "provisioningIssues": "None", - "networkSecurityPerimeter": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", - "location": "japaneast" - }, - "resourceAssociation": { - "name": "assoc1", - "accessMode": "Enforced" - }, - "profile": { - "name": "profile1", - "accessRulesVersion": "0", - "accessRules": [ - { - "name": "rule1", - "properties": { - "direction": "Inbound", - "addressPrefixes": [ - "148.0.0.0/8", - "152.4.6.0/24" - ] - } - } - ] + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", + "name": "00000001-2222-3333-4444-111144444444.assoc1", + "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", + "properties": { + "provisioningState": "Accepted", + "networkSecurityPerimeter": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", + "location": "japaneast" + }, + "resourceAssociation": { + "name": "assoc1", + "accessMode": "Enforced" + }, + "profile": { + "name": "profile1", + "accessRulesVersion": "0", + "accessRules": [ + { + "name": "rule1", + "properties": { + "direction": "Inbound", + "addressPrefixes": [ + "148.0.0.0/8", + "152.4.6.0/24" + ] + } } - } + ] } - ] + } } }, "202": {} diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 4005ea09b8b9..59adab25c2d1 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -127,6 +127,7 @@ input-file: - Microsoft.Sql/preview/2022-11-01-preview/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.json - Microsoft.Sql/preview/2022-11-01-preview/ManagedServerDnsAliases.json - Microsoft.Sql/preview/2022-11-01-preview/ManagedServerSecurityAlertPolicies.json + - Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json - Microsoft.Sql/preview/2022-11-01-preview/Operations.json - Microsoft.Sql/preview/2022-11-01-preview/OutboundFirewallRules.json - Microsoft.Sql/preview/2022-11-01-preview/PrivateEndpointConnections.json From 80a2a4de5d65dcec0e78da48ad41908f97100ec2 Mon Sep 17 00:00:00 2001 From: Ben Oberhaus Date: Tue, 7 Mar 2023 13:51:25 -0800 Subject: [PATCH 3/6] Fixes round 2 --- ...etworkSecurityPerimeterConfigurations.json | 5 +-- ...urityPerimeterConfigurationsReconcile.json | 35 +------------------ 2 files changed, 2 insertions(+), 38 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json index 4e8c372e3529..af649f8db3be 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json @@ -132,15 +132,12 @@ ], "responses": { "200": { - "description": "Reconcile NSP Configurations operation successfully accepted" + "description": "Reconcile NSP Configurations operation successful" }, "default": { "description": "*** Error Responses: ***\n\n * 400 OnlyOneAssociationPerServer - A SQL Server may only be associated with one NSP\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 AssociationNotFound - This SQL Server is not associated with any NSP\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." }, "202": { - "description": "Accepted" - }, - "201": { "description": "Reconcile NSP Configurations operation successfully accepted" } }, diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json index 6b57fd3e6e1c..264a47701600 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json @@ -3,6 +3,7 @@ "subscriptionId": "00000000-1111-2222-3333-444444444444", "resourceGroupName": "sqlcrudtest-7398", "serverName": "sqlcrudtest-7398", + "nspConfigName": "00000001-2222-3333-4444-111144444444.assoc1", "api-version": "2022-11-01-preview" }, "responses": { @@ -40,40 +41,6 @@ } } }, - "201": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", - "name": "00000001-2222-3333-4444-111144444444.assoc1", - "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", - "properties": { - "provisioningState": "Accepted", - "networkSecurityPerimeter": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", - "location": "japaneast" - }, - "resourceAssociation": { - "name": "assoc1", - "accessMode": "Enforced" - }, - "profile": { - "name": "profile1", - "accessRulesVersion": "0", - "accessRules": [ - { - "name": "rule1", - "properties": { - "direction": "Inbound", - "addressPrefixes": [ - "148.0.0.0/8", - "152.4.6.0/24" - ] - } - } - ] - } - } - } - }, "202": {} } } From b9a05bf7fc7c51363966932f3de237ea99eeb2a6 Mon Sep 17 00:00:00 2001 From: Ben Oberhaus Date: Tue, 7 Mar 2023 14:58:51 -0800 Subject: [PATCH 4/6] Fixes Round 3 --- .../NetworkSecurityPerimeterConfigurations.json | 9 ++++++--- .../NetworkSecurityPerimeterConfigurationsReconcile.json | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json index af649f8db3be..7f952999f94f 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json @@ -132,18 +132,21 @@ ], "responses": { "200": { - "description": "Reconcile NSP Configurations operation successful" + "description": "Reconcile NSP Configuration operation successful" }, "default": { "description": "*** Error Responses: ***\n\n * 400 OnlyOneAssociationPerServer - A SQL Server may only be associated with one NSP\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 AssociationNotFound - This SQL Server is not associated with any NSP\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." }, "202": { - "description": "Reconcile NSP Configurations operation successfully accepted" + "description": "Reconcile NSP Configuration operation accepted" } }, "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { - "ReconcileNSPConfigurations": { + "Reconcile NSP Config": { "$ref": "./examples/NetworkSecurityPerimeterConfigurationsReconcile.json" } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json index 264a47701600..21a07df90e4c 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json @@ -41,6 +41,10 @@ } } }, - "202": {} + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/locations/japaneast/networkSecurityPerimeterReconciliationOperationResults/11111111-1111-1111-1111-111111111111" + } + } } } From 9227ceb10ff6fa4ff089f716daaccd5e6452fd10 Mon Sep 17 00:00:00 2001 From: Ben Oberhaus Date: Tue, 7 Mar 2023 15:19:40 -0800 Subject: [PATCH 5/6] Fixes Round 4 --- .../NetworkSecurityPerimeterConfigurations.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json index 7f952999f94f..12b728e86437 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json @@ -132,7 +132,10 @@ ], "responses": { "200": { - "description": "Reconcile NSP Configuration operation successful" + "description": "Reconcile NSP Configuration operation successful", + "schema": { + "$ref": "#/definitions/NetworkSecurityPerimeterConfiguration" + } }, "default": { "description": "*** Error Responses: ***\n\n * 400 OnlyOneAssociationPerServer - A SQL Server may only be associated with one NSP\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 AssociationNotFound - This SQL Server is not associated with any NSP\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." @@ -143,7 +146,7 @@ }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "final-state-via": "location" }, "x-ms-examples": { "Reconcile NSP Config": { From 7d6a770379eb34faf93b511a332ff95da0f4a1df Mon Sep 17 00:00:00 2001 From: Ben Oberhaus Date: Tue, 7 Mar 2023 18:57:40 -0800 Subject: [PATCH 6/6] Fix Round 5 --- .../NetworkSecurityPerimeterConfigurations.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json index 12b728e86437..691e897c9f87 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/NetworkSecurityPerimeterConfigurations.json @@ -212,7 +212,8 @@ "type": "array", "items": { "$ref": "#/definitions/NSPProvisioningIssue" - } + }, + "x-ms-identifiers": [] } } }, @@ -311,7 +312,8 @@ "type": "array", "items": { "$ref": "#/definitions/NSPConfigAccessRule" - } + }, + "x-ms-identifiers": [] } } },