Amazon Route 53 .NET SDK - CreateHostedZone / CreateHostedZoneRequest 与 DelegationSetId

问题描述 投票:0回答:1

这是一个非常具体的用例场景,但我正在使用 Route 53 .NET SDK 编写一个接口,并且我正在尝试使用委派集创建托管区域。我们有大量的域名,并且需要不断添加更多。我们为某些 NS 设置了委派,任何新创建的域都需要使用此委派集来创建。

根据我的理解,需要使用委派集创建新域,并且以后无法修改以使用所述委派。

我仔细阅读了文档,并查看了一些相当过时的创建托管区域的 .NET 示例,但看起来没有直接参数可以在 createHostedZoneResponse 中设置“DelegationSetId”。

举个例子 - 我希望它在这个社区:

        // Create a new hosted zone using the domain name
        var createHostedZoneRequest = new CreateHostedZoneRequest {
            Name = domainName,
            CallerReference = System.Guid.NewGuid().ToString(),
            // DelegationSetId = _delgationSetId <-- but this is not a property

        };

是否有其他方法可以在 .NET 中设置此属性以进行创建?有人有使用委托集在 Route53 中创建托管区域的经验吗?有解决办法吗?

如果我绝望的话,我可以将创建/更新插入逻辑移至前端。

感谢您的浏览。

amazon-route53
1个回答
0
投票

回答我自己的问题。我在 AWS github 上对此做出了回应。

需要使用CreateHostedZoneAsync。

var createHostedZoneResponse = r53Client.CreateHostedZoneAsync(new CreateHostedZoneRequest {
            Name = domainName,
            CallerReference = System.Guid.NewGuid().ToString(),
            DelegationSetId = _route53DelegationSet
        });

由于我的项目中存在引用冲突,此方法不可用,并通过在旧 dll 上使用别名来修复它。

© www.soinside.com 2019 - 2024. All rights reserved.