You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the output is expected to be an object but no object is returned the plugin should return the normal error: For example, if a service-id could not be found then an error is returned:
733
+
```
734
+
$ibmcloud iam service-id 15a15a0f-725e-453a-b3ac-755280ad7300 --output json
735
+
FAILED
736
+
Service ID '15a15a0f-725e-453a-b3ac-755280ad7300' was not found.
737
+
```
738
+
732
739
### 2.12. Common options
733
740
734
741
Customers will be writing scripts that use multiple services. Consistency with option names will help them be successful.
The IBM CLoud CLI supports logging in as a VPC compute resource identity. The CLI will fetch a VPC instance identity token and exchange it for an IAM access token when logging in as a VPC compute resource identity. This access token is stored in configuration once a user successfully logs into the CLI.
970
+
#### 5.3.1 Get the IAM Access Token
971
+
The IBM CLoud CLI supports logging in as a VPC compute resource identity. The CLI will fetch a VPC instance identity token and exchange it for an IAM access token when logging in as a VPC compute resource identity. This access token is stored in configuration once a user successfully logs into the CLI.
965
972
966
973
Plug-ins can invoke `plugin.PluginContext.IsLoggedInAsCRI()` and `plugin.PluginContext.CRIType()` in the CLI SDK to detect whether the user has logged in as a VPC compute resource identity.
967
974
You can get the IAM access token resulting from the user logging in as a VPC compute resource identity from the IBM CLoud SDK as follows:
@@ -1156,7 +1163,7 @@ When users are using CLI, they probably have already targeted region or resource
1156
1163
region = config.CurrentRegion().Name
1157
1164
ui.Say("Currently targeted region: " + region)
1158
1165
}
1159
-
1166
+
1160
1167
// get currently targeted resource group
1161
1168
group := ""
1162
1169
if config.HasTargetedResourceGroup() {
@@ -1173,23 +1180,23 @@ When users are using CLI, they probably have already targeted region or resource
1173
1180
1174
1181
## 9. Private Endpoint Support
1175
1182
1176
-
Private endpoint enables customers to connect to IBM Cloud services over IBM's private network. Plug-ins should provide the private endpoint support whenever possible. If the user chooses to use the private endpoint, all the traffic between the CLI client and IBMCloud services must go through the private network. If private endpoint is not supported by the plug-in, the CLI should fail any requests instead of falling back to using the public network.
1183
+
Private endpoint enables customers to connect to IBM Cloud services over IBM's private network. Plug-ins should provide the private endpoint support whenever possible. If the user chooses to use the private endpoint, all the traffic between the CLI client and IBMCloud services must go through the private network. If private endpoint is not supported by the plug-in, the CLI should fail any requests instead of falling back to using the public network.
1177
1184
1178
1185
**Choosing private endpoint**
1179
1186
1180
-
IBM CLoudCLI users can select to go with private network by specifying `private.cloud.ibm.com` as the API endpoint of IBMCloudCLI, either with command `ibmcloud api private.cloud.ibm.com` or `ibmcloud login -a private.cloud.ibm.com`.
1187
+
IBM CLoudCLI users can select to go with private network by specifying `private.cloud.ibm.com` as the API endpoint of IBMCloudCLI, either with command `ibmcloud api private.cloud.ibm.com` or `ibmcloud login -a private.cloud.ibm.com`.
1181
1188
1182
-
Plug-ins can invoke `plugin.PluginContext.IsPrivateEndpointEnabled()` in the CLISDK to detect whether the user has selected private endpoint or not.
1189
+
Plug-ins can invoke `plugin.PluginContext.IsPrivateEndpointEnabled()` in the CLISDK to detect whether the user has selected private endpoint or not.
1183
1190
1184
1191
**Publishing Plug-in with private endpoint support**
1185
1192
1186
1193
There is a field `private_endpoint_supported` in the plug-in metadata file indicating whether a plug-in supports private endpoint or not. Thedefault value is `false`. When publishing a plug-in, it needs to be set to `true`if the plug-in has private endpoint support. Likewise, in the plug-in Golang code, the `plugin.PluginMetadata`struct needs to have the `PrivateEndpointSupported` field set the same as this field in the metadata file. Otherwise the core CLI will fail the plug-in commands if the user chooses to use private endpoint.
1187
1194
1188
-
If the plug-in for an IBMCloud service only has partial private endpoint support in specific regions, this field should still be set to be `true`. It is the plug-in's responsibility to get the region setting and decide whether to fail the command or not. The plug-in should not fall back to the public endpoint if the region does not have private endpoint support.
1195
+
If the plug-in for an IBMCloud service only has partial private endpoint support in specific regions, this field should still be set to be `true`. It is the plug-in's responsibility to get the region setting and decide whether to fail the command or not. The plug-in should not fall back to the public endpoint if the region does not have private endpoint support.
1189
1196
1190
1197
**Private endpoints of platform services**
1191
1198
1192
-
The CLI SDK provides an API to retrieve both the public endpoint and private endpoint of core platform services.
1199
+
The CLI SDK provides an API to retrieve both the public endpoint and private endpoint of core platform services.
1193
1200
1194
1201
`plugin.PluginContext.ConsoleEndpoint()` returns the public endpoint of IBM Cloud console API if the user selects to go with public endpoint. It returns private endpoint of IBM Cloud console API if the user chooses private endpoint when logging into IBM Cloud.
0 commit comments