(TaskActions)
- Approve - Approve
- Comment - Comment
- Deny - Deny
- EscalateToEmergencyAccess - Escalate To Emergency Access
- Restart - Restart
Invokes the c1.api.task.v1.TaskActionsService.Approve method.
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.TaskActions.Approve(ctx, operations.C1APITaskV1TaskActionsServiceApproveRequest{
TaskActionsServiceApproveRequest: &shared.TaskActionsServiceApproveRequest{
TaskExpandMask: &shared.TaskExpandMask{
Paths: []string{
"string",
},
},
PolicyStepID: "string",
},
TaskID: "string",
})
if err != nil {
log.Fatal(err)
}
if res.TaskActionsServiceApproveResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APITaskV1TaskActionsServiceApproveRequest | ✔️ | The request object to use for the request. |
*operations.C1APITaskV1TaskActionsServiceApproveResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Invokes the c1.api.task.v1.TaskActionsService.Comment method.
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.TaskActions.Comment(ctx, operations.C1APITaskV1TaskActionsServiceCommentRequest{
TaskActionsServiceCommentRequest: &shared.TaskActionsServiceCommentRequest{
TaskExpandMask: &shared.TaskExpandMask{
Paths: []string{
"string",
},
},
},
TaskID: "string",
})
if err != nil {
log.Fatal(err)
}
if res.TaskActionsServiceCommentResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APITaskV1TaskActionsServiceCommentRequest | ✔️ | The request object to use for the request. |
*operations.C1APITaskV1TaskActionsServiceCommentResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Invokes the c1.api.task.v1.TaskActionsService.Deny method.
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.TaskActions.Deny(ctx, operations.C1APITaskV1TaskActionsServiceDenyRequest{
TaskActionsServiceDenyRequest: &shared.TaskActionsServiceDenyRequest{
TaskExpandMask: &shared.TaskExpandMask{
Paths: []string{
"string",
},
},
},
TaskID: "string",
})
if err != nil {
log.Fatal(err)
}
if res.TaskActionsServiceDenyResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APITaskV1TaskActionsServiceDenyRequest | ✔️ | The request object to use for the request. |
*operations.C1APITaskV1TaskActionsServiceDenyResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Invokes the c1.api.task.v1.TaskActionsService.EscalateToEmergencyAccess method.
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.TaskActions.EscalateToEmergencyAccess(ctx, operations.C1APITaskV1TaskActionsServiceEscalateToEmergencyAccessRequest{
TaskActionsServiceEscalateToEmergencyAccessRequest: &shared.TaskActionsServiceEscalateToEmergencyAccessRequest{
TaskExpandMask: &shared.TaskExpandMask{
Paths: []string{
"string",
},
},
},
TaskID: "string",
})
if err != nil {
log.Fatal(err)
}
if res.TaskServiceActionResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APITaskV1TaskActionsServiceEscalateToEmergencyAccessRequest | ✔️ | The request object to use for the request. |
*operations.C1APITaskV1TaskActionsServiceEscalateToEmergencyAccessResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Invokes the c1.api.task.v1.TaskActionsService.Restart method.
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.TaskActions.Restart(ctx, operations.C1APITaskV1TaskActionsServiceRestartRequest{
TaskActionsServiceRestartRequest: &shared.TaskActionsServiceRestartRequest{
TaskExpandMask: &shared.TaskExpandMask{
Paths: []string{
"string",
},
},
},
TaskID: "string",
})
if err != nil {
log.Fatal(err)
}
if res.TaskActionsServiceRestartResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APITaskV1TaskActionsServiceRestartRequest | ✔️ | The request object to use for the request. |
*operations.C1APITaskV1TaskActionsServiceRestartResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |