@pulumi/pulumi - v3.251.0
    Preparing search index...

    Interface Provider

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

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

    Properties

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

    Calls the indicated method.

    Type Declaration

    cancel?: () => Promise<void>

    Signals the provider to gracefully shut down and abort any ongoing operations.

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

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

    Type Declaration

      • (urn: string, olds: any, news: any): 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: string,
        type: string,
        inputs: Inputs,
        options: ComponentResourceOptions,
    ) => Promise<ConstructResult>

    Creates a new component resource.

    Type Declaration

    create?: (urn: string, inputs: any) => 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: string, urn: string, props: any) => Promise<void>

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

    Type Declaration

      • (id: string, urn: string, props: any): 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: string,
        urn: string,
        olds: any,
        news: any,
    ) => Promise<provider.DiffResult>

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

    Type Declaration

      • (id: string, urn: string, olds: any, news: any): 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>

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

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

    Calls the indicated function.

    Type Declaration

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

        • token: string

          The token of the function to call.

        • inputs: any

          The inputs to the function.

        Returns Promise<InvokeResult>

    parameterizeArgs?: (args: string[]) => Promise<ParameterizeResult>

    Parameterizes a sub-package.

    Type Declaration

      • (args: string[]): 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: string,
        version: string,
        value: string,
    ) => Promise<ParameterizeResult>

    Parameterizes a sub-package.

    Type Declaration

      • (name: string, version: string, value: string): 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: string, urn: string, props?: any) => 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.

    schema?: string

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

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

    Update updates an existing resource with new values.

    Type Declaration

      • (id: string, urn: string, olds: any, news: any): 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.