/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace ACMPCA { namespace Model { /** */ class RevokeCertificateRequest : public ACMPCARequest { public: AWS_ACMPCA_API RevokeCertificateRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "RevokeCertificate"; } AWS_ACMPCA_API Aws::String SerializePayload() const override; AWS_ACMPCA_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Amazon Resource Name (ARN) of the private CA that issued the certificate to * be revoked. This must be of the form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 *

*/ inline const Aws::String& GetCertificateAuthorityArn() const{ return m_certificateAuthorityArn; } /** *

Amazon Resource Name (ARN) of the private CA that issued the certificate to * be revoked. This must be of the form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 *

*/ inline bool CertificateAuthorityArnHasBeenSet() const { return m_certificateAuthorityArnHasBeenSet; } /** *

Amazon Resource Name (ARN) of the private CA that issued the certificate to * be revoked. This must be of the form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 *

*/ inline void SetCertificateAuthorityArn(const Aws::String& value) { m_certificateAuthorityArnHasBeenSet = true; m_certificateAuthorityArn = value; } /** *

Amazon Resource Name (ARN) of the private CA that issued the certificate to * be revoked. This must be of the form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 *

*/ inline void SetCertificateAuthorityArn(Aws::String&& value) { m_certificateAuthorityArnHasBeenSet = true; m_certificateAuthorityArn = std::move(value); } /** *

Amazon Resource Name (ARN) of the private CA that issued the certificate to * be revoked. This must be of the form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 *

*/ inline void SetCertificateAuthorityArn(const char* value) { m_certificateAuthorityArnHasBeenSet = true; m_certificateAuthorityArn.assign(value); } /** *

Amazon Resource Name (ARN) of the private CA that issued the certificate to * be revoked. This must be of the form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 *

*/ inline RevokeCertificateRequest& WithCertificateAuthorityArn(const Aws::String& value) { SetCertificateAuthorityArn(value); return *this;} /** *

Amazon Resource Name (ARN) of the private CA that issued the certificate to * be revoked. This must be of the form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 *

*/ inline RevokeCertificateRequest& WithCertificateAuthorityArn(Aws::String&& value) { SetCertificateAuthorityArn(std::move(value)); return *this;} /** *

Amazon Resource Name (ARN) of the private CA that issued the certificate to * be revoked. This must be of the form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 *

*/ inline RevokeCertificateRequest& WithCertificateAuthorityArn(const char* value) { SetCertificateAuthorityArn(value); return *this;} /** *

Serial number of the certificate to be revoked. This must be in hexadecimal * format. You can retrieve the serial number by calling GetCertificate * with the Amazon Resource Name (ARN) of the certificate you want and the ARN of * your private CA. The GetCertificate action retrieves the certificate in * the PEM format. You can use the following OpenSSL command to list the * certificate in text format and copy the hexadecimal serial number.

* openssl x509 -in file_path -text -noout

You can also * copy the serial number from the console or use the DescribeCertificate * action in the Certificate Manager API Reference.

*/ inline const Aws::String& GetCertificateSerial() const{ return m_certificateSerial; } /** *

Serial number of the certificate to be revoked. This must be in hexadecimal * format. You can retrieve the serial number by calling GetCertificate * with the Amazon Resource Name (ARN) of the certificate you want and the ARN of * your private CA. The GetCertificate action retrieves the certificate in * the PEM format. You can use the following OpenSSL command to list the * certificate in text format and copy the hexadecimal serial number.

* openssl x509 -in file_path -text -noout

You can also * copy the serial number from the console or use the DescribeCertificate * action in the Certificate Manager API Reference.

*/ inline bool CertificateSerialHasBeenSet() const { return m_certificateSerialHasBeenSet; } /** *

Serial number of the certificate to be revoked. This must be in hexadecimal * format. You can retrieve the serial number by calling GetCertificate * with the Amazon Resource Name (ARN) of the certificate you want and the ARN of * your private CA. The GetCertificate action retrieves the certificate in * the PEM format. You can use the following OpenSSL command to list the * certificate in text format and copy the hexadecimal serial number.

* openssl x509 -in file_path -text -noout

You can also * copy the serial number from the console or use the DescribeCertificate * action in the Certificate Manager API Reference.

*/ inline void SetCertificateSerial(const Aws::String& value) { m_certificateSerialHasBeenSet = true; m_certificateSerial = value; } /** *

Serial number of the certificate to be revoked. This must be in hexadecimal * format. You can retrieve the serial number by calling GetCertificate * with the Amazon Resource Name (ARN) of the certificate you want and the ARN of * your private CA. The GetCertificate action retrieves the certificate in * the PEM format. You can use the following OpenSSL command to list the * certificate in text format and copy the hexadecimal serial number.

* openssl x509 -in file_path -text -noout

You can also * copy the serial number from the console or use the DescribeCertificate * action in the Certificate Manager API Reference.

*/ inline void SetCertificateSerial(Aws::String&& value) { m_certificateSerialHasBeenSet = true; m_certificateSerial = std::move(value); } /** *

Serial number of the certificate to be revoked. This must be in hexadecimal * format. You can retrieve the serial number by calling GetCertificate * with the Amazon Resource Name (ARN) of the certificate you want and the ARN of * your private CA. The GetCertificate action retrieves the certificate in * the PEM format. You can use the following OpenSSL command to list the * certificate in text format and copy the hexadecimal serial number.

* openssl x509 -in file_path -text -noout

You can also * copy the serial number from the console or use the DescribeCertificate * action in the Certificate Manager API Reference.

*/ inline void SetCertificateSerial(const char* value) { m_certificateSerialHasBeenSet = true; m_certificateSerial.assign(value); } /** *

Serial number of the certificate to be revoked. This must be in hexadecimal * format. You can retrieve the serial number by calling GetCertificate * with the Amazon Resource Name (ARN) of the certificate you want and the ARN of * your private CA. The GetCertificate action retrieves the certificate in * the PEM format. You can use the following OpenSSL command to list the * certificate in text format and copy the hexadecimal serial number.

* openssl x509 -in file_path -text -noout

You can also * copy the serial number from the console or use the DescribeCertificate * action in the Certificate Manager API Reference.

*/ inline RevokeCertificateRequest& WithCertificateSerial(const Aws::String& value) { SetCertificateSerial(value); return *this;} /** *

Serial number of the certificate to be revoked. This must be in hexadecimal * format. You can retrieve the serial number by calling GetCertificate * with the Amazon Resource Name (ARN) of the certificate you want and the ARN of * your private CA. The GetCertificate action retrieves the certificate in * the PEM format. You can use the following OpenSSL command to list the * certificate in text format and copy the hexadecimal serial number.

* openssl x509 -in file_path -text -noout

You can also * copy the serial number from the console or use the DescribeCertificate * action in the Certificate Manager API Reference.

*/ inline RevokeCertificateRequest& WithCertificateSerial(Aws::String&& value) { SetCertificateSerial(std::move(value)); return *this;} /** *

Serial number of the certificate to be revoked. This must be in hexadecimal * format. You can retrieve the serial number by calling GetCertificate * with the Amazon Resource Name (ARN) of the certificate you want and the ARN of * your private CA. The GetCertificate action retrieves the certificate in * the PEM format. You can use the following OpenSSL command to list the * certificate in text format and copy the hexadecimal serial number.

* openssl x509 -in file_path -text -noout

You can also * copy the serial number from the console or use the DescribeCertificate * action in the Certificate Manager API Reference.

*/ inline RevokeCertificateRequest& WithCertificateSerial(const char* value) { SetCertificateSerial(value); return *this;} /** *

Specifies why you revoked the certificate.

*/ inline const RevocationReason& GetRevocationReason() const{ return m_revocationReason; } /** *

Specifies why you revoked the certificate.

*/ inline bool RevocationReasonHasBeenSet() const { return m_revocationReasonHasBeenSet; } /** *

Specifies why you revoked the certificate.

*/ inline void SetRevocationReason(const RevocationReason& value) { m_revocationReasonHasBeenSet = true; m_revocationReason = value; } /** *

Specifies why you revoked the certificate.

*/ inline void SetRevocationReason(RevocationReason&& value) { m_revocationReasonHasBeenSet = true; m_revocationReason = std::move(value); } /** *

Specifies why you revoked the certificate.

*/ inline RevokeCertificateRequest& WithRevocationReason(const RevocationReason& value) { SetRevocationReason(value); return *this;} /** *

Specifies why you revoked the certificate.

*/ inline RevokeCertificateRequest& WithRevocationReason(RevocationReason&& value) { SetRevocationReason(std::move(value)); return *this;} private: Aws::String m_certificateAuthorityArn; bool m_certificateAuthorityArnHasBeenSet = false; Aws::String m_certificateSerial; bool m_certificateSerialHasBeenSet = false; RevocationReason m_revocationReason; bool m_revocationReasonHasBeenSet = false; }; } // namespace Model } // namespace ACMPCA } // namespace Aws