dynamic library
Dynamic resource authoring APIs.
This module mirrors the shape of dynamic-provider APIs available in other
Pulumi language SDKs. It contains provider result models and a base
Resource that injects the reserved __provider input payload.
Use this library when you want provider-like behavior inside a Pulumi program without publishing a separate provider plugin. Dynamic resources are useful for prototyping and for narrowly scoped custom lifecycle logic.
Example
import 'package:pulumi/dynamic.dart' as dynamic;
import 'package:pulumi/pulumi.dart' as pulumi;
class ExampleDynamicResource extends dynamic.Resource {
ExampleDynamicResource(
dynamic.ProviderReference provider,
String name,
) : super(
provider,
name,
pulumi.Input.mapToInputs({'message': 'hello'}),
type: 'ExampleResource',
);
}
For published provider plugins and full provider RPC servers, prefer
package:pulumi/provider.dart.
Classes
- CheckFailure
- A single property validation failure.
-
CheckResult<
TInputs extends Map< String, dynamic> > -
Result returned from provider
check. - Config
- Configuration bag passed to dynamic providers.
- ConfigureRequest
-
Input bag passed to provider
configure. -
CreateResult<
TOutputs extends Map< String, dynamic> > -
Result returned from provider
create. - DiffResult
-
Result returned from provider
diff. - MapConfig
- Map-backed Config implementation.
- ProviderReference
- Serialized provider payload reference attached to dynamic resource inputs.
-
ReadResult<
TOutputs extends Map< String, dynamic> > -
Result returned from provider
read. - Resource
- Base class for dynamic resources.
-
ResourceProvider<
TInputs extends Map< String, dynamic> , TOutputs extends Map<String, dynamic> > - Provider CRUD contract for dynamic resources.
- SerializedProviderReference
- Simple ProviderReference backed by a pre-encoded payload.
-
UpdateResult<
TOutputs extends Map< String, dynamic> > -
Result returned from provider
update.
Constants
- providerKey → const String
- Reserved input key used to carry the serialized provider payload.