/// <summary>
        /// Associates a resource with an application. Both the resource and the application can
        /// be specified either by ID or name.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the AssociateResource 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 AssociateResource service method, as returned by AppRegistry.</returns>
        /// <exception cref="Amazon.AppRegistry.Model.ConflictException">
        /// There was a conflict when processing the request (for example, a resource with the
        /// given name already exists within the account).
        /// </exception>
        /// <exception cref="Amazon.AppRegistry.Model.InternalServerException">
        /// The service is experiencing internal problems.
        /// </exception>
        /// <exception cref="Amazon.AppRegistry.Model.ResourceNotFoundException">
        /// The specified resource does not exist.
        /// </exception>
        /// <exception cref="Amazon.AppRegistry.Model.ServiceQuotaExceededException">
        /// The maximum number of resources per account has been reached.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/AWS242AppRegistry/AssociateResource">REST API Reference for AssociateResource Operation</seealso>
        public virtual Task <AssociateResourceResponse> AssociateResourceAsync(AssociateResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = AssociateResourceRequestMarshaller.Instance;
            options.ResponseUnmarshaller = AssociateResourceResponseUnmarshaller.Instance;

            return(InvokeAsync <AssociateResourceResponse>(request, options, cancellationToken));
        }
        internal virtual AssociateResourceResponse AssociateResource(AssociateResourceRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = AssociateResourceRequestMarshaller.Instance;
            options.ResponseUnmarshaller = AssociateResourceResponseUnmarshaller.Instance;

            return(Invoke <AssociateResourceResponse>(request, options));
        }