public void DeleteDomain(string domainName)
 {
     DeleteDomainRequest request = new DeleteDomainRequest {
         DomainName = domainName
     };
     DeleteDomainResponse response = Service.DeleteDomain(request);
 }
Esempio n. 2
0
        /// <summary>
        /// Releases the domain, making it available to be claimed again by another tenancy.
        /// </summary>
        /// <param name="request">The request object containing the details to send. Required.</param>
        /// <param name="retryConfiguration">The retry configuration that will be used by to send this request. Optional.</param>
        /// <param name="cancellationToken">The cancellation token to cancel this operation. Optional.</param>
        /// <returns>A response object containing details about the completed operation</returns>
        /// <example>Click <a href="https://docs.cloud.oracle.com/en-us/iaas/tools/dot-net-examples/latest/tenantmanagercontrolplane/DeleteDomain.cs.html">here</a> to see an example of how to use DeleteDomain API.</example>
        public async Task <DeleteDomainResponse> DeleteDomain(DeleteDomainRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
        {
            logger.Trace("Called deleteDomain");
            Uri                uri            = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/domains/{domainId}".Trim('/')));
            HttpMethod         method         = new HttpMethod("DELETE");
            HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request);

            requestMessage.Headers.Add("Accept", "application/json");
            GenericRetrier      retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration);
            HttpResponseMessage responseMessage;

            try
            {
                if (retryingClient != null)
                {
                    responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, cancellationToken).ConfigureAwait(false);
                }
                else
                {
                    responseMessage = await this.restClient.HttpSend(requestMessage).ConfigureAwait(false);
                }
                this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage);

                return(Converter.FromHttpResponseMessage <DeleteDomainResponse>(responseMessage));
            }
            catch (Exception e)
            {
                logger.Error($"DeleteDomain failed with error: {e.Message}");
                throw;
            }
        }
        protected override void ProcessRecord()
        {
            base.ProcessRecord();

            if (!ConfirmDelete("OCITenantmanagercontrolplaneDomain", "Remove"))
            {
                return;
            }

            DeleteDomainRequest request;

            try
            {
                request = new DeleteDomainRequest
                {
                    DomainId     = DomainId,
                    IfMatch      = IfMatch,
                    OpcRequestId = OpcRequestId
                };

                response = client.DeleteDomain(request).GetAwaiter().GetResult();
                WriteOutput(response);
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// <para>Permanently deletes a search domain and all of its data.</para>
        /// </summary>
        ///
        /// <param name="deleteDomainRequest">Container for the necessary parameters to execute the DeleteDomain service method on
        /// AmazonCloudSearch.</param>
        ///
        /// <returns>The response from the DeleteDomain service method, as returned by AmazonCloudSearch.</returns>
        ///
        /// <exception cref="T:Amazon.CloudSearch.Model.BaseException" />
        /// <exception cref="T:Amazon.CloudSearch.Model.InternalException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        public Task <DeleteDomainResponse> DeleteDomainAsync(DeleteDomainRequest deleteDomainRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new DeleteDomainRequestMarshaller();
            var unmarshaller = DeleteDomainResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, DeleteDomainRequest, DeleteDomainResponse>(deleteDomainRequest, marshaller, unmarshaller, signer, cancellationToken));
        }
Esempio n. 5
0
        internal DeleteDomainResponse DeleteDomain(DeleteDomainRequest request)
        {
            var marshaller   = new DeleteDomainRequestMarshaller();
            var unmarshaller = DeleteDomainResponseUnmarshaller.Instance;

            return(Invoke <DeleteDomainRequest, DeleteDomainResponse>(request, marshaller, unmarshaller));
        }
Esempio n. 6
0
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteDomain operation.
        /// <seealso cref="M:Amazon.SimpleDB.AmazonSimpleDB.DeleteDomain"/>
        /// </summary>
        /// <param name="request">The DeleteDomainRequest that defines the parameters of
        /// the operation.</param>
        public void BeginDeleteDomain(DeleteDomainRequest request)
        {
            IDictionary <string, string> parameters = ConvertDeleteDomain(request);
            SDBAsyncResult result = new SDBAsyncResult(parameters, null);

            invoke <DeleteDomainResponse>(result);
        }
        /// <summary>
        /// The <code>DeleteDomain</code> operation deletes a domain. Any items (and their attributes)
        /// in the domain are deleted as well. The <code>DeleteDomain</code> operation might take
        /// 10 or more seconds to complete.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the DeleteDomain service method.</param>
        ///
        /// <returns>The response from the DeleteDomain service method, as returned by SimpleDB.</returns>
        /// <exception cref="Amazon.SimpleDB.Model.MissingParameterException">
        /// The request must contain the specified missing parameter.
        /// </exception>
        public virtual DeleteDomainResponse DeleteDomain(DeleteDomainRequest request)
        {
            var marshaller   = DeleteDomainRequestMarshaller.Instance;
            var unmarshaller = DeleteDomainResponseUnmarshaller.Instance;

            return(Invoke <DeleteDomainRequest, DeleteDomainResponse>(request, marshaller, unmarshaller));
        }
Esempio n. 8
0
        /// <summary>
        /// Deletes the simpleDB Domain
        /// </summary>
        /// <param name="domainName"></param>
        public void DeleteDomain(string domainName)
        {
            var request = new DeleteDomainRequest {
                DomainName = domainName
            };

            Client.DeleteDomain(request);
        }
Esempio n. 9
0
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteDomain operation.
        /// <seealso cref="Amazon.CloudSearch_2011_02_01.IAmazonCloudSearch"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DeleteDomain operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task <DeleteDomainResponse> DeleteDomainAsync(DeleteDomainRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new DeleteDomainRequestMarshaller();
            var unmarshaller = DeleteDomainResponseUnmarshaller.Instance;

            return(InvokeAsync <DeleteDomainRequest, DeleteDomainResponse>(request, marshaller,
                                                                           unmarshaller, cancellationToken));
        }
        // Token: 0x06000C4D RID: 3149 RVA: 0x00037B60 File Offset: 0x00035D60
        public void DeleteDomain(SmtpDomain domain, Guid tenantId, Namespace ns)
        {
            DeleteDomainRequest request = LocatorServiceClientWriter.ConstructDeleteDomainRequest(domain, tenantId, ns);
            LocatorService      proxy   = this.AcquireServiceProxy();

            GLSLogger.LoggingWrapper <DeleteDomainResponse>(this, domain.ToString(), proxy.GetHashCode().ToString(), () => proxy.DeleteDomain(this.requestIdentity, request));
            base.ReleaseServiceProxy(proxy);
        }
        // Token: 0x06000C51 RID: 3153 RVA: 0x00037CB4 File Offset: 0x00035EB4
        public IAsyncResult BeginDeleteDomain(SmtpDomain domain, Guid tenantId, Namespace ns, AsyncCallback callback, object asyncState)
        {
            DeleteDomainRequest deleteDomainRequest = LocatorServiceClientWriter.ConstructDeleteDomainRequest(domain, tenantId, ns);
            LocatorService      locatorService      = this.AcquireServiceProxy();
            IAsyncResult        internalAsyncResult = locatorService.BeginDeleteDomain(this.requestIdentity, deleteDomainRequest, new AsyncCallback(LocatorServiceClientAdapter.OnWebServiceRequestCompleted), new GlsAsyncState(callback, asyncState, locatorService));

            return(new GlsAsyncResult(callback, asyncState, locatorService, internalAsyncResult));
        }
Esempio n. 12
0
        /// <summary>
        /// The <code>DeleteDomain</code> operation deletes a domain. Any items (and their attributes)
        /// in the domain are deleted as well. The <code>DeleteDomain</code> operation might take
        /// 10 or more seconds to complete.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the DeleteDomain service method.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        ///
        /// <returns>The response from the DeleteDomain service method, as returned by SimpleDB.</returns>
        /// <exception cref="Amazon.SimpleDB.Model.MissingParameterException">
        /// The request must contain the specified missing parameter.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/sdb-2009-04-15/DeleteDomain">REST API Reference for DeleteDomain Operation</seealso>
        public virtual Task <DeleteDomainResponse> DeleteDomainAsync(DeleteDomainRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = DeleteDomainRequestMarshaller.Instance;
            options.ResponseUnmarshaller = DeleteDomainResponseUnmarshaller.Instance;

            return(InvokeAsync <DeleteDomainResponse>(request, options, cancellationToken));
        }
Esempio n. 13
0
        static void DeleteDomain(String domainName)
        {
            DeleteDomainRequest request = new DeleteDomainRequest()
            {
                DomainName = domainName,
            };

            Client.DeleteDomain(request);
        }
Esempio n. 14
0
        void DeleteDomain(String domainName)
        {
            DeleteDomainRequest request = new DeleteDomainRequest()
            {
                DomainName = domainName,
            };

            Client.DeleteDomainAsync(request).Wait();
        }
