OCISDK/OCISDK/Identity/identityClient.cs
/// <summary>
/// Lists the policies in the specified compartment (either the tenancy or another of your compartments). See Where to Get the Tenancy's OCID and User's OCID.
/// </summary>
/// <param name="param"></param>
/// <returns></returns>
Lists the policies in the specified compartment (either the tenancy or another of your compartments). See Where to Get the Tenancy's OCID and User's OCID.
Lists the policies in the specified compartment ( either the tenancy or another of your compartments ) . See Where to Get the Tenancy ' s OCID and User ' s OCID .
public ListPoliciesResponse ListPolicies(ListPoliciesRequest param)
        {
            var uri = new Uri($"{GetEndPoint(IdentityServices.Policiy, this.Region)}?{param.GetOptionQuery()}");
            using (var webResponse = this.RestClient.Get(uri))
            using (var stream = webResponse.GetResponseStream())
            using (var reader = new StreamReader(stream))
            {
                var response = reader.ReadToEnd();
                return new ListPoliciesResponse()
                {
                    Items = JsonSerializer.Deserialize<List<Policy>>(response),
                    OpcRequestId = webResponse.Headers.Get("opc-request-id"),
                    OpcNextPage = webResponse.Headers.Get("opc-next-page")
                };
            }
        }
public ListPoliciesResponse ListPolicies ( ListPoliciesRequest param ) { var uri = new Uri ( $" { GetEndPoint ( IdentityServices . Policiy , this . Region ) } ? { param . GetOptionQuery ( ) } " ) ; using ( var webResponse = this . RestClient . Get ( uri ) ) using ( var stream = webResponse . GetResponseStream ( ) ) using ( var reader = new StreamReader ( stream ) ) { var response = reader . ReadToEnd ( ) ; return new ListPoliciesResponse ( ) { Items = JsonSerializer . Deserialize < List < Policy > > ( response ) , OpcRequestId = webResponse . Headers . Get ( " " ) , OpcNextPage = webResponse . Headers . Get ( " " ) } ; } }
Lists the policies in the specified compartment (either the tenancy or another of your compartments).
Lists the policies in the specified compartment ( either the tenancy or another of your compartments ) .
None
param
ListPoliciesRequest
None