Skip to content

Commit 3b6b5e4

Browse files
author
awstools
committed
feat(client-iot): Add ConflictException to Update APIs of AWS IoT Software Package Catalog
1 parent ef8a699 commit 3b6b5e4

File tree

7 files changed

+46
-18
lines changed

7 files changed

+46
-18
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ export interface UpdatePackageCommandOutput extends UpdatePackageResponse, __Met
5959
* @see {@link UpdatePackageCommandOutput} for command's `response` shape.
6060
* @see {@link IoTClientResolvedConfig | config} for IoTClient's `config` shape.
6161
*
62+
* @throws {@link ConflictException} (client fault)
63+
* <p>A resource with the same name already exists.</p>
64+
*
6265
* @throws {@link InternalServerException} (server fault)
6366
* <p>Internal error from the service that indicates an unexpected error or that the service
6467
* is unavailable.</p>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ export interface UpdatePackageConfigurationCommandOutput extends UpdatePackageCo
5555
* @see {@link UpdatePackageConfigurationCommandOutput} for command's `response` shape.
5656
* @see {@link IoTClientResolvedConfig | config} for IoTClient's `config` shape.
5757
*
58+
* @throws {@link ConflictException} (client fault)
59+
* <p>A resource with the same name already exists.</p>
60+
*
5861
* @throws {@link InternalServerException} (server fault)
5962
* <p>Internal error from the service that indicates an unexpected error or that the service
6063
* is unavailable.</p>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ export interface UpdatePackageVersionCommandOutput extends UpdatePackageVersionR
6262
* @see {@link UpdatePackageVersionCommandOutput} for command's `response` shape.
6363
* @see {@link IoTClientResolvedConfig | config} for IoTClient's `config` shape.
6464
*
65+
* @throws {@link ConflictException} (client fault)
66+
* <p>A resource with the same name already exists.</p>
67+
*
6568
* @throws {@link InternalServerException} (server fault)
6669
* <p>Internal error from the service that indicates an unexpected error or that the service
6770
* is unavailable.</p>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5028,7 +5028,7 @@ export interface CreateJobRequest {
50285028
/**
50295029
* @public
50305030
* <p>The package version Amazon Resource Names (ARNs) that are installed on the device when the
5031-
* job successfully completes. </p>
5031+
* 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>
50325032
* <p>
50335033
* <b>Note:</b>The following Length Constraints relates to a single ARN.
50345034
* Up to 25 package version ARNs are allowed.</p>
@@ -5172,7 +5172,7 @@ export interface CreateJobTemplateRequest {
51725172
/**
51735173
* @public
51745174
* <p>The package version Amazon Resource Names (ARNs) that are installed on the device when the
5175-
* job successfully completes. </p>
5175+
* 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>
51765176
* <p>
51775177
* <b>Note:</b>The following Length Constraints relates to a single ARN.
51785178
* Up to 25 package version ARNs are allowed.</p>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2535,7 +2535,7 @@ export interface Job {
25352535
/**
25362536
* @public
25372537
* <p>The package version Amazon Resource Names (ARNs) that are installed on the device when the
2538-
* job successfully completes. </p>
2538+
* 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>
25392539
* <p>
25402540
* <b>Note:</b>The following Length Constraints relates to a single ARN.
25412541
* Up to 25 package version ARNs are allowed.</p>
@@ -2801,7 +2801,7 @@ export interface DescribeJobTemplateResponse {
28012801
/**
28022802
* @public
28032803
* <p>The package version Amazon Resource Names (ARNs) that are installed on the device when the
2804-
* job successfully completes. </p>
2804+
* 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>
28052805
* <p>
28062806
* <b>Note:</b>The following Length Constraints relates to a single ARN.
28072807
* Up to 25 package version ARNs are allowed.</p>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20816,6 +20816,9 @@ const de_UpdatePackageCommandError = async (
2081620816
};
2081720817
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2081820818
switch (errorCode) {
20819+
case "ConflictException":
20820+
case "com.amazonaws.iot#ConflictException":
20821+
throw await de_ConflictExceptionRes(parsedOutput, context);
2081920822
case "InternalServerException":
2082020823
case "com.amazonaws.iot#InternalServerException":
2082120824
throw await de_InternalServerExceptionRes(parsedOutput, context);
@@ -20868,6 +20871,9 @@ const de_UpdatePackageConfigurationCommandError = async (
2086820871
};
2086920872
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2087020873
switch (errorCode) {
20874+
case "ConflictException":
20875+
case "com.amazonaws.iot#ConflictException":
20876+
throw await de_ConflictExceptionRes(parsedOutput, context);
2087120877
case "InternalServerException":
2087220878
case "com.amazonaws.iot#InternalServerException":
2087320879
throw await de_InternalServerExceptionRes(parsedOutput, context);
@@ -20917,6 +20923,9 @@ const de_UpdatePackageVersionCommandError = async (
2091720923
};
2091820924
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2091920925
switch (errorCode) {
20926+
case "ConflictException":
20927+
case "com.amazonaws.iot#ConflictException":
20928+
throw await de_ConflictExceptionRes(parsedOutput, context);
2092020929
case "InternalServerException":
2092120930
case "com.amazonaws.iot#InternalServerException":
2092220931
throw await de_InternalServerExceptionRes(parsedOutput, context);

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

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4643,6 +4643,9 @@
46434643
}
46444644
},
46454645
"com.amazonaws.iot#Boolean": {
4646+
"type": "boolean"
4647+
},
4648+
"com.amazonaws.iot#Boolean2": {
46464649
"type": "boolean",
46474650
"traits": {
46484651
"smithy.api#default": false
@@ -7445,7 +7448,7 @@
74457448
"destinationPackageVersions": {
74467449
"target": "com.amazonaws.iot#DestinationPackageVersions",
74477450
"traits": {
7448-
"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>"
7451+
"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>"
74497452
}
74507453
}
74517454
},
@@ -7585,7 +7588,7 @@
75857588
"destinationPackageVersions": {
75867589
"target": "com.amazonaws.iot#DestinationPackageVersions",
75877590
"traits": {
7588-
"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>"
7591+
"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>"
75897592
}
75907593
}
75917594
},
@@ -8549,9 +8552,8 @@
85498552
}
85508553
},
85518554
"enabled": {
8552-
"target": "com.amazonaws.iot#Enabled",
8555+
"target": "com.amazonaws.iot#Enabled2",
85538556
"traits": {
8554-
"smithy.api#default": false,
85558557
"smithy.api#documentation": "<p>True to enable the provisioning template, otherwise false.</p>"
85568558
}
85578559
},
@@ -13743,7 +13745,7 @@
1374313745
"destinationPackageVersions": {
1374413746
"target": "com.amazonaws.iot#DestinationPackageVersions",
1374513747
"traits": {
13746-
"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>"
13748+
"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>"
1374713749
}
1374813750
}
1374913751
},
@@ -14054,9 +14056,8 @@
1405414056
}
1405514057
},
1405614058
"enabled": {
14057-
"target": "com.amazonaws.iot#Enabled",
14059+
"target": "com.amazonaws.iot#Enabled2",
1405814060
"traits": {
14059-
"smithy.api#default": false,
1406014061
"smithy.api#documentation": "<p>True if the provisioning template is enabled, otherwise false.</p>"
1406114062
}
1406214063
},
@@ -16179,6 +16180,9 @@
1617916180
"smithy.api#default": false
1618016181
}
1618116182
},
16183+
"com.amazonaws.iot#Enabled2": {
16184+
"type": "boolean"
16185+
},
1618216186
"com.amazonaws.iot#EnabledBoolean": {
1618316187
"type": "boolean"
1618416188
},
@@ -19164,7 +19168,7 @@
1916419168
"destinationPackageVersions": {
1916519169
"target": "com.amazonaws.iot#DestinationPackageVersions",
1916619170
"traits": {
19167-
"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>"
19171+
"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>"
1916819172
}
1916919173
}
1917019174
},
@@ -27629,9 +27633,8 @@
2762927633
}
2763027634
},
2763127635
"enabled": {
27632-
"target": "com.amazonaws.iot#Enabled",
27636+
"target": "com.amazonaws.iot#Enabled2",
2763327637
"traits": {
27634-
"smithy.api#default": false,
2763527638
"smithy.api#documentation": "<p>True if the fleet provision template is enabled, otherwise false.</p>"
2763627639
}
2763727640
},
@@ -31850,7 +31853,6 @@
3185031853
"connected": {
3185131854
"target": "com.amazonaws.iot#Boolean",
3185231855
"traits": {
31853-
"smithy.api#default": false,
3185431856
"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>"
3185531857
}
3185631858
},
@@ -32298,7 +32300,7 @@
3229832300
"type": "structure",
3229932301
"members": {
3230032302
"deprecated": {
32301-
"target": "com.amazonaws.iot#Boolean",
32303+
"target": "com.amazonaws.iot#Boolean2",
3230232304
"traits": {
3230332305
"smithy.api#default": false,
3230432306
"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>"
@@ -34548,6 +34550,9 @@
3454834550
"target": "com.amazonaws.iot#UpdatePackageResponse"
3454934551
},
3455034552
"errors": [
34553+
{
34554+
"target": "com.amazonaws.iot#ConflictException"
34555+
},
3455134556
{
3455234557
"target": "com.amazonaws.iot#InternalServerException"
3455334558
},
@@ -34580,6 +34585,9 @@
3458034585
"target": "com.amazonaws.iot#UpdatePackageConfigurationResponse"
3458134586
},
3458234587
"errors": [
34588+
{
34589+
"target": "com.amazonaws.iot#ConflictException"
34590+
},
3458334591
{
3458434592
"target": "com.amazonaws.iot#InternalServerException"
3458534593
},
@@ -34687,6 +34695,9 @@
3468734695
"target": "com.amazonaws.iot#UpdatePackageVersionResponse"
3468834696
},
3468934697
"errors": [
34698+
{
34699+
"target": "com.amazonaws.iot#ConflictException"
34700+
},
3469034701
{
3469134702
"target": "com.amazonaws.iot#InternalServerException"
3469234703
},
@@ -34819,9 +34830,8 @@
3481934830
}
3482034831
},
3482134832
"enabled": {
34822-
"target": "com.amazonaws.iot#Enabled",
34833+
"target": "com.amazonaws.iot#Enabled2",
3482334834
"traits": {
34824-
"smithy.api#default": false,
3482534835
"smithy.api#documentation": "<p>True to enable the provisioning template, otherwise false.</p>"
3482634836
}
3482734837
},

0 commit comments

Comments
 (0)