This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Oci.Common; | |
using Oci.Common.Auth; | |
using Oci.ObjectstorageService; | |
using Oci.ObjectstorageService.Models; | |
using Oci.ObjectstorageService.Requests; | |
using Oci.ObjectstorageService.Responses; | |
using System; | |
using System.IO; | |
using System.Net; | |
using System.Threading.Tasks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AMS : eu-amsterdam-1 | |
BOM : ap-mumbai-1 | |
FRA : eu-frankfurt-1 | |
GRU : sa-saopaulo-1 | |
HYD : ap-hyderabad-1 | |
IAD : us-ashburn-1 | |
ICN : ap-seoul-1 | |
JED : me-jeddah-1 | |
KIX : ap-osaka-1 | |
LHR : uk-london-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static async Task ListOciRegions() | |
{ | |
// Accepts profile name and creates a auth provider based on config file | |
var authProvider = new ConfigFileAuthenticationDetailsProvider("DEFAULT"); | |
// Create a client for the service to enable using its APIs | |
var client = new IdentityClient(authProvider); | |
// List regions | |
var listRegionsRequest = new ListRegionsRequest(); | |
try | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source_dotnetsdk1.sCdm2sWV | source compartment | ocid1.compartment.oc1.. | |
source_dotnetsdk2.MTCBvYR8 | source compartment | ocid1.compartment.oc1.. | |
source_dotnetsdk3.JLfWRqsX | source compartment | ocid1.compartment.oc1.. | |
source_dotnetsdk4.c4Dh9Bht | source compartment | ocid1.compartment.oc1.. | |
target_dotnetsdk1.HDbFwat0 | target compartment | ocid1.compartment.oc1.. | |
target_dotnetsdk2.90WbFnEJ | target compartment | ocid1.compartment.oc1.. | |
target_dotnetsdk3.01JaKkYG | target compartment | ocid1.compartment.oc1.. | |
target_dotnetsdk4.WaYvdMUj | target compartment | ocid1.compartment.oc1.. | |
target_dotnetsdk5.tdmO3sbW | target compartment | ocid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
{ | |
// Using Identity client paginator and its record enumerator to iterate through all compartments | |
var compartments = client.Paginators.ListCompartmentsRecordEnumerator(listCompartmentsRequest); | |
foreach (var compartment in compartments) | |
{ | |
Console.WriteLine("{0, 30} | {1, 60} | {2, 60}", | |
compartment.Name, | |
compartment.Description, | |
compartment.Id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var listCompartmentsRequest = new ListCompartmentsRequest | |
{ | |
CompartmentId = compartmentId | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = new IdentityClient(authProvider); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var authProvider = new ConfigFileAuthenticationDetailsProvider("DEFAULT"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static String compartmentId = "ocid1.tenancy.oc1.."; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using Oci.Common.Auth; | |
using Oci.IdentityService; | |
using Oci.IdentityService.Requests; | |
using Oci.IdentityService.Responses; |
NewerOlder