Method GetRegionAsync
GetRegionAsync(CancellationToken)
Gets the region of the running instance.
Declaration
public Task<Region> GetRegionAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | (Optional) Cancellation token. |
Returns
Type | Description |
---|---|
Task<Region> | Task returning the region of the OCI instance. |
Remarks
When using Instance Principal or OKE workload authentication, you
can provide the return region as Region
property of NoSQLConfig to create
NoSQLClient connected to the same region.
Exceptions
Type | Condition |
---|---|
AuthorizationException | If failed to retrieve the region metadata. |
ArgumentException | If the retrieved region code does not match any region defined in the SDK. |