Skip to content

Commit 267052f

Browse files
author
awstools
committed
feat(client-iot): AWS IoT - AWS IoT Device Defender adds support for a new Device Defender Audit Check that monitors device certificate age and custom threshold configurations for both the new device certificate age check and existing device certificate expiry check.
1 parent 7e91040 commit 267052f

File tree

8 files changed

+126
-54
lines changed

8 files changed

+126
-54
lines changed

clients/client-iot/src/commands/DescribeAccountAuditConfigurationCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ export interface DescribeAccountAuditConfigurationCommandOutput
6161
* // auditCheckConfigurations: { // AuditCheckConfigurations
6262
* // "<keys>": { // AuditCheckConfiguration
6363
* // enabled: true || false,
64+
* // configuration: { // CheckCustomConfiguration
65+
* // "<keys>": "STRING_VALUE",
66+
* // },
6467
* // },
6568
* // },
6669
* // };

clients/client-iot/src/commands/ListCustomMetricsCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
88
import { IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTClient";
9-
import { ListCustomMetricsRequest, ListCustomMetricsResponse } from "../models/models_1";
9+
import { ListCustomMetricsRequest } from "../models/models_1";
10+
import { ListCustomMetricsResponse } from "../models/models_2";
1011
import { de_ListCustomMetricsCommand, se_ListCustomMetricsCommand } from "../protocols/Aws_restJson1";
1112

1213
/**

clients/client-iot/src/commands/UpdateAccountAuditConfigurationCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ export interface UpdateAccountAuditConfigurationCommandOutput
5555
* auditCheckConfigurations: { // AuditCheckConfigurations
5656
* "<keys>": { // AuditCheckConfiguration
5757
* enabled: true || false,
58+
* configuration: { // CheckCustomConfiguration
59+
* "<keys>": "STRING_VALUE",
60+
* },
5861
* },
5962
* },
6063
* };

clients/client-iot/src/models/models_0.ts

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2767,6 +2767,20 @@ export interface AttributePayload {
27672767
merge?: boolean | undefined;
27682768
}
27692769

2770+
/**
2771+
* @public
2772+
* @enum
2773+
*/
2774+
export const ConfigName = {
2775+
CERT_AGE_THRESHOLD_IN_DAYS: "CERT_AGE_THRESHOLD_IN_DAYS",
2776+
CERT_EXPIRATION_THRESHOLD_IN_DAYS: "CERT_EXPIRATION_THRESHOLD_IN_DAYS",
2777+
} as const;
2778+
2779+
/**
2780+
* @public
2781+
*/
2782+
export type ConfigName = (typeof ConfigName)[keyof typeof ConfigName];
2783+
27702784
/**
27712785
* <p>Which audit checks are enabled and disabled for this account.</p>
27722786
* @public
@@ -2777,6 +2791,12 @@ export interface AuditCheckConfiguration {
27772791
* @public
27782792
*/
27792793
enabled?: boolean | undefined;
2794+
2795+
/**
2796+
* <p>A structure containing the configName and corresponding configValue for configuring audit checks.</p>
2797+
* @public
2798+
*/
2799+
configuration?: Partial<Record<ConfigName, string>> | undefined;
27802800
}
27812801

27822802
/**
@@ -7975,36 +7995,6 @@ export const TopicRuleDestinationStatus = {
79757995
*/
79767996
export type TopicRuleDestinationStatus = (typeof TopicRuleDestinationStatus)[keyof typeof TopicRuleDestinationStatus];
79777997

7978-
/**
7979-
* <p>The properties of a virtual private cloud (VPC) destination.</p>
7980-
* @public
7981-
*/
7982-
export interface VpcDestinationProperties {
7983-
/**
7984-
* <p>The subnet IDs of the VPC destination.</p>
7985-
* @public
7986-
*/
7987-
subnetIds?: string[] | undefined;
7988-
7989-
/**
7990-
* <p>The security groups of the VPC destination.</p>
7991-
* @public
7992-
*/
7993-
securityGroups?: string[] | undefined;
7994-
7995-
/**
7996-
* <p>The ID of the VPC.</p>
7997-
* @public
7998-
*/
7999-
vpcId?: string | undefined;
8000-
8001-
/**
8002-
* <p>The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).</p>
8003-
* @public
8004-
*/
8005-
roleArn?: string | undefined;
8006-
}
8007-
80087998
/**
80097999
* @internal
80108000
*/

clients/client-iot/src/models/models_1.ts

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,38 @@ import {
7878
TlsConfig,
7979
TopicRuleDestinationStatus,
8080
VerificationState,
81-
VpcDestinationProperties,
8281
} from "./models_0";
8382