Esempio n. 15
0
        internal virtual DeleteDomainResponse DeleteDomain(DeleteDomainRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = DeleteDomainRequestMarshaller.Instance;
            options.ResponseUnmarshaller = DeleteDomainResponseUnmarshaller.Instance;

            return(Invoke <DeleteDomainResponse>(request, options));
        }
Esempio n. 16
0
        private static IDictionary <string, string> ConvertDeleteDomain(DeleteDomainRequest request)
        {
            IDictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["Action"] = "DeleteDomain";
            if (request.IsSetDomainName())
            {
                dictionary["DomainName"] = request.DomainName;
            }
            return(dictionary);
        }
Esempio n. 17
0
        private void DeleteDomainButton_Click(object sender, RoutedEventArgs e)
        {
            SimpleDB.Client.OnSimpleDBResponse += DeleteDomainWebResponse;
            DeleteDomainRequest request = new DeleteDomainRequest()
            {
                DomainName = this.DomainName
            };

            this.DomainDeleteMessage = "Please wait...";
            SimpleDB.Client.BeginDeleteDomain(request);
        }
Esempio n. 18
0
        public override async Task <DeleteDomainResponse> DeleteDomain(DeleteDomainRequest request, ServerCallContext context)
        {
            var domain = await dbContext.Domains.FindIfNullThrowAsync(request.DomainId);

            dbContext.Domains.Remove(domain);

            await dbContext.SaveChangesAsync();

            return(new DeleteDomainResponse {
            });
        }
Esempio n. 19
0
        /**
         * Convert DeleteDomainRequest to name value pairs
         */
        private static IDictionary <string, string> ConvertDeleteDomain(DeleteDomainRequest request)
        {
            IDictionary <string, string> parameters = new Dictionary <string, string>();

            parameters["Action"] = "DeleteDomain";
            if (request.IsSetDomainName())
            {
                parameters["DomainName"] = request.DomainName;
            }

            return(parameters);
        }
Esempio n. 20
0
        /**
         * Convert DeleteDomainRequest to name value pairs
         */
        private IDictionary <String, String> ConvertDeleteDomain(DeleteDomainRequest request)
        {
            IDictionary <String, String> parameters = new Dictionary <String, String>();

            parameters.Add("Action", "DeleteDomain");
            if (request.IsSetDomainName())
            {
                parameters.Add("DomainName", request.DomainName);
            }

            return(parameters);
        }
		internal DeleteDomainResponse DeleteDomain(DeleteDomainRequest request)
        {
            var task = DeleteDomainAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
Esempio n. 22
0
        public override async Task <DeleteDomainResponse> DeleteDomain(DeleteDomainRequest request, ServerCallContext context)
        {
            var domain = await dbContext.Domains.FindIfNullThrowAsync(request.Id);

            dbContext.Domains.Remove(domain);

            // delete of entries should happen automatically by EFCore with foreign key constraints.

            await dbContext.SaveChangesAsync();

            return(new DeleteDomainResponse {
            });
        }
        /// <summary>
        /// 通过域名ID删除监控的域名
        /// </summary>
        /// <param name="req"><see cref="DeleteDomainRequest"/></param>
        /// <returns><see cref="DeleteDomainResponse"/></returns>
        public DeleteDomainResponse DeleteDomainSync(DeleteDomainRequest req)
        {
            JsonResponseModel <DeleteDomainResponse> rsp = null;

            try
            {
                var strResp = this.InternalRequestSync(req, "DeleteDomain");
                rsp = JsonConvert.DeserializeObject <JsonResponseModel <DeleteDomainResponse> >(strResp);
            }
            catch (JsonSerializationException e)
            {
                throw new TencentCloudSDKException(e.Message);
            }
            return(rsp.Response);
        }
Esempio n. 24
0
        public void DeleteIndex(string name)
        {
            var amazonSearchParameters = this.GetAmazonParams();
            var region = RegionEndpoint.GetBySystemName(amazonSearchParameters[Region]);

            using (IAmazonCloudSearch cloudSearchClient = AWSClientFactory.CreateAmazonCloudSearchClient(amazonSearchParameters[AccessKey], amazonSearchParameters[SecretAccessKey], region))
            {
                DeleteDomainRequest domainRequest = new DeleteDomainRequest();
                domainRequest.DomainName = name;
                try
                {
                    cloudSearchClient.DeleteDomain(domainRequest);
                }
                catch (BaseException ex)
                {
                    Log.Write(ex.InnerException.Message);
                }
                catch (InternalException ex)
                {
                    Log.Write(ex.InnerException.Message);
                }
            }
        }
Esempio n. 25
0
 /// <summary>
 /// Delete Domain
 /// </summary>
 /// <param name="request">Delete Domain  request</param>
 /// <returns>Delete Domain  Response from the service</returns>
 /// <remarks>
 /// The DeleteDomain operation deletes a domain. Any items (and their attributes) in the domain
 /// are deleted as well. The DeleteDomain operation may take 10 or more seconds to complete.
 ///
 /// </remarks>
 public DeleteDomainResponse DeleteDomain(DeleteDomainRequest request)
 {
     return(Invoke <DeleteDomainResponse>("DeleteDomainResponse.xml"));
 }
Esempio n. 26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack)
            {
                CheckIfFacebookAppIsSetupCorrectly();

                var auth = new CanvasAuthorizer {
                    Permissions = new[] { "user_about_me" }
                };

                if (auth.Authorize())
                {
                    ShowFacebookContent();
                }
            }
            else
            {
                AmazonSimpleDB sdb = GetSDB();

                // Should I clean out the AWS domain state?
                if (Page.Request.Params["delaws"] == "1")
                {
                    //Deleting a domain
                    DeleteDomainRequest deleteDomainAction = new DeleteDomainRequest().WithDomainName("ZigMeRecos");
                    sdb.DeleteDomain(deleteDomainAction);
                }

                // Now read from the AWS domain and populate the dropdown list

                // First check to see if a domain contain service types exists. if not then create it and populate it
                // Listing domains

                /*ListDomainsResponse sdbListDomainsResponse = sdb.ListDomains(new ListDomainsRequest());
                 * if (sdbListDomainsResponse.IsSetListDomainsResult())
                 * {
                 *  ListDomainsResult listDomainsResult = sdbListDomainsResponse.ListDomainsResult;
                 *
                 *  if (!listDomainsResult.DomainName.Contains("ZigMeServiceTypes"))
                 *  {
                 *  }
                 *  else
                 *  {
                 *      String selectExpression = "Select * From ZigMeServiceTypes";
                 *      SelectRequest selectRequestAction = new SelectRequest().WithSelectExpression(selectExpression);
                 *      SelectResponse selectResponse = sdb.Select(selectRequestAction);
                 *      if (selectResponse.IsSetSelectResult())
                 *      {
                 *          SelectResult selectResult = selectResponse.SelectResult;
                 *          foreach (Item item in selectResult.Item)
                 *          {
                 *              foreach (Amazon.SimpleDB.Model.Attribute attribute in item.Attribute)
                 *              {
                 *                  if (attribute.IsSetName() && attribute.IsSetValue())
                 *                  {
                 *                  }
                 *              }
                 *          }
                 *      }
                 *  }
                 * }*/
            }
        }
Esempio n. 27
0
 /// <summary>
 /// Delete Domain
 /// </summary>
 /// <param name="request">Delete Domain  request</param>
 /// <returns>Delete Domain  Response from the service</returns>
 /// <remarks>
 /// The DeleteDomain operation deletes a domain. Any items (and their attributes) in the domain
 /// are deleted as well. The DeleteDomain operation may take 10 or more seconds to complete.
 ///
 /// </remarks>
 public DeleteDomainResponse DeleteDomain(DeleteDomainRequest request)
 {
     return(Invoke <DeleteDomainResponse>(ConvertDeleteDomain(request)));
 }
        public void Flush(string storeIdentifier)
        {
            var deleteDomainAction = new DeleteDomainRequest().WithDomainName(storeIdentifier);

            _simpleDb.DeleteDomain(deleteDomainAction);
        }
Esempio n. 29
0
 /// <summary>
 ///  删除网站
 /// </summary>
 /// <param name="request">请求参数信息</param>
 /// <returns>请求结果信息</returns>
 public DeleteDomainResponse DeleteDomain(DeleteDomainRequest request)
 {
     return(new DeleteDomainExecutor().Client(this).Execute <DeleteDomainResponse, DeleteDomainResult, DeleteDomainRequest>(request));
 }
Esempio n. 30
0
 /// <summary>
 ///  删除网站
 /// </summary>
 /// <param name="request">请求参数信息</param>
 /// <returns>请求结果信息</returns>
 public async Task <DeleteDomainResponse> DeleteDomain(DeleteDomainRequest request)
 {
     return(await new DeleteDomainExecutor().Client(this).Execute <DeleteDomainResponse, DeleteDomainResult, DeleteDomainRequest>(request).ConfigureAwait(false));
 }