factory
π€ AI-Generated Content
This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.
pyvider.schema.factory
¶
Classes¶
Functions¶
a_null
¶
Creates a null CtyValue for a given schema attribute or object.
Source code in pyvider/schema/factory.py
a_unknown
¶
Creates an unknown CtyValue for a given schema attribute or object.
Source code in pyvider/schema/factory.py
s_function
¶
s_function(
parameters: list[PvsAttribute] | None = None,
return_type: PvsAttribute | None = None,
variadic_parameter: PvsAttribute | None = None,
) -> PvsSchema
Create a schema for a Terraform function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameters
|
list[PvsAttribute] | None
|
List of function parameters (created with a_str(), a_num(), etc.) |
None
|
return_type
|
PvsAttribute | None
|
The function's return type (created with a_str(), a_num(), etc.) |
None
|
variadic_parameter
|
PvsAttribute | None
|
Optional variadic parameter for functions that accept variable arguments |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
PvsSchema |
PvsSchema
|
A schema representing the function signature |
Example
schema = s_function( ... parameters=[ ... a_str(description="Input string"), ... a_num(description="Multiplier"), ... ], ... return_type=a_str(description="Processed result"), ... )