File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -473,11 +473,12 @@ authenticator = VPCInstanceAuthenticator(iam_profile_crn='crn:iam-profile-123')
473473service = ExampleServiceV1(authenticator = authenticator)
474474
475475# 'service' can now be used to invoke operations.
476+ ```
476477
477- # To use the new service version with custom token lifetime.
478+ To use the new service version with custom token lifetime:
479+ ``` python
478480authenticator = VPCInstanceAuthenticator(
479481 iam_profile_id = ' iam-profile-id-123' ,
480- url = ' https://api.metadata.cloud.ibm.com' ,
481482 service_version = ' 2025-08-26' ,
482483 token_lifetime = 900 # 15 minutes
483484)
@@ -488,12 +489,15 @@ External configuration:
488489```
489490export EXAMPLE_SERVICE_AUTH_TYPE=vpc
490491export EXAMPLE_SERVICE_IAM_PROFILE_CRN=crn:iam-profile-123
492+ ```
491493
492494To use the new service version:
495+ ```
493496export EXAMPLE_SERVICE_AUTH_TYPE=vpc
494- export EXAMPLE_SERVICE_IAM_PROFILE_ID= iam-profile-id -123
495- export EXAMPLE_SERVICE_SERVICE_VERSION =2025-08-26
497+ export EXAMPLE_SERVICE_IAM_PROFILE_CRN=crn: iam-profile-123
498+ export EXAMPLE_SERVICE_SERVICE_VPC_IMS_VERSION =2025-08-26
496499```
500+
497501Application code:
498502``` python
499503from < sdk- package- name> .example_service_v1 import *
You can’t perform that action at this time.
0 commit comments