(ctx context.Context, change *route53types.ChangeInfo)
| 353 | } |
| 354 | |
| 355 | func waitForChange(ctx context.Context, change *route53types.ChangeInfo) { |
| 356 | fmt.Printf("Waiting for sync") |
| 357 | for { |
| 358 | req := route53.GetChangeInput{Id: change.Id} |
| 359 | resp, err := r53.GetChange(ctx, &req) |
| 360 | fatalIfErr(err) |
| 361 | if resp.ChangeInfo.Status == route53types.ChangeStatusInsync { |
| 362 | fmt.Println("\nCompleted") |
| 363 | break |
| 364 | } else if resp.ChangeInfo.Status == route53types.ChangeStatusPending { |
| 365 | fmt.Printf(".") |
| 366 | } else { |
| 367 | fmt.Printf("\nFailed: %s\n", resp.ChangeInfo.Status) |
| 368 | break |
| 369 | } |
| 370 | time.Sleep(1 * time.Second) |
| 371 | } |
| 372 | } |
| 373 | |
| 374 | // Use shortened form of name with origin removed/abbreviated. |
| 375 | func shortenName(name, origin string) string { |
no test coverage detected