protected override void ProcessRecord()
        {
            base.ProcessRecord();
            CreateCertificateAuthorityRequest request;

            try
            {
                request = new CreateCertificateAuthorityRequest
                {
                    CreateCertificateAuthorityDetails = CreateCertificateAuthorityDetails,
                    OpcRequestId  = OpcRequestId,
                    OpcRetryToken = OpcRetryToken
                };

                response = client.CreateCertificateAuthority(request).GetAwaiter().GetResult();
                WriteOutput(response, response.CertificateAuthority);
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }
        /// <summary>
        /// Initiates the asynchronous execution of the CreateCertificateAuthority operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the CreateCertificateAuthority 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>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthority">REST API Reference for CreateCertificateAuthority Operation</seealso>
        public virtual Task <CreateCertificateAuthorityResponse> CreateCertificateAuthorityAsync(CreateCertificateAuthorityRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = CreateCertificateAuthorityRequestMarshaller.Instance;
            options.ResponseUnmarshaller = CreateCertificateAuthorityResponseUnmarshaller.Instance;

            return(InvokeAsync <CreateCertificateAuthorityResponse>(request, options, cancellationToken));
        }
        internal virtual CreateCertificateAuthorityResponse CreateCertificateAuthority(CreateCertificateAuthorityRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = CreateCertificateAuthorityRequestMarshaller.Instance;
            options.ResponseUnmarshaller = CreateCertificateAuthorityResponseUnmarshaller.Instance;

            return(Invoke <CreateCertificateAuthorityResponse>(request, options));
        }
Example #4
0
        internal virtual CreateCertificateAuthorityResponse CreateCertificateAuthority(CreateCertificateAuthorityRequest request)
        {
            var marshaller   = CreateCertificateAuthorityRequestMarshaller.Instance;
            var unmarshaller = CreateCertificateAuthorityResponseUnmarshaller.Instance;

            return(Invoke <CreateCertificateAuthorityRequest, CreateCertificateAuthorityResponse>(request, marshaller, unmarshaller));
        }