Skip to content

Commit

Permalink
add private only feature to azure bastion service (Azure#30807)
Browse files Browse the repository at this point in the history
* add private only feature to azure bastion service

* fix Swagger PrettierCheck

* fix the swagger PrettierCheck

* modify the api version

* modify file name

---------

Co-authored-by: Leo Liu (from Dev Box) <[email protected]>
  • Loading branch information
2 people authored and mikeharder committed Nov 27, 2024
1 parent f9c90e4 commit fbe3851
Show file tree
Hide file tree
Showing 14 changed files with 266 additions and 21 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 Expand Up @@ -1112,4 +1122,3 @@
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
"204": {}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
"204": {}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,3 @@
}
}
}

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 All @@ -53,4 +54,3 @@
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"parameters": {
"api-version": "2024-05-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 All @@ -56,4 +57,3 @@
}
}
}

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,10 +89,47 @@
}
]
}
},
{
"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"
}
}
}
]
}
}
]
}
}
}
}

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,10 +113,47 @@
}
]
}
},
{
"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"
}
}
}
]
}
}
]
}
}
}
}

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 All @@ -64,4 +65,3 @@
}
}
}

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 All @@ -111,4 +113,3 @@
}
}
}

Loading

0 comments on commit fbe3851

Please sign in to comment.