Skip to content

Commit

Permalink
feat(client-iot): This release adds additional enhancements to AWS Io…
Browse files Browse the repository at this point in the history
…T Device Management Software Package Catalog and Jobs. It also adds SBOM support in Software Package Version.
  • Loading branch information
awstools committed Sep 16, 2024
1 parent 52794ee commit 2df520d
Show file tree
Hide file tree
Showing 26 changed files with 1,824 additions and 330 deletions.
24 changes: 24 additions & 0 deletions clients/client-iot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@ AddThingToThingGroup

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iot/command/AddThingToThingGroupCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iot/Interface/AddThingToThingGroupCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iot/Interface/AddThingToThingGroupCommandOutput/)

</details>
<details>
<summary>
AssociateSbomWithPackageVersion
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iot/command/AssociateSbomWithPackageVersionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iot/Interface/AssociateSbomWithPackageVersionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iot/Interface/AssociateSbomWithPackageVersionCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -1186,6 +1194,14 @@ DisableTopicRule

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iot/command/DisableTopicRuleCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iot/Interface/DisableTopicRuleCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iot/Interface/DisableTopicRuleCommandOutput/)

</details>
<details>
<summary>
DisassociateSbomFromPackageVersion
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iot/command/DisassociateSbomFromPackageVersionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iot/Interface/DisassociateSbomFromPackageVersionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iot/Interface/DisassociateSbomFromPackageVersionCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -1666,6 +1682,14 @@ ListRoleAliases

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iot/command/ListRoleAliasesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iot/Interface/ListRoleAliasesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iot/Interface/ListRoleAliasesCommandOutput/)

</details>
<details>
<summary>
ListSbomValidationResults
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iot/command/ListSbomValidationResultsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iot/Interface/ListSbomValidationResultsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iot/Interface/ListSbomValidationResultsCommandOutput/)

</details>
<details>
<summary>
Expand Down
69 changes: 69 additions & 0 deletions clients/client-iot/src/IoT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ import {
AddThingToThingGroupCommandInput,
AddThingToThingGroupCommandOutput,
} from "./commands/AddThingToThingGroupCommand";
import {
AssociateSbomWithPackageVersionCommand,
AssociateSbomWithPackageVersionCommandInput,
AssociateSbomWithPackageVersionCommandOutput,
} from "./commands/AssociateSbomWithPackageVersionCommand";
import {
AssociateTargetsWithJobCommand,
AssociateTargetsWithJobCommandInput,
Expand Down Expand Up @@ -583,6 +588,11 @@ import {
DisableTopicRuleCommandInput,
DisableTopicRuleCommandOutput,
} from "./commands/DisableTopicRuleCommand";
import {
DisassociateSbomFromPackageVersionCommand,
DisassociateSbomFromPackageVersionCommandInput,
DisassociateSbomFromPackageVersionCommandOutput,
} from "./commands/DisassociateSbomFromPackageVersionCommand";
import {
EnableTopicRuleCommand,
EnableTopicRuleCommandInput,
Expand Down Expand Up @@ -867,6 +877,11 @@ import {
ListRoleAliasesCommandInput,
ListRoleAliasesCommandOutput,
} from "./commands/ListRoleAliasesCommand";
import {
ListSbomValidationResultsCommand,
ListSbomValidationResultsCommandInput,
ListSbomValidationResultsCommandOutput,
} from "./commands/ListSbomValidationResultsCommand";
import {
ListScheduledAuditsCommand,
ListScheduledAuditsCommandInput,
Expand Down Expand Up @@ -1219,6 +1234,7 @@ const commands = {
AcceptCertificateTransferCommand,
AddThingToBillingGroupCommand,
AddThingToThingGroupCommand,
AssociateSbomWithPackageVersionCommand,
AssociateTargetsWithJobCommand,
AttachPolicyCommand,
AttachPrincipalPolicyCommand,
Expand Down Expand Up @@ -1337,6 +1353,7 @@ const commands = {
DetachSecurityProfileCommand,
DetachThingPrincipalCommand,
DisableTopicRuleCommand,
DisassociateSbomFromPackageVersionCommand,
EnableTopicRuleCommand,
GetBehaviorModelTrainingSummariesCommand,
GetBucketsAggregationCommand,
Expand Down Expand Up @@ -1397,6 +1414,7 @@ const commands = {
ListProvisioningTemplateVersionsCommand,
ListRelatedResourcesForAuditFindingCommand,
ListRoleAliasesCommand,
ListSbomValidationResultsCommand,
ListScheduledAuditsCommand,
ListSecurityProfilesCommand,
ListSecurityProfilesForTargetCommand,
Expand Down Expand Up @@ -1527,6 +1545,23 @@ export interface IoT {
cb: (err: any, data?: AddThingToThingGroupCommandOutput) => void
): void;

/**
* @see {@link AssociateSbomWithPackageVersionCommand}
*/
associateSbomWithPackageVersion(
args: AssociateSbomWithPackageVersionCommandInput,
options?: __HttpHandlerOptions
): Promise<AssociateSbomWithPackageVersionCommandOutput>;
associateSbomWithPackageVersion(
args: AssociateSbomWithPackageVersionCommandInput,
cb: (err: any, data?: AssociateSbomWithPackageVersionCommandOutput) => void
): void;
associateSbomWithPackageVersion(
args: AssociateSbomWithPackageVersionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: AssociateSbomWithPackageVersionCommandOutput) => void
): void;

/**
* @see {@link AssociateTargetsWithJobCommand}
*/
Expand Down Expand Up @@ -3409,6 +3444,23 @@ export interface IoT {
cb: (err: any, data?: DisableTopicRuleCommandOutput) => void
): void;

/**
* @see {@link DisassociateSbomFromPackageVersionCommand}
*/
disassociateSbomFromPackageVersion(
args: DisassociateSbomFromPackageVersionCommandInput,
options?: __HttpHandlerOptions
): Promise<DisassociateSbomFromPackageVersionCommandOutput>;
disassociateSbomFromPackageVersion(
args: DisassociateSbomFromPackageVersionCommandInput,
cb: (err: any, data?: DisassociateSbomFromPackageVersionCommandOutput) => void
): void;
disassociateSbomFromPackageVersion(
args: DisassociateSbomFromPackageVersionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DisassociateSbomFromPackageVersionCommandOutput) => void
): void;

/**
* @see {@link EnableTopicRuleCommand}
*/
Expand Down Expand Up @@ -4379,6 +4431,23 @@ export interface IoT {
cb: (err: any, data?: ListRoleAliasesCommandOutput) => void
): void;

/**
* @see {@link ListSbomValidationResultsCommand}
*/
listSbomValidationResults(
args: ListSbomValidationResultsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListSbomValidationResultsCommandOutput>;
listSbomValidationResults(
args: ListSbomValidationResultsCommandInput,
cb: (err: any, data?: ListSbomValidationResultsCommandOutput) => void
): void;
listSbomValidationResults(
args: ListSbomValidationResultsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListSbomValidationResultsCommandOutput) => void
): void;

/**
* @see {@link ListScheduledAuditsCommand}
*/
Expand Down
18 changes: 18 additions & 0 deletions clients/client-iot/src/IoTClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ import {
AddThingToThingGroupCommandInput,
AddThingToThingGroupCommandOutput,
} from "./commands/AddThingToThingGroupCommand";
import {
AssociateSbomWithPackageVersionCommandInput,
AssociateSbomWithPackageVersionCommandOutput,
} from "./commands/AssociateSbomWithPackageVersionCommand";
import {
AssociateTargetsWithJobCommandInput,
AssociateTargetsWithJobCommandOutput,
Expand Down Expand Up @@ -387,6 +391,10 @@ import {
DetachThingPrincipalCommandOutput,
} from "./commands/DetachThingPrincipalCommand";
import { DisableTopicRuleCommandInput, DisableTopicRuleCommandOutput } from "./commands/DisableTopicRuleCommand";
import {
DisassociateSbomFromPackageVersionCommandInput,
DisassociateSbomFromPackageVersionCommandOutput,
} from "./commands/DisassociateSbomFromPackageVersionCommand";
import { EnableTopicRuleCommandInput, EnableTopicRuleCommandOutput } from "./commands/EnableTopicRuleCommand";
import {
GetBehaviorModelTrainingSummariesCommandInput,
Expand Down Expand Up @@ -537,6 +545,10 @@ import {
ListRelatedResourcesForAuditFindingCommandOutput,
} from "./commands/ListRelatedResourcesForAuditFindingCommand";
import { ListRoleAliasesCommandInput, ListRoleAliasesCommandOutput } from "./commands/ListRoleAliasesCommand";
import {
ListSbomValidationResultsCommandInput,
ListSbomValidationResultsCommandOutput,
} from "./commands/ListSbomValidationResultsCommand";
import {
ListScheduledAuditsCommandInput,
ListScheduledAuditsCommandOutput,
Expand Down Expand Up @@ -776,6 +788,7 @@ export type ServiceInputTypes =
| AcceptCertificateTransferCommandInput
| AddThingToBillingGroupCommandInput
| AddThingToThingGroupCommandInput
| AssociateSbomWithPackageVersionCommandInput
| AssociateTargetsWithJobCommandInput
| AttachPolicyCommandInput
| AttachPrincipalPolicyCommandInput
Expand Down Expand Up @@ -894,6 +907,7 @@ export type ServiceInputTypes =
| DetachSecurityProfileCommandInput
| DetachThingPrincipalCommandInput
| DisableTopicRuleCommandInput
| DisassociateSbomFromPackageVersionCommandInput
| EnableTopicRuleCommandInput
| GetBehaviorModelTrainingSummariesCommandInput
| GetBucketsAggregationCommandInput
Expand Down Expand Up @@ -954,6 +968,7 @@ export type ServiceInputTypes =
| ListProvisioningTemplatesCommandInput
| ListRelatedResourcesForAuditFindingCommandInput
| ListRoleAliasesCommandInput
| ListSbomValidationResultsCommandInput
| ListScheduledAuditsCommandInput
| ListSecurityProfilesCommandInput
| ListSecurityProfilesForTargetCommandInput
Expand Down Expand Up @@ -1036,6 +1051,7 @@ export type ServiceOutputTypes =
| AcceptCertificateTransferCommandOutput
| AddThingToBillingGroupCommandOutput
| AddThingToThingGroupCommandOutput
| AssociateSbomWithPackageVersionCommandOutput
| AssociateTargetsWithJobCommandOutput
| AttachPolicyCommandOutput
| AttachPrincipalPolicyCommandOutput
Expand Down Expand Up @@ -1154,6 +1170,7 @@ export type ServiceOutputTypes =
| DetachSecurityProfileCommandOutput
| DetachThingPrincipalCommandOutput
| DisableTopicRuleCommandOutput
| DisassociateSbomFromPackageVersionCommandOutput
| EnableTopicRuleCommandOutput
| GetBehaviorModelTrainingSummariesCommandOutput
| GetBucketsAggregationCommandOutput
Expand Down Expand Up @@ -1214,6 +1231,7 @@ export type ServiceOutputTypes =
| ListProvisioningTemplatesCommandOutput
| ListRelatedResourcesForAuditFindingCommandOutput
| ListRoleAliasesCommandOutput
| ListSbomValidationResultsCommandOutput
| ListScheduledAuditsCommandOutput
| ListSecurityProfilesCommandOutput
| ListSecurityProfilesForTargetCommandOutput
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTClient";
import { AssociateSbomWithPackageVersionRequest, AssociateSbomWithPackageVersionResponse } from "../models/models_0";
import {
de_AssociateSbomWithPackageVersionCommand,
se_AssociateSbomWithPackageVersionCommand,
} from "../protocols/Aws_restJson1";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link AssociateSbomWithPackageVersionCommand}.
*/
export interface AssociateSbomWithPackageVersionCommandInput extends AssociateSbomWithPackageVersionRequest {}
/**
* @public
*
* The output of {@link AssociateSbomWithPackageVersionCommand}.
*/
export interface AssociateSbomWithPackageVersionCommandOutput
extends AssociateSbomWithPackageVersionResponse,
__MetadataBearer {}

/**
* <p>Associates a software bill of materials (SBOM) with a specific software package version.</p>
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">AssociateSbomWithPackageVersion</a> action.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { IoTClient, AssociateSbomWithPackageVersionCommand } from "@aws-sdk/client-iot"; // ES Modules import
* // const { IoTClient, AssociateSbomWithPackageVersionCommand } = require("@aws-sdk/client-iot"); // CommonJS import
* const client = new IoTClient(config);
* const input = { // AssociateSbomWithPackageVersionRequest
* packageName: "STRING_VALUE", // required
* versionName: "STRING_VALUE", // required
* sbom: { // Sbom
* s3Location: { // S3Location
* bucket: "STRING_VALUE",
* key: "STRING_VALUE",
* version: "STRING_VALUE",
* },
* },
* clientToken: "STRING_VALUE",
* };
* const command = new AssociateSbomWithPackageVersionCommand(input);
* const response = await client.send(command);
* // { // AssociateSbomWithPackageVersionResponse
* // packageName: "STRING_VALUE",
* // versionName: "STRING_VALUE",
* // sbom: { // Sbom
* // s3Location: { // S3Location
* // bucket: "STRING_VALUE",
* // key: "STRING_VALUE",
* // version: "STRING_VALUE",
* // },
* // },
* // sbomValidationStatus: "IN_PROGRESS" || "FAILED" || "SUCCEEDED",
* // };
*
* ```
*
* @param AssociateSbomWithPackageVersionCommandInput - {@link AssociateSbomWithPackageVersionCommandInput}
* @returns {@link AssociateSbomWithPackageVersionCommandOutput}
* @see {@link AssociateSbomWithPackageVersionCommandInput} for command's `input` shape.
* @see {@link AssociateSbomWithPackageVersionCommandOutput} for command's `response` shape.
* @see {@link IoTClientResolvedConfig | config} for IoTClient's `config` shape.
*
* @throws {@link ConflictException} (client fault)
* <p>A resource with the same name already exists.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>Internal error from the service that indicates an unexpected error or that the service
* is unavailable.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource does not exist.</p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* <p>A limit has been exceeded.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>The rate exceeds the limit.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The request is not valid.</p>
*
* @throws {@link IoTServiceException}
* <p>Base exception class for all service exceptions from IoT service.</p>
*
* @public
*/
export class AssociateSbomWithPackageVersionCommand extends $Command
.classBuilder<
AssociateSbomWithPackageVersionCommandInput,
AssociateSbomWithPackageVersionCommandOutput,
IoTClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: IoTClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AWSIotService", "AssociateSbomWithPackageVersion", {})
.n("IoTClient", "AssociateSbomWithPackageVersionCommand")
.f(void 0, void 0)
.ser(se_AssociateSbomWithPackageVersionCommand)
.de(de_AssociateSbomWithPackageVersionCommand)
.build() {}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ export interface CreatePackageVersionCommandOutput extends CreatePackageVersionR
* attributes: { // ResourceAttributes
* "<keys>": "STRING_VALUE",
* },
* artifact: { // PackageVersionArtifact
* s3Location: { // S3Location
* bucket: "STRING_VALUE",
* key: "STRING_VALUE",
* version: "STRING_VALUE",
* },
* },
* recipe: "STRING_VALUE",
* tags: { // TagMap
* "<keys>": "STRING_VALUE",
* },
Expand Down
Loading

0 comments on commit 2df520d

Please sign in to comment.