diff --git a/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2017-04-01/EventHub.json b/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2017-04-01/EventHub.json index d3eb676181c1..df08e48fb481 100644 --- a/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2017-04-01/EventHub.json +++ b/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2017-04-01/EventHub.json @@ -1856,6 +1856,97 @@ "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default": { + "put": { + "tags": [ + "Namespaces" + ], + "x-ms-examples": { + "NameSpaceNetworkRuleSetCreate": { + "$ref": "./examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetCreate.json" + } + }, + "operationId": "Namespaces_CreateOrUpdateNetworkRuleSet", + "description": "Create or update NetworkRuleSet for a Namespace.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/NamespaceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/NetworkRuleSet" + }, + "description": "The Namespace IpFilterRule." + } + ], + "responses": { + "200": { + "description": "Namespace NetworkRuleSet successfully returned.", + "schema": { + "$ref": "#/definitions/NetworkRuleSet" + } + }, + "default": { + "description": "ServiceBus error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Namespaces" + ], + "x-ms-examples": { + "NameSpaceNetworkRuleSetGet": { + "$ref": "./examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetGet.json" + } + }, + "operationId": "Namespaces_GetNetworkRuleSet", + "description": "Gets NetworkRuleSet for a Namespace.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/NamespaceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Namespace NetworkRuleSet successfully returned.", + "schema": { + "$ref": "#/definitions/NetworkRuleSet" + } + }, + "default": { + "description": "ServiceBus error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } } }, "definitions": { @@ -2612,6 +2703,92 @@ } ], "description": "Messaging Plan for the namespace" + }, + "Subnet": { + "properties": { + "id": { + "type": "string", + "description": "Resource ID of Virtual Network Subnet" + } + }, + "description": "Properties supplied for Subnet" + }, + "NWRuleSetIpRules": { + "x-ms-client-flatten": true, + "properties": { + "ipMask": { + "type": "string", + "description": "IP Mask" + }, + "action": { + "type": "string", + "description": "The IP Filter Action", + "enum": [ + "Allow" + ], + "x-ms-enum": { + "name": "NetworkRuleIPAction", + "modelAsString": true + } + } + }, + "description": "The response from the List namespace operation." + }, + "NWRuleSetVirtualNetworkRules": { + "x-ms-client-flatten": true, + "properties": { + "subnet": { + "$ref": "#/definitions/Subnet", + "description": "Subnet properties" + }, + "ignoreMissingVnetServiceEndpoint": { + "type": "boolean", + "description": "Value that indicates whether to ignore missing Vnet Service Endpoint" + } + }, + "description": "The response from the List namespace operation." + }, + "NetworkRuleSet": { + "properties": { + "properties": { + "description": "NetworkRuleSet properties", + "x-ms-client-flatten": true, + "properties": { + "defaultAction": { + "type": "string", + "description": "Default Action for Network Rule Set", + "enum": [ + "Allow", + "Deny" + ], + "x-ms-enum": { + "name": "DefaultAction", + "modelAsString": true + } + }, + "virtualNetworkRules": { + "type": "array", + "items": { + "$ref": "#/definitions/NWRuleSetVirtualNetworkRules" + }, + "description": "List VirtualNetwork Rules" + }, + "ipRules": { + "type": "array", + "items": { + "$ref": "#/definitions/NWRuleSetIpRules" + }, + "description": "List of IpRules" + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "description": "Description of topic resource." } }, "parameters": { @@ -2716,6 +2893,25 @@ "minimum": 1, "maximum": 1000, "x-ms-parameter-location": "method" + }, + "ipFilterRuleNameParameter": { + "name": "ipFilterRuleName", + "in": "path", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "description": "The IP Filter Rule name." + }, + "virtualNetworkRuleNameParameter": { + "name": "virtualNetworkRuleName", + "in": "path", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "description": "The Virtual Network Rule name." } + } } \ No newline at end of file diff --git a/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetCreate.json b/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetCreate.json new file mode 100644 index 000000000000..2d6ef6f904b9 --- /dev/null +++ b/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetCreate.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "namespaceName": "sdk-Namespace-6019", + "resourceGroupName": "ResourceGroup", + "api-version": "2017-04-01", + "subscriptionId": "Subscription", + "parameters": { + "properties": { + "defaultAction": "Deny", + "virtualNetworkRules": [ + { + "subnet": { + "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2" + }, + "ignoreMissingVnetServiceEndpoint": true + }, + { + "subnet": { + "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3" + }, + "ignoreMissingVnetServiceEndpoint": false + }, + { + "subnet": { + "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6" + }, + "ignoreMissingVnetServiceEndpoint": false + } + ], + "ipRules": [ + { + "ipMask": "1.1.1.1", + "action": "Allow" + }, + { + "ipMask": "1.1.1.2", + "action": "Allow" + }, + { + "ipMask": "1.1.1.3", + "action": "Allow" + }, + { + "ipMask": "1.1.1.4", + "action": "Allow" + }, + { + "ipMask": "1.1.1.5", + "action": "Allow" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourceGroups/resourcegroupid/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9659/networkruleset/default", + "name": "default", + "type": "Microsoft.EventHub/Namespaces/NetworkRuleSet", + "properties": { + "defaultAction": "Deny", + "virtualNetworkRules": [ + { + "subnet": { "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2" }, + "ignoreMissingVnetServiceEndpoint": true + }, + { + "subnet": { "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3" }, + "ignoreMissingVnetServiceEndpoint": false + }, + { + "subnet": { "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6" }, + "ignoreMissingVnetServiceEndpoint": false + } + ], + "ipRules": [ + { + "ipMask": "1.1.1.1", + "action": "Allow" + }, + { + "ipMask": "1.1.1.2", + "action": "Allow" + }, + { + "ipMask": "1.1.1.3", + "action": "Allow" + }, + { + "ipMask": "1.1.1.4", + "action": "Allow" + }, + { + "ipMask": "1.1.1.5", + "action": "Allow" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetGet.json b/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetGet.json new file mode 100644 index 000000000000..c46c7abda77d --- /dev/null +++ b/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2017-04-01/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetGet.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "namespaceName": "sdk-Namespace-6019", + "resourceGroupName": "ResourceGroup", + "api-version": "2017-04-01", + "subscriptionId": "Subscription" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subscriptionid/resourceGroups/resourcegroupid/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9659/networkruleset/default", + "name": "default", + "type": "Microsoft.EventHub/Namespaces/NetworkRuleSet", + "properties": { + "defaultAction": "Deny", + "virtualNetworkRules": [ + { + "subnet": { "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2" }, + "ignoreMissingVnetServiceEndpoint": true + }, + { + "subnet": { "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3" }, + "ignoreMissingVnetServiceEndpoint": false + }, + { + "subnet": { "id": "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6" }, + "ignoreMissingVnetServiceEndpoint": false + } + ], + "ipRules": [ + { + "ipMask": "1.1.1.1", + "action": "Allow" + }, + { + "ipMask": "1.1.1.2", + "action": "Allow" + }, + { + "ipMask": "1.1.1.3", + "action": "Allow" + }, + { + "ipMask": "1.1.1.4", + "action": "Allow" + }, + { + "ipMask": "1.1.1.5", + "action": "Allow" + } + ] + } + } + } + } +} \ No newline at end of file