mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-16 03:21:39 -04:00
[SQL Migration] Add storage/MI connectivity validation (#22410)
* wip * Add SQL VM POC * Undo azurecore changes * Add warning banner instead of blocking on next * Fix warning banner behavior * Add private endpoint support * Fix navigation issue * Add offline scenario * Address PR comments * Fix merge conflicts
This commit is contained in:
@@ -32,7 +32,8 @@ export interface NetworkInterfaceIpConfiguration extends NetworkResource {
|
||||
privateIPAddress: string,
|
||||
privateIPAddressVersion: string,
|
||||
provisioningState: string,
|
||||
publicIPAddress: NetworkResource
|
||||
publicIPAddress: NetworkResource,
|
||||
subnet: { id: string }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +43,19 @@ export interface PublicIpAddress extends NetworkResource {
|
||||
}
|
||||
}
|
||||
|
||||
export interface PrivateEndpointConnection extends NetworkResource {
|
||||
properties: {
|
||||
privateEndpoint: { id: string },
|
||||
privateLinkServiceConnectionState: { description: string, status: string }
|
||||
}
|
||||
}
|
||||
|
||||
export interface PrivateEndpoint extends NetworkResource {
|
||||
properties: {
|
||||
subnet: { id: string }
|
||||
}
|
||||
}
|
||||
|
||||
export class NetworkInterfaceModel {
|
||||
public static IPv4VersionType = "IPv4".toLocaleLowerCase();
|
||||
private static NETWORK_API_VERSION = '2022-09-01';
|
||||
@@ -145,4 +159,13 @@ export class NetworkInterfaceModel {
|
||||
|
||||
return networkInterfaces;
|
||||
}
|
||||
|
||||
|
||||
public static async getPrivateEndpoint(account: azdata.Account, subscription: Subscription, privateEndpointId: string): Promise<PrivateEndpoint> {
|
||||
return getAzureResourceGivenId(account, subscription, privateEndpointId, this.NETWORK_API_VERSION);
|
||||
}
|
||||
|
||||
public static getVirtualNetworkFromSubnet(subnetId: string): string {
|
||||
return subnetId.replace(RegExp('^(.*?)/virtualNetworks/'), '').replace(RegExp('/subnets/.*'), '').toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user