Resource registration

Contents

Resource registration#

pulumi/pulumi:proto/pulumi/resource.proto

Services#

πŸ”Œ ResourceMonitor#

ResourceMonitor is the interface a source uses to talk back to the planning monitor orchestrating the execution.

πŸ“ž SupportsFeature#

‡️ SupportsFeatureRequest ‴️ SupportsFeatureResponse

πŸ“ž Invoke#

‡️ ResourceInvokeRequest ‴️ InvokeResponse

πŸ“ž Call#

‡️ ResourceCallRequest ‴️ CallResponse

πŸ“ž ReadResource#

‡️ ReadResourceRequest ‴️ ReadResourceResponse

πŸ“ž RegisterResource#

‡️ RegisterResourceRequest ‴️ RegisterResourceResponse

πŸ“ž RegisterResourceOutputs#

‡️ RegisterResourceOutputsRequest ‴️ .google.protobuf.Empty

πŸ“ž RegisterStackTransform#

‡️ Callback ‴️ .google.protobuf.Empty

Register a resource transform for the stack

πŸ“ž RegisterStackInvokeTransform#

‡️ Callback ‴️ .google.protobuf.Empty

Register an invoke transform for the stack

πŸ“ž RegisterResourceHook#

‡️ RegisterResourceHookRequest ‴️ .google.protobuf.Empty

Register a resource hook that can be called by the engine during certain steps of a resource’s lifecycle.

πŸ“ž RegisterErrorHook#

‡️ RegisterErrorHookRequest ‴️ .google.protobuf.Empty

Register an error hook that can be called by the engine when an operation fails and is retryable.

Error hooks are a separate type of hook to other life cycle hooks as they have different inputs and outputs.

πŸ“ž RegisterPackage#

‡️ RegisterPackageRequest ‴️ RegisterPackageResponse

Registers a package and allocates a packageRef. The same package can be registered multiple times in Pulumi. Multiple requests are idempotent and guaranteed to return the same result.

πŸ“ž SignalAndWaitForShutdown#

‡️ .google.protobuf.Empty ‴️ .google.protobuf.Empty

SignalAndWaitForShutdown lets the resource monitor know that no more events will be generated. This call blocks until the resource monitor is finished, which will happen once all the steps have executed. This allows the language runtime to stay running and handle callback requests, even after the user program has completed. Runtime SDKs should call this after executing the user’s program. This can only be called once.

Messages#

πŸ“¨ ErrorHookRequest#

ErrorHookRequest is the request object for error hook callbacks in CallbackInvokeRequest.

urn string

the urn of the resource for which the hook is called.

id string

the optional urn of the resource for which the hook is called.

name string

the name of the resource for which the hook is called.

type string

the type of the resource for which the hook is called.

new_inputs google.protobuf.Struct

the optional checked new inputs of the resource.

old_inputs google.protobuf.Struct

the optional checked old inputs of the resource.

old_outputs google.protobuf.Struct

the optional old outputs of the resource.

failed_operation string

the operation that failed (create, read, update, or delete).

errors string

the errors that have been seen so far (newest-first).

πŸ“¨ ErrorHookResponse#

ErrorHookResponse is the response object for error hook callbacks in CallbackInvokeResponse.

error string

an optional error message to return from the hook.

retry bool

whether we should retry the operation.

πŸ“¨ Parameterization#

name string

the parameterized package name.

version string

the parameterized package version.

value bytes

the parameter value for the parameterized package.

πŸ“¨ ReadResourceRequest#

ReadResourceRequest contains enough information to uniquely qualify and read a resource’s state.

id string

the ID of the resource to read.

type string

the type of the resource object.

name string

the name, for URN purposes, of the object.

parent string

an optional parent URN that this child resource belongs to.

properties google.protobuf.Struct

optional state sufficient to uniquely identify the resource.

dependencies string

a list of URNs that this read depends on, as observed by the language host.

provider string

an optional reference to the provider to use for this read.

version string

the version of the provider to use when servicing this request.

acceptSecrets bool

when true operations should return secrets as strongly typed.

additionalSecretOutputs string

a list of output properties that should also be treated as secret, in addition to ones we detect.

acceptResources bool

when true operations should return resource references as strongly typed.

pluginDownloadURL string

the server url of the provider to use when servicing this request.

pluginChecksums ReadResourceRequest.PluginChecksumsEntry

a map of checksums of the provider to use when servicing this request.

