Skip to content

Latest commit

 

History

History
116 lines (88 loc) · 6.69 KB

File metadata and controls

116 lines (88 loc) · 6.69 KB

AppResourceType

(AppResourceType)

Available Operations

Get

Get an app resource type.

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: "Bearer <YOUR_ACCESS_TOKEN_HERE>",
        }),
    )

    ctx := context.Background()
    res, err := s.AppResourceType.Get(ctx, operations.C1APIAppV1AppResourceTypeServiceGetRequest{
        AppID: "string",
        ID: "<ID>",
    })
    if err != nil {
        log.Fatal(err)
    }

    if res.AppResourceTypeServiceGetResponse != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
request operations.C1APIAppV1AppResourceTypeServiceGetRequest ✔️ The request object to use for the request.

Response

*operations.C1APIAppV1AppResourceTypeServiceGetResponse, error

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

List

List app resource types.

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: "Bearer <YOUR_ACCESS_TOKEN_HERE>",
        }),
    )

    ctx := context.Background()
    res, err := s.AppResourceType.List(ctx, operations.C1APIAppV1AppResourceTypeServiceListRequest{
        AppID: "string",
    })
    if err != nil {
        log.Fatal(err)
    }

    if res.AppResourceTypeServiceListResponse != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
request operations.C1APIAppV1AppResourceTypeServiceListRequest ✔️ The request object to use for the request.

Response

*operations.C1APIAppV1AppResourceTypeServiceListResponse, error

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