コード例 #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);
    }