Reputation: 120
I targeted organization and space using this command target -o [email protected] -s spaceName
and it targeted successfully
But when I run IBMCloud fn list
, it is showing A target org and name must be specified
Upvotes: 1
Views: 1029
Reputation: 17176
I assume that you targeted the organization and space using ibmcloud target ...
. See here the documentation for IBM Cloud Functions on targeting a namespace. Functions have their own system of namespaces. Initially, they mapped to Cloud Foundry organization and spaces, then moved to IAM-enabled namespaces.
You can list your IAM-enabled namespaces using this command:
ibmcloud fn namespace list
Thereafter, set the namespace like this:
ibmcloud fn namespace target HenriksNamespaceOne
Now you can list the objects in that namespace:
ibmcloud fn list
I strongly recommend to only use IAM-enabled namespaces because they allow better security control. In case of an issue, you could use the following command to see what Functions environment is set:
ibmcloud fn property get
Thereafter, use ibmcloud fn property unset --namespace
to unset the namespace property. Then, run ibmcloud target -o ORG -s SPACE
to target the CF-based namespace. You can also run ibmcloud target --cf
to interactively target it.
Upvotes: 0