Skip to main content

subdomain

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

Overview​

Namesubdomain
TypeResource
Idsumologic.account.subdomain

Fields​

The following fields are returned by SELECT queries:

The subdomain's definition.

NameDatatypeDescription
created_atstring (date-time)Creation timestamp in UTC in [RFC3339](https:​//tools.ietf.org/html/rfc3339) format. (wire: createdAt)
created_bystringIdentifier of the user who created the resource. (wire: createdBy)
modified_atstring (date-time)Last modification timestamp in UTC. (wire: modifiedAt)
modified_bystringIdentifier of the user who last modified the resource. (wire: modifiedBy)
subdomainstringThe new subdomain. (example: my-company)
urlstringLogin URL corresponding to the subdomain. (example: https:​//your-company.sumologic.com)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectregionGet the configured subdomain.
createinsertregion, subdomainCreate a subdomain. Only the Account Owner can create a subdomain.
updateupdateregion, subdomainUpdate a subdomain. Only the Account Owner can update the subdomain.
deletedeleteregionDelete the configured subdomain.
recoverexecemail, regionSend an email with the subdomain information for a user with the given email address.

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
emailstringEmail address of the user to get subdomain information.
regionstringSumo Logic deployment (au, ca, ch, de, eu, fed, in, jp, kr, us1, us2). Resolved from the SUMOLOGIC_ENVIRONMENT environment variable when it is set (x-stackQL-envVar, the same variable the Terraform provider reads); otherwise defaults to us2. A WHERE region = '...' value always takes precedence. (enum: [au, ca, ch, de, eu, fed, in, jp, kr, us1, us2], default: us2, x-stackQL-envVar: SUMOLOGIC_ENVIRONMENT)

SELECT examples​

Get the configured subdomain.

SELECT
created_at,
created_by,
modified_at,
modified_by,
subdomain,
url
FROM sumologic.account.subdomain
WHERE region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
;

INSERT examples​

Create a subdomain. Only the Account Owner can create a subdomain.

INSERT INTO sumologic.account.subdomain (
subdomain,
region
)
SELECT
'{{ subdomain }}' /* required */,
'{{ region }}'
RETURNING
created_at,
created_by,
modified_at,
modified_by,
subdomain,
url
;

UPDATE examples​

Update a subdomain. Only the Account Owner can update the subdomain.

UPDATE sumologic.account.subdomain
SET
subdomain = '{{ subdomain }}'
WHERE
region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
AND subdomain = '{{ subdomain }}' --required
RETURNING
created_at,
created_by,
modified_at,
modified_by,
subdomain,
url;

DELETE examples​

Delete the configured subdomain.

DELETE FROM sumologic.account.subdomain
WHERE region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Send an email with the subdomain information for a user with the given email address.

EXEC sumologic.account.subdomain.recover
@email='{{ email }}' --required,
@region='{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
;