io.cloudshiftdev.awscdk.services.iot.CfnCertificateProps.kt Maven / Gradle / Ivy
The newest version!
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package io.cloudshiftdev.awscdk.services.iot
import io.cloudshiftdev.awscdk.common.CdkDslMarker
import io.cloudshiftdev.awscdk.common.CdkObject
import io.cloudshiftdev.awscdk.common.CdkObjectWrappers
import kotlin.String
import kotlin.Unit
/**
* Properties for defining a `CfnCertificate`.
*
* Example:
*
* ```
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import io.cloudshiftdev.awscdk.services.iot.*;
* CfnCertificateProps cfnCertificateProps = CfnCertificateProps.builder()
* .status("status")
* // the properties below are optional
* .caCertificatePem("caCertificatePem")
* .certificateMode("certificateMode")
* .certificatePem("certificatePem")
* .certificateSigningRequest("certificateSigningRequest")
* .build();
* ```
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html)
*/
public interface CfnCertificateProps {
/**
* The CA certificate used to sign the device certificate being registered, not available when
* CertificateMode is SNI_ONLY.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html#cfn-iot-certificate-cacertificatepem)
*/
public fun caCertificatePem(): String? = unwrap(this).getCaCertificatePem()
/**
* Specifies which mode of certificate registration to use with this resource.
*
* Valid options are DEFAULT with CaCertificatePem and CertificatePem, SNI_ONLY with
* CertificatePem, and Default with CertificateSigningRequest.
*
* `DEFAULT` : A certificate in `DEFAULT` mode is either generated by AWS IoT Core or registered
* with an issuer certificate authority (CA). Devices with certificates in `DEFAULT` mode aren't
* required to send the Server Name Indication (SNI) extension when connecting to AWS IoT Core .
* However, to use features such as custom domains and VPC endpoints, we recommend that you use the
* SNI extension when connecting to AWS IoT Core .
*
* `SNI_ONLY` : A certificate in `SNI_ONLY` mode is registered without an issuer CA. Devices with
* certificates in `SNI_ONLY` mode must send the SNI extension when connecting to AWS IoT Core .
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html#cfn-iot-certificate-certificatemode)
*/
public fun certificateMode(): String? = unwrap(this).getCertificateMode()
/**
* The certificate data in PEM format.
*
* Requires SNI_ONLY for the certificate mode or the accompanying CACertificatePem for
* registration.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html#cfn-iot-certificate-certificatepem)
*/
public fun certificatePem(): String? = unwrap(this).getCertificatePem()
/**
* The certificate signing request (CSR).
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html#cfn-iot-certificate-certificatesigningrequest)
*/
public fun certificateSigningRequest(): String? = unwrap(this).getCertificateSigningRequest()
/**
* The status of the certificate.
*
* Valid values are ACTIVE, INACTIVE, REVOKED, PENDING_TRANSFER, and PENDING_ACTIVATION.
*
* The status value REGISTER_INACTIVE is deprecated and should not be used.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html#cfn-iot-certificate-status)
*/
public fun status(): String
/**
* A builder for [CfnCertificateProps]
*/
@CdkDslMarker
public interface Builder {
/**
* @param caCertificatePem The CA certificate used to sign the device certificate being
* registered, not available when CertificateMode is SNI_ONLY.
*/
public fun caCertificatePem(caCertificatePem: String)
/**
* @param certificateMode Specifies which mode of certificate registration to use with this
* resource.
* Valid options are DEFAULT with CaCertificatePem and CertificatePem, SNI_ONLY with
* CertificatePem, and Default with CertificateSigningRequest.
*
* `DEFAULT` : A certificate in `DEFAULT` mode is either generated by AWS IoT Core or registered
* with an issuer certificate authority (CA). Devices with certificates in `DEFAULT` mode aren't
* required to send the Server Name Indication (SNI) extension when connecting to AWS IoT Core .
* However, to use features such as custom domains and VPC endpoints, we recommend that you use the
* SNI extension when connecting to AWS IoT Core .
*
* `SNI_ONLY` : A certificate in `SNI_ONLY` mode is registered without an issuer CA. Devices
* with certificates in `SNI_ONLY` mode must send the SNI extension when connecting to AWS IoT Core
* .
*/
public fun certificateMode(certificateMode: String)
/**
* @param certificatePem The certificate data in PEM format.
* Requires SNI_ONLY for the certificate mode or the accompanying CACertificatePem for
* registration.
*/
public fun certificatePem(certificatePem: String)
/**
* @param certificateSigningRequest The certificate signing request (CSR).
*/
public fun certificateSigningRequest(certificateSigningRequest: String)
/**
* @param status The status of the certificate.
* Valid values are ACTIVE, INACTIVE, REVOKED, PENDING_TRANSFER, and PENDING_ACTIVATION.
*
* The status value REGISTER_INACTIVE is deprecated and should not be used.
*/
public fun status(status: String)
}
private class BuilderImpl : Builder {
private val cdkBuilder: software.amazon.awscdk.services.iot.CfnCertificateProps.Builder =
software.amazon.awscdk.services.iot.CfnCertificateProps.builder()
/**
* @param caCertificatePem The CA certificate used to sign the device certificate being
* registered, not available when CertificateMode is SNI_ONLY.
*/
override fun caCertificatePem(caCertificatePem: String) {
cdkBuilder.caCertificatePem(caCertificatePem)
}
/**
* @param certificateMode Specifies which mode of certificate registration to use with this
* resource.
* Valid options are DEFAULT with CaCertificatePem and CertificatePem, SNI_ONLY with
* CertificatePem, and Default with CertificateSigningRequest.
*
* `DEFAULT` : A certificate in `DEFAULT` mode is either generated by AWS IoT Core or registered
* with an issuer certificate authority (CA). Devices with certificates in `DEFAULT` mode aren't
* required to send the Server Name Indication (SNI) extension when connecting to AWS IoT Core .
* However, to use features such as custom domains and VPC endpoints, we recommend that you use the
* SNI extension when connecting to AWS IoT Core .
*
* `SNI_ONLY` : A certificate in `SNI_ONLY` mode is registered without an issuer CA. Devices
* with certificates in `SNI_ONLY` mode must send the SNI extension when connecting to AWS IoT Core
* .
*/
override fun certificateMode(certificateMode: String) {
cdkBuilder.certificateMode(certificateMode)
}
/**
* @param certificatePem The certificate data in PEM format.
* Requires SNI_ONLY for the certificate mode or the accompanying CACertificatePem for
* registration.
*/
override fun certificatePem(certificatePem: String) {
cdkBuilder.certificatePem(certificatePem)
}
/**
* @param certificateSigningRequest The certificate signing request (CSR).
*/
override fun certificateSigningRequest(certificateSigningRequest: String) {
cdkBuilder.certificateSigningRequest(certificateSigningRequest)
}
/**
* @param status The status of the certificate.
* Valid values are ACTIVE, INACTIVE, REVOKED, PENDING_TRANSFER, and PENDING_ACTIVATION.
*
* The status value REGISTER_INACTIVE is deprecated and should not be used.
*/
override fun status(status: String) {
cdkBuilder.status(status)
}
public fun build(): software.amazon.awscdk.services.iot.CfnCertificateProps = cdkBuilder.build()
}
private class Wrapper(
cdkObject: software.amazon.awscdk.services.iot.CfnCertificateProps,
) : CdkObject(cdkObject),
CfnCertificateProps {
/**
* The CA certificate used to sign the device certificate being registered, not available when
* CertificateMode is SNI_ONLY.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html#cfn-iot-certificate-cacertificatepem)
*/
override fun caCertificatePem(): String? = unwrap(this).getCaCertificatePem()
/**
* Specifies which mode of certificate registration to use with this resource.
*
* Valid options are DEFAULT with CaCertificatePem and CertificatePem, SNI_ONLY with
* CertificatePem, and Default with CertificateSigningRequest.
*
* `DEFAULT` : A certificate in `DEFAULT` mode is either generated by AWS IoT Core or registered
* with an issuer certificate authority (CA). Devices with certificates in `DEFAULT` mode aren't
* required to send the Server Name Indication (SNI) extension when connecting to AWS IoT Core .
* However, to use features such as custom domains and VPC endpoints, we recommend that you use the
* SNI extension when connecting to AWS IoT Core .
*
* `SNI_ONLY` : A certificate in `SNI_ONLY` mode is registered without an issuer CA. Devices
* with certificates in `SNI_ONLY` mode must send the SNI extension when connecting to AWS IoT Core
* .
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html#cfn-iot-certificate-certificatemode)
*/
override fun certificateMode(): String? = unwrap(this).getCertificateMode()
/**
* The certificate data in PEM format.
*
* Requires SNI_ONLY for the certificate mode or the accompanying CACertificatePem for
* registration.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html#cfn-iot-certificate-certificatepem)
*/
override fun certificatePem(): String? = unwrap(this).getCertificatePem()
/**
* The certificate signing request (CSR).
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html#cfn-iot-certificate-certificatesigningrequest)
*/
override fun certificateSigningRequest(): String? = unwrap(this).getCertificateSigningRequest()
/**
* The status of the certificate.
*
* Valid values are ACTIVE, INACTIVE, REVOKED, PENDING_TRANSFER, and PENDING_ACTIVATION.
*
* The status value REGISTER_INACTIVE is deprecated and should not be used.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-certificate.html#cfn-iot-certificate-status)
*/
override fun status(): String = unwrap(this).getStatus()
}
public companion object {
public operator fun invoke(block: Builder.() -> Unit = {}): CfnCertificateProps {
val builderImpl = BuilderImpl()
return Wrapper(builderImpl.apply(block).build())
}
internal fun wrap(cdkObject: software.amazon.awscdk.services.iot.CfnCertificateProps):
CfnCertificateProps = CdkObjectWrappers.wrap(cdkObject) as? CfnCertificateProps ?:
Wrapper(cdkObject)
internal fun unwrap(wrapped: CfnCertificateProps):
software.amazon.awscdk.services.iot.CfnCertificateProps = (wrapped as CdkObject).cdkObject
as software.amazon.awscdk.services.iot.CfnCertificateProps
}
}