Legacy Dev Forum Posts

 View Only

Sign Up

Set environment at runtime

  • 1.  Set environment at runtime

    Posted 06-05-2025 18:08

    Irina | 2022-11-03 09:34:39 UTC | #1

    Hello,

    is it possible to set GC region at runtime, from a variable?

    I've checked Python SDK documentation, but the only option I see is to choose it from ENUM: region = PureCloudPlatformClientV2.PureCloudRegionHosts.useast1

    Thanks, Irina


    tim.smith | 2022-11-03 17:54:28 UTC | #2

    Take note of the next line from that example (found here:

    region = PureCloudPlatformClientV2.PureCloudRegionHosts.us_east_1
    PureCloudPlatformClientV2.configuration.host = region.get_api_host()

    PureCloudPlatformClientV2.PureCloudRegionHosts.us_east_1 is indeed an enum member, but PureCloudPlatformClientV2.configuration.host is a string. You can set that property using any string your application can come up with from any source; it doesn't have to be from the region hosts helper.


    Irina | 2022-11-03 17:54:27 UTC | #3

    Thank you, Tim!


    system | 2022-12-04 17:54:44 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 17049