OCISDK/OCISDK/Identity/identityClient.cs
/// <summary>
/// Lists the availability domains in your tenancy. 
/// Specify the OCID of either the tenancy or another of your compartments as the value for 
/// the compartment ID (remember that the tenancy is simply the root compartment). See Where 
/// to Get the Tenancy's OCID and User's OCID. Note that the order of the results returned can 
/// change if availability domains are added or removed; therefore, do not create a dependency 
/// on the list order.
/// </summary>
/// <param name="listRequest"></param>
/// <returns></returns>
Lists the availability domains in your tenancy.
Specify the OCID of either the tenancy or another of your compartments as the value for
the compartment ID (remember that the tenancy is simply the root compartment). See Where
to Get the Tenancy's OCID and User's OCID. Note that the order of the results returned can
change if availability domains are added or removed; therefore, do not create a dependency
on the list order.
Lists the availability domains in your tenancy . Specify the OCID of either the tenancy or another of your compartments as the value for the compartment ID ( remember that the tenancy is simply the root compartment ) . See Where to Get the Tenancy ' s OCID and User ' s OCID . Note that the order of the results returned can change if availability domains are added or removed ; therefore do not create a dependency on the list order .
public ListAvailabilityDomainsResponse ListAvailabilityDomains(ListAvailabilityDomainsRequest listRequest)
        {
            var uriStr = $"{GetEndPoint(IdentityServices.AvailabilityDomain, this.Region)}";
            var querys = listRequest.GetOptionQuery();
            if (!string.IsNullOrEmpty(querys))
            {
                uriStr = $"{uriStr}?{querys}";
            }
            var uri = new Uri(uriStr);
            using (var webResponse = this.RestClient.Get(uri))
            using (var stream = webResponse.GetResponseStream())
            using (var reader = new StreamReader(stream))
            {
                var response = reader.ReadToEnd();
                return new ListAvailabilityDomainsResponse()
                {
                    Items = JsonSerializer.Deserialize<List<AvailabilityDomain>>(response),
                    OpcRequestId = webResponse.Headers.Get("opc-request-id"),
                    OpcNextPage = webResponse.Headers.Get("opc-next-page")
                };
            }
        }
public ListAvailabilityDomainsResponse ListAvailabilityDomains ( ListAvailabilityDomainsRequest listRequest ) { var uriStr = $" { GetEndPoint ( IdentityServices . AvailabilityDomain , this . Region ) } " ; var querys = listRequest . GetOptionQuery ( ) ; if ( ! string . IsNullOrEmpty ( querys ) ) { uriStr = $" { uriStr } ? { querys } " ; } var uri = new Uri ( uriStr ) ; using ( var webResponse = this . RestClient . Get ( uri ) ) using ( var stream = webResponse . GetResponseStream ( ) ) using ( var reader = new StreamReader ( stream ) ) { var response = reader . ReadToEnd ( ) ; return new ListAvailabilityDomainsResponse ( ) { Items = JsonSerializer . Deserialize < List < AvailabilityDomain > > ( response ) , OpcRequestId = webResponse . Headers . Get ( " " ) , OpcNextPage = webResponse . Headers . Get ( " " ) } ; } }
Lists the availability domains in your tenancy.
Lists the availability domains in your tenancy .
None
listRequest
ListAvailabilityDomainsRequest
None