-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The API ListInstances
of ComputeClient
does not return any value for the attribute PlatformConfig
#474
Comments
Thanks for reporting this, @ParthaI . Its possible that service itself is returning the null for PlatformConfig. Can you try to use other client tool for eg. OCI CLI and see if you are getting the same response ? This would help us figure out if the issue is with the SDK while marshalling/unmarshalling the response or with the compute service. |
Thank you, @jyotisaini, for your prompt response. I attempted using the OCI CLI command
Are there any alternative packages or APIs recommended for obtaining the |
Hi @ParthaI, looks like any API that returns an Instance struct as one of it's properties has the possibility of returning platform-config. i.e. getInstance or instanceActionResponse. It doesn't look like this parameter exists outside the Instance struct, though. |
Hey, @JoshuaWR, sorry for the late replay, getInstance or instanceActionResponse returns the Instance struct within the response and the PlatformConfig is the part of the Do you have any idea why the value is always null? |
Hello, sorry to butt into this ticket but I'm having the same issue, albeit in a different manner. The listInstances API does not return platformConfig: but OCI CLI
I haven't tried explictly calling the GetInstance method instead of the ListInstances method on the API, but the documentation says they should return the same thing. Looks like a bug on the API 🤔 https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/Instance/ListInstances |
@jyotisaini, Thanks For your response. FYI, If you would like to give it a try for // This is an automatically generated code sample.
// To make this code sample work in your Oracle Cloud tenancy,
// please replace the values for any parameters whose current values do not fit
// your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
// boolean, number, and enum parameters with values not fitting your use case).
package main
import (
"context"
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"github.com/oracle/oci-go-sdk/v65/core"
"github.com/oracle/oci-go-sdk/v65/example/helpers"
)
func ExampleGetInstance() {
// Create a default authentication provider that uses the DEFAULT
// profile in the configuration file.
// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.
client, err := core.NewComputeClientWithConfigurationProvider(common.DefaultConfigProvider())
helpers.FatalIfError(err)
// Create a request and dependent object(s).
req := core.GetInstanceRequest{InstanceId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-instanceId-Value")}
// Send the request using the service client
resp, err := client.GetInstance(context.Background(), req)
helpers.FatalIfError(err)
// Retrieve value from the response.
fmt.Println(resp)
} Thanks! |
@ParthaI which permissions are you granting to the account running the command? |
@lacioffi-tenchi, I have admin privilege but still, I am not able to get the |
Not sure. I didn't try it with admin privileges. Also note I'm using the API directly, I'm not using this SDK. I'm just posting here because the issues seem very related.
No idea mate 😆 |
Thank you, @lacioffi-tenchi, for the information. Based on what I understand, having Admin privileges should suffice to access the details. Regarding our earlier discussion, could this serve as a solution for the |
Dear Team,
We are currently utilizing the ListInstances API from the
github.com/oracle/oci-go-sdk/v65/core
Go Package to list instances in our environment. Our requirement includes retrieving PlatformConfig details provided by this API. However, we consistently receive anull
value for thePlatformConfig
attribute.Could you kindly advise if there might be an error in our approach? Additionally, are there any alternative packages or APIs recommended for obtaining the
PlatformConfig
values for instances?Thank you!
The text was updated successfully, but these errors were encountered: