OCISDK/OCISDK/Identity/identityClient.cs
/// <summary>
/// Deletes the specified policy.
/// The deletion takes effect typically within 10 seconds.
/// </summary>
/// <param name="deletePolicyRequest"></param>
/// <returns></returns>
Deletes the specified policy.
The deletion takes effect typically within 10 seconds.
Deletes the specified policy . The deletion takes effect typically within 10 seconds .
public DeletePolicyResponse DeletePolicy(DeletePolicyRequest deletePolicyRequest)
        {
            var uri = new Uri($"{GetEndPoint(IdentityServices.Policiy, this.Region)}/{deletePolicyRequest.PolicyId}");
            using (var webResponse = this.RestClient.Delete(uri, new HttpRequestHeaderParam() { IfMatch = deletePolicyRequest.IfMatch }))
            using (var stream = webResponse.GetResponseStream())
            using (var reader = new StreamReader(stream))
            {
                var response = reader.ReadToEnd();
                return new DeletePolicyResponse()
                {
                    OpcRequestId = webResponse.Headers.Get("opc-request-id")
                };
            }
        }
public DeletePolicyResponse DeletePolicy ( DeletePolicyRequest deletePolicyRequest ) { var uri = new Uri ( $" { GetEndPoint ( IdentityServices . Policiy , this . Region ) } / { deletePolicyRequest . PolicyId } " ) ; using ( var webResponse = this . RestClient . Delete ( uri , new HttpRequestHeaderParam ( ) { IfMatch = deletePolicyRequest . IfMatch } ) ) using ( var stream = webResponse . GetResponseStream ( ) ) using ( var reader = new StreamReader ( stream ) ) { var response = reader . ReadToEnd ( ) ; return new DeletePolicyResponse ( ) { OpcRequestId = webResponse . Headers . Get ( " " ) } ; } }
Deletes the specified policy.
Deletes the specified policy .
None
deletePolicyRequest
DeletePolicyRequest
None