|  | 
|  | 1 | +# ------------------------------------ | 
|  | 2 | +# Copyright (c) Microsoft Corporation. | 
|  | 3 | +# Licensed under the MIT License. | 
|  | 4 | +# ------------------------------------ | 
|  | 5 | +# pylint:skip-file (avoids crash due to six.with_metaclass https://github.com/PyCQA/astroid/issues/713) | 
|  | 6 | +from enum import Enum | 
|  | 7 | +from six import with_metaclass | 
|  | 8 | + | 
|  | 9 | +from azure.core import CaseInsensitiveEnumMeta | 
|  | 10 | +from msal import ConfidentialClientApplication | 
|  | 11 | + | 
|  | 12 | + | 
|  | 13 | +class RegionalAuthority(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): | 
|  | 14 | +    """Identifies a regional authority for authentication""" | 
|  | 15 | + | 
|  | 16 | +    #: Attempt to discover the appropriate authority. This works on some Azure hosts, such as VMs and | 
|  | 17 | +    #: Azure Functions. The non-regional authority is used when discovery fails. | 
|  | 18 | +    AUTO_DISCOVER_REGION = ConfidentialClientApplication.ATTEMPT_REGION_DISCOVERY | 
|  | 19 | + | 
|  | 20 | +    ASIA_EAST = "eastasia" | 
|  | 21 | +    ASIA_SOUTHEAST = "southeastasia" | 
|  | 22 | +    AUSTRALIA_CENTRAL = "australiacentral" | 
|  | 23 | +    AUSTRALIA_CENTRAL_2 = "australiacentral2" | 
|  | 24 | +    AUSTRALIA_EAST = "australiaeast" | 
|  | 25 | +    AUSTRALIA_SOUTHEAST = "australiasoutheast" | 
|  | 26 | +    BRAZIL_SOUTH = "brazilsouth" | 
|  | 27 | +    CANADA_CENTRAL = "canadacentral" | 
|  | 28 | +    CANADA_EAST = "canadaeast" | 
|  | 29 | +    CHINA_EAST = "chinaeast" | 
|  | 30 | +    CHINA_EAST_2 = "chinaeast2" | 
|  | 31 | +    CHINA_NORTH = "chinanorth" | 
|  | 32 | +    CHINA_NORTH_2 = "chinanorth2" | 
|  | 33 | +    EUROPE_NORTH = "northeurope" | 
|  | 34 | +    EUROPE_WEST = "westeurope" | 
|  | 35 | +    FRANCE_CENTRAL = "francecentral" | 
|  | 36 | +    FRANCE_SOUTH = "francesouth" | 
|  | 37 | +    GERMANY_CENTRAL = "germanycentral" | 
|  | 38 | +    GERMANY_NORTH = "germanynorth" | 
|  | 39 | +    GERMANY_NORTHEAST = "germanynortheast" | 
|  | 40 | +    GERMANY_WEST_CENTRAL = "germanywestcentral" | 
|  | 41 | +    GOVERNMENT_US_ARIZONA = "usgovarizona" | 
|  | 42 | +    GOVERNMENT_US_DOD_CENTRAL = "usdodcentral" | 
|  | 43 | +    GOVERNMENT_US_DOD_EAST = "usdodeast" | 
|  | 44 | +    GOVERNMENT_US_IOWA = "usgoviowa" | 
|  | 45 | +    GOVERNMENT_US_TEXAS = "usgovtexas" | 
|  | 46 | +    GOVERNMENT_US_VIRGINIA = "usgovvirginia" | 
|  | 47 | +    INDIA_CENTRAL = "centralindia" | 
|  | 48 | +    INDIA_SOUTH = "southindia" | 
|  | 49 | +    INDIA_WEST = "westindia" | 
|  | 50 | +    JAPAN_EAST = "japaneast" | 
|  | 51 | +    JAPAN_WEST = "japanwest" | 
|  | 52 | +    KOREA_CENTRAL = "koreacentral" | 
|  | 53 | +    KOREA_SOUTH = "koreasouth" | 
|  | 54 | +    NORWAY_EAST = "norwayeast" | 
|  | 55 | +    NORWAY_WEST = "norwaywest" | 
|  | 56 | +    SOUTH_AFRICA_NORTH = "southafricanorth" | 
|  | 57 | +    SOUTH_AFRICA_WEST = "southafricawest" | 
|  | 58 | +    SWITZERLAND_NORTH = "switzerlandnorth" | 
|  | 59 | +    SWITZERLAND_WEST = "switzerlandwest" | 
|  | 60 | +    UAE_CENTRAL = "uaecentral" | 
|  | 61 | +    UAE_NORTH = "uaenorth" | 
|  | 62 | +    UK_SOUTH = "uksouth" | 
|  | 63 | +    UK_WEST = "ukwest" | 
|  | 64 | +    US_CENTRAL = "centralus" | 
|  | 65 | +    US_EAST = "eastus" | 
|  | 66 | +    US_EAST_2 = "eastus2" | 
|  | 67 | +    US_NORTH_CENTRAL = "northcentralus" | 
|  | 68 | +    US_SOUTH_CENTRAL = "southcentralus" | 
|  | 69 | +    US_WEST = "westus" | 
|  | 70 | +    US_WEST_2 = "westus2" | 
|  | 71 | +    US_WEST_CENTRAL = "westcentralus" | 
0 commit comments