(ctx context.Context, name, comment, vpcId, vpcRegion, delegationSetId string)
| 17 | const ChangeBatchSize = 100 |
| 18 | |
| 19 | func createZone(ctx context.Context, name, comment, vpcId, vpcRegion, delegationSetId string) { |
| 20 | callerReference := uniqueReference() |
| 21 | req := route53.CreateHostedZoneInput{ |
| 22 | CallerReference: &callerReference, |
| 23 | Name: &name, |
| 24 | HostedZoneConfig: &route53types.HostedZoneConfig{ |
| 25 | Comment: &comment, |
| 26 | }, |
| 27 | } |
| 28 | |
| 29 | if vpcId != "" && vpcRegion != "" { |
| 30 | req.VPC = &route53types.VPC{ |
| 31 | VPCId: aws.String(vpcId), |
| 32 | VPCRegion: route53types.VPCRegion(vpcRegion), |
| 33 | } |
| 34 | } |
| 35 | if delegationSetId != "" { |
| 36 | delegationSetId = strings.Replace(delegationSetId, "/delegationset/", "", 1) |
| 37 | req.DelegationSetId = aws.String(delegationSetId) |
| 38 | } |
| 39 | resp, err := r53.CreateHostedZone(ctx, &req) |
| 40 | fatalIfErr(err) |
| 41 | fmt.Printf("Created zone: '%s' ID: '%s'\n", *resp.HostedZone.Name, *resp.HostedZone.Id) |
| 42 | } |
| 43 | |
| 44 | func createReusableDelegationSet(ctx context.Context, zoneId string) { |
| 45 | callerReference := uniqueReference() |
no test coverage detected