Provider represents an object that implements the resources and functions for a particular Pulumi package.

interface Provider {
    call?: ((token, inputs) => Promise<InvokeResult>);
    check?: ((urn, olds, news) => Promise<provider.CheckResult>);
    construct?: ((name, type, inputs, options) => Promise<ConstructResult>);
    create?: ((urn, inputs) => Promise<provider.CreateResult>);
    delete?: ((id, urn, props) => Promise<void>);
    diff?: ((id, urn, olds, news) => Promise<provider.DiffResult>);
    getSchema?: (() => Promise<string>);
    invoke?: ((token, inputs) => Promise<InvokeResult>);
    parameterizeArgs?: ((args) => Promise<ParameterizeResult>);
    parameterizeValue?: ((name, version, value) => Promise<ParameterizeResult>);
    read?: ((id, urn, props?) => Promise<provider.ReadResult>);
    schema?: string;
    update?: ((id, urn, olds, news) => Promise<provider.UpdateResult>);
    version?: string;
}

Properties

call?: ((token, inputs) => Promise<InvokeResult>)

Calls the indicated method.

Type declaration

    • (token, inputs): Promise<InvokeResult>
    • Parameters

      • token: string

        The token of the method to call.

      • inputs: Inputs

        The inputs to the method.

      Returns Promise<InvokeResult>

check?: ((urn, olds, news) => Promise<provider.CheckResult>)

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

Type declaration

    • (urn, olds, news): Promise<provider.CheckResult>
    • Parameters

      • urn: string
      • olds: any

        The old input properties to use for validation.

      • news: any

        The new input properties to use for validation.

      Returns Promise<provider.CheckResult>

construct?: ((name, type, inputs, options) => Promise<ConstructResult>)

Creates a new component resource.

Type declaration

create?: ((urn, inputs) => Promise<provider.CreateResult>)

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 "transactional").

Type declaration

delete?: ((id, urn, props) => Promise<void>)

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

Type declaration

    • (id, urn, props): Promise<void>
    • Parameters

      • id: string

        The ID of the resource to delete.

      • urn: string
      • props: any

        The current properties on the resource.

      Returns Promise<void>

diff?: ((id, urn, olds, news) => Promise<provider.DiffResult>)

Checks what impacts a hypothetical update will have on the resource's properties.

Type declaration

    • (id, urn, olds, news): Promise<provider.DiffResult>
    • Parameters

      • id: string

        The ID of the resource to diff.

      • urn: string
      • olds: any

        The old values of properties to diff.

      • news: any

        The new values of properties to diff.

      Returns Promise<provider.DiffResult>

getSchema?: (() => Promise<string>)

Gets the JSON-encoded schema for this provider's package. Implementations can lazily load or generate the schema when needed.

Type declaration

    • (): Promise<string>
    • Returns Promise<string>

Returns

A promise that resolves to the JSON-encoded schema string.

invoke?: ((token, inputs) => Promise<InvokeResult>)

Calls the indicated function.

Type declaration

    • (token, inputs): Promise<InvokeResult>
    • Parameters

      • token: string

        The token of the function to call.

      • inputs: any

        The inputs to the function.

      Returns Promise<InvokeResult>

parameterizeArgs?: ((args) => Promise<ParameterizeResult>)

Parameterizes a sub-package.

Type declaration

    • (args): Promise<ParameterizeResult>
    • Parameters

      • args: string[]

        A parameter value, represented as an array of strings, as might be provided by a command-line invocation, such as that used to generate an SDK.

      Returns Promise<ParameterizeResult>

parameterizeValue?: ((name, version, value) => Promise<ParameterizeResult>)

Parameterizes a sub-package.

Type declaration

    • (name, version, value): Promise<ParameterizeResult>
    • Parameters

      • name: string

        The sub-package name for this sub-schema parameterization.

      • version: string

        The sub-package version for this sub-schema parameterization.

      • value: string

        The embedded value from the sub-package.

      Returns Promise<ParameterizeResult>

read?: ((id, urn, props?) => Promise<provider.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.

Type declaration

schema?: string

The JSON-encoded schema for this provider's package.

update?: ((id, urn, olds, news) => Promise<provider.UpdateResult>)

Update updates an existing resource with new values.

Type declaration

    • (id, urn, olds, news): Promise<provider.UpdateResult>
    • Parameters

      • id: string

        The ID of the resource to update.

      • urn: string
      • olds: any

        The old values of properties to update.

      • news: any

        The new values of properties to update.

      Returns Promise<provider.UpdateResult>

version?: string

The version of the provider. Must be valid semver.

Generated using TypeDoc