Skip to content
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

Recompile plugin with steampipe-plugin-sdk v5.10.1 and add support for connection key columns #92

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

misraved
Copy link
Contributor

No description provided.

@misraved misraved self-assigned this Apr 12, 2024
@misraved misraved changed the title Recompile plugin with steampipe-plugin-sdk v5.10.0 and add support for connection key columns Recompile plugin with steampipe-plugin-sdk v5.10.1 and add support for connection key columns Jun 24, 2024
@misraved
Copy link
Contributor Author

@ParthaI could you please try the following code sample to revive the organization_id intended to be used as a common column?

package main

import (
    "context"
    "fmt"
    "log"

    "github.com/scaleway/scaleway-sdk-go/api/account/v2"
    "github.com/scaleway/scaleway-sdk-go/scw"
)

func main() {
    // Set up your credentials and default region
    accessKey := "your-access-key"
    secretKey := "your-secret-key"
    region := scw.RegionFrPar // or any other region like scw.RegionNlAms

    // Create a Scaleway client
    client, err := scw.NewClient(
        scw.WithAuth(accessKey, secretKey),
        scw.WithDefaultRegion(region),
    )
    if err != nil {
        log.Fatal(err)
    }

    // Create an Account API client
    accountApi := account.NewAPI(client)

    // Call the function to get organization details
    getOrganizationDetails(accountApi)
}

func getOrganizationDetails(api *account.API) {
    // The GetOrganizationRequest can be empty if you want to fetch the details of the requester's organization
    res, err := api.GetOrganization(&account.GetOrganizationRequest{})
    if err != nil {
        log.Fatal(err)
    }

    // Print the organization details
    fmt.Printf("Organization ID: %s\n", res.Organization.ID)
    fmt.Printf("Organization Name: %s\n", res.Organization.Name)
    fmt.Printf("Organization Creation Date: %s\n", res.Organization.CreationDate)
    fmt.Printf("Organization Modification Date: %s\n", res.Organization.ModificationDate)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants