mirror of
https://github.com/VinylDNS/vinyldns
synced 2025-09-05 16:55:16 +00:00
233 lines
16 KiB
HTML
233 lines
16 KiB
HTML
<!DOCTYPE html><html><head><title>VinylDNS: Create RecordSet</title><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="author" content="VinylDNS" /><meta name="description" content="DNS Governance" /><meta name="og:image" content="/img/poster.png" /><meta name="image" property="og:image" content="/img/poster.png" /><meta name="og:title" content="VinylDNS: Create RecordSet" /><meta name="title" property="og:title" content="VinylDNS: Create RecordSet" /><meta name="og:site_name" content="VinylDNS" /><meta name="og:url" content="http://vinyldns.io" /><meta name="og:type" content="website" /><meta name="og:description" content="DNS Governance" /><link rel="icon" type="image/png" href="/img/favicon.png" /><meta name="twitter:title" content="VinylDNS: Create RecordSet" /><meta name="twitter:image" content="/img/poster.png" /><meta name="twitter:description" content="DNS Governance" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:creator" content="@vinyldns" /><link rel="icon" type="image/png" sizes="16x16" href="/img/favicon16x16.png" /><link rel="icon" type="image/png" sizes="32x32" href="/img/favicon32x32.png" /><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" /><link rel="stylesheet" href="/highlight/styles/atom-one-light.css" /><link rel="stylesheet" href="/css/light-style.css" /><link rel="stylesheet" href="/css/custom.css" /></head><body class="docs"><div id="wrapper"><div id="sidebar-wrapper"><div id="sidebar-brand"><a href="/" class="brand"><div class="brand-wrapper"></div><span>VinylDNS</span></a><button id="main-toggle" class="sidebar-toggle"><span class="close"></span></button></div><div class="sidebar-nav"> <div class="sidebar-nav-item "><a href="/api/index.html" title="API documentation" class="">API documentation</a></div> <div class="sidebar-nav-item "><a href="/api/auth-mechanism.html" title="Authentication" class="">Authentication</a></div> <div class="sidebar-nav-item "><a href="/api/zone-model.html" title="Zone" class="drop-nested">Zone</a><i class="fa fa-angle-right"></i><div class="sub-section"> <a href="/api/zone-model.html" title="Zone Model" class="">Zone Model</a> <a href="/api/create-zone.html" title="Create Zone" class="">Create Zone</a> <a href="/api/update-zone.html" title="Update Zone" class="">Update Zone</a> <a href="/api/delete-zone.html" title="Delete Zone" class="">Delete Zone</a> <a href="/api/get-zone-by-id.html" title="Get Zone by ID" class="">Get Zone by ID</a> <a href="/api/get-zone-by-name.html" title="Get Zone by Name" class="">Get Zone by Name</a> <a href="/api/list-zones.html" title="List / Search Zone" class="">List / Search Zone</a> <a href="/api/sync-zone.html" title="Sync Zone" class="">Sync Zone</a> <a href="/api/list-zone-changes.html" title="List Zone Changes" class="">List Zone Changes</a></div></div> <div class="sidebar-nav-item open"><a href="/api/recordset-model.html" title="RecordSet" class="drop-nested">RecordSet</a><i class="fa fa-angle-right"></i><div class="sub-section"> <a href="/api/recordset-model.html" title="RecordSet Model" class="">RecordSet Model</a> <a href="/api/create-recordset.html" title="Create RecordSet" class="active">Create RecordSet</a> <a href="/api/update-recordset.html" title="Update RecordSet" class="">Update RecordSet</a> <a href="/api/delete-recordset.html" title="Delete RecordSet" class="">Delete RecordSet</a> <a href="/api/get-recordset.html" title="Get RecordSet" class="">Get RecordSet</a> <a href="/api/list-recordsets-by-zone.html" title="List / Search RecordSets by Zone" class="">List / Search RecordSets by Zone</a> <a href="/api/get-recordset-change.html" title="Get RecordSet Change" class="">Get RecordSet Change</a> <a href="/api/list-recordset-changes.html" title="List RecordSet Changes" class="">List RecordSet Changes</a> <a href="/api/list-recordsets-global.html" title="Global List / Search RecordSets" class="">Global List / Search RecordSets</a></div></div> <div class="sidebar-nav-item "><a href="/api/batchchange-model.html" title="Batch Change" class="drop-nested">Batch Change</a><i class="fa fa-angle-right"></i><div class="sub-section"> <a href="/api/batchchange-model.html" title="Batch Change Model" class="">Batch Change Model</a> <a href="/api/create-batchchange.html" title="Create Batch Change" class="">Create Batch Change</a> <a href="/api/get-batchchange.html" title="Get Batch Change" class="">Get Batch Change</a> <a href="/api/list-batchchanges.html" title="List Batch Changes" class="">List Batch Changes</a> <a href="/api/batchchange-errors.html" title="Batch Change Errors" class="">Batch Change Errors</a> <a href="/api/cancel-batchchange.html" title="Cancel Batch Change" class="">Cancel Batch Change</a> <a href="/api/approve-batchchange.html" title="Approve Batch Change" class="">Approve Batch Change</a> <a href="/api/reject-batchchange.html" title="Reject Batch Change" class="">Reject Batch Change</a></div></div> <div class="sidebar-nav-item "><a href="/api/membership-model.html" title="Membership" class="drop-nested">Membership</a><i class="fa fa-angle-right"></i><div class="sub-section"> <a href="/api/membership-model.html" title="Membership Model" class="">Membership Model</a> <a href="/api/create-group.html" title="Create Group" class="">Create Group</a> <a href="/api/update-group.html" title="Update Group" class="">Update Group</a> <a href="/api/delete-group.html" title="Delete Group" class="">Delete Group</a> <a href="/api/get-group.html" title="Get Group" class="">Get Group</a> <a href="/api/list-groups.html" title="List Groups" class="">List Groups</a> <a href="/api/list-group-admins.html" title="List Group Admins" class="">List Group Admins</a> <a href="/api/list-group-members.html" title="List Group Members" class="">List Group Members</a> <a href="/api/list-group-activity.html" title="List Group Activity" class="">List Group Activity</a></div></div></div></div><div id="page-content-wrapper"><div class="nav"><div class="container-fluid"><div class="row"><div class="col-lg-12"><div class="action-menu pull-left clearfix"><a href="#menu-toggle" id="menu-toggle"><i class="fa fa-bars" aria-hidden="true"></i></a></div><ul class="pull-right"><li id="gh-eyes-item" class="hidden-xs"><a href="https://github.com/vinyldns/vinyldns" target="_blank" rel="noopener noreferrer"><i class="fa fa-eye"></i><span>Watchers<span id="eyes" class="label label-default">--</span></span></a></li><li id="gh-stars-item" class="hidden-xs"><a href="https://github.com/vinyldns/vinyldns" target="_blank" rel="noopener noreferrer"><i class="fa fa-star-o"></i><span>Stars<span id="stars" class="label label-default">--</span></span></a></li></ul></div></div></div></div><div id="content" data-github-owner="vinyldns" data-github-repo="vinyldns"><div class="content-wrapper"><section><h1 id="create-recordset">Create RecordSet</h1>
|
|
|
|
<p>Creates a RecordSet in a specified zone</p>
|
|
|
|
<h4 id="http-request">HTTP REQUEST</h4>
|
|
|
|
<blockquote>
|
|
<p>POST /zones/{zoneId}/recordsets</p>
|
|
</blockquote>
|
|
|
|
<h4 id="http-request-params">HTTP REQUEST PARAMS</h4>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>name</th>
|
|
<th>type</th>
|
|
<th>required?</th>
|
|
<th style="text-align: left">description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>zoneId</td>
|
|
<td>string</td>
|
|
<td>yes</td>
|
|
<td style="text-align: left">id of the zone where the recordset belongs</td>
|
|
</tr>
|
|
<tr>
|
|
<td>name</td>
|
|
<td>string</td>
|
|
<td>yes</td>
|
|
<td style="text-align: left">the name of the recordset being updated</td>
|
|
</tr>
|
|
<tr>
|
|
<td>type</td>
|
|
<td>string</td>
|
|
<td>yes</td>
|
|
<td style="text-align: left">the type of recordset</td>
|
|
</tr>
|
|
<tr>
|
|
<td>ttl</td>
|
|
<td>integer</td>
|
|
<td>yes</td>
|
|
<td style="text-align: left">the TTL in seconds</td>
|
|
</tr>
|
|
<tr>
|
|
<td>records</td>
|
|
<td>array of record data</td>
|
|
<td>yes</td>
|
|
<td style="text-align: left">record data for recordset, see <a href="recordset-model.html">RecordSet Model</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td>ownerGroupId</td>
|
|
<td>string</td>
|
|
<td>no</td>
|
|
<td style="text-align: left">Record ownership assignment, applicable if the recordset is in a <a href="zone-model.html#shared-zones">shared zone</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<h4 id="example-http-request">EXAMPLE HTTP REQUEST</h4>
|
|
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
|
|
"name": "foo",
|
|
"type": "A",
|
|
"ttl": 300,
|
|
"records": [
|
|
{
|
|
"address": "10.10.10.10"
|
|
}
|
|
],
|
|
"zoneId": "2467dc05-68eb-4498-a9d5-78d24bb0893c",
|
|
"ownerGroupId": "f42385e4-5675-38c0-b42f-64105e743bfe"
|
|
}
|
|
</code></pre></div></div>
|
|
|
|
<h4 id="http-response-types">HTTP RESPONSE TYPES</h4>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Code</th>
|
|
<th style="text-align: left">description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>202</td>
|
|
<td style="text-align: left"><strong>Accepted</strong> - The record set is valid and has been accepted for processing; the record set change resource is returned</td>
|
|
</tr>
|
|
<tr>
|
|
<td>400</td>
|
|
<td style="text-align: left"><strong>Bad Request</strong> - The zone specified is not Active; typically because the zone has no connection information</td>
|
|
</tr>
|
|
<tr>
|
|
<td>401</td>
|
|
<td style="text-align: left"><strong>Unauthorized</strong> - The authentication information provided is invalid. Typically the request was not signed properly, or the access key and secret used to sign the request are incorrect</td>
|
|
</tr>
|
|
<tr>
|
|
<td>403</td>
|
|
<td style="text-align: left"><strong>Forbidden</strong> - The user does not have the access required to perform the action</td>
|
|
</tr>
|
|
<tr>
|
|
<td>404</td>
|
|
<td style="text-align: left"><strong>Not Found</strong> - the zone with the id specified was not found</td>
|
|
</tr>
|
|
<tr>
|
|
<td>409</td>
|
|
<td style="text-align: left"><strong>Conflict</strong> - A record set with the same name and type already exists in the zone</td>
|
|
</tr>
|
|
<tr>
|
|
<td>422</td>
|
|
<td style="text-align: left"><strong>Unprocessable Entity</strong></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<h4 id="http-response-attributes">HTTP RESPONSE ATTRIBUTES</h4>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>name</th>
|
|
<th>type</th>
|
|
<th style="text-align: left">description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>zone</td>
|
|
<td>map</td>
|
|
<td style="text-align: left">Contains information about the zone when the change was created</td>
|
|
</tr>
|
|
<tr>
|
|
<td>recordSet</td>
|
|
<td>map</td>
|
|
<td style="text-align: left">Contains the recordset model</td>
|
|
</tr>
|
|
<tr>
|
|
<td>userId</td>
|
|
<td>string</td>
|
|
<td style="text-align: left">The user id that initiated the change</td>
|
|
</tr>
|
|
<tr>
|
|
<td>changeType</td>
|
|
<td>string</td>
|
|
<td style="text-align: left">Type of change requested (Create, Update, Delete); in this case Create</td>
|
|
</tr>
|
|
<tr>
|
|
<td>created</td>
|
|
<td>string</td>
|
|
<td style="text-align: left">The timestamp (UTC) the change was initiated</td>
|
|
</tr>
|
|
<tr>
|
|
<td>id</td>
|
|
<td>string</td>
|
|
<td style="text-align: left">The ID of the change. This is not the ID of the recordset</td>
|
|
</tr>
|
|
<tr>
|
|
<td>status</td>
|
|
<td>RecordSetChangeStatus</td>
|
|
<td style="text-align: left">The status of the change (Pending, Complete, or Failed)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>singleBatchChangeIds</td>
|
|
<td>array of SingleBatchChange Id objects</td>
|
|
<td style="text-align: left">If the recordset change was part of a batch change, the IDs of the single changes that comprise the recordset change</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<h4 id="example-response">EXAMPLE RESPONSE</h4>
|
|
|
|
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{
|
|
"zone": {
|
|
"name": "vinyl.",
|
|
"email": "test@test.com",
|
|
"status": "Active",
|
|
"created": "2017-02-23T14:52:44Z",
|
|
"id": "2467dc05-68eb-4498-a9d5-78d24bb0893c",
|
|
"account": "9b22b686-54bc-47fb-a8f8-cdc48e6d04ae",
|
|
"shared": false,
|
|
"acl": {
|
|
"rules": [
|
|
|
|
]
|
|
},
|
|
"adminGroupId": "9b22b686-54bc-47fb-a8f8-cdc48e6d04ae"
|
|
},
|
|
"recordSet": {
|
|
"type": "A",
|
|
"zoneId": "2467dc05-68eb-4498-a9d5-78d24bb0893c",
|
|
"name": "foo",
|
|
"ttl": 300,
|
|
"status": "Pending",
|
|
"created": "2017-02-23T14:58:54Z",
|
|
"records": [
|
|
{
|
|
"address": "10.10.10.10"
|
|
}
|
|
],
|
|
"id": "9a41b99c-8e67-445f-bcf3-f9c7cd1f2357",
|
|
"account": "0215d410-9b7e-4636-89fd-b6b948a06347",
|
|
"ownerGroupId": "f42385e4-5675-38c0-b42f-64105e743bfe",
|
|
"ownerGroupName": "Shared Group"
|
|
},
|
|
"userId": "0215d410-9b7e-4636-89fd-b6b948a06347",
|
|
"changeType": "Create",
|
|
"status": "Pending",
|
|
"created": "2017-02-23T14:58:54Z",
|
|
"id": "fef81f0b-f439-462d-88df-c773d3686c9b",
|
|
"singleBatchChangeIds": []
|
|
}
|
|
</code></pre></div></div>
|
|
</section><div class="edit-button"><a href="https://github.com/vinyldns/vinyldns/edit/master/modules/docs/src/main/mdoc/api/create-recordset.md" target="_blank" rel="noopener noreferrer" class="btn-sm btn-info">Improve this page</a></div></div></div></div></div><script src="/highlight/highlight.pack.js"></script><script>
|
|
// For all code blocks, copy the language from the containing div
|
|
// to the inner code tag (where hljs expects it to be)
|
|
const langPrefix = 'language-';
|
|
document.querySelectorAll(`div[class^='${langPrefix}']`).forEach(function(div) {
|
|
div.classList.forEach(function(cssClass) {
|
|
if (cssClass.startsWith(langPrefix)) {
|
|
const lang = cssClass.substring(langPrefix.length);
|
|
div.querySelectorAll('pre code').forEach(function(code) {
|
|
code.classList.add(lang);
|
|
});
|
|
}
|
|
});
|
|
});
|
|
|
|
hljs.configure({languages:['scala','java','bash']});
|
|
hljs.initHighlightingOnLoad();
|
|
</script><script>console.info('\x57\x65\x62\x73\x69\x74\x65\x20\x62\x75\x69\x6c\x74\x20\x77\x69\x74\x68\x3a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x5f\x5f\x20\x20\x20\x20\x5f\x5f\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x5f\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\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5f\x5f\x2f\x5f\x2f\x5c\x5f\x5f\x2f\x5c\x5f\x5f\x5f\x2f\x5f\x5f\x5f\x5f\x2f\x0a\x0a\x68\x74\x74\x70\x73\x3a\x2f\x2f\x34\x37\x64\x65\x67\x2e\x67\x69\x74\x68\x75\x62\x2e\x69\x6f\x2f\x73\x62\x74\x2d\x6d\x69\x63\x72\x6f\x73\x69\x74\x65\x73')</script><script>((window.gitter = {}).chat = {}).options = {
|
|
room: 'vinyldns/Lobby'};</script><script src="https://sidecar.gitter.im/dist/sidecar.v1.js"></script><script src="/js/docs.js"></script></body></html> |