Skip to main content

hostnames

Creates, updates, deletes, gets or lists a hostnames resource.

Overview​

Namehostnames
TypeResource
Idoci.load_balancer.hostnames

Fields​

The following fields are returned by SELECT queries:

The hostname information is being retrieved.

NameDatatypeDescription
namestringA friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001
hostnamestringA 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:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectloadBalancerId, name, regionopc-request-idGets the specified hostname resource's configuration information.
listselectloadBalancerId, regionopc-request-idLists all hostname resources associated with the specified load balancer.
createinsertloadBalancerId, region, name, hostnameopc-request-id, opc-retry-tokenAdds a hostname resource to the specified load balancer. For more information, see<br />[Managing Request Routing](/Content/Balance/Tasks/managingrequest.htm).<br />
updateupdateloadBalancerId, name, regionopc-request-id, opc-retry-tokenOverwrites an existing hostname resource on the specified load balancer. Use this operation to change a<br />virtual hostname.<br />
deletedeleteloadBalancerId, name, regionopc-request-idDeletes 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.

NameDatatypeDescription
loadBalancerIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the load balancer associated with the hostname to delete.
namestringThe name of the hostname resource to delete. Example: example_hostname_001
regionstringOCI 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-idstringThe unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
opc-retry-tokenstringA 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​

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 }}'
;

INSERT examples​

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 }}'
;

UPDATE examples​

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​

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 }}'
;