Skip to content

Commit

Permalink
Add ConflictException to Update APIs of AWS IoT Software Package Catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-sdk-dotnet-automation committed Jan 11, 2024
1 parent b5c3ed9 commit 7ae36e3
Show file tree
Hide file tree
Showing 17 changed files with 208 additions and 12 deletions.
3 changes: 3 additions & 0 deletions generator/ServiceModels/iot/iot-2015-05-28.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -3912,6 +3912,7 @@
"output":{"shape":"UpdatePackageResponse"},
"errors":[
{"shape":"ThrottlingException"},
{"shape":"ConflictException"},
{"shape":"InternalServerException"},
{"shape":"ValidationException"},
{"shape":"ResourceNotFoundException"}
Expand All @@ -3929,6 +3930,7 @@
"output":{"shape":"UpdatePackageConfigurationResponse"},
"errors":[
{"shape":"ThrottlingException"},
{"shape":"ConflictException"},
{"shape":"InternalServerException"},
{"shape":"ValidationException"}
],
Expand All @@ -3945,6 +3947,7 @@
"output":{"shape":"UpdatePackageVersionResponse"},
"errors":[
{"shape":"ThrottlingException"},
{"shape":"ConflictException"},
{"shape":"InternalServerException"},
{"shape":"ValidationException"},
{"shape":"ResourceNotFoundException"}
Expand Down
8 changes: 4 additions & 4 deletions generator/ServiceModels/iot/iot-2015-05-28.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3075,10 +3075,10 @@
"DestinationPackageVersions": {
"base": null,
"refs": {
"CreateJobRequest$destinationPackageVersions": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. </p> <p> <b>Note:</b>The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.</p>",
"CreateJobTemplateRequest$destinationPackageVersions": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. </p> <p> <b>Note:</b>The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.</p>",
"DescribeJobTemplateResponse$destinationPackageVersions": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. </p> <p> <b>Note:</b>The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.</p>",
"Job$destinationPackageVersions": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. </p> <p> <b>Note:</b>The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.</p>"
"CreateJobRequest$destinationPackageVersions": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the 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>",
"CreateJobTemplateRequest$destinationPackageVersions": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the 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>",
"DescribeJobTemplateResponse$destinationPackageVersions": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the 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>",
"Job$destinationPackageVersions": "<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the 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>"
}
},
"DetachPolicyRequest": {
Expand Down
11 changes: 7 additions & 4 deletions generator/ServiceModels/iot/iot-2015-05-28.normal.json
Original file line number Diff line number Diff line change
Expand Up @@ -4154,6 +4154,7 @@
"output":{"shape":"UpdatePackageResponse"},
"errors":[
{"shape":"ThrottlingException"},
{"shape":"ConflictException"},
{"shape":"InternalServerException"},
{"shape":"ValidationException"},
{"shape":"ResourceNotFoundException"}
Expand All @@ -4172,6 +4173,7 @@
"output":{"shape":"UpdatePackageConfigurationResponse"},
"errors":[
{"shape":"ThrottlingException"},
{"shape":"ConflictException"},
{"shape":"InternalServerException"},
{"shape":"ValidationException"}
],
Expand All @@ -4189,6 +4191,7 @@
"output":{"shape":"UpdatePackageVersionResponse"},
"errors":[
{"shape":"ThrottlingException"},
{"shape":"ConflictException"},
{"shape":"InternalServerException"},
{"shape":"ValidationException"},
{"shape":"ResourceNotFoundException"}
Expand Down Expand Up @@ -7230,7 +7233,7 @@
},
"destinationPackageVersions":{
"shape":"DestinationPackageVersions",
"documentation":"<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. </p> <p> <b>Note:</b>The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.</p>"
"documentation":"<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the 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 @@ -7298,7 +7301,7 @@
},
"destinationPackageVersions":{
"shape":"DestinationPackageVersions",
"documentation":"<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. </p> <p> <b>Note:</b>The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.</p>"
"documentation":"<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the 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 @@ -9742,7 +9745,7 @@
},
"destinationPackageVersions":{
"shape":"DestinationPackageVersions",
"documentation":"<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. </p> <p> <b>Note:</b>The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.</p>"
"documentation":"<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the 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 @@ -12328,7 +12331,7 @@
},
"destinationPackageVersions":{
"shape":"DestinationPackageVersions",
"documentation":"<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. </p> <p> <b>Note:</b>The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.</p>"
"documentation":"<p>The package version Amazon Resource Names (ARNs) that are installed on the device when the 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>"
}
},
"documentation":"<p>The <code>Job</code> object contains details about a job.</p>"
Expand Down
4 changes: 3 additions & 1 deletion sdk/src/Services/IoT/Generated/Model/CreateJobRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ internal bool IsSetDescription()
/// Gets and sets the property DestinationPackageVersions.
/// <para>
/// The package version Amazon Resource Names (ARNs) that are installed on the device
/// when the job successfully completes.
/// when the 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>.
/// </para>
///
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ internal bool IsSetDescription()
/// Gets and sets the property DestinationPackageVersions.
/// <para>
/// The package version Amazon Resource Names (ARNs) that are installed on the device
/// when the job successfully completes.
/// when the 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>.
/// </para>
///
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ internal bool IsSetDescription()
/// Gets and sets the property DestinationPackageVersions.
/// <para>
/// The package version Amazon Resource Names (ARNs) that are installed on the device
/// when the job successfully completes.
/// when the 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>.
/// </para>
///
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public override AmazonServiceException UnmarshallException(JsonUnmarshallerConte
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public override AmazonServiceException UnmarshallException(JsonUnmarshallerConte
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public override AmazonServiceException UnmarshallException(JsonUnmarshallerConte
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException"))
{
return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
Expand Down
6 changes: 5 additions & 1 deletion sdk/src/Services/IoT/Generated/Model/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ internal bool IsSetDescription()
/// Gets and sets the property DestinationPackageVersions.
/// <para>
/// The package version Amazon Resource Names (ARNs) that are installed on the device
/// when the job successfully completes.
/// when the 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>.
/// </para>
///
/// <para>
Expand Down
9 changes: 9 additions & 0 deletions sdk/src/Services/IoT/Generated/_bcl35/AmazonIoTClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20674,6 +20674,9 @@ public virtual UpdateMitigationActionResponse EndUpdateMitigationAction(IAsyncRe
/// <param name="request">Container for the necessary parameters to execute the UpdatePackage service method.</param>
///
/// <returns>The response from the UpdatePackage service method, as returned by IoT.</returns>
/// <exception cref="Amazon.IoT.Model.ConflictException">
/// A resource with the same name already exists.
/// </exception>
/// <exception cref="Amazon.IoT.Model.InternalServerException">
/// Internal error from the service that indicates an unexpected error or that the service
/// is unavailable.
Expand Down Expand Up @@ -20748,6 +20751,9 @@ public virtual UpdatePackageResponse EndUpdatePackage(IAsyncResult asyncResult)
/// <param name="request">Container for the necessary parameters to execute the UpdatePackageConfiguration service method.</param>
///
/// <returns>The response from the UpdatePackageConfiguration service method, as returned by IoT.</returns>
/// <exception cref="Amazon.IoT.Model.ConflictException">
/// A resource with the same name already exists.
/// </exception>
/// <exception cref="Amazon.IoT.Model.InternalServerException">
/// Internal error from the service that indicates an unexpected error or that the service
/// is unavailable.
Expand Down Expand Up @@ -20819,6 +20825,9 @@ public virtual UpdatePackageConfigurationResponse EndUpdatePackageConfiguration(
/// <param name="request">Container for the necessary parameters to execute the UpdatePackageVersion service method.</param>
///
/// <returns>The response from the UpdatePackageVersion service method, as returned by IoT.</returns>
/// <exception cref="Amazon.IoT.Model.ConflictException">
/// A resource with the same name already exists.
/// </exception>
/// <exception cref="Amazon.IoT.Model.InternalServerException">
/// Internal error from the service that indicates an unexpected error or that the service
/// is unavailable.
Expand Down
9 changes: 9 additions & 0 deletions sdk/src/Services/IoT/Generated/_bcl35/IAmazonIoT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16849,6 +16849,9 @@ public partial interface IAmazonIoT : IAmazonService, IDisposable
/// <param name="request">Container for the necessary parameters to execute the UpdatePackage service method.</param>
///
/// <returns>The response from the UpdatePackage service method, as returned by IoT.</returns>
/// <exception cref="Amazon.IoT.Model.ConflictException">
/// A resource with the same name already exists.
/// </exception>
/// <exception cref="Amazon.IoT.Model.InternalServerException">
/// Internal error from the service that indicates an unexpected error or that the service
/// is unavailable.
Expand Down Expand Up @@ -16909,6 +16912,9 @@ public partial interface IAmazonIoT : IAmazonService, IDisposable
/// <param name="request">Container for the necessary parameters to execute the UpdatePackageConfiguration service method.</param>
///
/// <returns>The response from the UpdatePackageConfiguration service method, as returned by IoT.</returns>
/// <exception cref="Amazon.IoT.Model.ConflictException">
/// A resource with the same name already exists.
/// </exception>
/// <exception cref="Amazon.IoT.Model.InternalServerException">
/// Internal error from the service that indicates an unexpected error or that the service
/// is unavailable.
Expand Down Expand Up @@ -16966,6 +16972,9 @@ public partial interface IAmazonIoT : IAmazonService, IDisposable
/// <param name="request">Container for the necessary parameters to execute the UpdatePackageVersion service method.</param>
///
/// <returns>The response from the UpdatePackageVersion service method, as returned by IoT.</returns>
/// <exception cref="Amazon.IoT.Model.ConflictException">
/// A resource with the same name already exists.
/// </exception>
/// <exception cref="Amazon.IoT.Model.InternalServerException">
/// Internal error from the service that indicates an unexpected error or that the service
/// is unavailable.
Expand Down
Loading

0 comments on commit 7ae36e3

Please sign in to comment.