/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace ACMPCA { namespace Model { /** */ class CreateCertificateAuthorityRequest : public ACMPCARequest { public: AWS_ACMPCA_API CreateCertificateAuthorityRequest(); // 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 "CreateCertificateAuthority"; } AWS_ACMPCA_API Aws::String SerializePayload() const override; AWS_ACMPCA_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Name and bit size of the private key algorithm, the name of the signing * algorithm, and X.500 certificate subject information.

*/ inline const CertificateAuthorityConfiguration& GetCertificateAuthorityConfiguration() const{ return m_certificateAuthorityConfiguration; } /** *

Name and bit size of the private key algorithm, the name of the signing * algorithm, and X.500 certificate subject information.

*/ inline bool CertificateAuthorityConfigurationHasBeenSet() const { return m_certificateAuthorityConfigurationHasBeenSet; } /** *

Name and bit size of the private key algorithm, the name of the signing * algorithm, and X.500 certificate subject information.

*/ inline void SetCertificateAuthorityConfiguration(const CertificateAuthorityConfiguration& value) { m_certificateAuthorityConfigurationHasBeenSet = true; m_certificateAuthorityConfiguration = value; } /** *

Name and bit size of the private key algorithm, the name of the signing * algorithm, and X.500 certificate subject information.

*/ inline void SetCertificateAuthorityConfiguration(CertificateAuthorityConfiguration&& value) { m_certificateAuthorityConfigurationHasBeenSet = true; m_certificateAuthorityConfiguration = std::move(value); } /** *

Name and bit size of the private key algorithm, the name of the signing * algorithm, and X.500 certificate subject information.

*/ inline CreateCertificateAuthorityRequest& WithCertificateAuthorityConfiguration(const CertificateAuthorityConfiguration& value) { SetCertificateAuthorityConfiguration(value); return *this;} /** *

Name and bit size of the private key algorithm, the name of the signing * algorithm, and X.500 certificate subject information.

*/ inline CreateCertificateAuthorityRequest& WithCertificateAuthorityConfiguration(CertificateAuthorityConfiguration&& value) { SetCertificateAuthorityConfiguration(std::move(value)); return *this;} /** *

Contains information to enable Online Certificate Status Protocol (OCSP) * support, to enable a certificate revocation list (CRL), to enable both, or to * enable neither. The default is for both certificate validation mechanisms to be * disabled.

The following requirements apply to revocation * configurations.

  • A configuration disabling CRLs or OCSP must * contain only the Enabled=False parameter, and will fail if other * parameters such as CustomCname or ExpirationInDays are * included.

  • In a CRL configuration, the * S3BucketName parameter must conform to Amazon * S3 bucket naming rules.

  • A configuration containing a * custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396 restrictions on the use * of special characters in a CNAME.

  • In a CRL or OCSP * configuration, the value of a CNAME parameter must not include a protocol prefix * such as "http://" or "https://".

For more * information, see the OcspConfiguration * and CrlConfiguration * types.

*/ inline const RevocationConfiguration& GetRevocationConfiguration() const{ return m_revocationConfiguration; } /** *

Contains information to enable Online Certificate Status Protocol (OCSP) * support, to enable a certificate revocation list (CRL), to enable both, or to * enable neither. The default is for both certificate validation mechanisms to be * disabled.

The following requirements apply to revocation * configurations.

  • A configuration disabling CRLs or OCSP must * contain only the Enabled=False parameter, and will fail if other * parameters such as CustomCname or ExpirationInDays are * included.

  • In a CRL configuration, the * S3BucketName parameter must conform to Amazon * S3 bucket naming rules.

  • A configuration containing a * custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396 restrictions on the use * of special characters in a CNAME.

  • In a CRL or OCSP * configuration, the value of a CNAME parameter must not include a protocol prefix * such as "http://" or "https://".

For more * information, see the OcspConfiguration * and CrlConfiguration * types.

*/ inline bool RevocationConfigurationHasBeenSet() const { return m_revocationConfigurationHasBeenSet; } /** *

Contains information to enable Online Certificate Status Protocol (OCSP) * support, to enable a certificate revocation list (CRL), to enable both, or to * enable neither. The default is for both certificate validation mechanisms to be * disabled.

The following requirements apply to revocation * configurations.

  • A configuration disabling CRLs or OCSP must * contain only the Enabled=False parameter, and will fail if other * parameters such as CustomCname or ExpirationInDays are * included.

  • In a CRL configuration, the * S3BucketName parameter must conform to Amazon * S3 bucket naming rules.

  • A configuration containing a * custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396 restrictions on the use * of special characters in a CNAME.

  • In a CRL or OCSP * configuration, the value of a CNAME parameter must not include a protocol prefix * such as "http://" or "https://".

For more * information, see the OcspConfiguration * and CrlConfiguration * types.

*/ inline void SetRevocationConfiguration(const RevocationConfiguration& value) { m_revocationConfigurationHasBeenSet = true; m_revocationConfiguration = value; } /** *

Contains information to enable Online Certificate Status Protocol (OCSP) * support, to enable a certificate revocation list (CRL), to enable both, or to * enable neither. The default is for both certificate validation mechanisms to be * disabled.

The following requirements apply to revocation * configurations.

  • A configuration disabling CRLs or OCSP must * contain only the Enabled=False parameter, and will fail if other * parameters such as CustomCname or ExpirationInDays are * included.

  • In a CRL configuration, the * S3BucketName parameter must conform to Amazon * S3 bucket naming rules.

  • A configuration containing a * custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396 restrictions on the use * of special characters in a CNAME.

  • In a CRL or OCSP * configuration, the value of a CNAME parameter must not include a protocol prefix * such as "http://" or "https://".

For more * information, see the OcspConfiguration * and CrlConfiguration * types.

*/ inline void SetRevocationConfiguration(RevocationConfiguration&& value) { m_revocationConfigurationHasBeenSet = true; m_revocationConfiguration = std::move(value); } /** *

Contains information to enable Online Certificate Status Protocol (OCSP) * support, to enable a certificate revocation list (CRL), to enable both, or to * enable neither. The default is for both certificate validation mechanisms to be * disabled.

The following requirements apply to revocation * configurations.

  • A configuration disabling CRLs or OCSP must * contain only the Enabled=False parameter, and will fail if other * parameters such as CustomCname or ExpirationInDays are * included.

  • In a CRL configuration, the * S3BucketName parameter must conform to Amazon * S3 bucket naming rules.

  • A configuration containing a * custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396 restrictions on the use * of special characters in a CNAME.

  • In a CRL or OCSP * configuration, the value of a CNAME parameter must not include a protocol prefix * such as "http://" or "https://".

For more * information, see the OcspConfiguration * and CrlConfiguration * types.

*/ inline CreateCertificateAuthorityRequest& WithRevocationConfiguration(const RevocationConfiguration& value) { SetRevocationConfiguration(value); return *this;} /** *

Contains information to enable Online Certificate Status Protocol (OCSP) * support, to enable a certificate revocation list (CRL), to enable both, or to * enable neither. The default is for both certificate validation mechanisms to be * disabled.

The following requirements apply to revocation * configurations.

  • A configuration disabling CRLs or OCSP must * contain only the Enabled=False parameter, and will fail if other * parameters such as CustomCname or ExpirationInDays are * included.

  • In a CRL configuration, the * S3BucketName parameter must conform to Amazon * S3 bucket naming rules.

  • A configuration containing a * custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396 restrictions on the use * of special characters in a CNAME.

  • In a CRL or OCSP * configuration, the value of a CNAME parameter must not include a protocol prefix * such as "http://" or "https://".

For more * information, see the OcspConfiguration * and CrlConfiguration * types.

*/ inline CreateCertificateAuthorityRequest& WithRevocationConfiguration(RevocationConfiguration&& value) { SetRevocationConfiguration(std::move(value)); return *this;} /** *

The type of the certificate authority.

*/ inline const CertificateAuthorityType& GetCertificateAuthorityType() const{ return m_certificateAuthorityType; } /** *

The type of the certificate authority.

*/ inline bool CertificateAuthorityTypeHasBeenSet() const { return m_certificateAuthorityTypeHasBeenSet; } /** *

The type of the certificate authority.

*/ inline void SetCertificateAuthorityType(const CertificateAuthorityType& value) { m_certificateAuthorityTypeHasBeenSet = true; m_certificateAuthorityType = value; } /** *

The type of the certificate authority.

*/ inline void SetCertificateAuthorityType(CertificateAuthorityType&& value) { m_certificateAuthorityTypeHasBeenSet = true; m_certificateAuthorityType = std::move(value); } /** *

The type of the certificate authority.

*/ inline CreateCertificateAuthorityRequest& WithCertificateAuthorityType(const CertificateAuthorityType& value) { SetCertificateAuthorityType(value); return *this;} /** *

The type of the certificate authority.

*/ inline CreateCertificateAuthorityRequest& WithCertificateAuthorityType(CertificateAuthorityType&& value) { SetCertificateAuthorityType(std::move(value)); return *this;} /** *

Custom string that can be used to distinguish between calls to the * CreateCertificateAuthority action. Idempotency tokens for * CreateCertificateAuthority time out after five minutes. Therefore, if you * call CreateCertificateAuthority multiple times with the same idempotency * token within five minutes, Amazon Web Services Private CA recognizes that you * are requesting only certificate authority and will issue only one. If you change * the idempotency token for each call, Amazon Web Services Private CA recognizes * that you are requesting multiple certificate authorities.

*/ inline const Aws::String& GetIdempotencyToken() const{ return m_idempotencyToken; } /** *

Custom string that can be used to distinguish between calls to the * CreateCertificateAuthority action. Idempotency tokens for * CreateCertificateAuthority time out after five minutes. Therefore, if you * call CreateCertificateAuthority multiple times with the same idempotency * token within five minutes, Amazon Web Services Private CA recognizes that you * are requesting only certificate authority and will issue only one. If you change * the idempotency token for each call, Amazon Web Services Private CA recognizes * that you are requesting multiple certificate authorities.

*/ inline bool IdempotencyTokenHasBeenSet() const { return m_idempotencyTokenHasBeenSet; } /** *

Custom string that can be used to distinguish between calls to the * CreateCertificateAuthority action. Idempotency tokens for * CreateCertificateAuthority time out after five minutes. Therefore, if you * call CreateCertificateAuthority multiple times with the same idempotency * token within five minutes, Amazon Web Services Private CA recognizes that you * are requesting only certificate authority and will issue only one. If you change * the idempotency token for each call, Amazon Web Services Private CA recognizes * that you are requesting multiple certificate authorities.

*/ inline void SetIdempotencyToken(const Aws::String& value) { m_idempotencyTokenHasBeenSet = true; m_idempotencyToken = value; } /** *

Custom string that can be used to distinguish between calls to the * CreateCertificateAuthority action. Idempotency tokens for * CreateCertificateAuthority time out after five minutes. Therefore, if you * call CreateCertificateAuthority multiple times with the same idempotency * token within five minutes, Amazon Web Services Private CA recognizes that you * are requesting only certificate authority and will issue only one. If you change * the idempotency token for each call, Amazon Web Services Private CA recognizes * that you are requesting multiple certificate authorities.

*/ inline void SetIdempotencyToken(Aws::String&& value) { m_idempotencyTokenHasBeenSet = true; m_idempotencyToken = std::move(value); } /** *

Custom string that can be used to distinguish between calls to the * CreateCertificateAuthority action. Idempotency tokens for * CreateCertificateAuthority time out after five minutes. Therefore, if you * call CreateCertificateAuthority multiple times with the same idempotency * token within five minutes, Amazon Web Services Private CA recognizes that you * are requesting only certificate authority and will issue only one. If you change * the idempotency token for each call, Amazon Web Services Private CA recognizes * that you are requesting multiple certificate authorities.

*/ inline void SetIdempotencyToken(const char* value) { m_idempotencyTokenHasBeenSet = true; m_idempotencyToken.assign(value); } /** *

Custom string that can be used to distinguish between calls to the * CreateCertificateAuthority action. Idempotency tokens for * CreateCertificateAuthority time out after five minutes. Therefore, if you * call CreateCertificateAuthority multiple times with the same idempotency * token within five minutes, Amazon Web Services Private CA recognizes that you * are requesting only certificate authority and will issue only one. If you change * the idempotency token for each call, Amazon Web Services Private CA recognizes * that you are requesting multiple certificate authorities.

*/ inline CreateCertificateAuthorityRequest& WithIdempotencyToken(const Aws::String& value) { SetIdempotencyToken(value); return *this;} /** *

Custom string that can be used to distinguish between calls to the * CreateCertificateAuthority action. Idempotency tokens for * CreateCertificateAuthority time out after five minutes. Therefore, if you * call CreateCertificateAuthority multiple times with the same idempotency * token within five minutes, Amazon Web Services Private CA recognizes that you * are requesting only certificate authority and will issue only one. If you change * the idempotency token for each call, Amazon Web Services Private CA recognizes * that you are requesting multiple certificate authorities.

*/ inline CreateCertificateAuthorityRequest& WithIdempotencyToken(Aws::String&& value) { SetIdempotencyToken(std::move(value)); return *this;} /** *

Custom string that can be used to distinguish between calls to the * CreateCertificateAuthority action. Idempotency tokens for * CreateCertificateAuthority time out after five minutes. Therefore, if you * call CreateCertificateAuthority multiple times with the same idempotency * token within five minutes, Amazon Web Services Private CA recognizes that you * are requesting only certificate authority and will issue only one. If you change * the idempotency token for each call, Amazon Web Services Private CA recognizes * that you are requesting multiple certificate authorities.

*/ inline CreateCertificateAuthorityRequest& WithIdempotencyToken(const char* value) { SetIdempotencyToken(value); return *this;} /** *

Specifies a cryptographic key management compliance standard used for * handling CA keys.

Default: FIPS_140_2_LEVEL_3_OR_HIGHER

*

Some Amazon Web Services Regions do not support the default. When creating a * CA in these Regions, you must provide FIPS_140_2_LEVEL_2_OR_HIGHER * as the argument for KeyStorageSecurityStandard. Failure to do this * results in an InvalidArgsException with the message, "A certificate * authority cannot be created in this region with the specified security * standard."

For information about security standard support in various * Regions, see Storage * and security compliance of Amazon Web Services Private CA private keys.

* */ inline const KeyStorageSecurityStandard& GetKeyStorageSecurityStandard() const{ return m_keyStorageSecurityStandard; } /** *

Specifies a cryptographic key management compliance standard used for * handling CA keys.

Default: FIPS_140_2_LEVEL_3_OR_HIGHER

*

Some Amazon Web Services Regions do not support the default. When creating a * CA in these Regions, you must provide FIPS_140_2_LEVEL_2_OR_HIGHER * as the argument for KeyStorageSecurityStandard. Failure to do this * results in an InvalidArgsException with the message, "A certificate * authority cannot be created in this region with the specified security * standard."

For information about security standard support in various * Regions, see Storage * and security compliance of Amazon Web Services Private CA private keys.

* */ inline bool KeyStorageSecurityStandardHasBeenSet() const { return m_keyStorageSecurityStandardHasBeenSet; } /** *

Specifies a cryptographic key management compliance standard used for * handling CA keys.

Default: FIPS_140_2_LEVEL_3_OR_HIGHER

*

Some Amazon Web Services Regions do not support the default. When creating a * CA in these Regions, you must provide FIPS_140_2_LEVEL_2_OR_HIGHER * as the argument for KeyStorageSecurityStandard. Failure to do this * results in an InvalidArgsException with the message, "A certificate * authority cannot be created in this region with the specified security * standard."

For information about security standard support in various * Regions, see Storage * and security compliance of Amazon Web Services Private CA private keys.

* */ inline void SetKeyStorageSecurityStandard(const KeyStorageSecurityStandard& value) { m_keyStorageSecurityStandardHasBeenSet = true; m_keyStorageSecurityStandard = value; } /** *

Specifies a cryptographic key management compliance standard used for * handling CA keys.

Default: FIPS_140_2_LEVEL_3_OR_HIGHER

*

Some Amazon Web Services Regions do not support the default. When creating a * CA in these Regions, you must provide FIPS_140_2_LEVEL_2_OR_HIGHER * as the argument for KeyStorageSecurityStandard. Failure to do this * results in an InvalidArgsException with the message, "A certificate * authority cannot be created in this region with the specified security * standard."

For information about security standard support in various * Regions, see Storage * and security compliance of Amazon Web Services Private CA private keys.

* */ inline void SetKeyStorageSecurityStandard(KeyStorageSecurityStandard&& value) { m_keyStorageSecurityStandardHasBeenSet = true; m_keyStorageSecurityStandard = std::move(value); } /** *

Specifies a cryptographic key management compliance standard used for * handling CA keys.

Default: FIPS_140_2_LEVEL_3_OR_HIGHER

*

Some Amazon Web Services Regions do not support the default. When creating a * CA in these Regions, you must provide FIPS_140_2_LEVEL_2_OR_HIGHER * as the argument for KeyStorageSecurityStandard. Failure to do this * results in an InvalidArgsException with the message, "A certificate * authority cannot be created in this region with the specified security * standard."

For information about security standard support in various * Regions, see Storage * and security compliance of Amazon Web Services Private CA private keys.

* */ inline CreateCertificateAuthorityRequest& WithKeyStorageSecurityStandard(const KeyStorageSecurityStandard& value) { SetKeyStorageSecurityStandard(value); return *this;} /** *

Specifies a cryptographic key management compliance standard used for * handling CA keys.

Default: FIPS_140_2_LEVEL_3_OR_HIGHER

*

Some Amazon Web Services Regions do not support the default. When creating a * CA in these Regions, you must provide FIPS_140_2_LEVEL_2_OR_HIGHER * as the argument for KeyStorageSecurityStandard. Failure to do this * results in an InvalidArgsException with the message, "A certificate * authority cannot be created in this region with the specified security * standard."

For information about security standard support in various * Regions, see Storage * and security compliance of Amazon Web Services Private CA private keys.

* */ inline CreateCertificateAuthorityRequest& WithKeyStorageSecurityStandard(KeyStorageSecurityStandard&& value) { SetKeyStorageSecurityStandard(std::move(value)); return *this;} /** *

Key-value pairs that will be attached to the new private CA. You can * associate up to 50 tags with a private CA. For information using tags with IAM * to manage permissions, see Controlling * Access Using IAM Tags.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

Key-value pairs that will be attached to the new private CA. You can * associate up to 50 tags with a private CA. For information using tags with IAM * to manage permissions, see Controlling * Access Using IAM Tags.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

Key-value pairs that will be attached to the new private CA. You can * associate up to 50 tags with a private CA. For information using tags with IAM * to manage permissions, see Controlling * Access Using IAM Tags.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

Key-value pairs that will be attached to the new private CA. You can * associate up to 50 tags with a private CA. For information using tags with IAM * to manage permissions, see Controlling * Access Using IAM Tags.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

Key-value pairs that will be attached to the new private CA. You can * associate up to 50 tags with a private CA. For information using tags with IAM * to manage permissions, see Controlling * Access Using IAM Tags.

*/ inline CreateCertificateAuthorityRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

Key-value pairs that will be attached to the new private CA. You can * associate up to 50 tags with a private CA. For information using tags with IAM * to manage permissions, see Controlling * Access Using IAM Tags.

*/ inline CreateCertificateAuthorityRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

Key-value pairs that will be attached to the new private CA. You can * associate up to 50 tags with a private CA. For information using tags with IAM * to manage permissions, see Controlling * Access Using IAM Tags.

*/ inline CreateCertificateAuthorityRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

Key-value pairs that will be attached to the new private CA. You can * associate up to 50 tags with a private CA. For information using tags with IAM * to manage permissions, see Controlling * Access Using IAM Tags.

*/ inline CreateCertificateAuthorityRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

Specifies whether the CA issues general-purpose certificates that typically * require a revocation mechanism, or short-lived certificates that may optionally * omit revocation because they expire quickly. Short-lived certificate validity is * limited to seven days.

The default value is GENERAL_PURPOSE.

*/ inline const CertificateAuthorityUsageMode& GetUsageMode() const{ return m_usageMode; } /** *

Specifies whether the CA issues general-purpose certificates that typically * require a revocation mechanism, or short-lived certificates that may optionally * omit revocation because they expire quickly. Short-lived certificate validity is * limited to seven days.

The default value is GENERAL_PURPOSE.

*/ inline bool UsageModeHasBeenSet() const { return m_usageModeHasBeenSet; } /** *

Specifies whether the CA issues general-purpose certificates that typically * require a revocation mechanism, or short-lived certificates that may optionally * omit revocation because they expire quickly. Short-lived certificate validity is * limited to seven days.

The default value is GENERAL_PURPOSE.

*/ inline void SetUsageMode(const CertificateAuthorityUsageMode& value) { m_usageModeHasBeenSet = true; m_usageMode = value; } /** *

Specifies whether the CA issues general-purpose certificates that typically * require a revocation mechanism, or short-lived certificates that may optionally * omit revocation because they expire quickly. Short-lived certificate validity is * limited to seven days.

The default value is GENERAL_PURPOSE.

*/ inline void SetUsageMode(CertificateAuthorityUsageMode&& value) { m_usageModeHasBeenSet = true; m_usageMode = std::move(value); } /** *

Specifies whether the CA issues general-purpose certificates that typically * require a revocation mechanism, or short-lived certificates that may optionally * omit revocation because they expire quickly. Short-lived certificate validity is * limited to seven days.

The default value is GENERAL_PURPOSE.

*/ inline CreateCertificateAuthorityRequest& WithUsageMode(const CertificateAuthorityUsageMode& value) { SetUsageMode(value); return *this;} /** *

Specifies whether the CA issues general-purpose certificates that typically * require a revocation mechanism, or short-lived certificates that may optionally * omit revocation because they expire quickly. Short-lived certificate validity is * limited to seven days.

The default value is GENERAL_PURPOSE.

*/ inline CreateCertificateAuthorityRequest& WithUsageMode(CertificateAuthorityUsageMode&& value) { SetUsageMode(std::move(value)); return *this;} private: CertificateAuthorityConfiguration m_certificateAuthorityConfiguration; bool m_certificateAuthorityConfigurationHasBeenSet = false; RevocationConfiguration m_revocationConfiguration; bool m_revocationConfigurationHasBeenSet = false; CertificateAuthorityType m_certificateAuthorityType; bool m_certificateAuthorityTypeHasBeenSet = false; Aws::String m_idempotencyToken; bool m_idempotencyTokenHasBeenSet = false; KeyStorageSecurityStandard m_keyStorageSecurityStandard; bool m_keyStorageSecurityStandardHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; CertificateAuthorityUsageMode m_usageMode; bool m_usageModeHasBeenSet = false; }; } // namespace Model } // namespace ACMPCA } // namespace Aws