internal DeleteAssociationResponse DeleteAssociation(DeleteAssociationRequest request)
        {
            var marshaller   = new DeleteAssociationRequestMarshaller();
            var unmarshaller = DeleteAssociationResponseUnmarshaller.Instance;

            return(Invoke <DeleteAssociationRequest, DeleteAssociationResponse>(request, marshaller, unmarshaller));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteAssociation operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DeleteAssociation 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 <DeleteAssociationResponse> DeleteAssociationAsync(DeleteAssociationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new DeleteAssociationRequestMarshaller();
            var unmarshaller = DeleteAssociationResponseUnmarshaller.Instance;

            return(InvokeAsync <DeleteAssociationRequest, DeleteAssociationResponse>(request, marshaller,
                                                                                     unmarshaller, cancellationToken));
        }
        /// <summary>
        /// Disassociates the specified configuration document from the specified instance.
        ///
        ///
        /// <para>
        /// When you disassociate a configuration document from an instance, it does not change
        /// the configuration of the instance. To change the configuration state of an instance
        /// after you disassociate a configuration document, you must create a new configuration
        /// document with the desired configuration and associate it with the instance.
        /// </para>
        /// </summary>
        /// <param name="instanceId">The ID of the instance.</param>
        /// <param name="name">The name of the configuration document.</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 DeleteAssociation service method, as returned by SimpleSystemsManagement.</returns>
        /// <exception cref="Amazon.SimpleSystemsManagement.Model.AssociationDoesNotExistException">
        /// The specified association does not exist.
        /// </exception>
        /// <exception cref="Amazon.SimpleSystemsManagement.Model.InternalServerErrorException">
        /// An error occurred on the server side.
        /// </exception>
        /// <exception cref="Amazon.SimpleSystemsManagement.Model.InvalidDocumentException">
        /// The configuration document is not valid.
        /// </exception>
        /// <exception cref="Amazon.SimpleSystemsManagement.Model.InvalidInstanceIdException">
        /// You must specify the ID of a running instance.
        /// </exception>
        /// <exception cref="Amazon.SimpleSystemsManagement.Model.TooManyUpdatesException">
        /// There are concurrent updates for a resource that supports one update at a time.
        /// </exception>
        public Task <DeleteAssociationResponse> DeleteAssociationAsync(string instanceId, string name, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var request = new DeleteAssociationRequest();

            request.InstanceId = instanceId;
            request.Name       = name;
            return(DeleteAssociationAsync(request, cancellationToken));
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> Put(int id)
        {
            var request = new DeleteAssociationRequest {
                Id = id
            };
            var result = await _mediatorService.Send(request);

            return(Ok(result));
        }