83+
/**
84+
* <p>The properties of a virtual private cloud (VPC) destination.</p>
85+
* @public
86+
*/
87+
export interface VpcDestinationProperties {
88+
/**
89+
* <p>The subnet IDs of the VPC destination.</p>
90+
* @public
91+
*/
92+
subnetIds?: string[] | undefined;
93+
94+
/**
95+
* <p>The security groups of the VPC destination.</p>
96+
* @public
97+
*/
98+
securityGroups?: string[] | undefined;
99+
100+
/**
101+
* <p>The ID of the VPC.</p>
102+
* @public
103+
*/
104+
vpcId?: string | undefined;
105+
106+
/**
107+
* <p>The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).</p>
108+
* @public
109+
*/
110+
roleArn?: string | undefined;
111+
}
112+
84113
/**
85114
* <p>A topic rule destination.</p>
86115
* @public
@@ -7446,28 +7475,6 @@ export interface ListCustomMetricsRequest {
74467475
maxResults?: number | undefined;
74477476
}
74487477

7449-
/**
7450-
* @public
7451-
*/
7452-
export interface ListCustomMetricsResponse {
7453-
/**
7454-
* <p>
7455-
* The name of the custom metric.
7456-
* </p>
7457-
* @public
7458-
*/
7459-
metricNames?: string[] | undefined;
7460-
7461-
/**
7462-
* <p>
7463-
* A token that can be used to retrieve the next set of results,
7464-
* or <code>null</code> if there are no additional results.
7465-
* </p>
7466-
* @public
7467-
*/
7468-
nextToken?: string | undefined;
7469-
}
7470-
74717478
/**
74727479
* @internal
74737480
*/

clients/client-iot/src/models/models_2.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,28 @@ import {
8686
ViolationEventOccurrenceRange,
8787
} from "./models_1";
8888

89+
/**
90+
* @public
91+
*/
92+
export interface ListCustomMetricsResponse {
93+
/**
94+
* <p>
95+
* The name of the custom metric.
96+
* </p>
97+
* @public
98+
*/
99+
metricNames?: string[] | undefined;
100+
101+
/**
102+
* <p>
103+
* A token that can be used to retrieve the next set of results,
104+
* or <code>null</code> if there are no additional results.
105+
* </p>
106+
* @public
107+
*/
108+
nextToken?: string | undefined;
109+
}
110+
89111
/**
90112
* @public
91113
*/

clients/client-iot/src/protocols/Aws_restJson1.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,7 @@ import {
820820
CommandParameter,
821821
CommandParameterValue,
822822
CommandPayload,
823+
ConfigName,
823824
ConflictException,
824825
ConflictingResourceUpdateException,
825826
CustomCodeSigning,
@@ -13417,6 +13418,8 @@ const se_Behaviors = (input: Behavior[], context: __SerdeContext): any => {
1341713418

1341813419
// se_CertificateProviderAccountDefaultForOperations omitted.
1341913420

13421+
// se_CheckCustomConfiguration omitted.
13422+
1342013423
// se_Cidrs omitted.
1342113424

1342213425
// se_ClientCertificateConfig omitted.
@@ -14367,6 +14370,8 @@ const de_CertificateValidity = (output: any, context: __SerdeContext): Certifica
1436714370
}) as any;
1436814371
};
1436914372

14373+
// de_CheckCustomConfiguration omitted.
14374+
1437014375
// de_Cidrs omitted.
1437114376

1437214377
// de_ClientCertificateConfig omitted.

codegen/sdk-codegen/aws-models/iot.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3346,6 +3346,12 @@
33463346
"smithy.api#default": false,
33473347
"smithy.api#documentation": "<p>True if this audit check is enabled for this account.</p>"
33483348
}
3349+
},
3350+
"configuration": {
3351+
"target": "com.amazonaws.iot#CheckCustomConfiguration",
3352+
"traits": {
3353+
"smithy.api#documentation": "<p>A structure containing the configName and corresponding configValue for configuring audit checks.</p>"
3354+
}
33493355
}
33503356
},
33513357
"traits": {
@@ -5943,6 +5949,15 @@
59435949
"com.amazonaws.iot#CheckCompliant": {
59445950
"type": "boolean"
59455951
},
5952+
"com.amazonaws.iot#CheckCustomConfiguration": {
5953+
"type": "map",
5954+
"key": {
5955+
"target": "com.amazonaws.iot#ConfigName"
5956+
},
5957+
"value": {
5958+
"target": "com.amazonaws.iot#ConfigValue"
5959+
}
5960+
},
59465961
"com.amazonaws.iot#Cidr": {
59475962
"type": "string",
59485963
"traits": {
@@ -6767,6 +6782,32 @@
67676782
}
67686783
}
67696784
},
6785+
"com.amazonaws.iot#ConfigName": {
6786+
"type": "enum",
6787+
"members": {
6788+
"CERT_AGE_THRESHOLD_IN_DAYS": {
6789+
"target": "smithy.api#Unit",
6790+
"traits": {
6791+
"smithy.api#enumValue": "CERT_AGE_THRESHOLD_IN_DAYS"
6792+
}
6793+
},
6794+
"CERT_EXPIRATION_THRESHOLD_IN_DAYS": {
6795+
"target": "smithy.api#Unit",
6796+
"traits": {
6797+
"smithy.api#enumValue": "CERT_EXPIRATION_THRESHOLD_IN_DAYS"
6798+
}
6799+
}
6800+
}
6801+
},
6802+
"com.amazonaws.iot#ConfigValue": {
6803+
"type": "string",
6804+
"traits": {
6805+
"smithy.api#length": {
6806+
"min": 1,
6807+
"max": 64
6808+
}
6809+
}
6810+
},
67706811
"com.amazonaws.iot#Configuration": {
67716812
"type": "structure",
67726813
"members": {

0 commit comments

Comments
 (0)