OCISDK/OCISDK/Identity/identityClient.cs
/// <summary>
/// Lists all the tags enabled for cost-tracking in the specified tenancy. 
/// For information about cost-tracking tags, see Using Cost-tracking Tags.
/// </summary>
/// <param name="listRequest"></param>
/// <returns></returns>
Lists all the tags enabled for cost-tracking in the specified tenancy.
For information about cost-tracking tags, see Using Cost-tracking Tags.
Lists all the tags enabled for cost - tracking in the specified tenancy . For information about cost - tracking tags see Using Cost - tracking Tags .
public ListCostTrackingTagsResponse ListCostTrackingTags(ListCostTrackingTagsRequest listRequest)
        {
            var uriStr = $"{GetEndPoint(IdentityServices.TagNamespaces, this.Region)}/actions/listCostTrackingTags";
            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 ListCostTrackingTagsResponse()
                {
                    Items = JsonSerializer.Deserialize<List<Tag>>(response),
                    OpcRequestId = webResponse.Headers.Get("opc-request-id")
                };
            }
        }
public ListCostTrackingTagsResponse ListCostTrackingTags ( ListCostTrackingTagsRequest listRequest ) { var uriStr = $" { GetEndPoint ( IdentityServices . TagNamespaces , this . Region ) } /actions/listCostTrackingTags " ; 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 ListCostTrackingTagsResponse ( ) { Items = JsonSerializer . Deserialize < List < Tag > > ( response ) , OpcRequestId = webResponse . Headers . Get ( " " ) } ; } }
Lists all the tags enabled for cost-tracking in the specified tenancy.
Lists all the tags enabled for cost - tracking in the specified tenancy .
None
listRequest
ListCostTrackingTagsRequest
None