All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
AssignApplicationPolicy | Put /api/v1/apps/{appId}/policies/{policyId} | Assign an application to a Policy |
AssignApplicationPolicy(ctx, appId, policyId).Execute()
Assign an application to a Policy
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/unbiased-security/okta-sdk-golang"
)
func main() {
appId := "0oafxqCAJWWGELFTYASJ" // string | Application ID
policyId := "00plrilJ7jZ66Gn0X0g3" // string | `id` of the Policy
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.ApplicationPoliciesAPI.AssignApplicationPolicy(context.Background(), appId, policyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationPoliciesAPI.AssignApplicationPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
appId | string | Application ID | |
policyId | string | `id` of the Policy |
Other parameters are passed through a pointer to a apiAssignApplicationPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]