OCISDK/OCISDK/Identity/identityClient.cs
/// <summary>
/// Gets the specified tag's information.
/// </summary>
/// <param name="getRequest"></param>
/// <returns></returns>
Gets the specified tag's information.
Gets the specified tag ' s information .
public GetTagResponse GetTag(GetTagRequest getRequest)
        {
            var uri = new Uri(
                $"{GetEndPoint(IdentityServices.TagNamespaces, this.Region)}/" +
                $"{getRequest.TagNamespaceId}/tags/{getRequest.TagName}");
            using (var webResponse = this.RestClient.Get(uri))
            using (var stream = webResponse.GetResponseStream())
            using (var reader = new StreamReader(stream))
            {
                var response = reader.ReadToEnd();
                return new GetTagResponse()
                {
                    Tag = JsonSerializer.Deserialize<Tag>(response),
                    OpcRequestId = webResponse.Headers.Get("opc-request-id")
                };
            }
        }
public GetTagResponse GetTag ( GetTagRequest getRequest ) { var uri = new Uri ( $" { GetEndPoint ( IdentityServices . TagNamespaces , this . Region ) } / " + $" { getRequest . TagNamespaceId } /tags/ { getRequest . TagName } " ) ; using ( var webResponse = this . RestClient . Get ( uri ) ) using ( var stream = webResponse . GetResponseStream ( ) ) using ( var reader = new StreamReader ( stream ) ) { var response = reader . ReadToEnd ( ) ; return new GetTagResponse ( ) { Tag = JsonSerializer . Deserialize < Tag > ( response ) , OpcRequestId = webResponse . Headers . Get ( " " ) } ; } }
Gets the specified tag's information.
Gets the specified tag ' s information .
None
getRequest
GetTagRequest
None