tsig_keys
Creates, updates, deletes, gets or lists a tsig_keys resource.
Overview​
| Name | tsig_keys |
| Type | Resource |
| Id | oci.dns.tsig_keys |
Fields​
The following fields are returned by SELECT queries:
- get
- list
A response containing a single TSIG key object.
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the resource. |
name | string | A globally unique domain name identifying the key for a given pair of hosts. (pattern: <code>^.$|^(?=([^\]|\([^0-9]|[0-9]{3})){1,253}.?$)(?=.[^\0-9.])(?=..)(([a-zA-Z0-9_-]|\([\x21-\x2F\x3A-\x7E]|[01][0-9][0-9]|2[0-4][0-9]|25[0-5])){1,63}(.|$))+$</code>) |
algorithm | string | TSIG key algorithms are encoded as domain names, but most consist of only one non-empty label, which is not required to be explicitly absolute. Applicable algorithms include: hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha512. For more information on these algorithms, see [RFC 4635](https:​//tools.ietf.org/html/rfc4635#section-2). (pattern: <code>^.$|^(?=([^\]|\([^0-9]|[0-9]{3})){1,253}.?$)(?=.*[^\0-9.])(([a-zA-Z0-9_-]|\([\x21-\x2F\x3A-\x7E]|[01][0-9][0-9]|2[0-4][0-9]|25[0-5])){1,63}(.|$))+$</code>) |
compartmentId | string | The OCID of the compartment containing the TSIG key. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}} |
freeformTags | object | Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
lifecycleState | string | The current state of the resource. (ACTIVE, CREATING, DELETED, DELETING, FAILED, UPDATING) |
secret | string | A base64 string encoding the binary shared secret. (pattern: <code>^(([\x20\t\r\n\f][A-Za-z0-9+/]){4})(([\x20\t\r\n\f][A-Za-z0-9+/])([\x20\t\r\n\f][AQgw])==|([\x20\t\r\n\f][A-Za-z0-9+/]){2}([\x20\t\r\n\f][AEIMQUYcgkosw048])=)?[\x20\t\r\n\f]*$</code>) |
self | string (url) | The canonical absolute URL of the resource. |
timeCreated | string (date-time) | The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2016-07-22T17:23:59:60Z |
timeUpdated | string (date-time) | The date and time the resource was last updated, expressed in RFC 3339 timestamp format. Example: 2016-07-22T17:23:59:60Z |
A TSIG key.
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the resource. |
name | string | A globally unique domain name identifying the key for a given pair of hosts. (pattern: <code>^.$|^(?=([^\]|\([^0-9]|[0-9]{3})){1,253}.?$)(?=.[^\0-9.])(?=..)(([a-zA-Z0-9_-]|\([\x21-\x2F\x3A-\x7E]|[01][0-9][0-9]|2[0-4][0-9]|25[0-5])){1,63}(.|$))+$</code>) |
algorithm | string | TSIG key algorithms are encoded as domain names, but most consist of only one non-empty label, which is not required to be explicitly absolute. Applicable algorithms include: hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha512. For more information on these algorithms, see [RFC 4635](https:​//tools.ietf.org/html/rfc4635#section-2). (pattern: <code>^.$|^(?=([^\]|\([^0-9]|[0-9]{3})){1,253}.?$)(?=.*[^\0-9.])(([a-zA-Z0-9_-]|\([\x21-\x2F\x3A-\x7E]|[01][0-9][0-9]|2[0-4][0-9]|25[0-5])){1,63}(.|$))+$</code>) |
compartmentId | string | The OCID of the compartment containing the TSIG key. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}} |
freeformTags | object | Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
lifecycleState | string | The current state of the resource. (ACTIVE, CREATING, DELETED, DELETING, FAILED, UPDATING) |
self | string (url) | The canonical absolute URL of the resource. |
timeCreated | string (date-time) | The date and time the resource was created, expressed in RFC 3339 timestamp format. Example: 2016-07-22T17:23:59:60Z |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | tsigKeyId, region | If-None-Match, If-Modified-Since, opc-request-id, scope | Gets information about the specified TSIG key.<br /> |
list | select | compartmentId, region | opc-request-id, limit, page, id, name, lifecycleState, sortBy, sortOrder, scope | Gets a list of all TSIG keys in the specified compartment.<br /> |
create | insert | region, algorithm, compartmentId, name, secret | opc-request-id, scope | Creates a new TSIG key in the specified compartment. There is no<br />opc-retry-token header since TSIG key names must be globally unique.<br /> |
update | update | tsigKeyId, region | If-Match, If-Unmodified-Since, opc-request-id, scope | Updates the specified TSIG key.<br /> |
delete | delete | tsigKeyId, region | If-Match, If-Unmodified-Since, opc-request-id, scope | Deletes the specified TSIG key.<br /> |
change_compartment | exec | tsigKeyId, region, compartmentId | If-Match, opc-retry-token, opc-request-id, scope | Moves a TSIG key into a different compartment.<br /> |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | The OCID of the compartment the resource belongs to. |
region | string | OCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION) |
tsigKeyId | string | The OCID of the target TSIG key. |
If-Match | string | The If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value. |
If-Modified-Since | string | The If-Modified-Since header field makes a GET or HEAD request method conditional on the selected representation's modification date being more recent than the date provided in the field-value. Transfer of the selected representation's data is avoided if that data has not changed. |
If-None-Match | string | The If-None-Match header field makes the request method conditional on the absence of any current representation of the target resource, when the field-value is *, or having a selected representation with an entity-tag that does not match any of those listed in the field-value. |
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. |
id | string | The OCID of a resource. |
lifecycleState | string | The state of a resource. |
limit | integer (int64) | The maximum number of items to return in a page of the collection. |
name | string | The name of a resource. |
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-retry-token | string | A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). |
page | string | The value of the opc-next-page response header from the previous "List" call. |
scope | string | Specifies to operate only on resources that have a matching DNS scope. |
sortBy | string | The field by which to sort TSIG keys. If unspecified, defaults to timeCreated. |
sortOrder | string | The order to sort the resources. |
SELECT examples​
- get
- list
Gets information about the specified TSIG key.<br />
SELECT
id,
name,
algorithm,
compartmentId,
definedTags,
freeformTags,
lifecycleState,
secret,
self,
timeCreated,
timeUpdated
FROM oci.dns.tsig_keys
WHERE tsigKeyId = '{{ tsigKeyId }}' -- required
AND region = '{{ region }}' -- required
AND If-None-Match = '{{ If-None-Match }}'
AND If-Modified-Since = '{{ If-Modified-Since }}'
AND opc-request-id = '{{ opc-request-id }}'
AND scope = '{{ scope }}'
;
Gets a list of all TSIG keys in the specified compartment.<br />
SELECT
id,
name,
algorithm,
compartmentId,
definedTags,
freeformTags,
lifecycleState,
self,
timeCreated
FROM oci.dns.tsig_keys
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND id = '{{ id }}'
AND name = '{{ name }}'
AND lifecycleState = '{{ lifecycleState }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND scope = '{{ scope }}'
;
INSERT examples​
- create
- Manifest
Creates a new TSIG key in the specified compartment. There is no<br />opc-retry-token header since TSIG key names must be globally unique.<br />
INSERT INTO oci.dns.tsig_keys (
algorithm,
compartmentId,
definedTags,
freeformTags,
name,
secret,
region,
opc-request-id,
scope
)
SELECT
'{{ algorithm }}' /* required */,
'{{ compartmentId }}' /* required */,
'{{ definedTags }}',
'{{ freeformTags }}',
'{{ name }}' /* required */,
'{{ secret }}' /* required */,
'{{ region }}',
'{{ opc-request-id }}',
'{{ scope }}'
RETURNING
id,
name,
algorithm,
compartmentId,
definedTags,
freeformTags,
lifecycleState,
secret,
self,
timeCreated,
timeUpdated
;
# Description fields are for documentation purposes
- name: tsig_keys
props:
- name: region
value: "{{ region }}"
description: Required parameter for the tsig_keys resource.
- name: algorithm
value: "{{ algorithm }}"
description: |
TSIG key algorithms are encoded as domain names, but most consist of only one
non-empty label, which is not required to be explicitly absolute.
Applicable algorithms include: hmac-sha1, hmac-sha224, hmac-sha256,
hmac-sha512. For more information on these algorithms, see [RFC 4635](https://tools.ietf.org/html/rfc4635#section-2).
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The OCID of the compartment containing the TSIG key.
- name: definedTags
value: "{{ definedTags }}"
description: |
Defined tags for this resource. Each key is predefined and scoped to a namespace.
For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
**Example:** `{"Operations": {"CostCenter": "42"}}`
- name: freeformTags
value: "{{ freeformTags }}"
description: |
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
**Example:** `{"Department": "Finance"}`
- name: name
value: "{{ name }}"
description: |
A globally unique domain name identifying the key for a given pair of hosts.
- name: secret
value: "{{ secret }}"
description: |
A base64 string encoding the binary shared secret.
- name: opc-request-id
value: "{{ opc-request-id }}"
description: Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
description: Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- name: scope
value: "{{ scope }}"
description: Specifies to operate only on resources that have a matching DNS scope.
description: Specifies to operate only on resources that have a matching DNS scope.
UPDATE examples​
- update
Updates the specified TSIG key.<br />
UPDATE oci.dns.tsig_keys
SET
definedTags = '{{ definedTags }}',
freeformTags = '{{ freeformTags }}'
WHERE
tsigKeyId = '{{ tsigKeyId }}' --required
AND region = '{{ region }}' --required
AND If-Match = '{{ If-Match}}'
AND If-Unmodified-Since = '{{ If-Unmodified-Since}}'
AND opc-request-id = '{{ opc-request-id}}'
AND scope = '{{ scope}}'
RETURNING
id,
name,
algorithm,
compartmentId,
definedTags,
freeformTags,
lifecycleState,
secret,
self,
timeCreated,
timeUpdated;
DELETE examples​
- delete
Deletes the specified TSIG key.<br />
DELETE FROM oci.dns.tsig_keys
WHERE tsigKeyId = '{{ tsigKeyId }}' --required
AND region = '{{ region }}' --required
AND If-Match = '{{ If-Match }}'
AND If-Unmodified-Since = '{{ If-Unmodified-Since }}'
AND opc-request-id = '{{ opc-request-id }}'
AND scope = '{{ scope }}'
;
Lifecycle Methods​
- change_compartment
Moves a TSIG key into a different compartment.<br />
EXEC oci.dns.tsig_keys.change_compartment
@tsigKeyId='{{ tsigKeyId }}' --required,
@region='{{ region }}' --required,
@If-Match='{{ If-Match }}',
@opc-retry-token='{{ opc-retry-token }}',
@opc-request-id='{{ opc-request-id }}',
@scope='{{ scope }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;