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GE;IACF,OAAc,kBAAkB,SAAU;IAC1C,gBAAuB,wBAAwB,QAAQ;IACvD,gBAAuB,6BAA6B,KAAK;CAC7D;AASD,oBAAY,oBAAoB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,MAAM,WAAW;IACjB,gBAAgB,qBAAqB;IACrC,sBAAsB,2BAA2B;IACjD,uBAAuB,4BAA4B;CACtD;AAED,yBAAiB,YAAY,CAAC;IAC1B,SAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAc5D;CACJ","file":"azure-constants.d.ts","sourcesContent":["export class AzureConstants {\r\n    /**\r\n     * Azure Resource Manager endpoint - Azure Global/Public cloud.\r\n     */\r\n    public static readonly azureGlobalArmEndpoint = 'https://management.azure.com';\r\n\r\n    /**\r\n     * Azure public portal.\r\n     */\r\n    public static readonly azureGlobalPortal = 'https://portal.azure.com';\r\n\r\n    /**\r\n     * Azure Resource Manager endpoint - Azure China cloud.\r\n     */\r\n    public static readonly azureChinaArmEndpoint = 'https://management.chinacloudapi.cn';\r\n\r\n    /**\r\n     * Azure China portal.\r\n     */\r\n    public static readonly azureChinaPortal = 'https://portal.azure.cn';\r\n\r\n    /**\r\n     * Azure Resource Manager endpoint - Azure US Govenment/Fairfax/Arlington.\r\n     */\r\n     public static readonly azureUSGovArmEndpoint = 'https://management.usgovcloudapi.net';\r\n\r\n    /**\r\n     * Azure US Government portal.\r\n     */\r\n    public static readonly azureUSGovPortal = 'https://portal.azure.us';\r\n\r\n    public static readonly armApiVersion = '?api-version=2016-06-01';\r\n    public static readonly azureSubscriptionUrl = '{0}/subscriptions?api-version=2016-06-01';\r\n    public static readonly armDeploymentUrl =\r\n        '{0}/subscriptions/{1}/resourcegroups/{2}/providers/Microsoft.Resources/deployments/{3}?api-version=2018-02-01';\r\n    public static readonly validateAzureTemplate =\r\n        '{0}/subscriptions/{1}/resourcegroups/{2}/providers/Microsoft.Resources/deployments/{3}/validate?api-version=2018-05-01';\r\n    public static readonly getAllGeoLocations = '{0}/subscriptions/{1}/locations?api-version=2016-06-01';\r\n    public static readonly getResourceGroupsUri = '{0}/subscriptions/{1}/resourcegroups?api-version=2018-02-01';\r\n\r\n    // Resource groups.\r\n    public static readonly listResourceGroups = '{0}/subscriptions/{1}/resourcegroups?api-version=2018-05-01';\r\n    public static readonly listResourceGroupsWithParameters =\r\n        '{0}/subscriptions/{1}/resourcegroups?$filter={2}&$top={3}api-version=2018-05-01';\r\n    public static readonly resourceGroupUrl = '{0}/subscriptions/{1}/resourcegroups/{2}?api-version=2018-05-01';\r\n\r\n    // Template deployment urls.\r\n    public static readonly ArmDeploymentUrl =\r\n        '{0}/subscriptions/{1}/resourcegroups/{2}/providers/Microsoft.Resources/deployments/{3}?api-version=2018-02-01';\r\n\r\n    // Request header keys and values\r\n    public static readonly bearer = 'Bearer ';\r\n    public static readonly authorizationHeaderKey = 'Authorization';\r\n    public static readonly acceptLanguageHeaderKey = 'Accept-Language';\r\n    public static readonly clientRequestHeaderKey = 'x-ms-client-request-id';\r\n    public static readonly returnClientRequestHeaderKey = 'x-ms-return-client-request-id';\r\n\r\n    // TODO: Remove work around for telemetry. Client request id shouldnt have any parameters.\r\n    public static readonly telemetryDataParameter = 'telemetryData={0}; ';\r\n    public static readonly telemetryDataInvalidValue = 'invalid';\r\n    public static readonly integrationTypeDataParameter = 'integrationType={0}; ';\r\n    public static readonly clientRequestIdQualifier = '{0}; ';\r\n    public static readonly sourceParameter = 'source=WindowsAdminCenter';\r\n    public static readonly maxEncodedTelemetryDataLength = 512;\r\n    public static readonly resourceDeploymentSubstring = 'Microsoft.Resources/deployments';\r\n\r\n    // ms-graph resource endpoint\r\n    public static readonly graphResourceEndpoint = '/providers/Microsoft.ResourceGraph/resources?api-version=2021-03-01';\r\n\r\n    // ms-graph query\r\n    public static readonly resourceTypeFilterQuery = `resources \r\n    | extend parsedProperties = parse_json(properties) \r\n    | extend computerName = parsedProperties.osProfile.computerName \r\n    | where (type == \\\"microsoft.hybridcompute/machines\\\" or type == \\\"microsoft.compute/virtualmachines\\\") and tolower(computerName) in ({0}) \r\n    | project arcStatus = properties.status,  nodeName = computerName, type`;\r\n    public static readonly azureVmsFilterQuery = `resources \r\n    | extend parsedProperties = parse_json(properties) \r\n    | extend computerName = parsedProperties.osProfile.computerName \r\n    | where (type == \"microsoft.compute/virtualmachines\") and tolower(computerName) in ({0})\r\n    | project nodeName = computerName, type`;\r\n\r\n    public static readonly virtualMachine = \"microsoft.compute/virtualmachines\";\r\n\r\n     /**\r\n     * WAC URLS for azure arc machine agent\r\n     */\r\n     public static readonly arcMachineAgentIssuesURL = \"https://go.microsoft.com/fwlink/?linkid=2248533\";\r\n     public static readonly expiredArcMachineAgentURL = \"https://learn.microsoft.com/azure/azure-arc/servers/manage-agent?tabs=windows#step-2-disconnect-the-server-from-azure-arc\";\r\n\r\n     /**\r\n     * The interval of running the graph query call.\r\n     * In this case it's 15 minutes\r\n     */\r\n     public static graphQueryInterval = 900000;\r\n     public static readonly arcStatusGraphQueryDelay = 7000;\r\n     public static readonly arcStatusGraphQueryRetryCount = 8;\r\n}\r\n\r\n/*\r\n * Azure integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set when calling this.appContextService.azureManagerService.createRequestWithHeaders() or when a\r\n * method like this.appContextService.azureManagerService.getSubscriptions() is called.\r\n */\r\nexport enum AzureIntegrationType {\r\n    Backup = 'Backup',\r\n    Bridge = 'Bridge',\r\n    FileSync = 'FileSync',\r\n    HybridServices = 'HybridServices',\r\n    Monitor = 'Monitor',\r\n    NetworkAdapter = 'NetworkAdapter',\r\n    SecurityCenter = 'SecurityCenter',\r\n    SiteRecovery = 'SiteRecovery',\r\n    AzureMigrate = 'AzureMigrate',\r\n    SubnetStretch = 'SubnetStretch',\r\n    S2SVPN = 'S2SVPN',\r\n    UpdateManagement = 'UpdateManagement',\r\n    VirtualMachineCreation = 'VirtualMachineCreation',\r\n    VirtualMachineSelection = 'VirtualMachineSelection'\r\n}\r\n\r\nexport namespace ArmTelemetry {\r\n    export function toIntegrationType(moduleName: string): string {\r\n        switch (moduleName) {\r\n            case 'msft.azure.azure-backup': return AzureIntegrationType.Backup;\r\n            case 'msft.sme.azure-file-sync': return AzureIntegrationType.FileSync;\r\n            case 'msft.sme.azure-center': return AzureIntegrationType.HybridServices;\r\n            case 'msft.sme.server-manager': return AzureIntegrationType.Monitor;\r\n            case 'msft.sme.network-settings': return AzureIntegrationType.NetworkAdapter;\r\n            case 'msft.azure.security-center': return AzureIntegrationType.SecurityCenter;\r\n            case 'msft.sme.hyperv': return AzureIntegrationType.SiteRecovery;\r\n            case 'msft.sme.subnet-stretch': return AzureIntegrationType.SubnetStretch;\r\n            case 'msft.sdn.vgw-network-connection': return AzureIntegrationType.S2SVPN;\r\n            case 'msft.sme.windows-update': return AzureIntegrationType.UpdateManagement;\r\n            default: return moduleName;\r\n        }\r\n    }\r\n}\r\n"]}