예제 #1
0
        public void UpWhois(string ip)
        {
            string        DomainName = ConfigHelper.AppSettings("Whois");
            string        RR         = ConfigHelper.AppSettings("AName");
            AliyunRequest model      = new AliyunRequest();

            model.AccessKeyId       = ConfigHelper.AppSettings("AL_ID");
            model.Access_Key_Secret = ConfigHelper.AppSettings("AL_KEY");
            AliyunUtils.Init(model);

            //获取单前ID值
            var data = new Dictionary <string, string> {
            };

            data.Add("DomainName", DomainName);
            ResponseDescribeDomainRecords getRes = AliyunUtils.GetResponse(ActionType.DescribeDomainRecords, data) as ResponseDescribeDomainRecords;
            var oldModel = getRes.DomainRecords.Record.Where(x => x.RR == RR).FirstOrDefault();

            //修改单前ID值
            data.Clear();
            data.Add("RecordId", oldModel.RecordId);
            data.Add("RR", RR);
            data.Add("Type", oldModel.Type);
            data.Add("Value", ip);
            data.Add("TTL", oldModel.TTL.ToString());
            data.Add("Line", oldModel.Line);
            var upRes = AliyunUtils.GetResponse(ActionType.UpdateDomainRecord, data);
        }
예제 #2
0
파일: Util.cs 프로젝트: zs1621/amqp-demos
    public static void Main()
    {
        string userName = AliyunUtils.getUserName("aaa", "0");

        Console.WriteLine(userName);
        string password = AliyunUtils.getPassword("nnnn");

        Console.WriteLine(password);
    }