/** * Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ import { Realm } from "./realm"; export declare class Region { /** * Region ID. */ private readonly _regionId; /** * Realm this region belongs to. */ private readonly _realm; /** * Region Code. */ private readonly _regionCode?; get realm(): Realm; get regionId(): string; get regionCode(): string | undefined; private static KNOWN_REGIONS; private static DEVELOPER_TOOL_CONFIGURATION_REGIONS; private static hasCalledForImds; private static _hasUsedConfigFile; private static _hasUsedDeveloperToolConfigFile; private static hasUsedEnvVar; private static imdsRegionMetadata; private static hasWarnedAboutValuesWithoutInstanceMetadataService; private static REGIONS_CONFIG_FILE_PATH; private static OCI_REGION_METADATA_ENV_VAR; private static IMDS_BASE_URL; private static METADATA_AUTH_HEADERS; private static AUTHORIZATION; private static CONTENT_TYPE_HEADER; private static CONTENT_TYPE_HEADER_VALUE; static REGION_ID_STRING: string; static REGION_STRING: string; private constructor(); static AP_CHUNCHEON_1: Region; static AP_MUMBAI_1: Region; static AP_HYDERABAD_1: Region; static AP_SEOUL_1: Region; static AP_SYDNEY_1: Region; static AP_MELBOURNE_1: Region; static AP_OSAKA_1: Region; static AP_TOKYO_1: Region; static CA_MONTREAL_1: Region; static CA_TORONTO_1: Region; static EU_FRANKFURT_1: Region; static EU_ZURICH_1: Region; static SA_SAOPAULO_1: Region; static UK_CARDIFF_1: Region; static UK_LONDON_1: Region; static US_ASHBURN_1: Region; static US_PHOENIX_1: Region; static EU_AMSTERDAM_1: Region; static ME_JEDDAH_1: Region; static US_SANJOSE_1: Region; static ME_DUBAI_1: Region; static SA_SANTIAGO_1: Region; static SA_VINHEDO_1: Region; static IL_JERUSALEM_1: Region; static EU_MARSEILLE_1: Region; static AP_SINGAPORE_1: Region; static ME_ABUDHABI_1: Region; static EU_MILAN_1: Region; static EU_STOCKHOLM_1: Region; static AF_JOHANNESBURG_1: Region; static EU_PARIS_1: Region; static MX_QUERETARO_1: Region; static EU_MADRID_1: Region; static US_CHICAGO_1: Region; static MX_MONTERREY_1: Region; static US_SALTLAKE_2: Region; static SA_BOGOTA_1: Region; static SA_VALPARAISO_1: Region; static AP_SINGAPORE_2: Region; static ME_RIYADH_1: Region; static AP_DELHI_1: Region; static AP_BATAM_1: Region; static EU_MADRID_3: Region; static EU_TURIN_1: Region; static AP_KULAI_2: Region; static AF_CASABLANCA_1: Region; static US_LANGLEY_1: Region; static US_LUKE_1: Region; static US_GOV_ASHBURN_1: Region; static US_GOV_CHICAGO_1: Region; static US_GOV_PHOENIX_1: Region; static UK_GOV_LONDON_1: Region; static UK_GOV_CARDIFF_1: Region; static AP_CHIYODA_1: Region; static AP_IBARAKI_1: Region; static ME_DCC_MUSCAT_1: Region; static ME_IBRI_1: Region; static AP_DCC_CANBERRA_1: Region; static EU_DCC_MILAN_1: Region; static EU_DCC_MILAN_2: Region; static EU_DCC_DUBLIN_2: Region; static EU_DCC_RATING_2: Region; static EU_DCC_RATING_1: Region; static EU_DCC_DUBLIN_1: Region; static EU_JOVANOVAC_1: Region; static EU_MADRID_2: Region; static EU_FRANKFURT_2: Region; static EU_DCC_ZURICH_1: Region; static EU_CRISSIER_1: Region; static ME_DCC_DOHA_1: Region; static ME_ALRAYYAN_1: Region; static ME_ABUDHABI_3: Region; static ME_ALAIN_1: Region; static AP_DCC_GAZIPUR_1: Region; static ME_ABUDHABI_2: Region; static ME_ABUDHABI_4: Region; static US_SOMERSET_1: Region; static US_THAMES_1: Region; static AP_SEOUL_2: Region; static AP_SUWON_1: Region; static AP_CHUNCHEON_2: Region; static US_ASHBURN_2: Region; static US_NEWARK_1: Region; static EU_BUDAPEST_1: Region; static SA_RIODEJANEIRO_1: Region; /** * Return all known Regions in this version of the SDK, except possibly the region returned by IMDS (Instance Metadata * Service, only available on OCI instances), since IMDS is not automatically contacted by this method. * * To ensure that this method also returns the region provided by IMDS, call {@link Region#enableInstanceMetadata()} * explicitly before calling {@link Region#values()}. * */ static values(): Region[]; /** * Register all regions and sets status */ private static registerAllRegions; static fromRegionId(regionId: string): Region; private static addRegionsFromDeveloperToolConfigFile; private static addRegionsFromConfigFile; private static addRegionFromEnvVar; private static addRegionFromImds; static enableInstanceMetadata(): Promise; static register(regionId: string, realm: Realm, regionCode?: string, isDeveloperToolConfigurationRegion?: boolean): Region; /** * Function to get regionId based regionStr: regionStr can be a short code or regionId * if it is a shortCode then we want to return the corresponding regionId * @param regionStr * @return regionId */ static getRegionIdFromShortCode(regionStr: string): string; static set hasUsedConfigFile(bool: boolean); static set hasUsedDeveloperToolConfigFile(bool: boolean); static resetDeveloperToolConfiguration(): void; }