Skip to content

Commit

Permalink
add private only feature to azure bastion service
Browse files Browse the repository at this point in the history
  • Loading branch information
leoAzure20 committed Oct 1, 2024
1 parent 59bd02e commit 4a6b080
Show file tree
Hide file tree
Showing 10 changed files with 266 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@
},
"Get Bastion Host With Zones": {
"$ref": "./examples/BastionHostGetWithZones.json"
},
"Get Bastion Host With Private Only": {
"$ref": "./examples/BastionHostGetWithPrivateOnly.json"
}
}
},
Expand Down Expand Up @@ -187,6 +190,9 @@
"Create Bastion Host With Zones": {
"$ref": "./examples/BastionHostPutWithZones.json"
},
"Create Bastion Host With Private Only": {
"$ref": "./examples/BastionHostPutWithPrivateOnly.json"
},
"Create Developer Bastion Host": {
"$ref": "./examples/BastionHostDeveloperPut.json"
}
Expand Down Expand Up @@ -681,7 +687,7 @@
},
"publicIPAddress": {
"$ref": "./network.json#/definitions/SubResource",
"description": "Reference of the PublicIP resource."
"description": "Reference of the PublicIP resource. Null for private only bastion"
},
"provisioningState": {
"readOnly": true,
Expand All @@ -694,8 +700,7 @@
}
},
"required": [
"subnet",
"publicIPAddress"
"subnet"
],
"description": "Properties of IP configuration of an Bastion Host."
},
Expand Down Expand Up @@ -803,6 +808,11 @@
"type": "boolean",
"default": false,
"description": "Enable/Disable Session Recording feature of the Bastion Host resource."
},
"enablePrivateOnlyBastion": {
"type": "boolean",
"default": false,
"description": "Enable/Disable Private Only feature of the Bastion Host resource."
}
},
"description": "Properties of the Bastion Host."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"enableShareableLink": false,
"enableKerberos": false,
"enableSessionRecording": false,
"enablePrivateOnlyBastion": false,
"ipConfigurations": [
{
"name": "bastionHostIpConfiguration",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{

Check failure on line 1 in specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithPrivateOnly.json

View check run for this annotation

Azure Pipelines / Swagger PrettierCheck

specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithPrivateOnly.json#L1

specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithPrivateOnly.json(1,1): error : Code style issues found, please run prettier. > npm install > npx prettier --write specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/BastionHostGetWithPrivateOnly.json
"parameters": {
"api-version": "2024-01-01",
"subscriptionId": "subid",
"resourceGroupName": "rg1",
"bastionHostName": "bastionhosttenant"
},
"responses": {
"200": {
"body": {
"name": "bastionhosttenant",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhosttenant'",
"type": "Microsoft.Network/bastionHosts",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"location": "West US",
"tags": {
"key1": "value1"
},
"sku": {
"name": "Premium"
},
"zones": [],
"properties": {
"provisioningState": "Succeeded",
"dnsName": "bst-9d89d361-100e-4c01-b92d-466548c476dc.bastion.azure.com",
"scaleUnits": 2,
"disableCopyPaste": false,
"enableTunneling": false,
"enableIpConnect": false,
"enableShareableLink": false,
"enableKerberos": false,
"enableSessionRecording": false,
"enablePrivateOnlyBastion": true,
"ipConfigurations": [
{
"name": "bastionHostIpConfiguration",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhosttenant/bastionHostIpConfigurations/bastionHostIpConfiguration",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"type": "Microsoft.Network/bastionHosts/bastionHostIpConfigurations",
"properties": {
"provisioningState": "Succeeded",
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet"
}
}
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"api-version": "2024-05-01",
"subscriptionId": "subid",
"resourceGroupName": "rg1",
"bastionHostName": "bastionhosttenant'"
"bastionHostName": "bastionhosttenant"
},
"responses": {
"200": {
"body": {
"name": "bastionhost'",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhosttenant'",
"name": "bastionhosttenant",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhosttenant",
"type": "Microsoft.Network/bastionHosts",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"location": "West US",
Expand All @@ -33,6 +33,7 @@
"enableShareableLink": false,
"enableKerberos": false,
"enableSessionRecording": false,
"enablePrivateOnlyBastion": false,
"ipConfigurations": [
{
"name": "bastionHostIpConfiguration",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"enableShareableLink": false,
"enableKerberos": false,
"enableSessionRecording": false,
"enablePrivateOnlyBastion": false,
"ipConfigurations": [
{
"name": "bastionHostIpConfiguration",
Expand Down Expand Up @@ -68,6 +69,7 @@
"enableShareableLink": false,
"enableKerberos": false,
"enableSessionRecording": true,
"enablePrivateOnlyBastion": false,
"ipConfigurations": [
{
"name": "bastionHostIpConfiguration",
Expand All @@ -87,6 +89,44 @@
}
]
}
},
{
"name": "bastionhost3",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhost3",
"type": "Microsoft.Network/bastionHosts",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"location": "West US",
"sku": {
"name": "Premium"
},
"zones": [],
"properties": {
"provisioningState": "Succeeded",
"dnsName": "bst-9d89d361-100e-4c01-b92d-466548c476dc.bastion.azure.com",
"scaleUnits": 2,
"disableCopyPaste": false,
"enableTunneling": false,
"enableIpConnect": false,
"enableShareableLink": false,
"enableKerberos": false,
"enableSessionRecording": false,
"enablePrivateOnlyBastion": true,
"ipConfigurations": [
{
"name": "bastionHostIpConfiguration",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhost3/bastionHostIpConfigurations/IpConf",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"type": "Microsoft.Network/bastionHosts/bastionHostIpConfigurations",
"properties": {
"provisioningState": "Succeeded",
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet3/subnets/AzureBastionSubnet"
}
}
}
]
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"enableShareableLink": false,
"enableKerberos": false,
"enableSessionRecording": false,
"enablePrivateOnlyBastion": false,
"ipConfigurations": [
{
"name": "bastionHostIpConfiguration",
Expand Down Expand Up @@ -92,6 +93,7 @@
"enableShareableLink": false,
"enableKerberos": false,
"enableSessionRecording": true,
"enablePrivateOnlyBastion": false,
"ipConfigurations": [
{
"name": "bastionHostIpConfiguration",
Expand All @@ -111,6 +113,44 @@
}
]
}
},
{
"name": "bastionhost4",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhost4",
"type": "Microsoft.Network/bastionHosts",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"location": "West US",
"sku": {
"name": "Premium"
},
"zones": [],
"properties": {
"provisioningState": "Succeeded",
"dnsName": "bst-9d89d361-100e-4c01-b92d-466548c476dc.bastion.azure.com",
"scaleUnits": 2,
"disableCopyPaste": false,
"enableTunneling": false,
"enableIpConnect": false,
"enableShareableLink": false,
"enableKerberos": false,
"enableSessionRecording": false,
"enablePrivateOnlyBastion": true,
"ipConfigurations": [
{
"name": "bastionHostIpConfiguration",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhost4/bastionHostIpConfigurations/IpConf",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"type": "Microsoft.Network/bastionHosts/bastionHostIpConfigurations",
"properties": {
"provisioningState": "Succeeded",
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet4/subnets/AzureBastionSubnet"
}
}
}
]
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"200": {
"body": {
"name": "bastionhosttenant",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhosttenant'",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhosttenant",
"type": "Microsoft.Network/bastionHosts",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"location": "West US",
Expand All @@ -38,6 +38,7 @@
"enableShareableLink": false,
"enableKerberos": false,
"enableSessionRecording": false,
"enablePrivateOnlyBastion": false,
"ipConfigurations": [
{
"name": "bastionHostIpConfiguration",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"enableShareableLink": false,
"enableKerberos": false,
"enableSessionRecording": false,
"enablePrivateOnlyBastion": false,
"ipConfigurations": [
{
"name": "bastionHostIpConfiguration",
Expand All @@ -70,8 +71,8 @@
},
"201": {
"body": {
"name": "bastionhost'",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhosttenant'",
"name": "bastionhosttenant'",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhosttenant",
"type": "Microsoft.Network/bastionHosts",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"location": "West US",
Expand All @@ -88,6 +89,7 @@
"enableShareableLink": false,
"enableKerberos": false,
"enableSessionRecording": false,
"enablePrivateOnlyBastion": false,
"ipConfigurations": [
{
"name": "bastionHostIpConfiguration",
Expand Down
Loading

0 comments on commit 4a6b080

Please sign in to comment.