
software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration Maven / Gradle / Ivy
package software.amazon.awscdk.services.iot;
/**
* A CloudFormation `AWS::IoT::AccountAuditConfiguration`.
*
* Use the AWS::IoT::AccountAuditConfiguration
resource to configure or reconfigure the Device Defender audit settings for your account. Settings include how audit notifications are sent and which audit checks are enabled or disabled. For API reference, see UpdateAccountAuditConfiguration and for detailed information on all available audit checks, see Audit checks .
*
* Example:
*
*
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.services.iot.*;
* CfnAccountAuditConfiguration cfnAccountAuditConfiguration = CfnAccountAuditConfiguration.Builder.create(this, "MyCfnAccountAuditConfiguration")
* .accountId("accountId")
* .auditCheckConfigurations(AuditCheckConfigurationsProperty.builder()
* .authenticatedCognitoRoleOverlyPermissiveCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .caCertificateExpiringCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .caCertificateKeyQualityCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .conflictingClientIdsCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .deviceCertificateExpiringCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .deviceCertificateKeyQualityCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .deviceCertificateSharedCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .iotPolicyOverlyPermissiveCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .iotRoleAliasAllowsAccessToUnusedServicesCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .iotRoleAliasOverlyPermissiveCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .loggingDisabledCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .revokedCaCertificateStillActiveCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .revokedDeviceCertificateStillActiveCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .unauthenticatedCognitoRoleOverlyPermissiveCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .build())
* .roleArn("roleArn")
* // the properties below are optional
* .auditNotificationTargetConfigurations(AuditNotificationTargetConfigurationsProperty.builder()
* .sns(AuditNotificationTargetProperty.builder()
* .enabled(false)
* .roleArn("roleArn")
* .targetArn("targetArn")
* .build())
* .build())
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.50.0 (build d1830a4)", date = "2022-01-11T17:58:41.997Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.iot.$Module.class, fqn = "@aws-cdk/aws-iot.CfnAccountAuditConfiguration")
public class CfnAccountAuditConfiguration extends software.amazon.awscdk.core.CfnResource implements software.amazon.awscdk.core.IInspectable {
protected CfnAccountAuditConfiguration(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CfnAccountAuditConfiguration(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
CFN_RESOURCE_TYPE_NAME = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.class, "CFN_RESOURCE_TYPE_NAME", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Create a new `AWS::IoT::AccountAuditConfiguration`.
*
* @param scope - scope in which this resource is defined. This parameter is required.
* @param id - scoped id of the resource. This parameter is required.
* @param props - resource properties. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public CfnAccountAuditConfiguration(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iot.CfnAccountAuditConfigurationProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* Examines the CloudFormation resource and discloses attributes.
*
* @param inspector - tree inspector to collect and process attributes. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public void inspect(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.TreeInspector inspector) {
software.amazon.jsii.Kernel.call(this, "inspect", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(inspector, "inspector is required") });
}
/**
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
protected @org.jetbrains.annotations.NotNull java.util.Map renderProperties(final @org.jetbrains.annotations.NotNull java.util.Map props) {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "renderProperties", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)), new Object[] { java.util.Objects.requireNonNull(props, "props is required") }));
}
/**
* The CloudFormation resource type name for this resource class.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static java.lang.String CFN_RESOURCE_TYPE_NAME;
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
protected @org.jetbrains.annotations.NotNull java.util.Map getCfnProperties() {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "cfnProperties", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))));
}
/**
* The ID of the account.
*
* You can use the expression !Sub "${AWS::AccountId}"
to use your account ID.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAccountId() {
return software.amazon.jsii.Kernel.get(this, "accountId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* The ID of the account.
*
* You can use the expression !Sub "${AWS::AccountId}"
to use your account ID.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setAccountId(final @org.jetbrains.annotations.NotNull java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "accountId", java.util.Objects.requireNonNull(value, "accountId is required"));
}
/**
* Specifies which audit checks are enabled and disabled for this account.
*
* Some data collection might start immediately when certain checks are enabled. When a check is disabled, any data collected so far in relation to the check is deleted. To disable a check, set the value of the Enabled:
key to false
.
*
* If an enabled check is removed from the template, it will also be disabled.
*
* You can't disable a check if it's used by any scheduled audit. You must delete the check from the scheduled audit or delete the scheduled audit itself to disable the check.
*
* For more information on avialbe auidt checks see AWS::IoT::AccountAuditConfiguration AuditCheckConfigurations
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.Object getAuditCheckConfigurations() {
return software.amazon.jsii.Kernel.get(this, "auditCheckConfigurations", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
* Specifies which audit checks are enabled and disabled for this account.
*
* Some data collection might start immediately when certain checks are enabled. When a check is disabled, any data collected so far in relation to the check is deleted. To disable a check, set the value of the Enabled:
key to false
.
*
* If an enabled check is removed from the template, it will also be disabled.
*
* You can't disable a check if it's used by any scheduled audit. You must delete the check from the scheduled audit or delete the scheduled audit itself to disable the check.
*
* For more information on avialbe auidt checks see AWS::IoT::AccountAuditConfiguration AuditCheckConfigurations
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setAuditCheckConfigurations(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.IResolvable value) {
software.amazon.jsii.Kernel.set(this, "auditCheckConfigurations", java.util.Objects.requireNonNull(value, "auditCheckConfigurations is required"));
}
/**
* Specifies which audit checks are enabled and disabled for this account.
*
* Some data collection might start immediately when certain checks are enabled. When a check is disabled, any data collected so far in relation to the check is deleted. To disable a check, set the value of the Enabled:
key to false
.
*
* If an enabled check is removed from the template, it will also be disabled.
*
* You can't disable a check if it's used by any scheduled audit. You must delete the check from the scheduled audit or delete the scheduled audit itself to disable the check.
*
* For more information on avialbe auidt checks see AWS::IoT::AccountAuditConfiguration AuditCheckConfigurations
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setAuditCheckConfigurations(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationsProperty value) {
software.amazon.jsii.Kernel.set(this, "auditCheckConfigurations", java.util.Objects.requireNonNull(value, "auditCheckConfigurations is required"));
}
/**
* The Amazon Resource Name (ARN) of the role that grants permission to AWS IoT to access information about your devices, policies, certificates, and other items as required when performing an audit.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getRoleArn() {
return software.amazon.jsii.Kernel.get(this, "roleArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* The Amazon Resource Name (ARN) of the role that grants permission to AWS IoT to access information about your devices, policies, certificates, and other items as required when performing an audit.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setRoleArn(final @org.jetbrains.annotations.NotNull java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "roleArn", java.util.Objects.requireNonNull(value, "roleArn is required"));
}
/**
* Information about the targets to which audit notifications are sent.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.Object getAuditNotificationTargetConfigurations() {
return software.amazon.jsii.Kernel.get(this, "auditNotificationTargetConfigurations", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
* Information about the targets to which audit notifications are sent.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setAuditNotificationTargetConfigurations(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.core.IResolvable value) {
software.amazon.jsii.Kernel.set(this, "auditNotificationTargetConfigurations", value);
}
/**
* Information about the targets to which audit notifications are sent.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setAuditNotificationTargetConfigurations(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditNotificationTargetConfigurationsProperty value) {
software.amazon.jsii.Kernel.set(this, "auditNotificationTargetConfigurations", value);
}
/**
* Which audit checks are enabled and disabled for this account.
*
* Example:
*
*
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.services.iot.*;
* AuditCheckConfigurationProperty auditCheckConfigurationProperty = AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build();
*
*/
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.iot.$Module.class, fqn = "@aws-cdk/aws-iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty")
@software.amazon.jsii.Jsii.Proxy(AuditCheckConfigurationProperty.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static interface AuditCheckConfigurationProperty extends software.amazon.jsii.JsiiSerializable {
/**
* True if this audit check is enabled for this account.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getEnabled() {
return null;
}
/**
* @return a {@link Builder} of {@link AuditCheckConfigurationProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link AuditCheckConfigurationProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Object enabled;
/**
* Sets the value of {@link AuditCheckConfigurationProperty#getEnabled}
* @param enabled True if this audit check is enabled for this account.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder enabled(java.lang.Boolean enabled) {
this.enabled = enabled;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationProperty#getEnabled}
* @param enabled True if this audit check is enabled for this account.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder enabled(software.amazon.awscdk.core.IResolvable enabled) {
this.enabled = enabled;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link AuditCheckConfigurationProperty}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public AuditCheckConfigurationProperty build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link AuditCheckConfigurationProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AuditCheckConfigurationProperty {
private final java.lang.Object enabled;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.enabled = software.amazon.jsii.Kernel.get(this, "enabled", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.enabled = builder.enabled;
}
@Override
public final java.lang.Object getEnabled() {
return this.enabled;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
if (this.getEnabled() != null) {
data.set("enabled", om.valueToTree(this.getEnabled()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AuditCheckConfigurationProperty.Jsii$Proxy that = (AuditCheckConfigurationProperty.Jsii$Proxy) o;
return this.enabled != null ? this.enabled.equals(that.enabled) : that.enabled == null;
}
@Override
public final int hashCode() {
int result = this.enabled != null ? this.enabled.hashCode() : 0;
return result;
}
}
}
/**
* The types of audit checks that can be performed.
*
* Example:
*
*
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.services.iot.*;
* AuditCheckConfigurationsProperty auditCheckConfigurationsProperty = AuditCheckConfigurationsProperty.builder()
* .authenticatedCognitoRoleOverlyPermissiveCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .caCertificateExpiringCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .caCertificateKeyQualityCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .conflictingClientIdsCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .deviceCertificateExpiringCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .deviceCertificateKeyQualityCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .deviceCertificateSharedCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .iotPolicyOverlyPermissiveCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .iotRoleAliasAllowsAccessToUnusedServicesCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .iotRoleAliasOverlyPermissiveCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .loggingDisabledCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .revokedCaCertificateStillActiveCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .revokedDeviceCertificateStillActiveCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .unauthenticatedCognitoRoleOverlyPermissiveCheck(AuditCheckConfigurationProperty.builder()
* .enabled(false)
* .build())
* .build();
*
*/
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.iot.$Module.class, fqn = "@aws-cdk/aws-iot.CfnAccountAuditConfiguration.AuditCheckConfigurationsProperty")
@software.amazon.jsii.Jsii.Proxy(AuditCheckConfigurationsProperty.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static interface AuditCheckConfigurationsProperty extends software.amazon.jsii.JsiiSerializable {
/**
* Checks the permissiveness of an authenticated Amazon Cognito identity pool role.
*
* For this check, AWS IoT Device Defender audits all Amazon Cognito identity pools that have been used to connect to the AWS IoT message broker during the 31 days before the audit is performed.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getAuthenticatedCognitoRoleOverlyPermissiveCheck() {
return null;
}
/**
* Checks if a CA certificate is expiring.
*
* This check applies to CA certificates expiring within 30 days or that have expired.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getCaCertificateExpiringCheck() {
return null;
}
/**
* Checks the quality of the CA certificate key.
*
* The quality checks if the key is in a valid format, not expired, and if the key meets a minimum required size. This check applies to CA certificates that are ACTIVE
or PENDING_TRANSFER
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getCaCertificateKeyQualityCheck() {
return null;
}
/**
* Checks if multiple devices connect using the same client ID.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getConflictingClientIdsCheck() {
return null;
}
/**
* Checks if a device certificate is expiring.
*
* This check applies to device certificates expiring within 30 days or that have expired.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getDeviceCertificateExpiringCheck() {
return null;
}
/**
* Checks the quality of the device certificate key.
*
* The quality checks if the key is in a valid format, not expired, signed by a registered certificate authority, and if the key meets a minimum required size.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getDeviceCertificateKeyQualityCheck() {
return null;
}
/**
* Checks if multiple concurrent connections use the same X.509 certificate to authenticate with AWS IoT .
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getDeviceCertificateSharedCheck() {
return null;
}
/**
* Checks the permissiveness of a policy attached to an authenticated Amazon Cognito identity pool role.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getIotPolicyOverlyPermissiveCheck() {
return null;
}
/**
* Checks if a role alias has access to services that haven't been used for the AWS IoT device in the last year.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getIotRoleAliasAllowsAccessToUnusedServicesCheck() {
return null;
}
/**
* Checks if the temporary credentials provided by AWS IoT role aliases are overly permissive.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getIotRoleAliasOverlyPermissiveCheck() {
return null;
}
/**
* Checks if AWS IoT logs are disabled.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getLoggingDisabledCheck() {
return null;
}
/**
* Checks if a revoked CA certificate is still active.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getRevokedCaCertificateStillActiveCheck() {
return null;
}
/**
* Checks if a revoked device certificate is still active.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getRevokedDeviceCertificateStillActiveCheck() {
return null;
}
/**
* Checks if policy attached to an unauthenticated Amazon Cognito identity pool role is too permissive.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getUnauthenticatedCognitoRoleOverlyPermissiveCheck() {
return null;
}
/**
* @return a {@link Builder} of {@link AuditCheckConfigurationsProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link AuditCheckConfigurationsProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Object authenticatedCognitoRoleOverlyPermissiveCheck;
java.lang.Object caCertificateExpiringCheck;
java.lang.Object caCertificateKeyQualityCheck;
java.lang.Object conflictingClientIdsCheck;
java.lang.Object deviceCertificateExpiringCheck;
java.lang.Object deviceCertificateKeyQualityCheck;
java.lang.Object deviceCertificateSharedCheck;
java.lang.Object iotPolicyOverlyPermissiveCheck;
java.lang.Object iotRoleAliasAllowsAccessToUnusedServicesCheck;
java.lang.Object iotRoleAliasOverlyPermissiveCheck;
java.lang.Object loggingDisabledCheck;
java.lang.Object revokedCaCertificateStillActiveCheck;
java.lang.Object revokedDeviceCertificateStillActiveCheck;
java.lang.Object unauthenticatedCognitoRoleOverlyPermissiveCheck;
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getAuthenticatedCognitoRoleOverlyPermissiveCheck}
* @param authenticatedCognitoRoleOverlyPermissiveCheck Checks the permissiveness of an authenticated Amazon Cognito identity pool role.
* For this check, AWS IoT Device Defender audits all Amazon Cognito identity pools that have been used to connect to the AWS IoT message broker during the 31 days before the audit is performed.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder authenticatedCognitoRoleOverlyPermissiveCheck(software.amazon.awscdk.core.IResolvable authenticatedCognitoRoleOverlyPermissiveCheck) {
this.authenticatedCognitoRoleOverlyPermissiveCheck = authenticatedCognitoRoleOverlyPermissiveCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getAuthenticatedCognitoRoleOverlyPermissiveCheck}
* @param authenticatedCognitoRoleOverlyPermissiveCheck Checks the permissiveness of an authenticated Amazon Cognito identity pool role.
* For this check, AWS IoT Device Defender audits all Amazon Cognito identity pools that have been used to connect to the AWS IoT message broker during the 31 days before the audit is performed.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder authenticatedCognitoRoleOverlyPermissiveCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty authenticatedCognitoRoleOverlyPermissiveCheck) {
this.authenticatedCognitoRoleOverlyPermissiveCheck = authenticatedCognitoRoleOverlyPermissiveCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getCaCertificateExpiringCheck}
* @param caCertificateExpiringCheck Checks if a CA certificate is expiring.
* This check applies to CA certificates expiring within 30 days or that have expired.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder caCertificateExpiringCheck(software.amazon.awscdk.core.IResolvable caCertificateExpiringCheck) {
this.caCertificateExpiringCheck = caCertificateExpiringCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getCaCertificateExpiringCheck}
* @param caCertificateExpiringCheck Checks if a CA certificate is expiring.
* This check applies to CA certificates expiring within 30 days or that have expired.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder caCertificateExpiringCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty caCertificateExpiringCheck) {
this.caCertificateExpiringCheck = caCertificateExpiringCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getCaCertificateKeyQualityCheck}
* @param caCertificateKeyQualityCheck Checks the quality of the CA certificate key.
* The quality checks if the key is in a valid format, not expired, and if the key meets a minimum required size. This check applies to CA certificates that are ACTIVE
or PENDING_TRANSFER
.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder caCertificateKeyQualityCheck(software.amazon.awscdk.core.IResolvable caCertificateKeyQualityCheck) {
this.caCertificateKeyQualityCheck = caCertificateKeyQualityCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getCaCertificateKeyQualityCheck}
* @param caCertificateKeyQualityCheck Checks the quality of the CA certificate key.
* The quality checks if the key is in a valid format, not expired, and if the key meets a minimum required size. This check applies to CA certificates that are ACTIVE
or PENDING_TRANSFER
.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder caCertificateKeyQualityCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty caCertificateKeyQualityCheck) {
this.caCertificateKeyQualityCheck = caCertificateKeyQualityCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getConflictingClientIdsCheck}
* @param conflictingClientIdsCheck Checks if multiple devices connect using the same client ID.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder conflictingClientIdsCheck(software.amazon.awscdk.core.IResolvable conflictingClientIdsCheck) {
this.conflictingClientIdsCheck = conflictingClientIdsCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getConflictingClientIdsCheck}
* @param conflictingClientIdsCheck Checks if multiple devices connect using the same client ID.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder conflictingClientIdsCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty conflictingClientIdsCheck) {
this.conflictingClientIdsCheck = conflictingClientIdsCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getDeviceCertificateExpiringCheck}
* @param deviceCertificateExpiringCheck Checks if a device certificate is expiring.
* This check applies to device certificates expiring within 30 days or that have expired.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder deviceCertificateExpiringCheck(software.amazon.awscdk.core.IResolvable deviceCertificateExpiringCheck) {
this.deviceCertificateExpiringCheck = deviceCertificateExpiringCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getDeviceCertificateExpiringCheck}
* @param deviceCertificateExpiringCheck Checks if a device certificate is expiring.
* This check applies to device certificates expiring within 30 days or that have expired.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder deviceCertificateExpiringCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty deviceCertificateExpiringCheck) {
this.deviceCertificateExpiringCheck = deviceCertificateExpiringCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getDeviceCertificateKeyQualityCheck}
* @param deviceCertificateKeyQualityCheck Checks the quality of the device certificate key.
* The quality checks if the key is in a valid format, not expired, signed by a registered certificate authority, and if the key meets a minimum required size.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder deviceCertificateKeyQualityCheck(software.amazon.awscdk.core.IResolvable deviceCertificateKeyQualityCheck) {
this.deviceCertificateKeyQualityCheck = deviceCertificateKeyQualityCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getDeviceCertificateKeyQualityCheck}
* @param deviceCertificateKeyQualityCheck Checks the quality of the device certificate key.
* The quality checks if the key is in a valid format, not expired, signed by a registered certificate authority, and if the key meets a minimum required size.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder deviceCertificateKeyQualityCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty deviceCertificateKeyQualityCheck) {
this.deviceCertificateKeyQualityCheck = deviceCertificateKeyQualityCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getDeviceCertificateSharedCheck}
* @param deviceCertificateSharedCheck Checks if multiple concurrent connections use the same X.509 certificate to authenticate with AWS IoT .
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder deviceCertificateSharedCheck(software.amazon.awscdk.core.IResolvable deviceCertificateSharedCheck) {
this.deviceCertificateSharedCheck = deviceCertificateSharedCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getDeviceCertificateSharedCheck}
* @param deviceCertificateSharedCheck Checks if multiple concurrent connections use the same X.509 certificate to authenticate with AWS IoT .
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder deviceCertificateSharedCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty deviceCertificateSharedCheck) {
this.deviceCertificateSharedCheck = deviceCertificateSharedCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getIotPolicyOverlyPermissiveCheck}
* @param iotPolicyOverlyPermissiveCheck Checks the permissiveness of a policy attached to an authenticated Amazon Cognito identity pool role.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder iotPolicyOverlyPermissiveCheck(software.amazon.awscdk.core.IResolvable iotPolicyOverlyPermissiveCheck) {
this.iotPolicyOverlyPermissiveCheck = iotPolicyOverlyPermissiveCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getIotPolicyOverlyPermissiveCheck}
* @param iotPolicyOverlyPermissiveCheck Checks the permissiveness of a policy attached to an authenticated Amazon Cognito identity pool role.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder iotPolicyOverlyPermissiveCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty iotPolicyOverlyPermissiveCheck) {
this.iotPolicyOverlyPermissiveCheck = iotPolicyOverlyPermissiveCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getIotRoleAliasAllowsAccessToUnusedServicesCheck}
* @param iotRoleAliasAllowsAccessToUnusedServicesCheck Checks if a role alias has access to services that haven't been used for the AWS IoT device in the last year.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder iotRoleAliasAllowsAccessToUnusedServicesCheck(software.amazon.awscdk.core.IResolvable iotRoleAliasAllowsAccessToUnusedServicesCheck) {
this.iotRoleAliasAllowsAccessToUnusedServicesCheck = iotRoleAliasAllowsAccessToUnusedServicesCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getIotRoleAliasAllowsAccessToUnusedServicesCheck}
* @param iotRoleAliasAllowsAccessToUnusedServicesCheck Checks if a role alias has access to services that haven't been used for the AWS IoT device in the last year.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder iotRoleAliasAllowsAccessToUnusedServicesCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty iotRoleAliasAllowsAccessToUnusedServicesCheck) {
this.iotRoleAliasAllowsAccessToUnusedServicesCheck = iotRoleAliasAllowsAccessToUnusedServicesCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getIotRoleAliasOverlyPermissiveCheck}
* @param iotRoleAliasOverlyPermissiveCheck Checks if the temporary credentials provided by AWS IoT role aliases are overly permissive.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder iotRoleAliasOverlyPermissiveCheck(software.amazon.awscdk.core.IResolvable iotRoleAliasOverlyPermissiveCheck) {
this.iotRoleAliasOverlyPermissiveCheck = iotRoleAliasOverlyPermissiveCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getIotRoleAliasOverlyPermissiveCheck}
* @param iotRoleAliasOverlyPermissiveCheck Checks if the temporary credentials provided by AWS IoT role aliases are overly permissive.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder iotRoleAliasOverlyPermissiveCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty iotRoleAliasOverlyPermissiveCheck) {
this.iotRoleAliasOverlyPermissiveCheck = iotRoleAliasOverlyPermissiveCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getLoggingDisabledCheck}
* @param loggingDisabledCheck Checks if AWS IoT logs are disabled.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder loggingDisabledCheck(software.amazon.awscdk.core.IResolvable loggingDisabledCheck) {
this.loggingDisabledCheck = loggingDisabledCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getLoggingDisabledCheck}
* @param loggingDisabledCheck Checks if AWS IoT logs are disabled.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder loggingDisabledCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty loggingDisabledCheck) {
this.loggingDisabledCheck = loggingDisabledCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getRevokedCaCertificateStillActiveCheck}
* @param revokedCaCertificateStillActiveCheck Checks if a revoked CA certificate is still active.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder revokedCaCertificateStillActiveCheck(software.amazon.awscdk.core.IResolvable revokedCaCertificateStillActiveCheck) {
this.revokedCaCertificateStillActiveCheck = revokedCaCertificateStillActiveCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getRevokedCaCertificateStillActiveCheck}
* @param revokedCaCertificateStillActiveCheck Checks if a revoked CA certificate is still active.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder revokedCaCertificateStillActiveCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty revokedCaCertificateStillActiveCheck) {
this.revokedCaCertificateStillActiveCheck = revokedCaCertificateStillActiveCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getRevokedDeviceCertificateStillActiveCheck}
* @param revokedDeviceCertificateStillActiveCheck Checks if a revoked device certificate is still active.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder revokedDeviceCertificateStillActiveCheck(software.amazon.awscdk.core.IResolvable revokedDeviceCertificateStillActiveCheck) {
this.revokedDeviceCertificateStillActiveCheck = revokedDeviceCertificateStillActiveCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getRevokedDeviceCertificateStillActiveCheck}
* @param revokedDeviceCertificateStillActiveCheck Checks if a revoked device certificate is still active.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder revokedDeviceCertificateStillActiveCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty revokedDeviceCertificateStillActiveCheck) {
this.revokedDeviceCertificateStillActiveCheck = revokedDeviceCertificateStillActiveCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getUnauthenticatedCognitoRoleOverlyPermissiveCheck}
* @param unauthenticatedCognitoRoleOverlyPermissiveCheck Checks if policy attached to an unauthenticated Amazon Cognito identity pool role is too permissive.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder unauthenticatedCognitoRoleOverlyPermissiveCheck(software.amazon.awscdk.core.IResolvable unauthenticatedCognitoRoleOverlyPermissiveCheck) {
this.unauthenticatedCognitoRoleOverlyPermissiveCheck = unauthenticatedCognitoRoleOverlyPermissiveCheck;
return this;
}
/**
* Sets the value of {@link AuditCheckConfigurationsProperty#getUnauthenticatedCognitoRoleOverlyPermissiveCheck}
* @param unauthenticatedCognitoRoleOverlyPermissiveCheck Checks if policy attached to an unauthenticated Amazon Cognito identity pool role is too permissive.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder unauthenticatedCognitoRoleOverlyPermissiveCheck(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationProperty unauthenticatedCognitoRoleOverlyPermissiveCheck) {
this.unauthenticatedCognitoRoleOverlyPermissiveCheck = unauthenticatedCognitoRoleOverlyPermissiveCheck;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link AuditCheckConfigurationsProperty}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public AuditCheckConfigurationsProperty build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link AuditCheckConfigurationsProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AuditCheckConfigurationsProperty {
private final java.lang.Object authenticatedCognitoRoleOverlyPermissiveCheck;
private final java.lang.Object caCertificateExpiringCheck;
private final java.lang.Object caCertificateKeyQualityCheck;
private final java.lang.Object conflictingClientIdsCheck;
private final java.lang.Object deviceCertificateExpiringCheck;
private final java.lang.Object deviceCertificateKeyQualityCheck;
private final java.lang.Object deviceCertificateSharedCheck;
private final java.lang.Object iotPolicyOverlyPermissiveCheck;
private final java.lang.Object iotRoleAliasAllowsAccessToUnusedServicesCheck;
private final java.lang.Object iotRoleAliasOverlyPermissiveCheck;
private final java.lang.Object loggingDisabledCheck;
private final java.lang.Object revokedCaCertificateStillActiveCheck;
private final java.lang.Object revokedDeviceCertificateStillActiveCheck;
private final java.lang.Object unauthenticatedCognitoRoleOverlyPermissiveCheck;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.authenticatedCognitoRoleOverlyPermissiveCheck = software.amazon.jsii.Kernel.get(this, "authenticatedCognitoRoleOverlyPermissiveCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.caCertificateExpiringCheck = software.amazon.jsii.Kernel.get(this, "caCertificateExpiringCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.caCertificateKeyQualityCheck = software.amazon.jsii.Kernel.get(this, "caCertificateKeyQualityCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.conflictingClientIdsCheck = software.amazon.jsii.Kernel.get(this, "conflictingClientIdsCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.deviceCertificateExpiringCheck = software.amazon.jsii.Kernel.get(this, "deviceCertificateExpiringCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.deviceCertificateKeyQualityCheck = software.amazon.jsii.Kernel.get(this, "deviceCertificateKeyQualityCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.deviceCertificateSharedCheck = software.amazon.jsii.Kernel.get(this, "deviceCertificateSharedCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.iotPolicyOverlyPermissiveCheck = software.amazon.jsii.Kernel.get(this, "iotPolicyOverlyPermissiveCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.iotRoleAliasAllowsAccessToUnusedServicesCheck = software.amazon.jsii.Kernel.get(this, "iotRoleAliasAllowsAccessToUnusedServicesCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.iotRoleAliasOverlyPermissiveCheck = software.amazon.jsii.Kernel.get(this, "iotRoleAliasOverlyPermissiveCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.loggingDisabledCheck = software.amazon.jsii.Kernel.get(this, "loggingDisabledCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.revokedCaCertificateStillActiveCheck = software.amazon.jsii.Kernel.get(this, "revokedCaCertificateStillActiveCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.revokedDeviceCertificateStillActiveCheck = software.amazon.jsii.Kernel.get(this, "revokedDeviceCertificateStillActiveCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.unauthenticatedCognitoRoleOverlyPermissiveCheck = software.amazon.jsii.Kernel.get(this, "unauthenticatedCognitoRoleOverlyPermissiveCheck", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.authenticatedCognitoRoleOverlyPermissiveCheck = builder.authenticatedCognitoRoleOverlyPermissiveCheck;
this.caCertificateExpiringCheck = builder.caCertificateExpiringCheck;
this.caCertificateKeyQualityCheck = builder.caCertificateKeyQualityCheck;
this.conflictingClientIdsCheck = builder.conflictingClientIdsCheck;
this.deviceCertificateExpiringCheck = builder.deviceCertificateExpiringCheck;
this.deviceCertificateKeyQualityCheck = builder.deviceCertificateKeyQualityCheck;
this.deviceCertificateSharedCheck = builder.deviceCertificateSharedCheck;
this.iotPolicyOverlyPermissiveCheck = builder.iotPolicyOverlyPermissiveCheck;
this.iotRoleAliasAllowsAccessToUnusedServicesCheck = builder.iotRoleAliasAllowsAccessToUnusedServicesCheck;
this.iotRoleAliasOverlyPermissiveCheck = builder.iotRoleAliasOverlyPermissiveCheck;
this.loggingDisabledCheck = builder.loggingDisabledCheck;
this.revokedCaCertificateStillActiveCheck = builder.revokedCaCertificateStillActiveCheck;
this.revokedDeviceCertificateStillActiveCheck = builder.revokedDeviceCertificateStillActiveCheck;
this.unauthenticatedCognitoRoleOverlyPermissiveCheck = builder.unauthenticatedCognitoRoleOverlyPermissiveCheck;
}
@Override
public final java.lang.Object getAuthenticatedCognitoRoleOverlyPermissiveCheck() {
return this.authenticatedCognitoRoleOverlyPermissiveCheck;
}
@Override
public final java.lang.Object getCaCertificateExpiringCheck() {
return this.caCertificateExpiringCheck;
}
@Override
public final java.lang.Object getCaCertificateKeyQualityCheck() {
return this.caCertificateKeyQualityCheck;
}
@Override
public final java.lang.Object getConflictingClientIdsCheck() {
return this.conflictingClientIdsCheck;
}
@Override
public final java.lang.Object getDeviceCertificateExpiringCheck() {
return this.deviceCertificateExpiringCheck;
}
@Override
public final java.lang.Object getDeviceCertificateKeyQualityCheck() {
return this.deviceCertificateKeyQualityCheck;
}
@Override
public final java.lang.Object getDeviceCertificateSharedCheck() {
return this.deviceCertificateSharedCheck;
}
@Override
public final java.lang.Object getIotPolicyOverlyPermissiveCheck() {
return this.iotPolicyOverlyPermissiveCheck;
}
@Override
public final java.lang.Object getIotRoleAliasAllowsAccessToUnusedServicesCheck() {
return this.iotRoleAliasAllowsAccessToUnusedServicesCheck;
}
@Override
public final java.lang.Object getIotRoleAliasOverlyPermissiveCheck() {
return this.iotRoleAliasOverlyPermissiveCheck;
}
@Override
public final java.lang.Object getLoggingDisabledCheck() {
return this.loggingDisabledCheck;
}
@Override
public final java.lang.Object getRevokedCaCertificateStillActiveCheck() {
return this.revokedCaCertificateStillActiveCheck;
}
@Override
public final java.lang.Object getRevokedDeviceCertificateStillActiveCheck() {
return this.revokedDeviceCertificateStillActiveCheck;
}
@Override
public final java.lang.Object getUnauthenticatedCognitoRoleOverlyPermissiveCheck() {
return this.unauthenticatedCognitoRoleOverlyPermissiveCheck;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
if (this.getAuthenticatedCognitoRoleOverlyPermissiveCheck() != null) {
data.set("authenticatedCognitoRoleOverlyPermissiveCheck", om.valueToTree(this.getAuthenticatedCognitoRoleOverlyPermissiveCheck()));
}
if (this.getCaCertificateExpiringCheck() != null) {
data.set("caCertificateExpiringCheck", om.valueToTree(this.getCaCertificateExpiringCheck()));
}
if (this.getCaCertificateKeyQualityCheck() != null) {
data.set("caCertificateKeyQualityCheck", om.valueToTree(this.getCaCertificateKeyQualityCheck()));
}
if (this.getConflictingClientIdsCheck() != null) {
data.set("conflictingClientIdsCheck", om.valueToTree(this.getConflictingClientIdsCheck()));
}
if (this.getDeviceCertificateExpiringCheck() != null) {
data.set("deviceCertificateExpiringCheck", om.valueToTree(this.getDeviceCertificateExpiringCheck()));
}
if (this.getDeviceCertificateKeyQualityCheck() != null) {
data.set("deviceCertificateKeyQualityCheck", om.valueToTree(this.getDeviceCertificateKeyQualityCheck()));
}
if (this.getDeviceCertificateSharedCheck() != null) {
data.set("deviceCertificateSharedCheck", om.valueToTree(this.getDeviceCertificateSharedCheck()));
}
if (this.getIotPolicyOverlyPermissiveCheck() != null) {
data.set("iotPolicyOverlyPermissiveCheck", om.valueToTree(this.getIotPolicyOverlyPermissiveCheck()));
}
if (this.getIotRoleAliasAllowsAccessToUnusedServicesCheck() != null) {
data.set("iotRoleAliasAllowsAccessToUnusedServicesCheck", om.valueToTree(this.getIotRoleAliasAllowsAccessToUnusedServicesCheck()));
}
if (this.getIotRoleAliasOverlyPermissiveCheck() != null) {
data.set("iotRoleAliasOverlyPermissiveCheck", om.valueToTree(this.getIotRoleAliasOverlyPermissiveCheck()));
}
if (this.getLoggingDisabledCheck() != null) {
data.set("loggingDisabledCheck", om.valueToTree(this.getLoggingDisabledCheck()));
}
if (this.getRevokedCaCertificateStillActiveCheck() != null) {
data.set("revokedCaCertificateStillActiveCheck", om.valueToTree(this.getRevokedCaCertificateStillActiveCheck()));
}
if (this.getRevokedDeviceCertificateStillActiveCheck() != null) {
data.set("revokedDeviceCertificateStillActiveCheck", om.valueToTree(this.getRevokedDeviceCertificateStillActiveCheck()));
}
if (this.getUnauthenticatedCognitoRoleOverlyPermissiveCheck() != null) {
data.set("unauthenticatedCognitoRoleOverlyPermissiveCheck", om.valueToTree(this.getUnauthenticatedCognitoRoleOverlyPermissiveCheck()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-iot.CfnAccountAuditConfiguration.AuditCheckConfigurationsProperty"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AuditCheckConfigurationsProperty.Jsii$Proxy that = (AuditCheckConfigurationsProperty.Jsii$Proxy) o;
if (this.authenticatedCognitoRoleOverlyPermissiveCheck != null ? !this.authenticatedCognitoRoleOverlyPermissiveCheck.equals(that.authenticatedCognitoRoleOverlyPermissiveCheck) : that.authenticatedCognitoRoleOverlyPermissiveCheck != null) return false;
if (this.caCertificateExpiringCheck != null ? !this.caCertificateExpiringCheck.equals(that.caCertificateExpiringCheck) : that.caCertificateExpiringCheck != null) return false;
if (this.caCertificateKeyQualityCheck != null ? !this.caCertificateKeyQualityCheck.equals(that.caCertificateKeyQualityCheck) : that.caCertificateKeyQualityCheck != null) return false;
if (this.conflictingClientIdsCheck != null ? !this.conflictingClientIdsCheck.equals(that.conflictingClientIdsCheck) : that.conflictingClientIdsCheck != null) return false;
if (this.deviceCertificateExpiringCheck != null ? !this.deviceCertificateExpiringCheck.equals(that.deviceCertificateExpiringCheck) : that.deviceCertificateExpiringCheck != null) return false;
if (this.deviceCertificateKeyQualityCheck != null ? !this.deviceCertificateKeyQualityCheck.equals(that.deviceCertificateKeyQualityCheck) : that.deviceCertificateKeyQualityCheck != null) return false;
if (this.deviceCertificateSharedCheck != null ? !this.deviceCertificateSharedCheck.equals(that.deviceCertificateSharedCheck) : that.deviceCertificateSharedCheck != null) return false;
if (this.iotPolicyOverlyPermissiveCheck != null ? !this.iotPolicyOverlyPermissiveCheck.equals(that.iotPolicyOverlyPermissiveCheck) : that.iotPolicyOverlyPermissiveCheck != null) return false;
if (this.iotRoleAliasAllowsAccessToUnusedServicesCheck != null ? !this.iotRoleAliasAllowsAccessToUnusedServicesCheck.equals(that.iotRoleAliasAllowsAccessToUnusedServicesCheck) : that.iotRoleAliasAllowsAccessToUnusedServicesCheck != null) return false;
if (this.iotRoleAliasOverlyPermissiveCheck != null ? !this.iotRoleAliasOverlyPermissiveCheck.equals(that.iotRoleAliasOverlyPermissiveCheck) : that.iotRoleAliasOverlyPermissiveCheck != null) return false;
if (this.loggingDisabledCheck != null ? !this.loggingDisabledCheck.equals(that.loggingDisabledCheck) : that.loggingDisabledCheck != null) return false;
if (this.revokedCaCertificateStillActiveCheck != null ? !this.revokedCaCertificateStillActiveCheck.equals(that.revokedCaCertificateStillActiveCheck) : that.revokedCaCertificateStillActiveCheck != null) return false;
if (this.revokedDeviceCertificateStillActiveCheck != null ? !this.revokedDeviceCertificateStillActiveCheck.equals(that.revokedDeviceCertificateStillActiveCheck) : that.revokedDeviceCertificateStillActiveCheck != null) return false;
return this.unauthenticatedCognitoRoleOverlyPermissiveCheck != null ? this.unauthenticatedCognitoRoleOverlyPermissiveCheck.equals(that.unauthenticatedCognitoRoleOverlyPermissiveCheck) : that.unauthenticatedCognitoRoleOverlyPermissiveCheck == null;
}
@Override
public final int hashCode() {
int result = this.authenticatedCognitoRoleOverlyPermissiveCheck != null ? this.authenticatedCognitoRoleOverlyPermissiveCheck.hashCode() : 0;
result = 31 * result + (this.caCertificateExpiringCheck != null ? this.caCertificateExpiringCheck.hashCode() : 0);
result = 31 * result + (this.caCertificateKeyQualityCheck != null ? this.caCertificateKeyQualityCheck.hashCode() : 0);
result = 31 * result + (this.conflictingClientIdsCheck != null ? this.conflictingClientIdsCheck.hashCode() : 0);
result = 31 * result + (this.deviceCertificateExpiringCheck != null ? this.deviceCertificateExpiringCheck.hashCode() : 0);
result = 31 * result + (this.deviceCertificateKeyQualityCheck != null ? this.deviceCertificateKeyQualityCheck.hashCode() : 0);
result = 31 * result + (this.deviceCertificateSharedCheck != null ? this.deviceCertificateSharedCheck.hashCode() : 0);
result = 31 * result + (this.iotPolicyOverlyPermissiveCheck != null ? this.iotPolicyOverlyPermissiveCheck.hashCode() : 0);
result = 31 * result + (this.iotRoleAliasAllowsAccessToUnusedServicesCheck != null ? this.iotRoleAliasAllowsAccessToUnusedServicesCheck.hashCode() : 0);
result = 31 * result + (this.iotRoleAliasOverlyPermissiveCheck != null ? this.iotRoleAliasOverlyPermissiveCheck.hashCode() : 0);
result = 31 * result + (this.loggingDisabledCheck != null ? this.loggingDisabledCheck.hashCode() : 0);
result = 31 * result + (this.revokedCaCertificateStillActiveCheck != null ? this.revokedCaCertificateStillActiveCheck.hashCode() : 0);
result = 31 * result + (this.revokedDeviceCertificateStillActiveCheck != null ? this.revokedDeviceCertificateStillActiveCheck.hashCode() : 0);
result = 31 * result + (this.unauthenticatedCognitoRoleOverlyPermissiveCheck != null ? this.unauthenticatedCognitoRoleOverlyPermissiveCheck.hashCode() : 0);
return result;
}
}
}
/**
* The configuration of the audit notification target.
*
* Example:
*
*
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.services.iot.*;
* AuditNotificationTargetConfigurationsProperty auditNotificationTargetConfigurationsProperty = AuditNotificationTargetConfigurationsProperty.builder()
* .sns(AuditNotificationTargetProperty.builder()
* .enabled(false)
* .roleArn("roleArn")
* .targetArn("targetArn")
* .build())
* .build();
*
*/
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.iot.$Module.class, fqn = "@aws-cdk/aws-iot.CfnAccountAuditConfiguration.AuditNotificationTargetConfigurationsProperty")
@software.amazon.jsii.Jsii.Proxy(AuditNotificationTargetConfigurationsProperty.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static interface AuditNotificationTargetConfigurationsProperty extends software.amazon.jsii.JsiiSerializable {
/**
* The `Sns` notification target.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getSns() {
return null;
}
/**
* @return a {@link Builder} of {@link AuditNotificationTargetConfigurationsProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link AuditNotificationTargetConfigurationsProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Object sns;
/**
* Sets the value of {@link AuditNotificationTargetConfigurationsProperty#getSns}
* @param sns The `Sns` notification target.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder sns(software.amazon.awscdk.core.IResolvable sns) {
this.sns = sns;
return this;
}
/**
* Sets the value of {@link AuditNotificationTargetConfigurationsProperty#getSns}
* @param sns The `Sns` notification target.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder sns(software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditNotificationTargetProperty sns) {
this.sns = sns;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link AuditNotificationTargetConfigurationsProperty}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public AuditNotificationTargetConfigurationsProperty build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link AuditNotificationTargetConfigurationsProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AuditNotificationTargetConfigurationsProperty {
private final java.lang.Object sns;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.sns = software.amazon.jsii.Kernel.get(this, "sns", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.sns = builder.sns;
}
@Override
public final java.lang.Object getSns() {
return this.sns;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
if (this.getSns() != null) {
data.set("sns", om.valueToTree(this.getSns()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-iot.CfnAccountAuditConfiguration.AuditNotificationTargetConfigurationsProperty"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AuditNotificationTargetConfigurationsProperty.Jsii$Proxy that = (AuditNotificationTargetConfigurationsProperty.Jsii$Proxy) o;
return this.sns != null ? this.sns.equals(that.sns) : that.sns == null;
}
@Override
public final int hashCode() {
int result = this.sns != null ? this.sns.hashCode() : 0;
return result;
}
}
}
/**
* Information about the targets to which audit notifications are sent.
*
* Example:
*
*
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.services.iot.*;
* AuditNotificationTargetProperty auditNotificationTargetProperty = AuditNotificationTargetProperty.builder()
* .enabled(false)
* .roleArn("roleArn")
* .targetArn("targetArn")
* .build();
*
*/
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.iot.$Module.class, fqn = "@aws-cdk/aws-iot.CfnAccountAuditConfiguration.AuditNotificationTargetProperty")
@software.amazon.jsii.Jsii.Proxy(AuditNotificationTargetProperty.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static interface AuditNotificationTargetProperty extends software.amazon.jsii.JsiiSerializable {
/**
* True if notifications to the target are enabled.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getEnabled() {
return null;
}
/**
* The ARN of the role that grants permission to send notifications to the target.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getRoleArn() {
return null;
}
/**
* The ARN of the target (SNS topic) to which audit notifications are sent.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getTargetArn() {
return null;
}
/**
* @return a {@link Builder} of {@link AuditNotificationTargetProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link AuditNotificationTargetProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Object enabled;
java.lang.String roleArn;
java.lang.String targetArn;
/**
* Sets the value of {@link AuditNotificationTargetProperty#getEnabled}
* @param enabled True if notifications to the target are enabled.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder enabled(java.lang.Boolean enabled) {
this.enabled = enabled;
return this;
}
/**
* Sets the value of {@link AuditNotificationTargetProperty#getEnabled}
* @param enabled True if notifications to the target are enabled.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder enabled(software.amazon.awscdk.core.IResolvable enabled) {
this.enabled = enabled;
return this;
}
/**
* Sets the value of {@link AuditNotificationTargetProperty#getRoleArn}
* @param roleArn The ARN of the role that grants permission to send notifications to the target.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder roleArn(java.lang.String roleArn) {
this.roleArn = roleArn;
return this;
}
/**
* Sets the value of {@link AuditNotificationTargetProperty#getTargetArn}
* @param targetArn The ARN of the target (SNS topic) to which audit notifications are sent.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder targetArn(java.lang.String targetArn) {
this.targetArn = targetArn;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link AuditNotificationTargetProperty}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public AuditNotificationTargetProperty build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link AuditNotificationTargetProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AuditNotificationTargetProperty {
private final java.lang.Object enabled;
private final java.lang.String roleArn;
private final java.lang.String targetArn;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.enabled = software.amazon.jsii.Kernel.get(this, "enabled", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.roleArn = software.amazon.jsii.Kernel.get(this, "roleArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.targetArn = software.amazon.jsii.Kernel.get(this, "targetArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.enabled = builder.enabled;
this.roleArn = builder.roleArn;
this.targetArn = builder.targetArn;
}
@Override
public final java.lang.Object getEnabled() {
return this.enabled;
}
@Override
public final java.lang.String getRoleArn() {
return this.roleArn;
}
@Override
public final java.lang.String getTargetArn() {
return this.targetArn;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
if (this.getEnabled() != null) {
data.set("enabled", om.valueToTree(this.getEnabled()));
}
if (this.getRoleArn() != null) {
data.set("roleArn", om.valueToTree(this.getRoleArn()));
}
if (this.getTargetArn() != null) {
data.set("targetArn", om.valueToTree(this.getTargetArn()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-iot.CfnAccountAuditConfiguration.AuditNotificationTargetProperty"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AuditNotificationTargetProperty.Jsii$Proxy that = (AuditNotificationTargetProperty.Jsii$Proxy) o;
if (this.enabled != null ? !this.enabled.equals(that.enabled) : that.enabled != null) return false;
if (this.roleArn != null ? !this.roleArn.equals(that.roleArn) : that.roleArn != null) return false;
return this.targetArn != null ? this.targetArn.equals(that.targetArn) : that.targetArn == null;
}
@Override
public final int hashCode() {
int result = this.enabled != null ? this.enabled.hashCode() : 0;
result = 31 * result + (this.roleArn != null ? this.roleArn.hashCode() : 0);
result = 31 * result + (this.targetArn != null ? this.targetArn.hashCode() : 0);
return result;
}
}
}
/**
* A fluent builder for {@link software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope - scope in which this resource is defined. This parameter is required.
* @param id - scoped id of the resource. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.amazon.awscdk.core.Construct scope;
private final java.lang.String id;
private final software.amazon.awscdk.services.iot.CfnAccountAuditConfigurationProps.Builder props;
private Builder(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new software.amazon.awscdk.services.iot.CfnAccountAuditConfigurationProps.Builder();
}
/**
* The ID of the account.
*
* You can use the expression !Sub "${AWS::AccountId}"
to use your account ID.
*
* @return {@code this}
* @param accountId The ID of the account. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder accountId(final java.lang.String accountId) {
this.props.accountId(accountId);
return this;
}
/**
* Specifies which audit checks are enabled and disabled for this account.
*
* Some data collection might start immediately when certain checks are enabled. When a check is disabled, any data collected so far in relation to the check is deleted. To disable a check, set the value of the Enabled:
key to false
.
*
* If an enabled check is removed from the template, it will also be disabled.
*
* You can't disable a check if it's used by any scheduled audit. You must delete the check from the scheduled audit or delete the scheduled audit itself to disable the check.
*
* For more information on avialbe auidt checks see AWS::IoT::AccountAuditConfiguration AuditCheckConfigurations
*
* @return {@code this}
* @param auditCheckConfigurations Specifies which audit checks are enabled and disabled for this account. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder auditCheckConfigurations(final software.amazon.awscdk.core.IResolvable auditCheckConfigurations) {
this.props.auditCheckConfigurations(auditCheckConfigurations);
return this;
}
/**
* Specifies which audit checks are enabled and disabled for this account.
*
* Some data collection might start immediately when certain checks are enabled. When a check is disabled, any data collected so far in relation to the check is deleted. To disable a check, set the value of the Enabled:
key to false
.
*
* If an enabled check is removed from the template, it will also be disabled.
*
* You can't disable a check if it's used by any scheduled audit. You must delete the check from the scheduled audit or delete the scheduled audit itself to disable the check.
*
* For more information on avialbe auidt checks see AWS::IoT::AccountAuditConfiguration AuditCheckConfigurations
*
* @return {@code this}
* @param auditCheckConfigurations Specifies which audit checks are enabled and disabled for this account. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder auditCheckConfigurations(final software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditCheckConfigurationsProperty auditCheckConfigurations) {
this.props.auditCheckConfigurations(auditCheckConfigurations);
return this;
}
/**
* The Amazon Resource Name (ARN) of the role that grants permission to AWS IoT to access information about your devices, policies, certificates, and other items as required when performing an audit.
*
* @return {@code this}
* @param roleArn The Amazon Resource Name (ARN) of the role that grants permission to AWS IoT to access information about your devices, policies, certificates, and other items as required when performing an audit. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder roleArn(final java.lang.String roleArn) {
this.props.roleArn(roleArn);
return this;
}
/**
* Information about the targets to which audit notifications are sent.
*
* @return {@code this}
* @param auditNotificationTargetConfigurations Information about the targets to which audit notifications are sent. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder auditNotificationTargetConfigurations(final software.amazon.awscdk.core.IResolvable auditNotificationTargetConfigurations) {
this.props.auditNotificationTargetConfigurations(auditNotificationTargetConfigurations);
return this;
}
/**
* Information about the targets to which audit notifications are sent.
*
* @return {@code this}
* @param auditNotificationTargetConfigurations Information about the targets to which audit notifications are sent. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder auditNotificationTargetConfigurations(final software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration.AuditNotificationTargetConfigurationsProperty auditNotificationTargetConfigurations) {
this.props.auditNotificationTargetConfigurations(auditNotificationTargetConfigurations);
return this;
}
/**
* @returns a newly built instance of {@link software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration build() {
return new software.amazon.awscdk.services.iot.CfnAccountAuditConfiguration(
this.scope,
this.id,
this.props.build()
);
}
}
}