/// <summary>
        /// 删除SAML身份提供商
        /// </summary>
        /// <param name="req">参考<see cref="DeleteSAMLProviderRequest"/></param>
        /// <returns>参考<see cref="DeleteSAMLProviderResponse"/>实例</returns>
        public async Task <DeleteSAMLProviderResponse> DeleteSAMLProvider(DeleteSAMLProviderRequest req)
        {
            JsonResponseModel <DeleteSAMLProviderResponse> rsp = null;

            try
            {
                var strResp = await this.InternalRequest(req, "DeleteSAMLProvider");

                rsp = JsonConvert.DeserializeObject <JsonResponseModel <DeleteSAMLProviderResponse> >(strResp);
            }
            catch (JsonSerializationException e)
            {
                throw new TencentCloudSDKException(e.Message);
            }
            return(rsp.Response);
        }
Example #2
0
        private static void DeleteSAMLProvider(String Name)
        {
            if (String.IsNullOrEmpty(Token))
            {
                stsClient = new AmazonIdentityManagementServiceClient(AccessKeyId, SecretKey);
            }
            else
            {
                stsClient = new AmazonIdentityManagementServiceClient(AccessKeyId, SecretKey, Token, iamconfig);
            }

            try
            {
                DeleteSAMLProviderRequest Req = new DeleteSAMLProviderRequest();
                Req.SAMLProviderArn = Name;

                DeleteSAMLProviderResponse response = stsClient.DeleteSAMLProvider(Req);
                Console.WriteLine("Saml Provider deleted successfully.");
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error occured while creating user. " + ex.ToString());
            }
        }
 public Task <DeleteSAMLProviderResponse> DeleteSAMLProviderAsync(DeleteSAMLProviderRequest request,
                                                                  CancellationToken cancellationToken = new CancellationToken())
 {
     throw new System.NotImplementedException();
 }