(AppEntitlements)
- Get - Get
- List - List
- ListForAppResource - List For App Resource
- ListForAppUser - List For App User
- ListUsers - List Users
- Update - Update
Get an app entitlement by ID.
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.AppEntitlements.Get(ctx, operations.C1APIAppV1AppEntitlementsGetRequest{
AppID: "string",
ID: "<ID>",
})
if err != nil {
log.Fatal(err)
}
if res.GetAppEntitlementResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APIAppV1AppEntitlementsGetRequest | ✔️ | The request object to use for the request. |
*operations.C1APIAppV1AppEntitlementsGetResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
List app entitlements associated with an app.
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.AppEntitlements.List(ctx, operations.C1APIAppV1AppEntitlementsListRequest{
AppID: "string",
})
if err != nil {
log.Fatal(err)
}
if res.ListAppEntitlementsResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APIAppV1AppEntitlementsListRequest | ✔️ | The request object to use for the request. |
*operations.C1APIAppV1AppEntitlementsListResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
List app entitlements associated with an app resource.
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.AppEntitlements.ListForAppResource(ctx, operations.C1APIAppV1AppEntitlementsListForAppResourceRequest{
AppID: "string",
AppResourceID: "string",
AppResourceTypeID: "string",
})
if err != nil {
log.Fatal(err)
}
if res.ListAppEntitlementsResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APIAppV1AppEntitlementsListForAppResourceRequest | ✔️ | The request object to use for the request. |
*operations.C1APIAppV1AppEntitlementsListForAppResourceResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
List app entitlements associated with an app user.
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.AppEntitlements.ListForAppUser(ctx, operations.C1APIAppV1AppEntitlementsListForAppUserRequest{
AppID: "string",
AppUserID: "string",
})
if err != nil {
log.Fatal(err)
}
if res.ListAppEntitlementsResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APIAppV1AppEntitlementsListForAppUserRequest | ✔️ | The request object to use for the request. |
*operations.C1APIAppV1AppEntitlementsListForAppUserResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
List the users, as AppEntitlementUsers objects, of an 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: "Bearer <YOUR_ACCESS_TOKEN_HERE>",
}),
)
ctx := context.Background()
res, err := s.AppEntitlements.ListUsers(ctx, operations.C1APIAppV1AppEntitlementsListUsersRequest{
AppEntitlementID: "string",
AppID: "string",
})
if err != nil {
log.Fatal(err)
}
if res.ListAppEntitlementUsersResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APIAppV1AppEntitlementsListUsersRequest | ✔️ | The request object to use for the request. |
*operations.C1APIAppV1AppEntitlementsListUsersResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Update an app entitlement by ID.
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.AppEntitlements.Update(ctx, operations.C1APIAppV1AppEntitlementsUpdateRequest{
UpdateAppEntitlementRequest: &shared.UpdateAppEntitlementRequest{
AppEntitlement: &shared.AppEntitlementInput{
ProvisionPolicy: &shared.ProvisionPolicy{
ConnectorProvision: &shared.ConnectorProvision{},
DelegatedProvision: &shared.DelegatedProvision{},
ManualProvision: &shared.ManualProvision{
UserIds: []string{
"string",
},
},
},
ComplianceFrameworkValueIds: []string{
"string",
},
DurationUnset: &shared.DurationUnset{},
},
AppEntitlementExpandMask: &shared.AppEntitlementExpandMask{
Paths: []string{
"string",
},
},
},
AppID: "string",
ID: "<ID>",
})
if err != nil {
log.Fatal(err)
}
if res.UpdateAppEntitlementResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APIAppV1AppEntitlementsUpdateRequest | ✔️ | The request object to use for the request. |
*operations.C1APIAppV1AppEntitlementsUpdateResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |