Skip to content

Commit

Permalink
feat(client-iot): Add ConflictException to Update APIs of AWS IoT Sof…
Browse files Browse the repository at this point in the history
…tware Package Catalog
  • Loading branch information
awstools committed Jan 11, 2024
1 parent ef8a699 commit 3b6b5e4
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 18 deletions.
3 changes: 3 additions & 0 deletions clients/client-iot/src/commands/UpdatePackageCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ export interface UpdatePackageCommandOutput extends UpdatePackageResponse, __Met
* @see {@link UpdatePackageCommandOutput} 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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export interface UpdatePackageConfigurationCommandOutput extends UpdatePackageCo
* @see {@link UpdatePackageConfigurationCommandOutput} 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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ export interface UpdatePackageVersionCommandOutput extends UpdatePackageVersionR
* @see {@link UpdatePackageVersionCommandOutput} 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>
Expand Down
4 changes: 2 additions & 2 deletions clients/client-iot/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5028,7 +5028,7 @@ export interface CreateJobRequest {
/**
* @public
* <p>The package version Amazon Resource Names (ARNs) that are installed on the device when the
* job successfully completes. </p>
* job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>. </p>
* <p>
* <b>Note:</b>The following Length Constraints relates to a single ARN.
* Up to 25 package version ARNs are allowed.</p>
Expand Down Expand Up @@ -5172,7 +5172,7 @@ export interface CreateJobTemplateRequest {
/**
* @public
* <p>The package version Amazon Resource Names (ARNs) that are installed on the device when the
* job successfully completes. </p>
* job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.</p>
* <p>
* <b>Note:</b>The following Length Constraints relates to a single ARN.
* Up to 25 package version ARNs are allowed.</p>
Expand Down
4 changes: 2 additions & 2 deletions clients/client-iot/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2535,7 +2535,7 @@ export interface Job {
/**
* @public
* <p>The package version Amazon Resource Names (ARNs) that are installed on the device when the
* job successfully completes. </p>
* job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.</p>
* <p>
* <b>Note:</b>The following Length Constraints relates to a single ARN.
* Up to 25 package version ARNs are allowed.</p>
Expand Down Expand Up @@ -2801,7 +2801,7 @@ export interface DescribeJobTemplateResponse {
/**
* @public
* <p>The package version Amazon Resource Names (ARNs) that are installed on the device when the
* job successfully completes. </p>
* job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.</p>
* <p>
* <b>Note:</b>The following Length Constraints relates to a single ARN.
* Up to 25 package version ARNs are allowed.</p>
Expand Down
9 changes: 9 additions & 0 deletions clients/client-iot/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20816,6 +20816,9 @@ const de_UpdatePackageCommandError = async (
};
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ConflictException":
case "com.amazonaws.iot#ConflictException":
throw await de_ConflictExceptionRes(parsedOutput, context);
case "InternalServerException":
case "com.amazonaws.iot#InternalServerException":
throw await de_InternalServerExceptionRes(parsedOutput, context);
Expand Down Expand Up @@ -20868,6 +20871,9 @@ const de_UpdatePackageConfigurationCommandError = async (
};
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ConflictException":
case "com.amazonaws.iot#ConflictException":
throw await de_ConflictExceptionRes(parsedOutput, context);
case "InternalServerException":
case "com.amazonaws.iot#InternalServerException":
throw await de_InternalServerExceptionRes(parsedOutput, context);
Expand Down Expand Up @@ -20917,6 +20923,9 @@ const de_UpdatePackageVersionCommandError = async (
};
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ConflictException":
case "com.amazonaws.iot#ConflictException":
throw await de_ConflictExceptionRes(parsedOutput, context);
case "InternalServerException":
case "com.amazonaws.iot#InternalServerException":
throw await de_InternalServerExceptionRes(parsedOutput, context);
Expand Down
38 changes: 24 additions & 14 deletions codegen/sdk-codegen/aws-models/iot.json
Original file line number Diff line number Diff line change
Expand Up @@ -4643,6 +4643,9 @@
}
},
"com.amazonaws.iot#Boolean": {
"type": "boolean"
},
"com.amazonaws.iot#Boolean2": {
"type": "boolean",
"traits": {
"smithy.api#default": false
Expand Down Expand Up @@ -7445,7 +7448,7 @@
"destinationPackageVersions": {
"target": "com.amazonaws.iot#DestinationPackageVersions",
"traits": {
"smithy.api#documentation": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the \n job successfully completes. </p>\n <p>\n <b>Note:</b>The following Length Constraints relates to a single ARN. \n Up to 25 package version ARNs are allowed.</p>"
"smithy.api#documentation": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the \n job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href=\"https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle\">Package version lifecycle</a>. </p>\n <p>\n <b>Note:</b>The following Length Constraints relates to a single ARN. \n Up to 25 package version ARNs are allowed.</p>"
}
}
},
Expand Down Expand Up @@ -7585,7 +7588,7 @@
"destinationPackageVersions": {
"target": "com.amazonaws.iot#DestinationPackageVersions",
"traits": {
"smithy.api#documentation": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the \n job successfully completes. </p>\n <p>\n <b>Note:</b>The following Length Constraints relates to a single ARN. \n Up to 25 package version ARNs are allowed.</p>"
"smithy.api#documentation": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the \n job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href=\"https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle\">Package version lifecycle</a>.</p>\n <p>\n <b>Note:</b>The following Length Constraints relates to a single ARN. \n Up to 25 package version ARNs are allowed.</p>"
}
}
},
Expand Down Expand Up @@ -8549,9 +8552,8 @@
}
},
"enabled": {
"target": "com.amazonaws.iot#Enabled",
"target": "com.amazonaws.iot#Enabled2",
"traits": {
"smithy.api#default": false,
"smithy.api#documentation": "<p>True to enable the provisioning template, otherwise false.</p>"
}
},
Expand Down Expand Up @@ -13743,7 +13745,7 @@
"destinationPackageVersions": {
"target": "com.amazonaws.iot#DestinationPackageVersions",
"traits": {
"smithy.api#documentation": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the \n job successfully completes. </p>\n <p>\n <b>Note:</b>The following Length Constraints relates to a single ARN. \n Up to 25 package version ARNs are allowed.</p>"
"smithy.api#documentation": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the \n job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href=\"https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle\">Package version lifecycle</a>.</p>\n <p>\n <b>Note:</b>The following Length Constraints relates to a single ARN. \n Up to 25 package version ARNs are allowed.</p>"
}
}
},
Expand Down Expand Up @@ -14054,9 +14056,8 @@
}
},
"enabled": {
"target": "com.amazonaws.iot#Enabled",
"target": "com.amazonaws.iot#Enabled2",
"traits": {
"smithy.api#default": false,
"smithy.api#documentation": "<p>True if the provisioning template is enabled, otherwise false.</p>"
}
},
Expand Down Expand Up @@ -16179,6 +16180,9 @@
"smithy.api#default": false
}
},
"com.amazonaws.iot#Enabled2": {
"type": "boolean"
},
"com.amazonaws.iot#EnabledBoolean": {
"type": "boolean"
},
Expand Down Expand Up @@ -19164,7 +19168,7 @@
"destinationPackageVersions": {
"target": "com.amazonaws.iot#DestinationPackageVersions",
"traits": {
"smithy.api#documentation": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the \n job successfully completes. </p>\n <p>\n <b>Note:</b>The following Length Constraints relates to a single ARN. \n Up to 25 package version ARNs are allowed.</p>"
"smithy.api#documentation": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the \n job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href=\"https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle\">Package version lifecycle</a>.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href=\"https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle\">Package version lifecycle</a>.</p>\n <p>\n <b>Note:</b>The following Length Constraints relates to a single ARN. \n Up to 25 package version ARNs are allowed.</p>"
}
}
},
Expand Down Expand Up @@ -27629,9 +27633,8 @@
}
},
"enabled": {
"target": "com.amazonaws.iot#Enabled",
"target": "com.amazonaws.iot#Enabled2",
"traits": {
"smithy.api#default": false,
"smithy.api#documentation": "<p>True if the fleet provision template is enabled, otherwise false.</p>"
}
},
Expand Down Expand Up @@ -31850,7 +31853,6 @@
"connected": {
"target": "com.amazonaws.iot#Boolean",
"traits": {
"smithy.api#default": false,
"smithy.api#documentation": "<p>True if the thing is connected to the Amazon Web Services IoT Core service; false if it is not\n connected.</p>"
}
},
Expand Down Expand Up @@ -32298,7 +32300,7 @@
"type": "structure",
"members": {
"deprecated": {
"target": "com.amazonaws.iot#Boolean",
"target": "com.amazonaws.iot#Boolean2",
"traits": {
"smithy.api#default": false,
"smithy.api#documentation": "<p>Whether the thing type is deprecated. If <b>true</b>, no new things could be\n\t\t\tassociated with this type.</p>"
Expand Down Expand Up @@ -34548,6 +34550,9 @@
"target": "com.amazonaws.iot#UpdatePackageResponse"
},
"errors": [
{
"target": "com.amazonaws.iot#ConflictException"
},
{
"target": "com.amazonaws.iot#InternalServerException"
},
Expand Down Expand Up @@ -34580,6 +34585,9 @@
"target": "com.amazonaws.iot#UpdatePackageConfigurationResponse"
},
"errors": [
{
"target": "com.amazonaws.iot#ConflictException"
},
{
"target": "com.amazonaws.iot#InternalServerException"
},
Expand Down Expand Up @@ -34687,6 +34695,9 @@
"target": "com.amazonaws.iot#UpdatePackageVersionResponse"
},
"errors": [
{
"target": "com.amazonaws.iot#ConflictException"
},
{
"target": "com.amazonaws.iot#InternalServerException"
},
Expand Down Expand Up @@ -34819,9 +34830,8 @@
}
},
"enabled": {
"target": "com.amazonaws.iot#Enabled",
"target": "com.amazonaws.iot#Enabled2",
"traits": {
"smithy.api#default": false,
"smithy.api#documentation": "<p>True to enable the provisioning template, otherwise false.</p>"
}
},
Expand Down

0 comments on commit 3b6b5e4

Please sign in to comment.