hostnames
Creates, updates, deletes, gets or lists a hostnames resource.
Overview​
| Name | hostnames |
| Type | Resource |
| Id | oci.load_balancer.hostnames |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The hostname information is being retrieved.
| Name | Datatype | Description |
|---|---|---|
name | string | A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001 |
hostname | string | A virtual hostname. For more information about virtual hostname string construction, see [Managing Request Routing](/Content/Balance/Tasks/managingrequest.htm#routing). Example: app.example.com |
A hostname resource associated with a load balancer for use by one or more listeners.<br /><br />Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.<br />
| Name | Datatype | Description |
|---|---|---|
name | string | A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001 |
hostname | string | A virtual hostname. For more information about virtual hostname string construction, see [Managing Request Routing](/Content/Balance/Tasks/managingrequest.htm#routing). Example: app.example.com |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | loadBalancerId, name, region | opc-request-id | Gets the specified hostname resource's configuration information. |
list | select | loadBalancerId, region | opc-request-id | Lists all hostname resources associated with the specified load balancer. |
create | insert | loadBalancerId, region, name, hostname | opc-request-id, opc-retry-token | Adds a hostname resource to the specified load balancer. For more information, see<br />[Managing Request Routing](/Content/Balance/Tasks/managingrequest.htm).<br /> |
update | update | loadBalancerId, name, region | opc-request-id, opc-retry-token | Overwrites an existing hostname resource on the specified load balancer. Use this operation to change a<br />virtual hostname.<br /> |
delete | delete | loadBalancerId, name, region | opc-request-id | Deletes a hostname resource from the specified load balancer.<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 |
|---|---|---|
loadBalancerId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the load balancer associated with the hostname to delete. |
name | string | The name of the hostname resource to delete. Example: example_hostname_001 |
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) |
opc-request-id | string | The 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 (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). |
SELECT examples​
- get
- list
Gets the specified hostname resource's configuration information.
SELECT
name,
hostname
FROM oci.load_balancer.hostnames
WHERE loadBalancerId = '{{ loadBalancerId }}' -- required
AND name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;
Lists all hostname resources associated with the specified load balancer.
SELECT
name,
hostname
FROM oci.load_balancer.hostnames
WHERE loadBalancerId = '{{ loadBalancerId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;
INSERT examples​
- create
- Manifest
Adds a hostname resource to the specified load balancer. For more information, see<br />[Managing Request Routing](/Content/Balance/Tasks/managingrequest.htm).<br />
INSERT INTO oci.load_balancer.hostnames (
hostname,
name,
loadBalancerId,
region,
opc-request-id,
opc-retry-token
)
SELECT
'{{ hostname }}' /* required */,
'{{ name }}' /* required */,
'{{ loadBalancerId }}',
'{{ region }}',
'{{ opc-request-id }}',
'{{ opc-retry-token }}'
;
# Description fields are for documentation purposes
- name: hostnames
props:
- name: loadBalancerId
value: "{{ loadBalancerId }}"
description: Required parameter for the hostnames resource.
- name: region
value: "{{ region }}"
description: Required parameter for the hostnames resource.
- name: hostname
value: "{{ hostname }}"
description: |
A virtual hostname. For more information about virtual hostname string construction, see
[Managing Request Routing](/Content/Balance/Tasks/managingrequest.htm#routing).
Example: `app.example.com`
- name: name
value: "{{ name }}"
description: |
A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential
information.
Example: `example_hostname_001`
- name: opc-request-id
value: "{{ opc-request-id }}"
description: The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
description: The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: 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 (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
description: 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 (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
UPDATE examples​
- update
Overwrites an existing hostname resource on the specified load balancer. Use this operation to change a<br />virtual hostname.<br />
UPDATE oci.load_balancer.hostnames
SET
hostname = '{{ hostname }}'
WHERE
loadBalancerId = '{{ loadBalancerId }}' --required
AND name = '{{ name }}' --required
AND region = '{{ region }}' --required
AND opc-request-id = '{{ opc-request-id}}'
AND opc-retry-token = '{{ opc-retry-token}}';
DELETE examples​
- delete
Deletes a hostname resource from the specified load balancer.<br />
DELETE FROM oci.load_balancer.hostnames
WHERE loadBalancerId = '{{ loadBalancerId }}' --required
AND name = '{{ name }}' --required
AND region = '{{ region }}' --required
AND opc-request-id = '{{ opc-request-id }}'
;