Austin.Linode.LinodeClient.Domain_Resource_Update C# (CSharp) Method

Domain_Resource_Update() public method

Update a domain record.
possible errors: NOTFOUND,VALIDATION
public Domain_Resource_Update ( int ResourceID, int DomainID = null, string Name = null, int Port = null, int Priority = null, string Protocol = null, string Target = null, int TTL_sec = null, int Weight = null ) : void
ResourceID int
DomainID int
Name string The hostname or FQDN. When Type=MX the subdomain to delegate to the Target MX server.
Port int
Priority int Priority for MX and SRV records, 0-255
Protocol string The protocol to append to an SRV record. Ignored on other record types.
Target string When Type=MX the hostname. When Type=CNAME the target of the alias. When Type=TXT the value of the record. When Type=A or AAAA the token of '[remote_addr]' will be substituted with the IP address of the request.
TTL_sec int TTL. Leave as 0 to accept our default.
Weight int
return void
        public void Domain_Resource_Update(
                int ResourceID,
                int? DomainID = null,
                string Name = null,
                int? Port = null,
                int? Priority = null,
                string Protocol = null,
                string Target = null,
                int? TTL_sec = null,
                int? Weight = null)
        {
            var myParams = new Dictionary<string, string>();
            myParams.Add("ResourceID", ResourceID.ToString(CultureInfo.InvariantCulture));
            if (DomainID != null)
                myParams.Add("DomainID", DomainID.Value.ToString(CultureInfo.InvariantCulture));
            if (Name != null)
                myParams.Add("Name", Name);
            if (Port != null)
                myParams.Add("Port", Port.Value.ToString(CultureInfo.InvariantCulture));
            if (Priority != null)
                myParams.Add("Priority", Priority.Value.ToString(CultureInfo.InvariantCulture));
            if (Protocol != null)
                myParams.Add("Protocol", Protocol);
            if (Target != null)
                myParams.Add("Target", Target);
            if (TTL_sec != null)
                myParams.Add("TTL_sec", TTL_sec.Value.ToString(CultureInfo.InvariantCulture));
            if (Weight != null)
                myParams.Add("Weight", Weight.Value.ToString(CultureInfo.InvariantCulture));
            GetResponse<object>("domain.resource.update", myParams);
        }