Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 3.29 KB

File metadata and controls

57 lines (43 loc) · 3.29 KB

PersonalClient

(PersonalClient)

Available Operations

Create

Create creates a new PersonalClient object for the current User.

Example Usage

package main

import(
	"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
	conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
	"context"
	"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.PersonalClient.Create(ctx, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.PersonalClientServiceCreateResponse != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.C1APIIamV1PersonalClientServiceCreateResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /