Skip to content

connect service ContactFlow.IsDefault serialized incorrectly #2909

Closed
@ewbankkit

Description

@ewbankkit

Acknowledgements

Describe the bug

The field IsDefault (added in [email protected], Release 2024-11-18) in the connect service's ContactFlow struct has Go type bool:

type ContactFlow struct {
// The Amazon Resource Name (ARN) of the flow.
Arn *string
// The JSON string that represents the content of the flow. For an example, see [Example flow in Amazon Connect Flow language].
//
// Length Constraints: Minimum length of 1. Maximum length of 256000.
//
// [Example flow in Amazon Connect Flow language]: https://docs.aws.amazon.com/connect/latest/APIReference/flow-language-example.html
Content *string
// The description of the flow.
Description *string
// Indicates the checksum value of the flow content.
FlowContentSha256 *string
// The identifier of the flow.
Id *string
// Amazon Connect includes a set of default flows that have already been
// published. It uses them to power your contact center.
IsDefault bool
// The region in which the contact flow was last modified
LastModifiedRegion *string
// The time at which the contact flow was last modified.
LastModifiedTime *time.Time
// The name of the flow.
Name *string
// The type of flow.
State ContactFlowState
// The status of the contact flow.
Status ContactFlowStatus
// The tags used to organize, track, or control access for this resource. For
// example, { "Tags": {"key1":"value1", "key2":"value2"} }.
Tags map[string]string
// The type of the flow. For descriptions of the available types, see [Choose a flow type] in the
// Amazon Connect Administrator Guide.
//
// [Choose a flow type]: https://docs.aws.amazon.com/connect/latest/adminguide/create-contact-flow.html#contact-flow-types
Type ContactFlowType
// The identifier of the flow version.
Version *int64
// The description of the flow version.
VersionDescription *string
noSmithyDocumentSerde
}
.
The upstream service is incorrectly serializing this field as a string

  http.response.body=
  | {
  |   "ContactFlow" : {
  |     "Arn" : "arn:aws:connect:us-west-2:123456789012:instance/5d367605-5d5b-4d98-a442-fe88e573aaaa/contact-flow/2f3b8896-ee32-48d5-981b-e287673e8f4f",
  |     "Id" : "2f3b8896-ee32-48d5-981b-e287673e8f4f",
  |     "IsDefault" : "false",
  |     "Name" : "resource-test-terraform-7075749418873109470",
  |     "Type" : "CONTACT_FLOW",
  |     "State" : "ACTIVE",
  |     "Status" : "PUBLISHED",
  |     "LastModifiedRegion" : "us-west-2",
  |     "LastModifiedTime" : 1.73229019499E9,
  |     "FlowContentSha256" : "9b5906e4b563c7d71dadd8f911d8c88db02ccd38a92edd17b55f92e302c6afaf",
  |     "Description" : "Created",
  |     "Content" : "    {\n\t\t\"Version\": \"2019-10-30\",\n\t\t\"StartAction\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\"Actions\": [\n\t\t\t{\n\t\t\t\t\"Identifier\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\t\t\"Type\": \"MessageParticipant\",\n\t\t\t\t\"Transitions\": {\n\t\t\t\t\t\"NextAction\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\t\"Errors\": [],\n\t\t\t\t\t\"Conditions\": []\n\t\t\t\t},\n\t\t\t\t\"Parameters\": {\n\t\t\t\t\t\"Text\": \"Created\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"Identifier\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\"Type\": \"DisconnectParticipant\",\n\t\t\t\t\"Transitions\": {},\n\t\t\t\t\"Parameters\": {}\n\t\t\t}\n\t\t]\n    }\n",
  |     "Tags" : {
  |       "Method" : "Created",
  |       "Name" : "Test Contact Flow"
  |     }
  |   }
  | }

, causing runtime errors:

deserialization failed, failed to decode response body with invalid JSON, expected Boolean to be of type *bool, got string instead

See hashicorp/terraform-provider-aws#40267.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

The DescribeContactFlow API call should succeed with the correct value for IsDefault returned.

Current Behavior

Runtime deserialization error.

Reproduction Steps

	input := &connect.DescribeContactFlowInput{
		ContactFlowId: aws.String(contactFlowID),
		InstanceId:    aws.String(instanceID),
	}

	output, err := conn.DescribeContactFlow(ctx, input)

Possible Solution

No response

Additional Information/Context

No response

AWS Go SDK V2 Module Versions Used

% grep connect go.mod
	github.com/aws/aws-sdk-go-v2/service/codeconnections v1.5.6
	github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.29.6
	github.com/aws/aws-sdk-go-v2/service/connect v1.116.0
	github.com/aws/aws-sdk-go-v2/service/connectcases v1.21.6
	github.com/aws/aws-sdk-go-v2/service/directconnect v1.29.6
	github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.21.6
	github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.35.6
	github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.9.6

Compiler and Version used

go 1.23.2

Operating System and version

macos

Metadata

Metadata

Assignees

Labels

breaking-changeIssue requires a breaking change to remediate.bugThis issue is a bug.p0This issue is the highest prioritypending-releaseThis issue will be fixed by an approved PR that hasn't been released yet.service-apiThis issue is due to a problem in a service API, not the SDK implementation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions