File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 23
23
from ibm_cloud_sdk_core import ApiException
24
24
from ibm_cloud_sdk_core .authenticators import IAMAuthenticator
25
25
26
- # Retrieve the IBM Cloud API key from the environment
26
+ """
27
+ Pull IBM Cloud API key from environment. If not set, raise an error.
28
+ """
27
29
ibmcloud_api_key = os .environ .get ('IBMCLOUD_API_KEY' )
28
30
if not ibmcloud_api_key :
29
31
raise ValueError ("IBMCLOUD_API_KEY environment variable not found" )
30
32
31
- # Create an IAM authenticator object
33
+ """
34
+ Create an IAM authenticator object for use with the VPC API.
35
+ """
32
36
authenticator = IAMAuthenticator (apikey = ibmcloud_api_key )
33
37
34
38
def sl_iam_client ():
35
39
"""
36
40
Create a SoftLayer client object using the IBM Cloud API key
37
41
This function is used to authenticate to the SoftLayer API
42
+ and interact with Classic resources.
38
43
"""
39
44
client = SoftLayer .create_client_from_env (
40
45
username = "apikey" ,
You can’t perform that action at this time.
0 commit comments