provider library
Pulumi provider authoring APIs for Dart.
This library exposes the provider-side contracts and gRPC server helpers used to implement custom Pulumi providers and component methods.
Main entrypoints
- Provider: implement CRUD operations and optional invokes.
- serve: host the provider over the Pulumi provider RPC protocol.
- CreateResult, ReadResult, DiffResult, CheckResult, InvokeResult: shape the responses sent back to the engine.
Quick start:
import 'package:pulumi/provider.dart';
class MyProvider extends Provider {
@override
Future<CreateResult> create(String urn, Map<String, dynamic> inputs) async {
return CreateResult(id: 'resource-1', outs: <String, dynamic>{...inputs});
}
}
Future<void> main(List<String> args) async {
await serve(MyProvider(), args);
}
See example/provider_authoring_example.dart in this package for a more
complete provider implementation.
Most end users do not need this library. It is for authoring providers, not consuming them from Pulumi programs.
Classes
- CallResult
- Result returned from Provider.call.
- CheckFailure
- A single property validation failure.
- CheckResult
- Result returned from Provider.check.
- ComponentResource
- A logical resource that groups and orchestrates child resources.
- ComponentResourceOptions
- Resource options specialized for ComponentResource.
- ConstructResult
- Result returned from Provider.construct.
- CreateResult
- Result returned from Provider.create.
- DiffResult
- Result returned from Provider.diff.
-
Input<
T> - Represents a Pulumi resource/function input.
- InputPropertyErrorDetails
- Structured detail for InputPropertiesError.
- InvokeResult
- Result returned from Provider.invoke.
- ListResourcesComputed
- Indicates that a list query contains values that are not yet known.
- ListResourcesContinuation
- Supplies the opaque token for the next page of a list operation.
- ListResourcesRequest
- Request passed to Provider.list.
- ListResourcesResponse
- A streamed item returned from Provider.list.
- ListResourcesResult
- Identifies one resource returned by a list operation.
- ParameterizeResult
- Result returned from provider parameterization.
- ParsedProviderArgs
- Parsed provider plugin command line arguments.
- PropertyDiff
- Detailed diff metadata for a single property path.
- Provider
- Base provider contract for custom provider authoring.
- ProviderServer
- gRPC service implementation for custom provider authoring.
- ReadResult
- Result returned from Provider.read.
- UpdateResult
- Result returned from Provider.update.
Enums
- PropertyDiffKind
- Result returned from Provider.diff.
Extensions
-
PulumiInputExtensions
on Input<
T> - PulumiInputOutputExtensions on T
- Ergonomic value/output conversions for Pulumi program code.
-
PulumiOutputExtensions
on Output<
T> -
Makes
.input()/.output()chain-friendly on already-computed outputs.
Functions
-
containsOutputs(
dynamic value) → bool -
Returns true if
valuecontains nested Output values. -
deserializeInputs(
Struct inputs, List< String> dependencyUrnsForKey(String key)) → Future<Inputs> - Deserializes provider input structs and applies dependency metadata.
-
input<
T> (T value) → Input< T> - Wraps a strongly typed plain value as a Pulumi Input.
-
parseProviderArgs(
List< String> args) → ParsedProviderArgs? - Parses provider host args and strips CLI-injected logging flags.
-
serve(
Provider provider, List< String> args) → Future<void> - Starts a provider gRPC server and emits the selected port on stdout.
Typedefs
Exceptions / Errors
- ComponentInitError
- Wraps initialization errors raised by component constructors.
- InputPropertiesError
- Thrown when multiple input properties are invalid.
- InputPropertyError
- Thrown when a single input property is invalid.
- UnsupportedProviderOperationError
- Indicates that a provider operation is intentionally unsupported.