sourcePosition SourcePosition

the optional source position of the user code that initiated the read.

stackTrace StackTrace

the optional stack trace at the time of the request.

parentStackTraceHandle string

the optional parent stack trace handle for the request. Supports stitching stack traces across plugins.

packageRef string

a reference from RegisterPackageRequest.

πŸ“¨ PluginChecksumsEntry#

key string

<No description>

value bytes

<No description>

πŸ“¨ ReadResourceResponse#

ReadResourceResponse contains the result of reading a resource’s state.

urn string

the URN for this resource.

properties google.protobuf.Struct

the state of the resource read from the live environment.

πŸ“¨ RegisterErrorHookRequest#

name string

The name of the hook. Must be unique within a program, registering the same name twice is an error.

callback Callback

the callback that the engine can call to run the hook.

πŸ“¨ RegisterPackageRequest#

name string

the plugin name.

version string

the plugin version.

download_url string

the optional plugin download url.

checksums RegisterPackageRequest.ChecksumsEntry

the optional plugin checksums.

parameterization Parameterization

the optional parameterization for this package.

πŸ“¨ ChecksumsEntry#

key string

<No description>

value bytes

<No description>

πŸ“¨ RegisterPackageResponse#

ref string

The UUID package reference for this registered package.

Lifecycle methods accept this reference in the β€˜packageRef’ field.

πŸ“¨ RegisterResourceHookRequest#

name string

The name of the hook. Must be unique within a program, registering the same name twice is an error.

callback Callback

the callback that the engine can call to run the hook.

on_dry_run bool

whether to run the hook on dry runs.

πŸ“¨ RegisterResourceOutputsRequest#

RegisterResourceOutputsRequest adds extra resource outputs created by the program after registration has occurred.

urn string

the URN for the resource to attach output properties to.

outputs google.protobuf.Struct

additional output properties to add to the existing resource.

πŸ“¨ RegisterResourceRequest#

RegisterResourceRequest contains information about a resource object that was newly allocated.

type string

the type of the object allocated.

name string

the name, for URN purposes, of the object.

parent string

an optional parent URN that this child resource belongs to.

custom bool

true if the resource is a custom, managed by a plugin’s CRUD operations.

object google.protobuf.Struct

an object produced by the interpreter/source.

protect bool

true if the resource should be marked protected.

dependencies string

a list of URNs that this resource depends on, as observed by the language host.

provider string

an optional reference to the provider to manage this resource’s CRUD operations.

propertyDependencies RegisterResourceRequest.PropertyDependenciesEntry

a map from property keys to the dependencies of the property.

deleteBeforeReplace bool

true if this resource should be deleted before replacement.

version string

the version of the provider to use when servicing this request.

ignoreChanges string

a list of property selectors to ignore during updates.

acceptSecrets bool

when true operations should return secrets as strongly typed.

additionalSecretOutputs string

a list of output properties that should also be treated as secret, in addition to ones we detect.

aliasURNs string

a list of additional URNs that should be considered the same.

importId string

if set, this resource’s state should be imported from the given ID.

customTimeouts RegisterResourceRequest.CustomTimeouts

ability to pass a custom Timeout block.

deleteBeforeReplaceDefined bool

true if the deleteBeforeReplace property should be treated as defined even if it is false.

supportsPartialValues bool

true if the request is from an SDK that supports partially-known properties during preview.

remote bool

true if the resource is a plugin-managed component resource.

acceptResources bool

when true operations should return resource references as strongly typed.

providers RegisterResourceRequest.ProvidersEntry

an optional reference to the provider map to manage this resource’s CRUD operations.

replaceOnChanges string

a list of properties that if changed should force a replacement.

pluginDownloadURL string

the server URL of the provider to use when servicing this request.

pluginChecksums RegisterResourceRequest.PluginChecksumsEntry

a map of checksums expected for the provider plugin.

retainOnDelete bool

if true the engine will not call the resource providers delete method for this resource.

aliases Alias

a list of additional aliases that should be considered the same.

deletedWith string

if set the engine will not call the resource providers delete method for this resource when specified resource is deleted.

replace_with string

if set the engine will replace this resource when any of the specified resources are replaced.

replacement_trigger google.protobuf.Value

if set, the engine will diff this with the last recorded value, and trigger a replace if they are not equal.

aliasSpecs bool

