All URIs are relative to http://localhost/nifi-api
Method | HTTP request | Description |
---|---|---|
CreateAccessPolicy | Post /policies | Creates an access policy |
GetAccessPolicy | Get /policies/{id} | Gets an access policy |
GetAccessPolicyForResource | Get /policies/{action}/{resource} | Gets an access policy for the specified action and resource |
RemoveAccessPolicy | Delete /policies/{id} | Deletes an access policy |
UpdateAccessPolicy | Put /policies/{id} | Updates a access policy |
AccessPolicyEntity CreateAccessPolicy(ctx).Body(body).Execute()
Creates an access policy
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
body := *openapiclient.NewAccessPolicyEntity() // AccessPolicyEntity | The access policy configuration details.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PoliciesApi.CreateAccessPolicy(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.CreateAccessPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateAccessPolicy`: AccessPolicyEntity
fmt.Fprintf(os.Stdout, "Response from `PoliciesApi.CreateAccessPolicy`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateAccessPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
body | AccessPolicyEntity | The access policy configuration details. |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccessPolicyEntity GetAccessPolicy(ctx, id).Execute()
Gets an access policy
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string | The access policy id.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PoliciesApi.GetAccessPolicy(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.GetAccessPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAccessPolicy`: AccessPolicyEntity
fmt.Fprintf(os.Stdout, "Response from `PoliciesApi.GetAccessPolicy`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The access policy id. |
Other parameters are passed through a pointer to a apiGetAccessPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccessPolicyEntity GetAccessPolicyForResource(ctx, action, resource).Execute()
Gets an access policy for the specified action and resource
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
action := "action_example" // string | The request action.
resource := "resource_example" // string | The resource of the policy.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PoliciesApi.GetAccessPolicyForResource(context.Background(), action, resource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.GetAccessPolicyForResource``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAccessPolicyForResource`: AccessPolicyEntity
fmt.Fprintf(os.Stdout, "Response from `PoliciesApi.GetAccessPolicyForResource`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
action | string | The request action. | |
resource | string | The resource of the policy. |
Other parameters are passed through a pointer to a apiGetAccessPolicyForResourceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccessPolicyEntity RemoveAccessPolicy(ctx, id).Version(version).ClientId(clientId).DisconnectedNodeAcknowledged(disconnectedNodeAcknowledged).Execute()
Deletes an access policy
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string | The access policy id.
version := "version_example" // string | The revision is used to verify the client is working with the latest version of the flow. (optional)
clientId := "clientId_example" // string | If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response. (optional)
disconnectedNodeAcknowledged := true // bool | Acknowledges that this node is disconnected to allow for mutable requests to proceed. (optional) (default to false)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PoliciesApi.RemoveAccessPolicy(context.Background(), id).Version(version).ClientId(clientId).DisconnectedNodeAcknowledged(disconnectedNodeAcknowledged).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.RemoveAccessPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RemoveAccessPolicy`: AccessPolicyEntity
fmt.Fprintf(os.Stdout, "Response from `PoliciesApi.RemoveAccessPolicy`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The access policy id. |
Other parameters are passed through a pointer to a apiRemoveAccessPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
version | string | The revision is used to verify the client is working with the latest version of the flow. | clientId | string | If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response. | disconnectedNodeAcknowledged | bool | Acknowledges that this node is disconnected to allow for mutable requests to proceed. | [default to false]
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccessPolicyEntity UpdateAccessPolicy(ctx, id).Body(body).Execute()
Updates a access policy
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string | The access policy id.
body := *openapiclient.NewAccessPolicyEntity() // AccessPolicyEntity | The access policy configuration details.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PoliciesApi.UpdateAccessPolicy(context.Background(), id).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PoliciesApi.UpdateAccessPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateAccessPolicy`: AccessPolicyEntity
fmt.Fprintf(os.Stdout, "Response from `PoliciesApi.UpdateAccessPolicy`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The access policy id. |
Other parameters are passed through a pointer to a apiUpdateAccessPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
body | AccessPolicyEntity | The access policy configuration details. |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]