Skip to content

Commit d2380d7

Browse files
author
awstools
committed
feat(client-sagemaker-a2i-runtime): Fix bug with parsing ISO-8601 CreationTime in Java SDK in DescribeHumanLoop
1 parent c4ac25d commit d2380d7

File tree

2 files changed

+26
-25
lines changed

2 files changed

+26
-25
lines changed

clients/client-sagemaker-a2i-runtime/src/protocols/Aws_restJson1.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@a
33
import {
44
decorateServiceException as __decorateServiceException,
55
expectNonNull as __expectNonNull,
6-
expectNumber as __expectNumber,
76
expectObject as __expectObject,
87
expectString as __expectString,
98
extendedEncodeURIComponent as __extendedEncodeURIComponent,
109
map as __map,
11-
parseEpochTimestamp as __parseEpochTimestamp,
10+
parseRfc3339DateTime as __parseRfc3339DateTime,
1211
resolvedPath as __resolvedPath,
1312
throwDefaultError,
1413
} from "@aws-sdk/smithy-client";
@@ -242,7 +241,7 @@ export const deserializeAws_restJson1DescribeHumanLoopCommand = async (
242241
});
243242
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
244243
if (data.CreationTime != null) {
245-
contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime)));
244+
contents.CreationTime = __expectNonNull(__parseRfc3339DateTime(data.CreationTime));
246245
}
247246
if (data.FailureCode != null) {
248247
contents.FailureCode = __expectString(data.FailureCode);
@@ -600,9 +599,7 @@ const deserializeAws_restJson1HumanLoopSummaries = (output: any, context: __Serd
600599
const deserializeAws_restJson1HumanLoopSummary = (output: any, context: __SerdeContext): HumanLoopSummary => {
601600
return {
602601
CreationTime:
603-
output.CreationTime != null
604-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
605-
: undefined,
602+
output.CreationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.CreationTime)) : undefined,
606603
FailureReason: __expectString(output.FailureReason),
607604
FlowDefinitionArn: __expectString(output.FlowDefinitionArn),
608605
HumanLoopName: __expectString(output.HumanLoopName),

codegen/sdk-codegen/aws-models/sagemaker-a2i-runtime.json

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,21 @@
3131
"shapes": {
3232
"com.amazonaws.sagemakera2iruntime#AmazonSageMakerA2IRuntime": {
3333
"type": "service",
34+
"traits": {
35+
"aws.api#service": {
36+
"sdkId": "SageMaker A2I Runtime",
37+
"arnNamespace": "sagemaker",
38+
"cloudFormationName": "SageMakerA2IRuntime",
39+
"cloudTrailEventSource": "sagemakera2iruntime.amazonaws.com",
40+
"endpointPrefix": "a2i-runtime.sagemaker"
41+
},
42+
"aws.auth#sigv4": {
43+
"name": "sagemaker"
44+
},
45+
"aws.protocols#restJson1": {},
46+
"smithy.api#documentation": "<p>Amazon Augmented AI (Amazon A2I) adds the benefit of human judgment to any machine learning\n application. When an AI application can't evaluate data with a high degree of confidence,\n human reviewers can take over. This human review is called a human review workflow. To create\n and start a human review workflow, you need three resources: a <i>worker task\n template</i>, a <i>flow definition</i>, and a <i>human\n loop</i>.</p>\n <p>For information about these resources and prerequisites for using Amazon A2I, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-getting-started.html\">Get Started with\n Amazon Augmented AI</a> in the Amazon SageMaker Developer Guide.</p>\n <p>This API reference includes information about API actions and data types that you can use\n to interact with Amazon A2I programmatically. Use this guide to:</p>\n <ul>\n <li>\n <p>Start a human loop with the <code>StartHumanLoop</code> operation when using\n Amazon A2I with a <i>custom task type</i>. To learn more about the\n difference between custom and built-in task types, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-task-types-general.html\">Use Task Types </a>. To learn\n how to start a human loop using this API, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-start-human-loop.html#a2i-instructions-starthumanloop\">Create and Start a Human Loop for a Custom Task Type </a> in the\n Amazon SageMaker Developer Guide.</p>\n </li>\n <li>\n <p>Manage your human loops. You can list all human loops that you have created, describe\n individual human loops, and stop and delete human loops. To learn more, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-monitor-humanloop-results.html\">Monitor and Manage Your Human Loop </a> in the Amazon SageMaker Developer Guide.</p>\n </li>\n </ul>\n <p>Amazon A2I integrates APIs from various AWS services to create and start human review\n workflows for those services. To learn how Amazon A2I uses these APIs, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-api-references.html\">Use APIs in\n Amazon A2I</a> in the Amazon SageMaker Developer Guide.</p>",
47+
"smithy.api#title": "Amazon Augmented AI Runtime"
48+
},
3449
"version": "2019-11-07",
3550
"operations": [
3651
{
@@ -48,22 +63,7 @@
4863
{
4964
"target": "com.amazonaws.sagemakera2iruntime#StopHumanLoop"
5065
}
51-
],
52-
"traits": {
53-
"aws.api#service": {
54-
"sdkId": "SageMaker A2I Runtime",
55-
"arnNamespace": "sagemaker",
56-
"cloudFormationName": "SageMakerA2IRuntime",
57-
"cloudTrailEventSource": "sagemakera2iruntime.amazonaws.com",
58-
"endpointPrefix": "a2i-runtime.sagemaker"
59-
},
60-
"aws.auth#sigv4": {
61-
"name": "sagemaker"
62-
},
63-
"aws.protocols#restJson1": {},
64-
"smithy.api#documentation": "<p>Amazon Augmented AI (Amazon A2I) adds the benefit of human judgment to any machine learning\n application. When an AI application can't evaluate data with a high degree of confidence,\n human reviewers can take over. This human review is called a human review workflow. To create\n and start a human review workflow, you need three resources: a <i>worker task\n template</i>, a <i>flow definition</i>, and a <i>human\n loop</i>.</p>\n <p>For information about these resources and prerequisites for using Amazon A2I, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-getting-started.html\">Get Started with\n Amazon Augmented AI</a> in the Amazon SageMaker Developer Guide.</p>\n <p>This API reference includes information about API actions and data types that you can use\n to interact with Amazon A2I programmatically. Use this guide to:</p>\n <ul>\n <li>\n <p>Start a human loop with the <code>StartHumanLoop</code> operation when using\n Amazon A2I with a <i>custom task type</i>. To learn more about the\n difference between custom and built-in task types, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-task-types-general.html\">Use Task Types </a>. To learn\n how to start a human loop using this API, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-start-human-loop.html#a2i-instructions-starthumanloop\">Create and Start a Human Loop for a Custom Task Type </a> in the\n Amazon SageMaker Developer Guide.</p>\n </li>\n <li>\n <p>Manage your human loops. You can list all human loops that you have created, describe\n individual human loops, and stop and delete human loops. To learn more, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-monitor-humanloop-results.html\">Monitor and Manage Your Human Loop </a> in the Amazon SageMaker Developer Guide.</p>\n </li>\n </ul>\n <p>Amazon A2I integrates APIs from various AWS services to create and start human review\n workflows for those services. To learn how Amazon A2I uses these APIs, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-api-references.html\">Use APIs in\n Amazon A2I</a> in the Amazon SageMaker Developer Guide.</p>",
65-
"smithy.api#title": "Amazon Augmented AI Runtime"
66-
}
66+
]
6767
},
6868
"com.amazonaws.sagemakera2iruntime#ConflictException": {
6969
"type": "structure",
@@ -271,7 +271,7 @@
271271
"min": 0,
272272
"max": 1024
273273
},
274-
"smithy.api#pattern": "arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:flow-definition/.*"
274+
"smithy.api#pattern": "^arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:flow-definition/"
275275
}
276276
},
277277
"com.amazonaws.sagemakera2iruntime#HumanLoopArn": {
@@ -281,7 +281,7 @@
281281
"min": 0,
282282
"max": 1024
283283
},
284-
"smithy.api#pattern": "arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:human-loop/.*"
284+
"smithy.api#pattern": "^arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:human-loop/"
285285
}
286286
},
287287
"com.amazonaws.sagemakera2iruntime#HumanLoopDataAttributes": {
@@ -464,6 +464,7 @@
464464
"smithy.api#paginated": {
465465
"inputToken": "NextToken",
466466
"outputToken": "NextToken",
467+
"items": "HumanLoopSummaries",
467468
"pageSize": "MaxResults"
468469
}
469470
}
@@ -736,7 +737,10 @@
736737
}
737738
},
738739
"com.amazonaws.sagemakera2iruntime#Timestamp": {
739-
"type": "timestamp"
740+
"type": "timestamp",
741+
"traits": {
742+
"smithy.api#timestampFormat": "date-time"
743+
}
740744
},
741745
"com.amazonaws.sagemakera2iruntime#ValidationException": {
742746
"type": "structure",

0 commit comments

Comments
 (0)