Updates records in the specified zone at a domain
patch
/20180115/zones/{zone_name_or_id}/records/{domain}
You can update one record or all records for the specified zone depending on the changes provided in the request body. You can also add or remove records using this function. When the zone name is provided as a path parameter and PRIVATE is used for the scope query parameter then the viewId query parameter is required.
Request
Supported Media Types
- application/json
Path Parameters
-
domain(required): string
The target fully-qualified domain name (FQDN) within the target zone.
-
zoneNameOrId(required): string
The name or OCID of the target zone.
Query Parameters
-
compartmentId: string
Minimum Length:
1
Maximum Length:255
The OCID of the compartment the zone belongs to. Deprecated. Do not use. -
scope: string
Specifies to operate only on resources that have a matching DNS scope.Allowed Values:
[ "GLOBAL", "PRIVATE" ]
-
viewId: string
Minimum Length:
1
Maximum Length:255
The OCID of the view the zone is associated with. Required when accessing a private zone by name.
Header Parameters
-
If-Unmodified-Since: string
The If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation.
-
if-match: string
For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
-
opc-request-id: string
Minimum Length:
1
Maximum Length:98
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Operations describing how to modify the collection of records.
Nested Schema : items
Type:
Show Source
array
-
Array of:
object RecordOperation
An extension of the existing record resource, describing either a precondition, an add, or a remove. Preconditions check all fields, including read-only data like recordHash and rrsetVersion.
Nested Schema : RecordOperation
Type:
object
An extension of the existing record resource, describing either a precondition, an add, or a remove. Preconditions check all fields, including read-only data like recordHash and rrsetVersion.
Show Source
-
domain:
string
Minimum Length:
1
Maximum Length:254
The fully qualified domain name where the record can be located. -
isProtected:
boolean
A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
-
operation:
string
Default Value:
ADD
Allowed Values:[ "REQUIRE", "PROHIBIT", "ADD", "REMOVE" ]
A description of how a record relates to a PATCH operation. - REQUIRE indicates a precondition that record data must already exist. - PROHIBIT indicates a precondition that record data must not already exist. - ADD indicates that record data must exist after successful application. - REMOVE indicates that record data must not exist after successful application. Note: ADD and REMOVE operations can succeed even if they require no changes when applied, such as when the described records are already present or absent. Note: ADD and REMOVE operations can describe changes for more than one record. Example: { "domain": "www.example.com", "rtype": "AAAA", "ttl": 60 } specifies a new TTL for every record in the www.example.com AAAA RRSet. -
rdata:
string
The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input.
-
recordHash:
string
A unique identifier for the record within its zone.
-
rrsetVersion:
string
The latest version of the record's zone in which its RRSet differs from the preceding version.
-
rtype:
string
The type of DNS record, such as A or CNAME. For more information, see [Resource Record (RR) TYPEs](https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4).
-
ttl:
integer(int32)
Minimum Value:
0
Maximum Value:604800
The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
Response
Supported Media Types
- application/json
200 Response
A collection of DNS resource record objects.
Headers
-
ETag: string
The current version of the resource, ending with a representation-specific suffix. This value may be used in If-Match and If-None-Match headers for later requests of the same resource.
-
opc-next-page: string
For list pagination. When this header appears in the response, additional pages of results remain. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
-
opc-total-items: integer
The total number of items that match the query.
Nested Schema : Record
Type:
object
A DNS resource record.
Show Source
-
domain:
string
Minimum Length:
1
Maximum Length:254
The fully qualified domain name where the record can be located. -
isProtected:
boolean
A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
-
rdata:
string
The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input.
-
recordHash:
string
A unique identifier for the record within its zone.
-
rrsetVersion:
string
The latest version of the record's zone in which its RRSet differs from the preceding version.
-
rtype:
string
The type of DNS record, such as A or CNAME. For more information, see [Resource Record (RR) TYPEs](https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4).
-
ttl:
integer(int32)
Minimum Value:
0
Maximum Value:604800
The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
400 Response
Bad Request
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
401 Response
Unauthorized
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
404 Response
Not Found
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
409 Response
Conflict
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
412 Response
Precondition Failed
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
422 Response
Unprocessable Entity
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
429 Response
Too Many Requests
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
500 Response
Internal Server Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
Default Response
An error has occurred.
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.