Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from wuyingfengsui/master
支持 dns API
- Loading branch information
Showing
2 changed files
with
189 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
{ | ||
"format": "pop", | ||
"apiVersion": "2015-01-09", | ||
"checksumFormat": "md5", | ||
"endpointPrefix": "alidns", | ||
"serviceAbbreviation": "DNS", | ||
"serviceFullName": "Aliyun DNS", | ||
"signatureVersion": "pop", | ||
"timestampFormat": "top", | ||
"xmlnamespace": "", | ||
"operations": { | ||
"describeDomains": { | ||
"name": "DescribeDomains", | ||
"http": { | ||
"method": "POST", | ||
"uri":"/" | ||
}, | ||
"input": { | ||
"type": "structure", | ||
"members": { | ||
"Action": { | ||
"required": true, | ||
"default": "DescribeDomains" | ||
}, | ||
"PageNumber": { | ||
"type": "integer" | ||
}, | ||
"PageSize": { | ||
"type": "integer" | ||
}, | ||
"KeyWord": { | ||
"type": "string" | ||
}, | ||
"GroupId": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"describeDomainInfo": { | ||
"name": "DescribeDomainInfo", | ||
"http": { | ||
"method": "POST", | ||
"uri":"/" | ||
}, | ||
"input": { | ||
"type": "structure", | ||
"members": { | ||
"Action": { | ||
"required": true, | ||
"default": "DescribeDomainInfo" | ||
}, | ||
"DomainName": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"describeDomainRecords": { | ||
"name": "DescribeDomainRecords", | ||
"http": { | ||
"method": "POST", | ||
"uri":"/" | ||
}, | ||
"input": { | ||
"type": "structure", | ||
"members": { | ||
"Action": { | ||
"required": true, | ||
"default": "DescribeDomainRecords" | ||
}, | ||
"DomainName": { | ||
"required": true, | ||
"type": "string" | ||
}, | ||
"PageNumber": { | ||
"type": "integer" | ||
}, | ||
"PageSize": { | ||
"type": "integer" | ||
}, | ||
"RRKeyWord": { | ||
"type": "string" | ||
}, | ||
"TypeKeyWord": { | ||
"type": "string" | ||
}, | ||
"ValueKeyWord": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"addDomainRecord": { | ||
"name": "AddDomainRecord", | ||
"http": { | ||
"method": "POST", | ||
"uri":"/" | ||
}, | ||
"input": { | ||
"type": "structure", | ||
"members": { | ||
"Action": { | ||
"required": true, | ||
"default": "AddDomainRecord" | ||
}, | ||
"DomainName": { | ||
"required": true, | ||
"type": "string" | ||
}, | ||
"RR": { | ||
"required": true, | ||
"type": "string" | ||
}, | ||
"Type": { | ||
"required": true, | ||
"type": "string" | ||
}, | ||
"Value": { | ||
"required": true, | ||
"type": "string" | ||
}, | ||
"TTL": { | ||
"type": "integer" | ||
}, | ||
"Priority": { | ||
"type": "integer" | ||
}, | ||
"Line": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"describeDomainRecordInfo": { | ||
"name": "DescribeDomainRecordInfo", | ||
"http": { | ||
"method": "POST", | ||
"uri":"/" | ||
}, | ||
"input": { | ||
"type": "structure", | ||
"members": { | ||
"Action": { | ||
"required": true, | ||
"default": "DescribeDomainRecordInfo" | ||
}, | ||
"RecordId": { | ||
"required": true, | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"deleteDomainRecord": { | ||
"name": "DeleteDomainRecord", | ||
"http": { | ||
"method": "POST", | ||
"uri":"/" | ||
}, | ||
"input": { | ||
"type": "structure", | ||
"members": { | ||
"Action": { | ||
"required": true, | ||
"default": "DeleteDomainRecord" | ||
}, | ||
"RecordId": { | ||
"required": true, | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
var ALY = require('../../index.js'); | ||
|
||
var cdn = new ALY.DNS({ | ||
accessKeyId: "在阿里云OSS申请的 accessKeyId", | ||
secretAccessKey: "在阿里云OSS申请的 secretAccessKey", | ||
endpoint: 'http://alidns.aliyuncs.com', | ||
apiVersion: '2015-01-09' | ||
} | ||
); | ||
|
||
cdn.describeDomains({}, function(err, res) { | ||
console.log(err, res); | ||
}); |