Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 3.78 KB

File metadata and controls

66 lines (50 loc) · 3.78 KB

AppResourceOwners

(AppResourceOwners)

Overview

Available Operations

List

List all owners of an app resource.

Example Usage

package main

import(
	"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
	conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
	"context"
	"github.com/conductorone/conductorone-sdk-go/pkg/models/operations"
	"log"
)

func main() {
    s := conductoronesdkgo.New(
        conductoronesdkgo.WithSecurity(shared.Security{
            BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
            Oauth: "<YOUR_OAUTH_HERE>",
        }),
    )

    ctx := context.Background()
    res, err := s.AppResourceOwners.List(ctx, operations.C1APIAppV1AppResourceOwnersListRequest{
        AppID: "<id>",
        ResourceID: "<id>",
        ResourceTypeID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.ListAppResourceOwnersResponse != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
request operations.C1APIAppV1AppResourceOwnersListRequest ✔️ The request object to use for the request.
opts []operations.Option The options for this request.

Response

*operations.C1APIAppV1AppResourceOwnersListResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.SDKError 4XX, 5XX */*