aws-samples / aws-samples/amazon-connect-copy

New Metafields LastModifiedTime and LastModifiedRegion breaks the copy logic for Hours of Operations

Open
#49 2 comments 4 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
40
Forks
26
PR merge metrics
No merged PRs in 30d

Description

Hello,
During the copy process this error messages raises in the log:
` Unknown parameter in input: "LastModifiedTime", must be one of: InstanceId, HoursOfOperationId, Name, Description, TimeZone, Config`
and
`Unknown parameter in input: "LastModifiedRegion", must be one of: InstanceId, HoursOfOperationId, Name, Description, TimeZone, Config`

The current output for describe-hour-of-operations is
`{
"HoursOfOperationSummaryList": [
{
"Id": "xxxxxxxxxx",
"Arn": "arn:aws:connect:eu-central-1:XXXXXXXXXXX:instance/xxxxxxxxxx/operating-hours/xxxxxxxxxx",
"Name": "xxxx working hours",
"LastModifiedTime": "2023-11-23T20:23:24.386000+01:00",
"LastModifiedRegion": "eu-central-1"
},
{
"Id": "xxxxxxxxxx",
"Arn": "arn:aws:connect:eu-central-1:XXXXXXXXXXX:instance/xxxxxxxxxx/operating-hours/xxxxxxxxxx",
"Name": "Basic Hours",
"LastModifiedTime": "2023-11-23T20:08:56.375000+01:00",
"LastModifiedRegion": "eu-central-1"
}
]
}`

A single describe-hour-of-operation seems
`{
"HoursOfOperation": {
"HoursOfOperationId": "XXXXXXXXXXX",
"HoursOfOperationArn": "arn:aws:connect:eu-central-1:XXXXXXXXXXX:instance/XXXXXXXXXXX/operating-hours/XXXXXXXXXXX",
"Name": "Basic Hours",
"Description": "Never Open",
"TimeZone": "Europe/Berlin",
"Config": [],
"Tags": {},
"LastModifiedTime": "2023-11-23T20:08:56.375000+01:00",
"LastModifiedRegion": "eu-central-1"
}
}`

From the logic I understand, that the copy iterate over a json and try then to update each attribute step by step. This fails for the read-only meta fields LastModifiedTime and LastModifiedRegion and this fields needs to be excluded from the loop iteration.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.