Fork me on GitHub

Module dynamic

@pulumi/pulumi > dynamic



class Resource

Resource represents a Pulumi Resource that incorporates an inline implementation of the Resource’s CRUD operations.


new Resource(provider: ResourceProvider, name: string, props: resource.Inputs, opts?: resource.CustomResourceOptions)

Creates a new dynamic resource.

  • provider The implementation of the resource's CRUD operations.
  • name The name of the resource.
  • props The arguments to use to populate the new resource. Must not define the reserved property "__provider".
  • opts A bag of options that control this resource's behavior.

method getProvider

public getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

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.

property id

public id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property urn

public urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

interface CheckFailure

CheckFailure represents a single failure in the results of a call to ResourceProvider.check

property property

property: string;

The property that failed validation.

property reason

reason: string;

The reason that the property failed validation.

interface CheckResult

CheckResult represents the results of a call to ResourceProvider.check.

property failures

failures?: CheckFailure[];

Any validation failures that occurred.

property inputs

inputs?: any;

The inputs to use, if any.

interface CreateResult

CreateResult represents the results of a call to ResourceProvider.create.

property id

id: resource.ID;

The ID of the created resource.

property outs

outs?: any;

Any properties that were computed during creation.

interface DiffResult

DiffResult represents the results of a call to ResourceProvider.diff.

property changes

changes?: undefined | false | true;

If true, this diff detected changes and suggests an update.

property deleteBeforeReplace

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.

property replaces

replaces?: string[];

If this update requires a replacement, the set of properties triggering it.

property stables

stables?: string[];

An optional list of properties that will not ever change.

interface ReadResult

property props

props?: any;

The current property state read from the live environment.

interface ResourceProvider

ResourceProvider represents an object that provides CRUD operations for a particular type of resource.

property check

check?: undefined | { ... };

Check validates that the given property bag is valid for a resource of the given type.

property create

create: { ... };

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”).

property delete

delete?: undefined | { ... };

Delete tears down an existing resource with the given ID. If it fails, the resource is assumed to still exist.

property diff

diff?: undefined | { ... };

Diff checks what impacts a hypothetical update will have on the resource’s properties.

property read

read?: undefined | { ... };

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.

property update

update?: undefined | { ... };

Update updates an existing resource with new values.

interface UpdateResult

UpdateResult represents the results of a call to ResourceProvider.update.

property outs

outs?: any;

Any properties that were computed during updating.