Úselo RenewCertificate con un o AWS SDK CLI - Ejemplos de código de AWS SDK

Hay más AWS SDK ejemplos disponibles en el GitHub repositorio de AWS Doc SDK Examples.

Las traducciones son generadas a través de traducción automática. En caso de conflicto entre la traducción y la version original de inglés, prevalecerá la version en inglés.

Úselo RenewCertificate con un o AWS SDK CLI

En el siguiente ejemplo de código, se muestra cómo usar RenewCertificate.

C++
SDKpara C++
nota

Hay más información GitHub. Busque el ejemplo completo y aprenda a configurar y ejecutar en el Repositorio de ejemplos de código de AWS.

//! Renew an AWS Certificate Manager (ACM) certificate. /*! \param certificateArn: The Amazon Resource Name (ARN) of a certificate. \param clientConfiguration: AWS client configuration. \return bool: Function succeeded. */ bool AwsDoc::ACM::renewCertificate(const Aws::String &certificateArn, const Aws::Client::ClientConfiguration &clientConfiguration) { Aws::ACM::ACMClient acmClient(clientConfiguration); Aws::ACM::Model::RenewCertificateRequest request; request.SetCertificateArn(certificateArn); Aws::ACM::Model::RenewCertificateOutcome outcome = acmClient.RenewCertificate(request); if (!outcome.IsSuccess()) { std::cerr << "Error: RenewCertificate: " << outcome.GetError().GetMessage() << std::endl; return false; } else { std::cout << "Success: Renewed certificate with ARN '" << certificateArn << "'." << std::endl; return true; } }
  • Para API obtener más información, consulte RenewCertificatela AWS SDK for C++ APIReferencia.