Skip to main content

region_subscriptions

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

Overview​

Nameregion_subscriptions
TypeResource
Idoci.identity.region_subscriptions

Fields​

The following fields are returned by SELECT queries:

An object that represents your tenancy's access to a particular region (i.e., a subscription), the status of that<br />access, and whether that region is the home region. For more information, see [Managing Regions](/Content/Identity/regions/managingregions.htm).<br /><br />To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,<br />talk to an administrator. If you're an administrator who needs to write policies to give users access,<br />see [Get Started with Policies](/Content/Identity/policiesgs/get-started-with-policies.htm).<br />

NameDatatypeDescription
isHomeRegionbooleanIndicates if the region is the home region or not.
regionKeystringThe region's key. See [Regions and Availability Domains](/Content/General/Concepts/regions.htm) for the full list of supported 3-letter region codes. Example: PHX
regionNamestringThe region's name. See [Regions and Availability Domains](/Content/General/Concepts/regions.htm) for the full list of supported region names. Example: us-phoenix-1
statusstringThe region subscription status. (READY, IN_PROGRESS)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselecttenancyId, regionLists the region subscriptions for the specified tenancy.
createinserttenancyId, region, regionKeyopc-retry-tokenCreates a subscription to a region for a tenancy.<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
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)
tenancyIdstringThe OCID of the tenancy.
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​

Lists the region subscriptions for the specified tenancy.

SELECT
isHomeRegion,
regionKey,
regionName,
status
FROM oci.identity.region_subscriptions
WHERE tenancyId = '{{ tenancyId }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

Creates a subscription to a region for a tenancy.<br />

INSERT INTO oci.identity.region_subscriptions (
regionKey,
tenancyId,
region,
opc-retry-token
)
SELECT
'{{ regionKey }}' /* required */,
'{{ tenancyId }}',
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
isHomeRegion,
regionKey,
regionName,
status
;