RecordOperation

class oci.dns.models.RecordOperation(**kwargs)

Bases: 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.

Attributes:

OPERATION_ADD

A constant which can be used with the operation property of a RecordOperation.

OPERATION_PROHIBIT

A constant which can be used with the operation property of a RecordOperation.

OPERATION_REMOVE

A constant which can be used with the operation property of a RecordOperation.

OPERATION_REQUIRE

A constant which can be used with the operation property of a RecordOperation.

domain

Gets the domain of this RecordOperation.

is_protected

Gets the is_protected of this RecordOperation.

operation

Gets the operation of this RecordOperation.

rdata

Gets the rdata of this RecordOperation.

record_hash

Gets the record_hash of this RecordOperation.

rrset_version

Gets the rrset_version of this RecordOperation.

rtype

Gets the rtype of this RecordOperation.

ttl

Gets the ttl of this RecordOperation.

Methods:

__init__(**kwargs)

Initializes a new RecordOperation object with values from keyword arguments.

OPERATION_ADD = 'ADD'

A constant which can be used with the operation property of a RecordOperation. This constant has a value of “ADD”

OPERATION_PROHIBIT = 'PROHIBIT'

A constant which can be used with the operation property of a RecordOperation. This constant has a value of “PROHIBIT”

OPERATION_REMOVE = 'REMOVE'

A constant which can be used with the operation property of a RecordOperation. This constant has a value of “REMOVE”

OPERATION_REQUIRE = 'REQUIRE'

A constant which can be used with the operation property of a RecordOperation. This constant has a value of “REQUIRE”

__init__(**kwargs)

Initializes a new RecordOperation object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • domain (str) – The value to assign to the domain property of this RecordOperation.

  • record_hash (str) – The value to assign to the record_hash property of this RecordOperation.

  • is_protected (bool) – The value to assign to the is_protected property of this RecordOperation.

  • rdata (str) – The value to assign to the rdata property of this RecordOperation.

  • rrset_version (str) – The value to assign to the rrset_version property of this RecordOperation.

  • rtype (str) – The value to assign to the rtype property of this RecordOperation.

  • ttl (int) – The value to assign to the ttl property of this RecordOperation.

  • operation (str) – The value to assign to the operation property of this RecordOperation. Allowed values for this property are: “REQUIRE”, “PROHIBIT”, “ADD”, “REMOVE”

property domain

Gets the domain of this RecordOperation. The fully qualified domain name where the record can be located.

Returns

The domain of this RecordOperation.

Return type

str

property is_protected

Gets the is_protected of this RecordOperation. A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.

Returns

The is_protected of this RecordOperation.

Return type

bool

property operation

Gets the operation of this RecordOperation. 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.

Allowed values for this property are: “REQUIRE”, “PROHIBIT”, “ADD”, “REMOVE”

Returns

The operation of this RecordOperation.

Return type

str

property rdata

Gets the rdata of this RecordOperation. 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. For more information about RDATA, see Supported DNS Resource Record Types

Returns

The rdata of this RecordOperation.

Return type

str

property record_hash

Gets the record_hash of this RecordOperation. A unique identifier for the record within its zone.

Returns

The record_hash of this RecordOperation.

Return type

str

property rrset_version

Gets the rrset_version of this RecordOperation. The latest version of the record’s zone in which its RRSet differs from the preceding version.

Returns

The rrset_version of this RecordOperation.

Return type

str

property rtype

Gets the rtype of this RecordOperation. The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.

Returns

The rtype of this RecordOperation.

Return type

str

property ttl

Gets the ttl of this RecordOperation. The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.

Returns

The ttl of this RecordOperation.

Return type

int