(AppEntitlementOwners)
Add an owner to a given app entitlement.
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.AppEntitlementOwners.Add(ctx, operations.C1APIAppV1AppEntitlementOwnersAddRequest{
AppID: "<id>",
EntitlementID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.AddAppEntitlementOwnerResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APIAppV1AppEntitlementOwnersAddRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.C1APIAppV1AppEntitlementOwnersAddResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |
List owners for a given app entitlement.
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.AppEntitlementOwners.List(ctx, operations.C1APIAppV1AppEntitlementOwnersListRequest{
AppID: "<id>",
EntitlementID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.ListAppEntitlementOwnersResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APIAppV1AppEntitlementOwnersListRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.C1APIAppV1AppEntitlementOwnersListResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |
Remove an owner from a given app entitlement.
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.AppEntitlementOwners.Remove(ctx, operations.C1APIAppV1AppEntitlementOwnersRemoveRequest{
AppID: "<id>",
EntitlementID: "<id>",
UserID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.RemoveAppEntitlementOwnerResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APIAppV1AppEntitlementOwnersRemoveRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.C1APIAppV1AppEntitlementOwnersRemoveResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |
Sets the owners for a given app entitlement to the specified list of users.
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.AppEntitlementOwners.Set(ctx, operations.C1APIAppV1AppEntitlementOwnersSetRequest{
AppID: "<id>",
EntitlementID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.SetAppEntitlementOwnersResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APIAppV1AppEntitlementOwnersSetRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.C1APIAppV1AppEntitlementOwnersSetResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |