Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Region

Hierarchy

  • Region

Constructors

Private constructor

  • new Region(regionId: string, realm: Realm, regionCode?: undefined | string): Region

Properties

Private Readonly _realm

_realm: Realm

Realm this region belongs to.

Private Optional Readonly _regionCode

_regionCode: undefined | string

Region Code.

Private Readonly _regionId

_regionId: string

Region ID.

Static AP_CHIYODA_1

AP_CHIYODA_1: Region = Region.register("ap-chiyoda-1", Realm.OC8, "nja")

Static AP_CHUNCHEON_1

AP_CHUNCHEON_1: Region = Region.register("ap-chuncheon-1", Realm.OC1, "yny")

Static AP_HYDERABAD_1

AP_HYDERABAD_1: Region = Region.register("ap-hyderabad-1", Realm.OC1, "hyd")

Static AP_IBARAKI_1

AP_IBARAKI_1: Region = Region.register("ap-ibaraki-1", Realm.OC8, "ukb")

Static AP_MELBOURNE_1

AP_MELBOURNE_1: Region = Region.register("ap-melbourne-1", Realm.OC1, "mel")

Static AP_MUMBAI_1

AP_MUMBAI_1: Region = Region.register("ap-mumbai-1", Realm.OC1, "bom")

Static AP_OSAKA_1

AP_OSAKA_1: Region = Region.register("ap-osaka-1", Realm.OC1, "kix")

Static AP_SEOUL_1

AP_SEOUL_1: Region = Region.register("ap-seoul-1", Realm.OC1, "icn")

Static AP_SINGAPORE_1

AP_SINGAPORE_1: Region = Region.register("ap-singapore-1", Realm.OC1, "sin")

Static AP_SYDNEY_1

AP_SYDNEY_1: Region = Region.register("ap-sydney-1", Realm.OC1, "syd")

Static AP_TOKYO_1

AP_TOKYO_1: Region = Region.register("ap-tokyo-1", Realm.OC1, "nrt")

Static Private AUTHORIZATION

AUTHORIZATION: string = "Authorization"

Static CA_MONTREAL_1

CA_MONTREAL_1: Region = Region.register("ca-montreal-1", Realm.OC1, "yul")

Static CA_TORONTO_1

CA_TORONTO_1: Region = Region.register("ca-toronto-1", Realm.OC1, "yyz")

Static Private CONTENT_TYPE_HEADER

CONTENT_TYPE_HEADER: string = "Content-Type"

Static Private CONTENT_TYPE_HEADER_VALUE

CONTENT_TYPE_HEADER_VALUE: string = "application/json"

Static EU_AMSTERDAM_1

EU_AMSTERDAM_1: Region = Region.register("eu-amsterdam-1", Realm.OC1, "ams")

Static EU_FRANKFURT_1

EU_FRANKFURT_1: Region = Region.register("eu-frankfurt-1", Realm.OC1, "fra")

Static EU_MARSEILLE_1

EU_MARSEILLE_1: Region = Region.register("eu-marseille-1", Realm.OC1, "mrs")

Static EU_MILAN_1

EU_MILAN_1: Region = Region.register("eu-milan-1", Realm.OC1, "lin")

Static EU_ZURICH_1

EU_ZURICH_1: Region = Region.register("eu-zurich-1", Realm.OC1, "zrh")

Static IL_JERUSALEM_1

IL_JERUSALEM_1: Region = Region.register("il-jerusalem-1", Realm.OC1, "mtz")

Static Private IMDS_BASE_URL

IMDS_BASE_URL: string = "http://169.254.169.254/opc/v2/"

Static Private KNOWN_REGIONS

KNOWN_REGIONS: Map<string, Region> = new Map()

Static Private METADATA_AUTH_HEADERS

METADATA_AUTH_HEADERS: string = "Bearer Oracle"

Static ME_ABUDHABI_1

ME_ABUDHABI_1: Region = Region.register("me-abudhabi-1", Realm.OC1, "auh")

Static ME_DUBAI_1

ME_DUBAI_1: Region = Region.register("me-dubai-1", Realm.OC1, "dxb")

Static ME_JEDDAH_1

ME_JEDDAH_1: Region = Region.register("me-jeddah-1", Realm.OC1, "jed")

Static Private OCI_REGION_METADATA_ENV_VAR

OCI_REGION_METADATA_ENV_VAR: string = "OCI_REGION_METADATA"

Static Private REGIONS_CONFIG_FILE_PATH

REGIONS_CONFIG_FILE_PATH: string = "~/.oci/regions-config.json"

Static SA_SANTIAGO_1

SA_SANTIAGO_1: Region = Region.register("sa-santiago-1", Realm.OC1, "scl")

Static SA_SAOPAULO_1

SA_SAOPAULO_1: Region = Region.register("sa-saopaulo-1", Realm.OC1, "gru")

Static SA_VINHEDO_1

SA_VINHEDO_1: Region = Region.register("sa-vinhedo-1", Realm.OC1, "vcp")

Static UK_CARDIFF_1

UK_CARDIFF_1: Region = Region.register("uk-cardiff-1", Realm.OC1, "cwl")

Static UK_GOV_CARDIFF_1

UK_GOV_CARDIFF_1: Region = Region.register("uk-gov-cardiff-1", Realm.OC4, "brs")

Static UK_GOV_LONDON_1

UK_GOV_LONDON_1: Region = Region.register("uk-gov-london-1", Realm.OC4, "ltn")

Static UK_LONDON_1

UK_LONDON_1: Region = Region.register("uk-london-1", Realm.OC1, "lhr")

Static US_ASHBURN_1

US_ASHBURN_1: Region = Region.register("us-ashburn-1", Realm.OC1, "iad")

Static US_GOV_ASHBURN_1

US_GOV_ASHBURN_1: Region = Region.register("us-gov-ashburn-1", Realm.OC3, "ric")

Static US_GOV_CHICAGO_1

US_GOV_CHICAGO_1: Region = Region.register("us-gov-chicago-1", Realm.OC3, "pia")

Static US_GOV_PHOENIX_1

US_GOV_PHOENIX_1: Region = Region.register("us-gov-phoenix-1", Realm.OC3, "tus")

Static US_LANGLEY_1

US_LANGLEY_1: Region = Region.register("us-langley-1", Realm.OC2, "lfi")

Static US_LUKE_1

US_LUKE_1: Region = Region.register("us-luke-1", Realm.OC2, "luf")

Static US_PHOENIX_1

US_PHOENIX_1: Region = Region.register("us-phoenix-1", Realm.OC1, "phx")

Static US_SANJOSE_1

US_SANJOSE_1: Region = Region.register("us-sanjose-1", Realm.OC1, "sjc")

Static Private hasCalledForImds

hasCalledForImds: boolean = false

Static Private hasUsedConfigFile

hasUsedConfigFile: boolean = false

Static Private hasUsedEnvVar

hasUsedEnvVar: boolean = false

Static Private hasWarnedAboutValuesWithoutInstanceMetadataService

hasWarnedAboutValuesWithoutInstanceMetadataService: boolean = false

Static Private imdsRegionMetadata

imdsRegionMetadata: RegionMetadataSchema | undefined

Accessors

realm

regionCode

  • get regionCode(): string | undefined

regionId

  • get regionId(): string

Methods

Static Private addRegionFromEnvVar

  • addRegionFromEnvVar(): void

Static Private addRegionFromImds

  • addRegionFromImds(): void

Static Private addRegionsFromConfigFile

  • addRegionsFromConfigFile(): void

Static enableInstanceMetadata

  • enableInstanceMetadata(): Promise<void>

Static fromRegionId

  • fromRegionId(regionId: string): Region

Static getRegionIdFromShortCode

  • getRegionIdFromShortCode(regionStr: string): string
  • 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

    Parameters

    • regionStr: string

    Returns string

    regionId

Static register

  • register(regionId: string, realm: Realm, regionCode?: undefined | string): Region

Static Private registerAllRegions

  • registerAllRegions(): void

Static values

  • 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()}.

    To ensure that this method also returns the region provided by IMDS, call {@link Region#enableInstanceMetadata()} explicitly before calling {@link Region#values()}.

    Returns Region[]