OCISDK/OCISDK/Identity/identityClient.cs
/// <summary>
/// Lists all the regions offered by Oracle Cloud Infrastructure.
/// </summary>
/// <returns></returns>
Lists all the regions offered by Oracle Cloud Infrastructure.
Lists all the regions offered by Oracle Cloud Infrastructure .
public ListRegionsResponse ListRegions()
        {
            var uri = new Uri($"{GetEndPoint(IdentityServices.Region, this.Region)}");
            using (var webResponse = this.RestClient.Get(uri))
            using (var stream = webResponse.GetResponseStream())
            using (var reader = new StreamReader(stream))
            {
                var response = reader.ReadToEnd();
                return new ListRegionsResponse()
                {
                    Items = JsonSerializer.Deserialize<List<Region>>(response),
                    OpcRequestId = webResponse.Headers.Get("opc-request-id")
                };
            }
        }
public ListRegionsResponse ListRegions ( ) { var uri = new Uri ( $" { GetEndPoint ( IdentityServices . Region , this . Region ) } " ) ; using ( var webResponse = this . RestClient . Get ( uri ) ) using ( var stream = webResponse . GetResponseStream ( ) ) using ( var reader = new StreamReader ( stream ) ) { var response = reader . ReadToEnd ( ) ; return new ListRegionsResponse ( ) { Items = JsonSerializer . Deserialize < List < Region > > ( response ) , OpcRequestId = webResponse . Headers . Get ( " " ) } ; } }
Lists all the regions offered by Oracle Cloud Infrastructure.
Lists all the regions offered by Oracle Cloud Infrastructure .
None