Exemplo n.º 1
0
        public static async Task DestroyCNameRecord(this Route53Helper r53h, string zoneId, string name, string failover = null, bool throwIfNotFound = true)
        {
            var zone = await r53h.GetHostedZoneAsync(zoneId);

            var cname = $"{name}.{zone.HostedZone.Name.TrimEnd('.')}";
            await r53h.DestroyRecord(zoneId, cname, "CNAME", failover : failover, throwIfNotFound : throwIfNotFound);
        }
Exemplo n.º 2
0
        public static async Task <ResourceRecordSet> GetCNameRecordSet(
            this Route53Helper r53h,
            string zoneId,
            string name,
            string failover      = null,
            bool throwIfNotFound = true)
        {
            var zone = await r53h.GetHostedZoneAsync(zoneId);

            var cname = $"{name}.{zone.HostedZone.Name.TrimEnd('.')}";

            return(await r53h.GetRecordSet(zoneId, cname, "CNAME", failover, throwIfNotFound));
        }
Exemplo n.º 3
0
        public static async Task <string> UpsertARecordAsync(this Route53Helper r53h,
                                                             string zoneId,
                                                             string name,
                                                             string value,
                                                             int ttl              = 0,
                                                             string failover      = null,
                                                             string healthCheckId = null,
                                                             string setIdentifier = null)
        {
            var zone = await r53h.GetHostedZoneAsync(zoneId);

            var cname = $"{name}.{zone.HostedZone.Name.TrimEnd('.')}";
            await r53h.UpsertRecordAsync(zoneId,
                                         cname,
                                         value,
                                         RRType.A,
                                         ttl,
                                         failover,
                                         healthCheckId,
                                         setIdentifier);

            return(cname);
        }