(AppResourceType)
Get an app resource type.
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
}
}
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. |
*operations.C1APIAppV1AppResourceTypeServiceGetResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
List app resource types.
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
}
}
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. |
*operations.C1APIAppV1AppResourceTypeServiceListResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |