
Kestra Plugin Set
CertifiedCreate a role binding
Kestra Plugin Set
Create a role binding
Creates a role binding for a user or group. If a binding already exists (HTTP 409), the task returns the existing binding ID unless failIfExists is set to true.
type: io.kestra.plugin.kestra.ee.iam.bindings.SetExamples
Bind a user to a role.
id: iam_binding_set
namespace: company.team
tasks:
- id: create_binding
type: io.kestra.plugin.kestra.ee.iam.bindings.Set
subjectType: USER
externalId: "user-external-id"
roleId: "role-id"
namespace: "company.team"
Properties
externalId *Requiredstring
External ID of the user or group to bind
roleId *Requiredstring
Role ID to assign
subjectType *Requiredstring
USERGROUPUNKNOWN_DEFAULT_OPEN_APIBinding subject type
Whether the binding applies to a USER or a GROUP.
auth Non-dynamic
Select API authentication
Use either an API token or HTTP Basic (username/password); do not provide both.
io.kestra.plugin.kestra.AbstractKestraTask-Auth
API token for bearer auth
trueAutomatically retrieve credentials from Kestra's configuration if available
The default configuration can be configured globally inside the Kestra configuration file:
- Set
kestra.tasks.sdk.authentication.api-tokento use an API token - Set
kestra.tasks.sdk.authentication.usernameandkestra.tasks.sdk.authentication.passwordfor HTTP basic authentication - Set
kestra.tasks.sdk.authentication.urlto also default the Kestra API endpoint (seekestraUrlabove) The Enterprise edition also provides setting a default configuration at the Namespace or Tenant level by an administrator. Set to false to also opt out of the default URL.
Password for HTTP Basic auth
Username for HTTP Basic auth
failIfExists booleanstring
falseFail if a binding already exists
When false (default), the task returns the existing binding ID on conflict. When true, a 409 conflict throws an exception.
kestraUrl string
Override Kestra API endpoint
URL used for calls to the Kestra API. When null, falls back to the url configured alongside the default SDK authentication (Namespace or Tenant level, Enterprise edition), then renders {{ kestra.url }} from configuration; if still empty, defaults to http://localhost: 8080. Trailing slashes are stripped before use.
namespace string
Namespace scope for the binding
If omitted, the binding applies to the whole tenant.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
tenantId string
Override target tenant
Tenant identifier applied to API calls; defaults to the current execution tenant.
Outputs
id string
ID of the created or existing binding