class AccountAuditConfiguration (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.IoT.Alpha.AccountAuditConfiguration |
![]() | github.com/aws/aws-cdk-go/awscdkiotalpha/v2#AccountAuditConfiguration |
![]() | software.amazon.awscdk.services.iot.alpha.AccountAuditConfiguration |
![]() | aws_cdk.aws_iot_alpha.AccountAuditConfiguration |
![]() | @aws-cdk/aws-iot-alpha ยป AccountAuditConfiguration |
Implements
IConstruct
, IDependable
, IResource
, IAccount
Defines AWS IoT Audit Configuration.
Example
// Audit notification are sent to the SNS topic
declare const targetTopic: sns.ITopic;
new iot.AccountAuditConfiguration(this, 'AuditConfiguration', {
targetTopic,
});
Initializer
new AccountAuditConfiguration(scope: Construct, id: string, props?: AccountAuditConfigurationProps)
Parameters
- scope
Construct
- id
string
- props
Account
Audit Configuration Props
Construct Props
Name | Type | Description |
---|---|---|
check | Check | Specifies which audit checks are enabled and disabled for this account. |
target | ITopic | The target SNS topic to which audit notifications are sent. |
checkConfiguration?
Type:
Check
(optional, default: all checks are enabled)
Specifies which audit checks are enabled and disabled for this account.
targetTopic?
Type:
ITopic
(optional, default: no notifications are sent)
The target SNS topic to which audit notifications are sent.
Properties
Name | Type | Description |
---|---|---|
account | string | The account ID. |
env | Resource | The environment this resource belongs to. |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
accountId
Type:
string
The account ID.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
to | Returns a string representation of this construct. |
static from | Import an existing AWS IoT Audit Configuration. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
static fromAccountId(scope, id, accountId)
public static fromAccountId(scope: Construct, id: string, accountId: string): IAccountAuditConfiguration
Parameters
- scope
Construct
โ The parent creating construct (usuallythis
). - id
string
โ The construct's name. - accountId
string
โ The account ID.
Returns
Import an existing AWS IoT Audit Configuration.