@pulumi/pulumi > dynamic
Resource represents a Pulumi Resource that incorporates an inline implementation of the Resource’s CRUD operations.
new Resource(provider: ResourceProvider, name: string, props: Inputs, opts?: resource.CustomResourceOptions)
Creates a new dynamic resource.
providerThe implementation of the resource's CRUD operations.
nameThe name of the resource.
propsThe arguments to use to populate the new resource. Must not define the reserved property "__provider".
optsA bag of options that control this resource's behavior.
Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
CheckFailure represents a single failure in the results of a call to
The property that failed validation.
The reason that the property failed validation.
CheckResult represents the results of a call to
Any validation failures that occurred.
The inputs to use, if any.
CreateResult represents the results of a call to
The ID of the created resource.
Any properties that were computed during creation.
DiffResult represents the results of a call to
changes?: undefined | false | true;
If true, this diff detected changes and suggests an update.
deleteBeforeReplace?: undefined | false | true;
If true, and a replacement occurs, the resource will first be deleted before being recreated. This is to void potential side-by-side issues with the default create before delete behavior.
If this update requires a replacement, the set of properties triggering it.
An optional list of properties that will not ever change.
The ID of the resource ready back (or blank if missing).
The current property state read from the live environment.
ResourceProvider represents an object that provides CRUD operations for a particular type of resource.
check?: undefined | (olds: any, news: any) => Promise<CheckResult>;
Check validates that the given property bag is valid for a resource of the given type.
create: (inputs: any) => Promise<CreateResult>;
Create allocates a new instance of the provided resource and returns its unique ID afterwards. If this call fails, the resource must not have been created (i.e., it is “transacational”).
Delete tears down an existing resource with the given ID. If it fails, the resource is assumed to still exist.
diff?: undefined | (id: resource.ID, olds: any, news: any) => Promise<DiffResult>;
Diff checks what impacts a hypothetical update will have on the resource’s properties.
read?: undefined | (id: resource.ID, props?: any) => Promise<ReadResult>;
Reads the current live state associated with a resource. Enough state must be included in the inputs to uniquely identify the resource; this is typically just the resource ID, but it may also include some properties.