airflow.providers.apache.polaris.operators.principal

Operators that create and delete Polaris principals.

Classes

PolarisCreatePrincipalOperator

Create a Polaris principal (a service identity).

PolarisDeletePrincipalOperator

Delete a Polaris principal.

Module Contents

class airflow.providers.apache.polaris.operators.principal.PolarisCreatePrincipalOperator(*, principal_name, properties=None, credential_rotation_required=False, if_exists='skip', **kwargs)[source]

Bases: airflow.providers.apache.polaris.operators.base.PolarisManagementBaseOperator

Create a Polaris principal (a service identity).

The operator never returns, logs or stores the new principal’s client secret, which Polaris sends only once. It suits principals that authenticate through an external identity provider; for Polaris-issued credentials, obtain them out of band (for example polaris principals reset in the Polaris CLI) and store them in your secrets backend.

See also

For more information, take a look at the guide: PolarisCreatePrincipalOperator

Parameters:
  • principal_name (str) – Name of the principal.

  • properties (dict[str, str] | None) – Optional principal properties.

  • credential_rotation_required (bool) – If true, Polaris lets the initial credentials call only rotateCredentials (enforced when the server enables that check).

  • if_exists (airflow.providers.apache.polaris.hooks.polaris.IfExists) – "skip" (default) succeeds and returns the existing principal; "fail" raises.

  • polaris_conn_id – Polaris connection id.

Returns:

The principal as a dict (name, client id, properties); never credentials.

template_fields: collections.abc.Sequence[str] = ('polaris_conn_id', 'principal_name', 'properties')[source]
template_fields_renderers[source]
principal_name[source]
properties = None[source]
credential_rotation_required = False[source]
if_exists = 'skip'[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.apache.polaris.operators.principal.PolarisDeletePrincipalOperator(*, principal_name, if_missing='skip', **kwargs)[source]

Bases: airflow.providers.apache.polaris.operators.base.PolarisManagementBaseOperator

Delete a Polaris principal.

See also

For more information, take a look at the guide: PolarisDeletePrincipalOperator

Parameters:
Returns:

True if deleted, False if it did not exist.

template_fields: collections.abc.Sequence[str] = ('polaris_conn_id', 'principal_name')[source]
principal_name[source]
if_missing = 'skip'[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?