/// <summary>
        /// Initiates the asynchronous execution of the UploadServerCertificate operation.
        /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UploadServerCertificate 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<UploadServerCertificateResponse> UploadServerCertificateAsync(UploadServerCertificateRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UploadServerCertificateRequestMarshaller();
            var unmarshaller = UploadServerCertificateResponseUnmarshaller.Instance;

            return InvokeAsync<UploadServerCertificateRequest,UploadServerCertificateResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
 IAsyncResult invokeUploadServerCertificate(UploadServerCertificateRequest uploadServerCertificateRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new UploadServerCertificateRequestMarshaller().Marshall(uploadServerCertificateRequest);
     var unmarshaller = UploadServerCertificateResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
        internal UploadServerCertificateResponse UploadServerCertificate(UploadServerCertificateRequest request)
        {
            var marshaller = new UploadServerCertificateRequestMarshaller();
            var unmarshaller = UploadServerCertificateResponseUnmarshaller.Instance;

            return Invoke<UploadServerCertificateRequest,UploadServerCertificateResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the UploadServerCertificate operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UploadServerCertificate operation on AmazonIdentityManagementServiceClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUploadServerCertificate
        ///         operation.</returns>
        public IAsyncResult BeginUploadServerCertificate(UploadServerCertificateRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new UploadServerCertificateRequestMarshaller();
            var unmarshaller = UploadServerCertificateResponseUnmarshaller.Instance;

            return BeginInvoke<UploadServerCertificateRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        public void UploadServerCertificateMarshallTest()
        {
            var operation = service_model.FindOperation("UploadServerCertificate");

            var request = InstantiateClassGenerator.Execute<UploadServerCertificateRequest>();
            var marshaller = new UploadServerCertificateRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);
            validator.Validate();


            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();
            var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null);
            var response = UploadServerCertificateResponseUnmarshaller.Instance.Unmarshall(context)
                as UploadServerCertificateResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }
 /// <summary>
 /// <para>Uploads a server certificate entity for the AWS account. The
 /// server certificate entity includes a public key certificate, a private
 /// key and an optional certificate chain. The uploaded public key
 /// certificate, the private key and certificate chain should all be PEM
 /// encoded.</para> <para>For information about the number of server
 /// certificates you can upload, see Limitations on IAM Entities in Using
 /// AWS Identity and Access Management.</para> <para><b>NOTE:</b>Because
 /// the body of the public key certificate, private key and the
 /// certificate chain can be large, you should use POST rather than GET
 /// when calling UploadServerCertificate. For more information, see Using
 /// the Query API in Using AWS Identity and Access Management.</para>
 /// </summary>
 /// 
 /// <param name="uploadServerCertificateRequest">Container for the
 ///           necessary parameters to execute the UploadServerCertificate service
 ///           method on AmazonIdentityManagementService.</param>
 /// 
 /// <returns>The response from the UploadServerCertificate service method,
 ///         as returned by AmazonIdentityManagementService.</returns>
 /// 
 /// <exception cref="KeyPairMismatchException"/>
 /// <exception cref="MalformedCertificateException"/>
 /// <exception cref="LimitExceededException"/>
 /// <exception cref="EntityAlreadyExistsException"/>
 public UploadServerCertificateResponse UploadServerCertificate(UploadServerCertificateRequest uploadServerCertificateRequest)
 {
     IRequest<UploadServerCertificateRequest> request = new UploadServerCertificateRequestMarshaller().Marshall(uploadServerCertificateRequest);
     UploadServerCertificateResponse response = Invoke<UploadServerCertificateRequest, UploadServerCertificateResponse> (request, this.signer, UploadServerCertificateResponseUnmarshaller.GetInstance());
     return response;
 }
 /// <summary>
 /// Initiates the asynchronous execution of the UploadServerCertificate operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the UploadServerCertificate operation on AmazonIdentityManagementServiceClient.</param>
 /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
 /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 public void UploadServerCertificateAsync(UploadServerCertificateRequest request, AmazonServiceCallback<UploadServerCertificateRequest, UploadServerCertificateResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new UploadServerCertificateRequestMarshaller();
     var unmarshaller = UploadServerCertificateResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<UploadServerCertificateRequest,UploadServerCertificateResponse> responseObject 
                     = new AmazonServiceResult<UploadServerCertificateRequest,UploadServerCertificateResponse>((UploadServerCertificateRequest)req, (UploadServerCertificateResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<UploadServerCertificateRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the UploadServerCertificate operation.
        /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.UploadServerCertificate"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UploadServerCertificate 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 async Task<UploadServerCertificateResponse> UploadServerCertificateAsync(UploadServerCertificateRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UploadServerCertificateRequestMarshaller();
            var unmarshaller = UploadServerCertificateResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, UploadServerCertificateRequest, UploadServerCertificateResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
Example #9
0
        /// <summary>
        /// <para>Uploads a server certificate entity for the AWS account. The server certificate entity includes a public key certificate, a private
        /// key, and an optional certificate chain, which should all be PEM-encoded.</para> <para>For information about the number of server
        /// certificates you can upload, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?LimitationsOnEntities.html">Limitations on IAM Entities</a> in <i>Using AWS Identity and Access Management</i> .</para> <para><b>NOTE:</b>Because the body of the
        /// public key certificate, private key, and the certificate chain can be large, you should use POST rather than GET when calling
        /// UploadServerCertificate. For information about setting up signatures and authorization through the API, go to Signing AWS API Requests in
        /// the AWS General Reference. For general information about using the Query API with IAM, go to Making Query Requests in Using IAM.</para>
        /// </summary>
        /// 
        /// <param name="uploadServerCertificateRequest">Container for the necessary parameters to execute the UploadServerCertificate service method on
        /// AmazonIdentityManagementService.</param>
        /// 
        /// <returns>The response from the UploadServerCertificate service method, as returned by AmazonIdentityManagementService.</returns>
        /// 
        /// <exception cref="T:Amazon.IdentityManagement.Model.KeyPairMismatchException" />
        /// <exception cref="T:Amazon.IdentityManagement.Model.MalformedCertificateException" />
        /// <exception cref="T:Amazon.IdentityManagement.Model.LimitExceededException" />
        /// <exception cref="T:Amazon.IdentityManagement.Model.EntityAlreadyExistsException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public Task<UploadServerCertificateResponse> UploadServerCertificateAsync(UploadServerCertificateRequest uploadServerCertificateRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UploadServerCertificateRequestMarshaller();
            var unmarshaller = UploadServerCertificateResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, UploadServerCertificateRequest, UploadServerCertificateResponse>(uploadServerCertificateRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
        IAsyncResult invokeUploadServerCertificate(UploadServerCertificateRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new UploadServerCertificateRequestMarshaller();
            var unmarshaller = UploadServerCertificateResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }