OCISDK/OCISDK/Identity/identityClient.cs
/// <summary>
/// Lists the tag defaults for tag definitions in the specified compartment.
/// </summary>
/// <param name="listRequest"></param>
/// <returns></returns>
Lists the tag defaults for tag definitions in the specified compartment.
Lists the tag defaults for tag definitions in the specified compartment .
public ListTagDefaultsResponse ListTagDefaults(ListTagDefaultsRequest listRequest)
        {
            var uriStr = $"{GetEndPoint(IdentityServices.TagDefault, 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 ListTagDefaultsResponse()
                {
                    Items = JsonSerializer.Deserialize<List<TagDefaultSummary>>(response),
                    OpcRequestId = webResponse.Headers.Get("opc-request-id"),
                    OpcNextPage = webResponse.Headers.Get("opc-next-page")
                };
            }
        }
public ListTagDefaultsResponse ListTagDefaults ( ListTagDefaultsRequest listRequest ) { var uriStr = $" { GetEndPoint ( IdentityServices . TagDefault , 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 ListTagDefaultsResponse ( ) { Items = JsonSerializer . Deserialize < List < TagDefaultSummary > > ( response ) , OpcRequestId = webResponse . Headers . Get ( " " ) , OpcNextPage = webResponse . Headers . Get ( " " ) } ; } }
Lists the tag defaults for tag definitions in the specified compartment.
Lists the tag defaults for tag definitions in the specified compartment .
None
listRequest
ListTagDefaultsRequest
None