Indicates that alias specs are specified correctly according to the spec. Older versions of the Node.js SDK did not send alias specs correctly. If this is not set to true and the engine detects the request is from the Node.js runtime, the engine will transform incorrect alias specs into correct ones. Other SDKs that are correctly specifying alias specs could set this to true, but it’s not necessary.

sourcePosition SourcePosition

the optional source position of the user code that initiated the register.

stackTrace StackTrace

the optional stack trace at the time of the request.

parentStackTraceHandle string

the optional parent stack trace handle for the request. Supports stitching stack traces across plugins.

transforms Callback

a list of transforms to apply to the resource before registering it.

supportsResultReporting bool

true if the request is from an SDK that supports the result field in the response.

packageRef string

a reference from RegisterPackageRequest.

hooks RegisterResourceRequest.ResourceHooksBinding

The resource hooks that should run at certain points in the resource’s lifecycle.

hideDiffs string

<No description>

envVarMappings RegisterResourceRequest.EnvVarMappingsEntry

environment variable remappings for provider resources (NEW_KEY -> OLD_KEY)

πŸ“¨ CustomTimeouts#

CustomTimeouts allows a user to be able to create a set of custom timeout parameters.

create string

The create resource timeout represented as a string e.g. 5m.

update string

The update resource timeout represented as a string e.g. 5m.

delete string

The delete resource timeout represented as a string e.g. 5m.

πŸ“¨ EnvVarMappingsEntry#

key string

<No description>

value string

<No description>

πŸ“¨ PluginChecksumsEntry#

key string

<No description>

value bytes

<No description>

πŸ“¨ PropertyDependencies#

PropertyDependencies describes the resources that a particular property depends on.

urns string

A list of URNs this property depends on.

πŸ“¨ PropertyDependenciesEntry#

key string

<No description>

value RegisterResourceRequest.PropertyDependencies

<No description>

πŸ“¨ ProvidersEntry#

key string

<No description>

value string

<No description>

πŸ“¨ ResourceHooksBinding#

before_create string

<No description>

after_create string

<No description>

before_update string

<No description>

after_update string

<No description>

before_delete string

<No description>

after_delete string

<No description>

on_error string

<No description>

πŸ“¨ RegisterResourceResponse#

RegisterResourceResponse is returned by the engine after a resource has finished being initialized. It includes the auto-assigned URN, the provider-assigned ID, and any other properties initialized by the engine.

urn string

the URN assigned by the engine.

id string

the unique ID assigned by the provider.

object google.protobuf.Struct

the resulting object properties, including provider defaults.

stable bool

if true, the object’s state is stable and may be trusted not to change.

stables string

an optional list of guaranteed-stable properties.

propertyDependencies RegisterResourceResponse.PropertyDependenciesEntry

a map from property keys to the dependencies of the property.

result Result

the reason, whether the resource registration was successful, failed, or skipped.

πŸ“¨ PropertyDependencies#

PropertyDependencies describes the resources that a particular property depends on.

urns string

A list of URNs this property depends on.

πŸ“¨ PropertyDependenciesEntry#

key string

<No description>

value RegisterResourceResponse.PropertyDependencies

<No description>

πŸ“¨ ResourceCallRequest#

tok string

the function token to invoke.

args google.protobuf.Struct

the arguments for the function invocation.

argDependencies ResourceCallRequest.ArgDependenciesEntry

a map from argument keys to the dependencies of the argument.

provider string

an optional reference to the provider to use for this invoke.

version string

the version of the provider to use when servicing this request.

pluginDownloadURL string

the pluginDownloadURL of the provider to use when servicing this request.

pluginChecksums ResourceCallRequest.PluginChecksumsEntry

a map of checksums of the provider to use when servicing this request.

sourcePosition SourcePosition

the optional source position of the user code that initiated the call.

stackTrace StackTrace

the optional stack trace at the time of the request.

parentStackTraceHandle string

the optional parent stack trace handle for the request. Supports stitching stack traces across plugins.

packageRef string

a reference from RegisterPackageRequest.

πŸ“¨ ArgDependenciesEntry#

key string

<No description>

value ResourceCallRequest.ArgumentDependencies

<No description>

πŸ“¨ ArgumentDependencies#

ArgumentDependencies describes the resources that a particular argument depends on.

urns string

A list of URNs this argument depends on.

πŸ“¨ PluginChecksumsEntry#

key string

<No description>

value bytes

<No description>

πŸ“¨ ResourceHookRequest#

ResourceHookRequest is the request object for resource hook callbacks in CallbackInvokeRequest.

