Fabric Capacity Operator¶
Operators for suspending, resuming, and scaling Microsoft Fabric capacities.
- class scamander.providers.fabric.operators.fabric_capacity_operator.BaseFabricCapacityOperator(*, fabric_capacity_conn_id: str, subscription_id: str, resource_group: str, capacity_name: str, max_retries: int = 5, retry_delay: int = 1, **kwargs)¶
Bases:
BaseOperator,ABCSuspend a Microsoft Fabric capacity.
- abstractmethod execute(context: Context)¶
Perform this operator’s capacity action against self.hook.
- Parameters:
context – The Airflow task execution context.
- Returns:
The capacity resource payload returned by the underlying hook call.
- property hook: FabricCapacityHook¶
Create and return the FabricHook (cached).
- class scamander.providers.fabric.operators.fabric_capacity_operator.FabricCapacityOperator(*, subscription_id: str, resource_group: str, capacity_name: str, action: str, fabric_capacity_conn_id: str = 'fabric_capacity_default', sku_name: str | None = None, sku_tier: str = 'Fabric', wait_for_completion: bool = True, timeout: int = 604800, check_interval: int = 60, deferrable: bool = False, **kwargs)¶
Bases:
BaseOperatorOperator to manage Microsoft Fabric capacities (suspend/resume/update SKU).
- execute(context: Context) None¶
Run self.action against the capacity, synchronously or deferred.
- Parameters:
context – The Airflow task execution context.
- Raises:
ValueError – If self.action is not one of
"suspend","resume", or"update_sku".
- execute_complete(context: Context, event) None¶
Callback for when
FabricCapacityTriggerfires.- Parameters:
context – The Airflow task execution context.
event – The trigger event payload, with
status,result, andmessagekeys.
- Raises:
Exception – If the deferred capacity operation failed.
- class scamander.providers.fabric.operators.fabric_capacity_operator.GetFabricCapacityOperator(*, fabric_capacity_conn_id: str, subscription_id: str, resource_group: str, capacity_name: str, max_retries: int = 5, retry_delay: int = 1, **kwargs)¶
Bases:
BaseFabricCapacityOperatorFetch details of a Microsoft Fabric capacity.
- execute(context: Context)¶
Fetch details of the capacity identified by subscription_id/resource_group/capacity_name.
- Parameters:
context – The Airflow task execution context.
- Returns:
The capacity resource payload from the API.
- class scamander.providers.fabric.operators.fabric_capacity_operator.ResumeFabricCapacityOperator(*, fabric_capacity_conn_id: str, subscription_id: str, resource_group: str, capacity_name: str, max_retries: int = 5, retry_delay: int = 1, **kwargs)¶
Bases:
BaseFabricCapacityOperatorResume a Microsoft Fabric capacity.
- execute(context: Context)¶
Resume the capacity identified by subscription_id/resource_group/capacity_name.
- Parameters:
context – The Airflow task execution context.
- Returns:
The final capacity resource payload from the API.
- class scamander.providers.fabric.operators.fabric_capacity_operator.SuspendFabricCapacityOperator(*, fabric_capacity_conn_id: str, subscription_id: str, resource_group: str, capacity_name: str, max_retries: int = 5, retry_delay: int = 1, **kwargs)¶
Bases:
BaseFabricCapacityOperatorSuspend a Microsoft Fabric capacity.
- execute(context: Context)¶
Suspend the capacity identified by subscription_id/resource_group/capacity_name.
- Parameters:
context – The Airflow task execution context.
- Returns:
The final capacity resource payload from the API.