urn string

the urn of the resource for which the hook is called.

id string

the optional urn of the resource for which the hook is called.

name string

the name of the resource for which the hook is called.

type string

the type of the resource for which the hook is called.

new_inputs google.protobuf.Struct

the optional checked new inputs of the resource.

old_inputs google.protobuf.Struct

the optional checked old inputs of the resource.

new_outputs google.protobuf.Struct

the optional new outputs of the resource.

old_outputs google.protobuf.Struct

the optional old outputs of the resource.

πŸ“¨ ResourceHookResponse#

ResourceHookResponse is the response object for resource hook callbacks in CallbackInvokeResponse.

error string

an optional error message to return from the hook.

πŸ“¨ ResourceInvokeRequest#

tok string

the function token to invoke.

args google.protobuf.Struct

the arguments for the function invocation.

provider string

an optional reference to the provider version to use for this invoke.

version string

the version of the provider to use when servicing this request.

acceptResources bool

when true operations should return resource references as strongly typed.

pluginDownloadURL string

an optional reference to the provider url to use for this invoke.

pluginChecksums ResourceInvokeRequest.PluginChecksumsEntry

a map of checksums expected for the provider plugin.

sourcePosition SourcePosition

the optional source position of the user code that initiated the invoke.

stackTrace StackTrace

the optional stack trace at the time of the request.

parentStackTraceHandle string

the optional parent stack trace handle for the request. Supports stitching stack traces across plugins.

packageRef string

a reference from RegisterPackageRequest.

πŸ“¨ PluginChecksumsEntry#

key string

<No description>

value bytes

<No description>

πŸ“¨ SupportsFeatureRequest#

SupportsFeatureRequest allows a client to test if the resource monitor supports a certain feature, which it may use to control the format or types of messages it sends.

id string

the ID of the feature to test support for.

πŸ“¨ SupportsFeatureResponse#

hasSupport bool

true when the resource monitor supports this feature.

πŸ“¨ TransformInvokeOptions#

TransformInvokeOptions is a subset of all invoke options that are relevant to transforms.

provider string

<No description>

plugin_download_url string

<No description>

version string

<No description>

plugin_checksums TransformInvokeOptions.PluginChecksumsEntry

<No description>

πŸ“¨ PluginChecksumsEntry#

key string

<No description>

value bytes

<No description>

πŸ“¨ TransformInvokeRequest#

TransformInvokeRequest is the request object for the TransformInvoke RPC.

token string

the token for the invoke request.

args google.protobuf.Struct

the input args of the resource.

options TransformInvokeOptions

the options for the resource.

πŸ“¨ TransformInvokeResponse#

TransformInvokeResponse is the response object for the TransformInvoke RPC.

args google.protobuf.Struct

the transformed input args.

options TransformInvokeOptions

the options for the resource.

πŸ“¨ TransformRequest#

type string

the type of the resource.

name string

the name of the resource.

custom bool

true if the resource is a custom resource, else it’s a component resource.

parent string

the parent of the resource, this can’t be changed by the transform.

properties google.protobuf.Struct

the input properties of the resource.

options TransformResourceOptions

the options for the resource.

πŸ“¨ TransformResourceOptions#

TransformResourceOptions is a subset of all resource options that are relevant to transforms.

depends_on string

<No description>

protect bool

<No description>

ignore_changes string

<No description>

replace_on_changes string

<No description>

version string

<No description>

aliases Alias

<No description>

provider string

<No description>

custom_timeouts RegisterResourceRequest.CustomTimeouts

<No description>

plugin_download_url string

<No description>

retain_on_delete bool

<No description>

deleted_with string

<No description>

delete_before_replace bool

<No description>

additional_secret_outputs string

<No description>

providers TransformResourceOptions.ProvidersEntry

<No description>

plugin_checksums TransformResourceOptions.PluginChecksumsEntry

<No description>

hooks RegisterResourceRequest.ResourceHooksBinding

<No description>

import string

<No description>

hide_diff string

<No description>

replace_with string

<No description>

replacement_trigger google.protobuf.Value

<No description>

πŸ“¨ PluginChecksumsEntry#

key string

<No description>

value bytes

<No description>

πŸ“¨ ProvidersEntry#

key string

<No description>

value string

<No description>

πŸ“¨ TransformResponse#

properties google.protobuf.Struct

the transformed input properties.

options TransformResourceOptions

the options for the resource.